aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/math-sqrt.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-06-29 17:26:51 +0200
committerRyan Dahl <ry@tinyclouds.org>2011-06-29 17:26:51 +0200
commit33af2720f26c2b25bc7f75ce7eb454ff99db6d35 (patch)
tree9a38f0c96420edf503eebd6325dd8d2d8249f653 /deps/v8/test/mjsunit/math-sqrt.js
parent6afdca885adeeeed9eef8cbb01c3d97af0bc084d (diff)
downloadandroid-node-v8-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.tar.gz
android-node-v8-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.tar.bz2
android-node-v8-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.zip
Upgrade V8 to 3.4.8
Diffstat (limited to 'deps/v8/test/mjsunit/math-sqrt.js')
-rw-r--r--deps/v8/test/mjsunit/math-sqrt.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/v8/test/mjsunit/math-sqrt.js b/deps/v8/test/mjsunit/math-sqrt.js
index fb00d5ba8a..43fbf6b2dc 100644
--- a/deps/v8/test/mjsunit/math-sqrt.js
+++ b/deps/v8/test/mjsunit/math-sqrt.js
@@ -29,7 +29,11 @@
function test(expected_sqrt, value) {
assertEquals(expected_sqrt, Math.sqrt(value));
- if (isFinite(value)) {
+ if (isFinite(value)) {
+ if (value === 0 && (1 / value) == -Infinity) {
+ // Math.pow(-0, 0.5) must be zero, but Math.sqrt(-0) is -0.
+ expected_sqrt = 0;
+ }
assertEquals(expected_sqrt, Math.pow(value, 0.5));
}
}