Commit 40f9a7db authored by lrn@chromium.org's avatar lrn@chromium.org

Fix test that can fail for small denormals.

Review URL: http://codereview.chromium.org/6736027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1a15a9e6
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
function test(expected_sqrt, value) { function test(expected_sqrt, value) {
assertEquals(expected_sqrt, Math.sqrt(value)); assertEquals(expected_sqrt, Math.sqrt(value));
if (isFinite(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. // Math.pow(-0, 0.5) must be zero, but Math.sqrt(-0) is -0.
expected_sqrt = 0; expected_sqrt = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment