Chromium Code Reviews| Index: src/third_party/fdlibm/fdlibm.js |
| diff --git a/src/third_party/fdlibm/fdlibm.js b/src/third_party/fdlibm/fdlibm.js |
| index ceeacc59bbf313b850035dcd35c1feb5f97e0362..072cb6dbaf08ac98070d82446ce235cf165adb4e 100644 |
| --- a/src/third_party/fdlibm/fdlibm.js |
| +++ b/src/third_party/fdlibm/fdlibm.js |
| @@ -24,6 +24,7 @@ |
| "use strict"; |
| var kMath; |
| +var rempio2result; |
|
Sven Panne
2015/02/06 07:37:28
Extend the comment above.
|
| const INVPIO2 = kMath[0]; |
| const PIO2_1 = kMath[1]; |
| @@ -38,6 +39,7 @@ const PIO4LO = kMath[33]; |
| // Compute k and r such that x - k*pi/2 = r where |r| < pi/4. For |
| // precision, r is returned as two values y0 and y1 such that r = y0 + y1 |
| // to more than double precision. |
| + |
| macro REMPIO2(X) |
| var n, y0, y1; |
| var hx = %_DoubleHi(X); |
| @@ -105,10 +107,9 @@ macro REMPIO2(X) |
| } |
| } else { |
| // Need to do full Payne-Hanek reduction here. |
| - var r = %RemPiO2(X); |
| - n = r[0]; |
| - y0 = r[1]; |
| - y1 = r[2]; |
| + n = %RemPiO2(X, rempio2result); |
| + y0 = rempio2result[0]; |
| + y1 = rempio2result[1]; |
| } |
| endmacro |