Merge pull request #178 from JuliaLang/aa/upstream

msun: signed overflow in atan2
This commit is contained in:
Viral B. Shah 2018-06-18 15:55:46 -04:00 committed by GitHub
commit 4b4b41c941
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ __ieee754_atan2(double y, double x)
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 */
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 */