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

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

Issue 2070813002: Revert of [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/runtime/runtime-maths.cc ('k') | src/v8.cc » ('j') | 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 935b777b316cf47ad82d679104bb99be22ad1211..b9c9b3375f587cee21836ebfb5eccd289030d6fa 100644
--- a/src/third_party/fdlibm/fdlibm.js
+++ b/src/third_party/fdlibm/fdlibm.js
@@ -31,11 +31,13 @@
var GlobalFloat64Array = global.Float64Array;
var GlobalMath = global.Math;
var MathAbs;
+var MathExp;
var NaN = %GetRootNaN();
var rempio2result;
utils.Import(function(from) {
MathAbs = from.MathAbs;
+ MathExp = from.MathExp;
});
utils.CreateDoubleResultArray = function(global) {
@@ -632,11 +634,11 @@
return h * (t + t / (t + 1));
}
// |x| in [22, log(maxdouble)], return 0.5 * exp(|x|)
- if (ax < LOG_MAXD) return h * %math_exp(ax);
+ if (ax < LOG_MAXD) return h * MathExp(ax);
// |x| in [log(maxdouble), overflowthreshold]
// overflowthreshold = 710.4758600739426
if (ax <= KSINH_OVERFLOW) {
- var w = %math_exp(0.5 * ax);
+ var w = MathExp(0.5 * ax);
var t = h * w;
return t * w;
}
@@ -682,14 +684,14 @@
}
// |x| in [0.5*log2, 22], return (exp(|x|)+1/exp(|x|)/2
if (ix < 0x40360000) {
- var t = %math_exp(MathAbs(x));
+ var t = MathExp(MathAbs(x));
return 0.5 * t + 0.5 / t;
}
// |x| in [22, log(maxdouble)], return half*exp(|x|)
- if (ix < 0x40862e42) return 0.5 * %math_exp(MathAbs(x));
+ if (ix < 0x40862e42) return 0.5 * MathExp(MathAbs(x));
// |x| in [log(maxdouble), overflowthreshold]
if (MathAbs(x) <= KCOSH_OVERFLOW) {
- var w = %math_exp(0.5 * MathAbs(x));
+ var w = MathExp(0.5 * MathAbs(x));
var t = 0.5 * w;
return t * w;
}
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698