Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: third_party/fdlibm/fdlibm.cc

Issue 522723002: Port fdlibm implementation for Math.cosh. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/es6/math-hyperbolic.js ('k') | third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // The following is adapted from fdlibm (http://www.netlib.org/fdlibm). 1 // The following is adapted from fdlibm (http://www.netlib.org/fdlibm).
2 // 2 //
3 // ==================================================== 3 // ====================================================
4 // Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 // Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 // 5 //
6 // Developed at SunSoft, a Sun Microsystems, Inc. business. 6 // Developed at SunSoft, a Sun Microsystems, Inc. business.
7 // Permission to use, copy, modify, and distribute this 7 // Permission to use, copy, modify, and distribute this
8 // software is freely granted, provided that this notice 8 // software is freely granted, provided that this notice
9 // is preserved. 9 // is preserved.
10 // ==================================================== 10 // ====================================================
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 1.818357216161805012e-01, // 42 72 1.818357216161805012e-01, // 42
73 1.531383769920937332e-01, // 43 73 1.531383769920937332e-01, // 43
74 1.479819860511658591e-01, // LP7 44 74 1.479819860511658591e-01, // LP7 44
75 7.09782712893383973096e+02, // 45 overflow threshold for expm1 75 7.09782712893383973096e+02, // 45 overflow threshold for expm1
76 1.44269504088896338700e+00, // 1/ln2 46 76 1.44269504088896338700e+00, // 1/ln2 46
77 -3.33333333333331316428e-02, // Q1 47 coefficients for expm1 77 -3.33333333333331316428e-02, // Q1 47 coefficients for expm1
78 1.58730158725481460165e-03, // 48 78 1.58730158725481460165e-03, // 48
79 -7.93650757867487942473e-05, // 49 79 -7.93650757867487942473e-05, // 49
80 4.00821782732936239552e-06, // 50 80 4.00821782732936239552e-06, // 50
81 -2.01099218183624371326e-07, // Q5 51 81 -2.01099218183624371326e-07, // Q5 51
82 710.4758600739439 // 52 overflow threshold for sinh 82 710.4758600739439 // 52 overflow threshold sinh, cosh
83 }; 83 };
84 84
85 85
86 // Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi 86 // Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
87 static const int two_over_pi[] = { 87 static const int two_over_pi[] = {
88 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C, 88 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C,
89 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, 0x424DD2, 0xE00649, 89 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, 0x424DD2, 0xE00649,
90 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 0xA73EE8, 0x8235F5, 0x2EBB44, 90 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 0xA73EE8, 0x8235F5, 0x2EBB44,
91 0x84E99C, 0x7026B4, 0x5F7E41, 0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 91 0x84E99C, 0x7026B4, 0x5F7E41, 0x3991D6, 0x398353, 0x39F49C, 0x845F8B,
92 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 92 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 int n = __kernel_rem_pio2(tx, y, e0, nx); 272 int n = __kernel_rem_pio2(tx, y, e0, nx);
273 if (hx < 0) { 273 if (hx < 0) {
274 y[0] = -y[0]; 274 y[0] = -y[0];
275 y[1] = -y[1]; 275 y[1] = -y[1];
276 return -n; 276 return -n;
277 } 277 }
278 return n; 278 return n;
279 } 279 }
280 } 280 }
281 } // namespace v8::internal 281 } // namespace v8::internal
OLDNEW
« no previous file with comments | « test/mjsunit/es6/math-hyperbolic.js ('k') | third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698