s_atan.c (17303c626fd4c19cddfd19dfdc70380d1d603cff) | s_atan.c (e044d80d08bf0eca40f938c05dd34a951f4a0814) |
---|---|
1/* @(#)s_atan.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice --- 73 unchanged lines hidden (view full) --- 82 u_int32_t low; 83 GET_LOW_WORD(low,x); 84 if(ix>0x7ff00000|| 85 (ix==0x7ff00000&&(low!=0))) 86 return x+x; /* NaN */ 87 if(hx>0) return atanhi[3]+*(volatile double *)&atanlo[3]; 88 else return -atanhi[3]-*(volatile double *)&atanlo[3]; 89 } if (ix < 0x3fdc0000) { /* |x| < 0.4375 */ | 1/* @(#)s_atan.c 5.1 93/09/24 */ 2/* 3 * ==================================================== 4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 5 * 6 * Developed at SunPro, a Sun Microsystems, Inc. business. 7 * Permission to use, copy, modify, and distribute this 8 * software is freely granted, provided that this notice --- 73 unchanged lines hidden (view full) --- 82 u_int32_t low; 83 GET_LOW_WORD(low,x); 84 if(ix>0x7ff00000|| 85 (ix==0x7ff00000&&(low!=0))) 86 return x+x; /* NaN */ 87 if(hx>0) return atanhi[3]+*(volatile double *)&atanlo[3]; 88 else return -atanhi[3]-*(volatile double *)&atanlo[3]; 89 } if (ix < 0x3fdc0000) { /* |x| < 0.4375 */ |
90 if (ix < 0x3e200000) { /* |x| < 2^-29 */ | 90 if (ix < 0x3e400000) { /* |x| < 2^-27 */ |
91 if(huge+x>one) return x; /* raise inexact */ 92 } 93 id = -1; 94 } else { 95 x = fabs(x); 96 if (ix < 0x3ff30000) { /* |x| < 1.1875 */ 97 if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */ 98 id = 0; x = (2.0*x-one)/(2.0+x); --- 26 unchanged lines hidden --- | 91 if(huge+x>one) return x; /* raise inexact */ 92 } 93 id = -1; 94 } else { 95 x = fabs(x); 96 if (ix < 0x3ff30000) { /* |x| < 1.1875 */ 97 if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */ 98 id = 0; x = (2.0*x-one)/(2.0+x); --- 26 unchanged lines hidden --- |