(__ieee754_asin): Handle NaN correctly.
authordrepper <drepper>
Mon, 12 Mar 2001 22:51:16 +0000 (22:51 +0000)
committerdrepper <drepper>
Mon, 12 Mar 2001 22:51:16 +0000 (22:51 +0000)
(__ieee754_acos): Likewise.

sysdeps/ieee754/dbl-64/e_asin.c

index 2efa631..a2b309e 100644 (file)
@@ -312,6 +312,8 @@ double __ieee754_asin(double x){
   }    /*   else  if (k < 0x3ff00000)    */
   /*---------------------------- |x|>=1 -------------------------------*/
   else if (k==0x3ff00000 && u.i[LOW_HALF]==0) return (m>0)?hp0.x:-hp0.x;
+  else
+  if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x;
   else {
     u.i[HIGH_HALF]=0x7ff00000;
     v.i[HIGH_HALF]=0x7ff00000;
@@ -621,6 +623,8 @@ double __ieee754_acos(double x)
   /*---------------------------- |x|>=1 -----------------------*/
   else
   if (k==0x3ff00000 && u.i[LOW_HALF]==0) return (m>0)?0:2.0*hp0.x;
+  else
+  if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x;
   else {
     u.i[HIGH_HALF]=0x7ff00000;
     v.i[HIGH_HALF]=0x7ff00000;