michael@0: // Properties of Math.log10 that are guaranteed by the spec. michael@0: michael@0: // If x is NaN, the result is NaN. michael@0: assertEq(Math.log10(NaN), NaN); michael@0: michael@0: // If x is less than 0, the result is NaN. michael@0: assertEq(Math.log10(-1e-10), NaN); michael@0: assertEq(Math.log10(-1e-5), NaN); michael@0: assertEq(Math.log10(-1e-1), NaN); michael@0: assertEq(Math.log10(-Number.MIN_VALUE), NaN); michael@0: assertEq(Math.log10(-Number.MAX_VALUE), NaN); michael@0: assertEq(Math.log10(-Infinity), NaN); michael@0: michael@0: for (var i = -1; i > -10; i--) michael@0: assertEq(Math.log10(i), NaN); michael@0: michael@0: // If x is +0, the result is −∞. michael@0: assertEq(Math.log10(+0), -Infinity); michael@0: michael@0: // If x is −0, the result is −∞. michael@0: assertEq(Math.log10(-0), -Infinity); michael@0: michael@0: // If x is 1, the result is +0. michael@0: assertEq(Math.log10(1), +0); michael@0: michael@0: // If x is +∞, the result is +∞. michael@0: assertEq(Math.log10(Infinity), Infinity); michael@0: michael@0: michael@0: reportCompare(0, 0, 'ok');