1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/ecma_6/Math/tanh-exact.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,19 @@ 1.4 +// Properties of Math.tanh that are guaranteed by the spec. 1.5 + 1.6 +// If x is NaN, the result is NaN. 1.7 +assertEq(Math.tanh(NaN), NaN); 1.8 + 1.9 +// If x is +0, the result is +0. 1.10 +assertEq(Math.tanh(+0), +0); 1.11 + 1.12 +// If x is −0, the result is −0. 1.13 +assertEq(Math.tanh(-0), -0); 1.14 + 1.15 +// If x is +∞, the result is +1. 1.16 +assertEq(Math.tanh(Number.POSITIVE_INFINITY), +1); 1.17 + 1.18 +// If x is −∞, the result is -1. 1.19 +assertEq(Math.tanh(Number.NEGATIVE_INFINITY), -1); 1.20 + 1.21 + 1.22 +reportCompare(0, 0, "ok");