Index: src/harmony-math.js |
diff --git a/src/harmony-math.js b/src/harmony-math.js |
index d57a10404259eec07094930e61fd161fb58c6428..ee426ef1191f417b2178b17581c1a516704ecaab 100644 |
--- a/src/harmony-math.js |
+++ b/src/harmony-math.js |
@@ -59,8 +59,7 @@ function MathSinh(x) { |
// ES6 draft 09-27-13, section 20.2.2.12. |
function MathCosh(x) { |
if (!IS_NUMBER(x)) x = NonNumberToNumber(x); |
- // Idempotent for NaN and +/-Infinity. |
- if (!NUMBER_IS_FINITE(x)) return x; |
+ if (!NUMBER_IS_FINITE(x)) return MathAbs(x); |
return (MathExp(x) + MathExp(-x)) / 2; |
} |