diff options
author | bde <bde@FreeBSD.org> | 2002-03-26 11:59:29 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-03-26 11:59:29 +0000 |
commit | 755d0bf04f6bc5a88960b759fbeff6ed789f37b9 (patch) | |
tree | ffda6fa693451722718de741980717e0bef8892b /lib/msun/bsdsrc/b_tgamma.c | |
parent | 5ff751bb8680caf8634643ee5e0c85c8e6904e24 (diff) | |
download | FreeBSD-src-755d0bf04f6bc5a88960b759fbeff6ed789f37b9.zip FreeBSD-src-755d0bf04f6bc5a88960b759fbeff6ed789f37b9.tar.gz |
Resurrect Lite1's gamma() as C99's tgamma(). Minimal changes.
Diffstat (limited to 'lib/msun/bsdsrc/b_tgamma.c')
-rw-r--r-- | lib/msun/bsdsrc/b_tgamma.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/msun/bsdsrc/b_tgamma.c b/lib/msun/bsdsrc/b_tgamma.c index 4859088..6c405df 100644 --- a/lib/msun/bsdsrc/b_tgamma.c +++ b/lib/msun/bsdsrc/b_tgamma.c @@ -34,7 +34,7 @@ #ifndef lint static char sccsid[] = "@(#)gamma.c 8.1 (Berkeley) 6/4/93"; #endif /* not lint */ -include <sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* @@ -138,7 +138,7 @@ static int endian; #endif double -gamma(x) +tgamma(x) double x; { struct Double u; @@ -225,7 +225,7 @@ small_gam(x) TRUNC(r.a); r.b += (t - r.a); } - /* Return r*gamma(y). */ + /* Return r*tgamma(y). */ yy = ratfun_gam(y - x0, 0); y = r.b*(yy.a + yy.b) + r.a*yy.b; y += yy.a*r.a; @@ -330,9 +330,9 @@ neg_gam(x) } y = one-x; if (one-y == x) - y = gamma(y); + y = tgamma(y); else /* 1-x is inexact */ - y = -x*gamma(-x); + y = -x*tgamma(-x); if (sgn < 0) y = -y; return (M_PI / (y*z)); } |