hotspot/src/share/vm/runtime/sharedRuntimeTrans.cpp
changeset 6176 4d9030fe341f
parent 5547 f4b087cbb361
child 7397 5b173b4ca846
--- a/hotspot/src/share/vm/runtime/sharedRuntimeTrans.cpp	Wed Jul 28 17:57:43 2010 -0400
+++ b/hotspot/src/share/vm/runtime/sharedRuntimeTrans.cpp	Tue Aug 03 08:13:38 2010 -0400
@@ -572,7 +572,11 @@
       if(hy<0) z = one/z;       /* z = (1/|x|) */
       if(hx<0) {
         if(((ix-0x3ff00000)|yisint)==0) {
+#ifdef CAN_USE_NAN_DEFINE
+          z = NAN;
+#else
           z = (z-z)/(z-z); /* (-1)**non-int is NaN */
+#endif
         } else if(yisint==1)
           z = -1.0*z;           /* (x<0)**odd = -(|x|**odd) */
       }
@@ -583,7 +587,12 @@
   n = (hx>>31)+1;
 
   /* (x<0)**(non-int) is NaN */
-  if((n|yisint)==0) return (x-x)/(x-x);
+  if((n|yisint)==0)
+#ifdef CAN_USE_NAN_DEFINE
+    return NAN;
+#else
+    return (x-x)/(x-x);
+#endif
 
   s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
   if((n|(yisint-1))==0) s = -one;/* (-ve)**(odd int) */