OLD | NEW |
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 // ==================================================== |
11 // | 11 // |
12 // The original source code covered by the above license above has been | 12 // The original source code covered by the above license above has been |
13 // modified significantly by Google Inc. | 13 // modified significantly by Google Inc. |
14 // Copyright 2014 the V8 project authors. All rights reserved. | 14 // Copyright 2014 the V8 project authors. All rights reserved. |
15 | 15 |
16 #include "src/v8.h" | |
17 | |
18 #include "src/double.h" | |
19 #include "src/third_party/fdlibm/fdlibm.h" | 16 #include "src/third_party/fdlibm/fdlibm.h" |
20 | 17 |
| 18 #include <stdint.h> |
| 19 #include <cmath> |
| 20 #include <limits> |
| 21 |
| 22 #include "src/base/macros.h" |
| 23 #include "src/double.h" |
21 | 24 |
22 namespace v8 { | 25 namespace v8 { |
23 namespace fdlibm { | 26 namespace fdlibm { |
24 | 27 |
25 #ifdef _MSC_VER | 28 #ifdef _MSC_VER |
26 inline double scalbn(double x, int y) { return _scalb(x, y); } | 29 inline double scalbn(double x, int y) { return _scalb(x, y); } |
27 #endif // _MSC_VER | 30 #endif // _MSC_VER |
28 | 31 |
29 const double MathConstants::constants[] = { | 32 const double MathConstants::constants[] = { |
30 6.36619772367581382433e-01, // invpio2 0 | 33 6.36619772367581382433e-01, // invpio2 0 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 int n = __kernel_rem_pio2(tx, y, e0, nx); | 288 int n = __kernel_rem_pio2(tx, y, e0, nx); |
286 if (hx < 0) { | 289 if (hx < 0) { |
287 y[0] = -y[0]; | 290 y[0] = -y[0]; |
288 y[1] = -y[1]; | 291 y[1] = -y[1]; |
289 return -n; | 292 return -n; |
290 } | 293 } |
291 return n; | 294 return n; |
292 } | 295 } |
293 } // namespace internal | 296 } // namespace internal |
294 } // namespace v8 | 297 } // namespace v8 |
OLD | NEW |