diff options
Diffstat (limited to 'lib/libm/src/e_lgamma_r.c')
| -rw-r--r-- | lib/libm/src/e_lgamma_r.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libm/src/e_lgamma_r.c b/lib/libm/src/e_lgamma_r.c index 1da673bc0c4..dbca95d5ea0 100644 --- a/lib/libm/src/e_lgamma_r.c +++ b/lib/libm/src/e_lgamma_r.c @@ -14,7 +14,7 @@ static char rcsid[] = "$NetBSD: e_lgamma_r.c,v 1.7 1995/05/10 20:45:42 jtc Exp $"; #endif -/* __ieee754_lgamma_r(x, signgamp) +/* lgamma_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function * with user provide pointer for the sign of Gamma(x). * @@ -201,7 +201,7 @@ sin_pi(double x) double -__ieee754_lgamma_r(double x, int *signgamp) +lgamma_r(double x, int *signgamp) { double t,y,z,nadj,p,p1,p2,p3,q,r,w; int i,hx,lx,ix; @@ -216,15 +216,15 @@ __ieee754_lgamma_r(double x, int *signgamp) if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */ if(hx<0) { *signgamp = -1; - return -__ieee754_log(-x); - } else return -__ieee754_log(x); + return - log(-x); + } else return - log(x); } if(hx<0) { if(ix>=0x43300000) /* |x|>=2**52, must be -integer */ return one/zero; t = sin_pi(x); if(t==zero) return one/zero; /* -integer */ - nadj = __ieee754_log(pi/fabs(t*x)); + nadj = log(pi/fabs(t*x)); if(t<zero) *signgamp = -1; x = -x; } @@ -234,7 +234,7 @@ __ieee754_lgamma_r(double x, int *signgamp) /* for x < 2.0 */ else if(ix<0x40000000) { if(ix<=0x3feccccc) { /* lgamma(x) = lgamma(x+1)-log(x) */ - r = -__ieee754_log(x); + r = - log(x); if(ix>=0x3FE76944) {y = one-x; i= 0;} else if(ix>=0x3FCDA661) {y= x-(tc-one); i=1;} else {y = x; i=2;} @@ -279,18 +279,18 @@ __ieee754_lgamma_r(double x, int *signgamp) case 5: z *= (y+4.0); /* FALLTHRU */ case 4: z *= (y+3.0); /* FALLTHRU */ case 3: z *= (y+2.0); /* FALLTHRU */ - r += __ieee754_log(z); break; + r += log(z); break; } /* 8.0 <= x < 2**58 */ } else if (ix < 0x43900000) { - t = __ieee754_log(x); + t = log(x); z = one/x; y = z*z; w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6))))); r = (x-half)*(t-one)+w; } else /* 2**58 <= x <= inf */ - r = x*(__ieee754_log(x)-one); + r = x*(log(x)-one); if(hx<0) r = nadj - r; return r; } |
