- return x*pio2; /* asin(+-1) = +-pi/2 with inexact */
- return (x-x)/(x-x); /* asin(|x|>1) is NaN */
- } else if (ix < 0x3f000000) { /* |x|<0.5 */
- if (ix < 0x39800000) { /* |x| < 2**-12 */
- if (huge+x > one)
- return x; /* return x with inexact if x!=0 */
- }
- t = x*x;
- p = t*(pS0+t*(pS1+t*pS2));
- q = one+t*qS1;
- w = p/q;
- return x + x*w;
+ return x*pio2 + 0x1p-120f; /* asin(+-1) = +-pi/2 with inexact */
+ return 0/(x-x); /* asin(|x|>1) is NaN */
+ }
+ if (ix < 0x3f000000) { /* |x| < 0.5 */
+ /* if 0x1p-126 <= |x| < 0x1p-12, avoid raising underflow */
+ if (ix < 0x39800000 && ix >= 0x00800000)
+ return x;
+ return x + x*R(x*x);