diff options
author | Eric Andersen <andersen@codepoet.org> | 2005-03-06 07:11:53 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2005-03-06 07:11:53 +0000 |
commit | c4e44e97f8562254d9da898f6ed7e6cb4d8a3ce4 (patch) | |
tree | 6c61f83ac5b94085222b3eda8d731309d61be99b | |
parent | d4fad9c64ee518be51ecb40662af69b405a49556 (diff) |
Trim off whitespace
98 files changed, 784 insertions, 784 deletions
diff --git a/libm/Makefile b/libm/Makefile index 7a0edbea5..e8aaddc12 100644 --- a/libm/Makefile +++ b/libm/Makefile @@ -6,14 +6,14 @@ # math library for Apple's MacOS X/Darwin math library, which was # itself swiped from FreeBSD. The original copyright information # is as follows: -# +# # Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -# +# # Developed at SunPro, a Sun Microsystems, Inc. business. # Permission to use, copy, modify, and distribute this # software is freely granted, provided that this notice # is preserved. -# +# # It has been ported to work with uClibc and generally behave # by Erik Andersen <andersen@codepoet.org> # @@ -36,7 +36,7 @@ include $(TOPDIR)Rules.mak CFLAGS+=$(SSP_ALL_CFLAGS) -DIRS = +DIRS = ifeq ($(strip $(HAS_FPU)),y) ifeq ($(TARGET_ARCH),$(wildcard $(TARGET_ARCH))) DIRS = $(TARGET_ARCH) @@ -71,7 +71,7 @@ else CSRC = w_acos.c w_asin.c s_atan.c w_atan2.c s_ceil.c s_cos.c \ w_cosh.c w_exp.c s_fabs.c s_floor.c w_fmod.c s_frexp.c \ s_ldexp.c w_log.c w_log10.c s_modf.c w_pow.c s_sin.c \ - w_sinh.c w_sqrt.c s_tan.c s_tanh.c + w_sinh.c w_sqrt.c s_tan.c s_tanh.c CSRC+= s_expm1.c s_scalbn.c s_copysign.c e_acos.c e_asin.c e_atan2.c \ k_cos.c e_cosh.c e_exp.c e_fmod.c e_log.c e_log10.c e_pow.c \ k_sin.c e_sinh.c e_sqrt.c k_tan.c e_rem_pio2.c k_rem_pio2.c \ diff --git a/libm/README b/libm/README index c275d1b9a..2c69a54af 100644 --- a/libm/README +++ b/libm/README @@ -7,10 +7,10 @@ is as follows: 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. -It has been ported to work with uClibc and generally behave +It has been ported to work with uClibc and generally behave by Erik Andersen <andersen@codepoet.org> 22 May, 2001 diff --git a/libm/e_acos.c b/libm/e_acos.c index 78bdae9f8..9f6305e1e 100644 --- a/libm/e_acos.c +++ b/libm/e_acos.c @@ -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,14 +15,14 @@ static char rcsid[] = "$NetBSD: e_acos.c,v 1.9 1995/05/12 04:57:13 jtc Exp $"; #endif /* __ieee754_acos(x) - * Method : + * Method : * acos(x) = pi/2 - asin(x) * acos(-x) = pi/2 + asin(x) * For |x|<=0.5 * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c) * For x>0.5 * acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2))) - * = 2asin(sqrt((1-x)/2)) + * = 2asin(sqrt((1-x)/2)) * = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z) * = 2f + (2c + 2s*z*R(z)) * where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term @@ -42,9 +42,9 @@ static char rcsid[] = "$NetBSD: e_acos.c,v 1.9 1995/05/12 04:57:13 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 */ pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ diff --git a/libm/e_acosh.c b/libm/e_acosh.c index 8383519df..3b3c6251e 100644 --- a/libm/e_acosh.c +++ b/libm/e_acosh.c @@ -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. * ==================================================== */ @@ -16,7 +16,7 @@ static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $"; /* __ieee754_acosh(x) * Method : - * Based on + * Based on * acosh(x) = log [ x + sqrt(x*x-1) ] * we have * acosh(x) := log(x)+ln2, if x is large; else @@ -32,9 +32,9 @@ static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $"; #include "math_private.h" #ifdef __STDC__ -static const double +static const double #else -static double +static double #endif one = 1.0, ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ @@ -45,7 +45,7 @@ ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ double __ieee754_acosh(x) double x; #endif -{ +{ double t; int32_t hx; u_int32_t lx; @@ -55,7 +55,7 @@ ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */ } else if(hx >=0x41b00000) { /* x > 2**28 */ if(hx >=0x7ff00000) { /* x is inf of NaN */ return x+x; - } else + } else return __ieee754_log(x)+ln2; /* acosh(huge)=log(2x) */ } else if(((hx-0x3ff00000)|lx)==0) { return 0.0; /* acosh(1) = 0 */ diff --git a/libm/e_asin.c b/libm/e_asin.c index 210fdbf3b..d7a785350 100644 --- a/libm/e_asin.c +++ b/libm/e_asin.c @@ -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,12 +86,12 @@ 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))); @@ -116,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; } diff --git a/libm/e_atan2.c b/libm/e_atan2.c index 2b5edeacf..8bfc79232 100644 --- a/libm/e_atan2.c +++ b/libm/e_atan2.c @@ -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. * ==================================================== */ @@ -17,7 +17,7 @@ static char rcsid[] = "$NetBSD: e_atan2.c,v 1.8 1995/05/10 20:44:51 jtc Exp $"; /* __ieee754_atan2(y,x) * Method : * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x). - * 2. Reduce x to positive by (if x and y are unexceptional): + * 2. Reduce x to positive by (if x and y are unexceptional): * ARG (x+iy) = arctan(y/x) ... if x > 0, * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0, * @@ -35,9 +35,9 @@ static char rcsid[] = "$NetBSD: e_atan2.c,v 1.8 1995/05/10 20:44:51 jtc Exp $"; * ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2; * * Constants: - * The hexadecimal values are the intended ones for the following - * constants. The decimal values may be used, provided that the - * compiler will convert from decimal to binary accurately enough + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough * to produce the hexadecimal values shown. */ @@ -45,9 +45,9 @@ static char rcsid[] = "$NetBSD: e_atan2.c,v 1.8 1995/05/10 20:44:51 jtc Exp $"; #include "math_private.h" #ifdef __STDC__ -static const double +static const double #else -static double +static double #endif tiny = 1.0e-300, zero = 0.0, @@ -62,7 +62,7 @@ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ double __ieee754_atan2(y,x) double y,x; #endif -{ +{ double z; int32_t k,m,hx,hy,ix,iy; u_int32_t lx,ly; @@ -80,7 +80,7 @@ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ /* when y = 0 */ if((iy|ly)==0) { switch(m) { - case 0: + case 0: case 1: return y; /* atan(+-0,+anything)=+-0 */ case 2: return pi+tiny;/* atan(+0,-anything) = pi */ case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */ @@ -88,7 +88,7 @@ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ } /* when x = 0 */ if((ix|lx)==0) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny; - + /* when x is INF */ if(ix==0x7ff00000) { if(iy==0x7ff00000) { diff --git a/libm/e_atanh.c b/libm/e_atanh.c index 559e8f158..d199a05cc 100644 --- a/libm/e_atanh.c +++ b/libm/e_atanh.c @@ -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. * ==================================================== */ @@ -21,7 +21,7 @@ static char rcsid[] = "$NetBSD: e_atanh.c,v 1.8 1995/05/10 20:44:55 jtc Exp $"; * 1 2x x * atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------) * 2 1 - x 1 - x - * + * * For x<0.5 * atanh(x) = 0.5*log1p(2x+2x*x/(1-x)) * @@ -61,14 +61,14 @@ static double zero = 0.0; ix = hx&0x7fffffff; if ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */ return (x-x)/(x-x); - if(ix==0x3ff00000) + if(ix==0x3ff00000) return x/zer |