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

Unified Diff: src/third_party/fdlibm/fdlibm.js

Issue 1404943002: Use import/export for more functions (instead of js builtins object). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « src/js/weak-collection.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/third_party/fdlibm/fdlibm.js
diff --git a/src/third_party/fdlibm/fdlibm.js b/src/third_party/fdlibm/fdlibm.js
index a8935565b7820dd77181bdecdb839b12e0670e3a..d89f69b5f5900fe76adfeb69e25be89d84f641aa 100644
--- a/src/third_party/fdlibm/fdlibm.js
+++ b/src/third_party/fdlibm/fdlibm.js
@@ -36,9 +36,9 @@ var rempio2result;
// Imports
var GlobalMath = global.Math;
-
var MathAbs;
var MathExp;
+var NaN = %GetRootNaN();
utils.Import(function(from) {
MathAbs = from.MathAbs;
@@ -476,7 +476,7 @@ function MathLog1p(x) {
if (x === -1) {
return -INFINITY; // log1p(-1) = -inf
} else {
- return NAN; // log1p(x<-1) = NaN
+ return NaN; // log1p(x<-1) = NaN
}
} else if (ax < 0x3c900000) {
// For |x| < 2^-54 we can return x.
@@ -492,7 +492,7 @@ function MathLog1p(x) {
}
}
- // Handle Infinity and NAN
+ // Handle Infinity and NaN
if (hx >= 0x7ff00000) return x;
if (k !== 0) {
@@ -885,7 +885,7 @@ function MathLog10(x) {
// log10(+/- 0) = -Infinity.
if (((hx & 0x7fffffff) | lx) === 0) return -INFINITY;
// log10 of negative number is NaN.
- if (hx < 0) return NAN;
+ if (hx < 0) return NaN;
// Subnormal number. Scale up x.
k -= 54;
x *= TWO54;
@@ -947,7 +947,7 @@ function MathLog2(x) {
if ((ix | lx) == 0) return -INFINITY;
// log(x) = NaN, if x < 0
- if (hx < 0) return NAN;
+ if (hx < 0) return NaN;
// log2(Infinity) = Infinity, log2(NaN) = NaN
if (ix >= 0x7ff00000) return x;
« no previous file with comments | « src/js/weak-collection.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698