Revision: 10150
Author:   [email protected]
Date:     Mon Dec  5 01:54:15 2011
Log:      Fixing Math.pow(NaN, -0.0) == 1 on Windows.

Review URL: http://codereview.chromium.org/8804005
http://code.google.com/p/v8/source/detail?r=10150

Modified:
 /branches/bleeding_edge/src/assembler.cc

=======================================
--- /branches/bleeding_edge/src/assembler.cc    Fri Dec  2 00:06:37 2011
+++ /branches/bleeding_edge/src/assembler.cc    Mon Dec  5 01:54:15 2011
@@ -1124,6 +1124,8 @@
     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();

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to