Fix test that can fail for small denormals.
authorlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 25 Mar 2011 14:03:42 +0000 (14:03 +0000)
committerlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 25 Mar 2011 14:03:42 +0000 (14:03 +0000)
Review URL: http://codereview.chromium.org/6736027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/mjsunit/math-sqrt.js

index 06250a6..43fbf6b 100644 (file)
@@ -30,7 +30,7 @@
 function test(expected_sqrt, value) {
   assertEquals(expected_sqrt, Math.sqrt(value));
   if (isFinite(value)) {
-    if ((1 / value) == -Infinity) {
+    if (value === 0 && (1 / value) == -Infinity) {
       // Math.pow(-0, 0.5) must be zero, but Math.sqrt(-0) is -0.
       expected_sqrt = 0;
     }