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

Unified Diff: src/rempio2.cc

Issue 305403002: fdlibm: reduce accuracy slightly in favor of performance. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« src/math.js ('K') | « src/math.js ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/rempio2.cc
diff --git a/src/rempio2.cc b/src/rempio2.cc
index 9d45bf364e5ef09197e44b6e3ff61772c7dd9390..dbbd8f0b00d6dc7ad7d9c5a7c8483bbc017249f0 100644
--- a/src/rempio2.cc
+++ b/src/rempio2.cc
@@ -178,10 +178,7 @@ int __kernel_rem_pio2(double* x, double* y, int e0, int nx) {
fw = 0.0;
for (int i = jz; i >= 0; i--) fw += fq[i];
- y[0] = (ih == 0) ? fw : -fw;
- fw = fq[0] - fw;
- for (int i = 1; i <= jz; i++) fw += fq[i];
- y[1] = (ih == 0) ? fw : -fw;
+ *y = (ih == 0) ? fw : -fw;
return n & 7;
}
@@ -208,8 +205,7 @@ int rempio2(double x, double* y) {
while (tx[nx - 1] == zero) nx--;
int n = __kernel_rem_pio2(tx, y, e0, nx);
if (hx < 0) {
- y[0] = -y[0];
- y[1] = -y[1];
+ *y = -*y;
return -n;
}
return n;
« src/math.js ('K') | « src/math.js ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698