comparison src/libm/e_atan2.c @ 4874:8288636b861d

Compiling in atan()/atan2() implementation on Visual Studio 2008.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 29 Aug 2010 16:55:58 -0700
parents d275c95ddc05
children
comparison
equal deleted inserted replaced
4873:67ad1c88dda0 4874:8288636b861d
55 55
56 EXTRACT_WORDS(hx,lx,x); 56 EXTRACT_WORDS(hx,lx,x);
57 ix = hx&0x7fffffff; 57 ix = hx&0x7fffffff;
58 EXTRACT_WORDS(hy,ly,y); 58 EXTRACT_WORDS(hy,ly,y);
59 iy = hy&0x7fffffff; 59 iy = hy&0x7fffffff;
60 if(((ix|((lx|-lx)>>31))>0x7ff00000)|| 60 if(((ix|((lx|-(int32_t)lx)>>31))>0x7ff00000)||
61 ((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */ 61 ((iy|((ly|-(int32_t)ly)>>31))>0x7ff00000)) /* x or y is NaN */
62 return x+y; 62 return x+y;
63 if(((hx-0x3ff00000)|lx)==0) return atan(y); /* x=1.0 */ 63 if(((hx-0x3ff00000)|lx)==0) return atan(y); /* x=1.0 */
64 m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */ 64 m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
65 65
66 /* when y = 0 */ 66 /* when y = 0 */