Date: Wed, 16 Sep 1998 19:36:07 +0200 (WET) From: Andris Pavenis To: djgpp-workers AT delorie DOT com cc: dj AT delorie DOT com Subject: Patch for bug in e_atan2.c Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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 */