src/share/vm/runtime/sharedRuntimeTrans.cpp

changeset 2036
126ea7725993
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
equal deleted inserted replaced
2035:a64438a2b7e8 2036:126ea7725993
570 if(ix==0x7ff00000||ix==0||ix==0x3ff00000){ 570 if(ix==0x7ff00000||ix==0||ix==0x3ff00000){
571 z = ax; /*x is +-0,+-inf,+-1*/ 571 z = ax; /*x is +-0,+-inf,+-1*/
572 if(hy<0) z = one/z; /* z = (1/|x|) */ 572 if(hy<0) z = one/z; /* z = (1/|x|) */
573 if(hx<0) { 573 if(hx<0) {
574 if(((ix-0x3ff00000)|yisint)==0) { 574 if(((ix-0x3ff00000)|yisint)==0) {
575 #ifdef CAN_USE_NAN_DEFINE
576 z = NAN;
577 #else
575 z = (z-z)/(z-z); /* (-1)**non-int is NaN */ 578 z = (z-z)/(z-z); /* (-1)**non-int is NaN */
579 #endif
576 } else if(yisint==1) 580 } else if(yisint==1)
577 z = -1.0*z; /* (x<0)**odd = -(|x|**odd) */ 581 z = -1.0*z; /* (x<0)**odd = -(|x|**odd) */
578 } 582 }
579 return z; 583 return z;
580 } 584 }
581 } 585 }
582 586
583 n = (hx>>31)+1; 587 n = (hx>>31)+1;
584 588
585 /* (x<0)**(non-int) is NaN */ 589 /* (x<0)**(non-int) is NaN */
586 if((n|yisint)==0) return (x-x)/(x-x); 590 if((n|yisint)==0)
591 #ifdef CAN_USE_NAN_DEFINE
592 return NAN;
593 #else
594 return (x-x)/(x-x);
595 #endif
587 596
588 s = one; /* s (sign of result -ve**odd) = -1 else = 1 */ 597 s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
589 if((n|(yisint-1))==0) s = -one;/* (-ve)**(odd int) */ 598 if((n|(yisint-1))==0) s = -one;/* (-ve)**(odd int) */
590 599
591 /* |y| is huge */ 600 /* |y| is huge */

mercurial