Bug #32677, fix for optimizer reducing expression incorrectly for Math.pow

edge cases.
This commit is contained in:
rogerl%netscape.com 2000-03-29 23:46:08 +00:00
parent b76e51bc61
commit 5501a7eae5

View File

@ -182,7 +182,12 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
if(ly==0) {
if (iy==0x7ff00000) { /* y is +-inf */
if(((ix-0x3ff00000)|lx)==0)
#ifdef _WIN32
/* VC++ optimizer reduces y - y to 0 */
return y / y;
#else
return y - y; /* inf**+-1 is NaN */
#endif
else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */
return (hy>=0)? y: zero;
else /* (|x|<1)**-,+inf = inf,0 */