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

Unified Diff: src/js/math.js

Issue 1407213002: Implement Math.tanh using fdlibm port. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: delete the actual old implementation 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 | « no previous file | src/third_party/fdlibm/fdlibm.js » ('j') | src/third_party/fdlibm/fdlibm.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/math.js
diff --git a/src/js/math.js b/src/js/math.js
index 1a9a349b25979f6d79951f679671225c7b726d9c..071566ff014150d4fd9c5e051dfa598053bef89c 100644
--- a/src/js/math.js
+++ b/src/js/math.js
@@ -182,18 +182,6 @@ function MathTrunc(x) {
return x;
}
-// ES6 draft 09-27-13, section 20.2.2.33.
-function MathTanh(x) {
- x = TO_NUMBER(x);
- // Idempotent for +/-0.
- if (x === 0) return x;
- // Returns +/-1 for +/-Infinity.
- if (!NUMBER_IS_FINITE(x)) return MathSign(x);
- var exp1 = MathExp(x);
- var exp2 = MathExp(-x);
- return (exp1 - exp2) / (exp1 + exp2);
-}
-
// ES6 draft 09-27-13, section 20.2.2.5.
function MathAsinh(x) {
x = TO_NUMBER(x);
@@ -329,7 +317,6 @@ utils.InstallFunctions(GlobalMath, DONT_ENUM, [
"imul", MathImul,
"sign", MathSign,
"trunc", MathTrunc,
- "tanh", MathTanh,
"asinh", MathAsinh,
"acosh", MathAcosh,
"atanh", MathAtanh,
« no previous file with comments | « no previous file | src/third_party/fdlibm/fdlibm.js » ('j') | src/third_party/fdlibm/fdlibm.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698