michael@0: michael@0: assertEq(Math.pow(100, 2), 10000); michael@0: assertEq(Math.pow(-Infinity, -0.5), 0); michael@0: assertEq(Math.pow(-Infinity, 0.5), Infinity); michael@0: assertEq(Math.pow(Infinity, -0.5), 0); michael@0: assertEq(Math.pow(Infinity, 0.5), Infinity); michael@0: assertEq(Math.pow(NaN, -0.5), NaN); michael@0: assertEq(Math.pow(NaN, 0.5), NaN); michael@0: assertEq(Math.pow(-3.14, -0.5), NaN); michael@0: assertEq(Math.pow(-1.23, 0.5), NaN); michael@0: assertEq(Math.pow(-0, -0.5), Infinity); michael@0: assertEq(Math.pow(-0, 0.5), 0); michael@0: assertEq(Math.pow(-1, -0.5), NaN); michael@0: assertEq(Math.pow(-1, 0.5), NaN); michael@0: assertEq(Math.pow(0, -0.5), Infinity); michael@0: assertEq(Math.pow(0, 0.5), 0); michael@0: assertEq(Math.pow(1, -0.5), 1); michael@0: assertEq(Math.pow(1, 0.5), 1); michael@0: assertEq(Math.pow(100, -0.5), 0.1); michael@0: assertEq(Math.pow(100, 0.5), 10); michael@0: michael@0: /* Inferred as pow(double, double). */ michael@0: function pow1(x) { michael@0: return Math.pow(x, 0.5); michael@0: } michael@0: assertEq(pow1(100), 10); michael@0: assertEq(pow1(144), 12); michael@0: assertEq(pow1(-0), 0); michael@0: assertEq(pow1(0), 0); michael@0: assertEq(pow1(1), 1); michael@0: assertEq(pow1(-1), NaN); michael@0: assertEq(pow1(NaN), NaN); michael@0: assertEq(pow1(-Infinity), Infinity); michael@0: assertEq(pow1(Infinity), Infinity); michael@0: