- return x*pio2_hi + x*pio2_lo;
- return (x-x)/(x-x); /* asin(|x|>1) is NaN */
- } else if (ix < 0x3fe00000) { /* |x|<0.5 */
- if (ix < 0x3e500000) { /* if |x| < 2**-26 */
- if (huge+x > 1.0)
- return x; /* return x with inexact if x!=0*/
- }
- t = x*x;
- p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
- q = 1.0+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
- w = p/q;
- return x + x*w;
+ return x*pio2_hi + 0x1p-120f;
+ return 0/(x-x);
+ }
+ /* |x| < 0.5 */
+ if (ix < 0x3fe00000) {
+ /* if 0x1p-1022 <= |x| < 0x1p-26, avoid raising underflow */
+ if (ix < 0x3e500000 && ix >= 0x00100000)
+ return x;
+ return x + x*R(x*x);