Commit 1df183c5 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fixing Math.pow(NaN, -0.0) == 1 on Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b45f451a
......@@ -1124,6 +1124,8 @@ double power_double_double(double x, double y) {
if (y == 0.5) return sqrt(x + 0.0); // -0 must be converted to +0.
if (y == -0.5) return 1.0 / sqrt(x + 0.0);
}
#else
if (y == 0) return 1.0; // Returns 1.0 for exponent 0.
#endif
if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) {
return OS::nan_value();
......
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