From 21023b519d0f5e30853953e131d04bbe61e4ffa9 Mon Sep 17 00:00:00 2001 From: cgf Date: Wed, 11 Feb 2004 00:47:52 +0000 Subject: [PATCH] * libm/mathfp/er_gamma.c (gamma): Add new non-reentrant function. * libm/mathfp/er_lgamma.c (lgamma): Ditto. * libm/mathfp/erf_gamma.c (gammaf): Ditto. * libm/mathfp/erf_lgamma.c (lgammaf): Ditto. --- newlib/ChangeLog | 7 +++++++ newlib/libm/mathfp/er_gamma.c | 5 +++++ newlib/libm/mathfp/er_lgamma.c | 6 ++++++ newlib/libm/mathfp/erf_gamma.c | 7 ++++++- newlib/libm/mathfp/erf_lgamma.c | 5 +++++ 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 6e298d1974..9b2e13eb21 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2004-02-10 Christopher Faylor + + * libm/mathfp/er_gamma.c (gamma): Add new non-reentrant function. + * libm/mathfp/er_lgamma.c (lgamma): Ditto. + * libm/mathfp/erf_gamma.c (gammaf): Ditto. + * libm/mathfp/erf_lgamma.c (lgammaf): Ditto. + 2004-02-09 Christopher Faylor * libc/include/time.h (TIMER_RELTIME): New define. diff --git a/newlib/libm/mathfp/er_gamma.c b/newlib/libm/mathfp/er_gamma.c index 63758bb43b..0060ed031b 100644 --- a/newlib/libm/mathfp/er_gamma.c +++ b/newlib/libm/mathfp/er_gamma.c @@ -30,3 +30,8 @@ { return exp (lgamma_r(x,signgamp)); } + +double gamma(double x) +{ + return gamma_r(x, &(_REENT_SIGNGAM(_REENT))); +} diff --git a/newlib/libm/mathfp/er_lgamma.c b/newlib/libm/mathfp/er_lgamma.c index 65d60026e6..fd49c252ee 100644 --- a/newlib/libm/mathfp/er_lgamma.c +++ b/newlib/libm/mathfp/er_lgamma.c @@ -422,3 +422,9 @@ static double zero= 0.00000000000000000000e+00; if(hx<0) r = nadj - r; return r; } + +double +lgamma(double x) +{ + return lgamma_r(x, &(_REENT_SIGNGAM(_REENT))); +} diff --git a/newlib/libm/mathfp/erf_gamma.c b/newlib/libm/mathfp/erf_gamma.c index 16be0d040d..246645d25e 100644 --- a/newlib/libm/mathfp/erf_gamma.c +++ b/newlib/libm/mathfp/erf_gamma.c @@ -16,7 +16,7 @@ /* gammaf_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function - * with user provide pointer for the sign of Gamma(x). + * with user provided pointer for the sign of Gamma(x). * * Method: See lgammaf_r */ @@ -32,3 +32,8 @@ { return expf (lgammaf_r(x,signgamp)); } + +float gammaf(float x) +{ + return gammaf_r(x, &(_REENT_SIGNGAM(_REENT))); +} diff --git a/newlib/libm/mathfp/erf_lgamma.c b/newlib/libm/mathfp/erf_lgamma.c index 64bec0acad..4f092147b7 100644 --- a/newlib/libm/mathfp/erf_lgamma.c +++ b/newlib/libm/mathfp/erf_lgamma.c @@ -244,3 +244,8 @@ static float zero= 0.0000000000e+00; if(hx<0) r = nadj - r; return r; } + +float lgammaf(float x) +{ + return lgammaf_r(x, &(_REENT_SIGNGAM(_REENT))); +} -- 2.11.0