diff options
Diffstat (limited to 'lib/msun/src/e_j0.c')
-rw-r--r-- | lib/msun/src/e_j0.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/msun/src/e_j0.c b/lib/msun/src/e_j0.c index 508f721..3a11397 100644 --- a/lib/msun/src/e_j0.c +++ b/lib/msun/src/e_j0.c @@ -5,13 +5,13 @@ * * 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. * ==================================================== */ #ifndef lint -static char rcsid[] = "$Id: e_j0.c,v 1.6 1994/08/18 23:05:29 jtc Exp $"; +static char rcsid[] = "$Id: e_j0.c,v 1.1.1.1 1994/08/19 09:39:43 jkh Exp $"; #endif /* __ieee754_j0(x), __ieee754_y0(x) @@ -33,20 +33,20 @@ static char rcsid[] = "$Id: e_j0.c,v 1.6 1994/08/18 23:05:29 jtc Exp $"; * (To avoid cancellation, use * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) * to compute the worse one.) - * + * * 3 Special cases * j0(nan)= nan * j0(0) = 1 * j0(inf) = 0 - * + * * Method -- y0(x): * 1. For x<2. - * Since + * Since * y0(x) = 2/pi*(j0(x)*(ln(x/2)+Euler) + x^2/4 - ...) * therefore y0(x)-2/pi*j0(x)*ln(x) is an even function. * We use the following function to approximate y0, * y0(x) = U(z)/V(z) + (2/pi)*(j0(x)*ln(x)), z= x^2 - * where + * where * U(z) = u00 + u01*z + ... + u06*z^6 * V(z) = 1 + v01*z + ... + v04*z^4 * with absolute approximation error bounded by 2**-72. @@ -69,9 +69,9 @@ static double pzero(), qzero(); #endif #ifdef __STDC__ -static const double +static const double #else -static double +static double #endif huge = 1e300, one = 1.0, @@ -94,9 +94,9 @@ static double zero = 0.0; #endif #ifdef __STDC__ - double __ieee754_j0(double x) + double __ieee754_j0(double x) #else - double __ieee754_j0(x) + double __ieee754_j0(x) double x; #endif { @@ -163,9 +163,9 @@ v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */ v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */ #ifdef __STDC__ - double __ieee754_y0(double x) + double __ieee754_y0(double x) #else - double __ieee754_y0(x) + double __ieee754_y0(x) double x; #endif { @@ -175,7 +175,7 @@ v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */ EXTRACT_WORDS(hx,lx,x); ix = 0x7fffffff&hx; /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */ - if(ix>=0x7ff00000) return one/(x+x*x); + if(ix>=0x7ff00000) return one/(x+x*x); if((ix|lx)==0) return -one/zero; if(hx<0) return zero/zero; if(ix >= 0x40000000) { /* |x| >= 2.0 */ @@ -349,7 +349,7 @@ static double pS2[5] = { s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4])))); return one+ r/s; } - + /* For x >= 8, the asymptotic expansions of qzero is * -1/8 s + 75/1024 s^3 - ..., where s = 1/x. |