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

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

Issue 2077533002: [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Import tests from Raymond. 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
Index: src/third_party/fdlibm/fdlibm.js
diff --git a/src/third_party/fdlibm/fdlibm.js b/src/third_party/fdlibm/fdlibm.js
index b9c9b3375f587cee21836ebfb5eccd289030d6fa..935b777b316cf47ad82d679104bb99be22ad1211 100644
--- a/src/third_party/fdlibm/fdlibm.js
+++ b/src/third_party/fdlibm/fdlibm.js
@@ -31,13 +31,11 @@
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) {
@@ -634,11 +632,11 @@ function MathSinh(x) {
return h * (t + t / (t + 1));
}
// |x| in [22, log(maxdouble)], return 0.5 * exp(|x|)
- if (ax < LOG_MAXD) return h * MathExp(ax);
+ if (ax < LOG_MAXD) return h * %math_exp(ax);
// |x| in [log(maxdouble), overflowthreshold]
// overflowthreshold = 710.4758600739426
if (ax <= KSINH_OVERFLOW) {
- var w = MathExp(0.5 * ax);
+ var w = %math_exp(0.5 * ax);
var t = h * w;
return t * w;
}
@@ -684,14 +682,14 @@ function MathCosh(x) {
}
// |x| in [0.5*log2, 22], return (exp(|x|)+1/exp(|x|)/2
if (ix < 0x40360000) {
- var t = MathExp(MathAbs(x));
+ var t = %math_exp(MathAbs(x));
return 0.5 * t + 0.5 / t;
}
// |x| in [22, log(maxdouble)], return half*exp(|x|)
- if (ix < 0x40862e42) return 0.5 * MathExp(MathAbs(x));
+ if (ix < 0x40862e42) return 0.5 * %math_exp(MathAbs(x));
// |x| in [log(maxdouble), overflowthreshold]
if (MathAbs(x) <= KCOSH_OVERFLOW) {
- var w = MathExp(0.5 * MathAbs(x));
+ var w = %math_exp(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') | test/unittests/base/ieee754-unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698