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

Unified Diff: src/math.js

Issue 488003005: Port fdlibm implementation for Math.sinh. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added TODO Created 6 years, 4 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 | test/mjsunit/es6/math-hyperbolic.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/math.js
diff --git a/src/math.js b/src/math.js
index 7ead7a861efe20c82dcb70c736ee1ee82305bc21..008a41ee55b2db74f7a522957e471f38990204d2 100644
--- a/src/math.js
+++ b/src/math.js
@@ -186,14 +186,6 @@ function MathTrunc(x) {
return x;
}
-// ES6 draft 09-27-13, section 20.2.2.30.
-function MathSinh(x) {
- if (!IS_NUMBER(x)) x = NonNumberToNumber(x);
- // Idempotent for NaN, +/-0 and +/-Infinity.
- if (x === 0 || !NUMBER_IS_FINITE(x)) return x;
- return (MathExp(x) - MathExp(-x)) / 2;
-}
-
// ES6 draft 09-27-13, section 20.2.2.12.
function MathCosh(x) {
if (!IS_NUMBER(x)) x = NonNumberToNumber(x);
@@ -376,7 +368,7 @@ function SetUpMath() {
"imul", MathImul,
"sign", MathSign,
"trunc", MathTrunc,
- "sinh", MathSinh,
+ "sinh", MathSinh, // implemented by third_party/fdlibm
"cosh", MathCosh,
"tanh", MathTanh,
"asinh", MathAsinh,
« no previous file with comments | « no previous file | test/mjsunit/es6/math-hyperbolic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698