Index: test/mjsunit/math-sqrt.js |
diff --git a/test/mjsunit/math-sqrt.js b/test/mjsunit/math-sqrt.js |
index fb00d5ba8ab138ac6b8020387ede85c9a245fd92..b940c75f461581b1ea508ffb25454dfc03535df5 100644 |
--- a/test/mjsunit/math-sqrt.js |
+++ b/test/mjsunit/math-sqrt.js |
@@ -29,7 +29,8 @@ |
function test(expected_sqrt, value) { |
assertEquals(expected_sqrt, Math.sqrt(value)); |
- if (isFinite(value)) { |
+ if (isFinite(value) && (1 / value) != -Infinity) { |
+ // Math.pow(-0, 0.5) must be zero, but Math.sqrt(-0) is -0. |
Kevin Millikin (Chromium)
2011/03/21 11:25:39
I think this should be converted from a comment in
Lasse Reichstein
2011/03/21 13:17:58
Done.
|
assertEquals(expected_sqrt, Math.pow(value, 0.5)); |
} |
} |