Add braces to make code clearer and to not confuse the poor compiler.
authordrepper <drepper>
Tue, 11 Nov 1997 23:40:44 +0000 (23:40 +0000)
committerdrepper <drepper>
Tue, 11 Nov 1997 23:40:44 +0000 (23:40 +0000)
sysdeps/libm-ieee754/e_asin.c
sysdeps/libm-ieee754/e_asinf.c

index b62a1c9..09d06a9 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Developed at SunPro, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
  */
@@ -15,12 +15,12 @@ static char rcsid[] = "$NetBSD: e_asin.c,v 1.9 1995/05/12 04:57:22 jtc Exp $";
 #endif
 
 /* __ieee754_asin(x)
- * Method :                  
+ * Method :
  *     Since  asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
  *     we approximate asin(x) on [0,0.5] by
  *             asin(x) = x + x*x^2*R(x^2)
  *     where
- *             R(x^2) is a rational approximation of (asin(x)-x)/x^3 
+ *             R(x^2) is a rational approximation of (asin(x)-x)/x^3
  *     and its remez error is bounded by
  *             |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75)
  *
@@ -49,9 +49,9 @@ static char rcsid[] = "$NetBSD: e_asin.c,v 1.9 1995/05/12 04:57:22 jtc Exp $";
 #include "math_private.h"
 
 #ifdef __STDC__
-static const double 
+static const double
 #else
-static double 
+static double
 #endif
 one =  1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
 huge =  1.000e+300,
@@ -86,17 +86,18 @@ qS4 =  7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
            GET_LOW_WORD(lx,x);
            if(((ix-0x3ff00000)|lx)==0)
                    /* asin(1)=+-pi/2 with inexact */
-               return x*pio2_hi+x*pio2_lo;     
-           return (x-x)/(x-x);         /* asin(|x|>1) is NaN */   
+               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<0x3e400000) {         /* if |x| < 2**-27 */
                if(huge+x>one) return x;/* return x with inexact if x!=0*/
-           } else 
+           } else {
                t = x*x;
                p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
                q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
                w = p/q;
                return x+x*w;
+           }
        }
        /* 1> |x|>= 0.5 */
        w = one-fabs(x);
@@ -115,6 +116,6 @@ qS4 =  7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
            p  = 2.0*s*r-(pio2_lo-2.0*c);
            q  = pio4_hi-2.0*w;
            t  = pio4_hi-(p-q);
-       }    
-       if(hx>0) return t; else return -t;    
+       }
+       if(hx>0) return t; else return -t;
 }
index 21157d8..5270f31 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Developed at SunPro, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
  */
@@ -21,9 +21,9 @@ static char rcsid[] = "$NetBSD: e_asinf.c,v 1.5 1995/05/12 04:57:25 jtc Exp $";
 #include "math_private.h"
 
 #ifdef __STDC__
-static const float 
+static const float
 #else
-static float 
+static float
 #endif
 one =  1.0000000000e+00, /* 0x3F800000 */
 huge =  1.000e+30,
@@ -55,18 +55,19 @@ qS4 =  7.7038154006e-02; /* 0x3d9dc62e */
        ix = hx&0x7fffffff;
        if(ix==0x3f800000) {
                /* asin(1)=+-pi/2 with inexact */
-           return x*pio2_hi+x*pio2_lo; 
+           return x*pio2_hi+x*pio2_lo;
        } else if(ix> 0x3f800000) {     /* |x|>= 1 */
-           return (x-x)/(x-x);         /* asin(|x|>1) is NaN */   
+           return (x-x)/(x-x);         /* asin(|x|>1) is NaN */
        } else if (ix<0x3f000000) {     /* |x|<0.5 */
            if(ix<0x32000000) {         /* if |x| < 2**-27 */
                if(huge+x>one) return x;/* return x with inexact if x!=0*/
-           } else 
+           } else {
                t = x*x;
                p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
                q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
                w = p/q;
                return x+x*w;
+           }
        }
        /* 1> |x|>= 0.5 */
        w = one-fabsf(x);
@@ -87,6 +88,6 @@ qS4 =  7.7038154006e-02; /* 0x3d9dc62e */
            p  = (float)2.0*s*r-(pio2_lo-(float)2.0*c);
            q  = pio4_hi-(float)2.0*w;
            t  = pio4_hi-(p-q);
-       }    
-       if(hx>0) return t; else return -t;    
+       }
+       if(hx>0) return t; else return -t;
 }