michael@0: // Properties of Math.tanh that are guaranteed by the spec. michael@0: michael@0: // If x is NaN, the result is NaN. michael@0: assertEq(Math.tanh(NaN), NaN); michael@0: michael@0: // If x is +0, the result is +0. michael@0: assertEq(Math.tanh(+0), +0); michael@0: michael@0: // If x is −0, the result is −0. michael@0: assertEq(Math.tanh(-0), -0); michael@0: michael@0: // If x is +∞, the result is +1. michael@0: assertEq(Math.tanh(Number.POSITIVE_INFINITY), +1); michael@0: michael@0: // If x is −∞, the result is -1. michael@0: assertEq(Math.tanh(Number.NEGATIVE_INFINITY), -1); michael@0: michael@0: michael@0: reportCompare(0, 0, "ok");