src/libm/e_atan2.c
changeset 4874 8288636b861d
parent 4870 d275c95ddc05
child 6044 35448a5ea044
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 */