js/src/tests/ecma_6/Math/tanh-exact.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:9347b9d9615d
1 // Properties of Math.tanh that are guaranteed by the spec.
2
3 // If x is NaN, the result is NaN.
4 assertEq(Math.tanh(NaN), NaN);
5
6 // If x is +0, the result is +0.
7 assertEq(Math.tanh(+0), +0);
8
9 // If x is −0, the result is −0.
10 assertEq(Math.tanh(-0), -0);
11
12 // If x is +∞, the result is +1.
13 assertEq(Math.tanh(Number.POSITIVE_INFINITY), +1);
14
15 // If x is −∞, the result is -1.
16 assertEq(Math.tanh(Number.NEGATIVE_INFINITY), -1);
17
18
19 reportCompare(0, 0, "ok");

mercurial