Mail Archives: djgpp-workers/1998/09/16/12:41:29
Hi!
Here is patch that fixes bug in src/libm/math/e_atan2.c
when atan2(anything,1.2) returns wrong result
Andris
---------------------------------------------------------
*** src/libm/math/e_atan2.c~ Sat Feb 7 13:25:04 1998
--- src/libm/math/e_atan2.c Wed Sep 16 20:10:30 1998
***************
*** 73,79 ****
if(((ix|((lx|-lx)>>31))>0x7ff00000)||
((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */
return x+y;
! if((hx-(0x3ff00000|lx))==0) return atan(y); /* x=1.0 */
m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
/* when y = 0 */
--- 73,79 ----
if(((ix|((lx|-lx)>>31))>0x7ff00000)||
((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */
return x+y;
! if(((hx-0x3ff00000)|lx)==0) return atan(y); /* x=1.0 */
m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
/* when y = 0 */
- Raw text -