From c36e6dd754453b8f57767b19c58d2f832bac8bb0 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 27 Jun 2002 20:25:57 +0000 Subject: * libm/mathfp/er_lgamma.c: Remove __kernel references. * libm/mathfp/erf_lgamma.c: Likewise. * libm/mathfp/s_tgamma.c: Likewise. * libm/mathfp/sf_tgamma.c: Likewise. --- newlib/libm/mathfp/sf_tgamma.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'newlib/libm/mathfp/sf_tgamma.c') diff --git a/newlib/libm/mathfp/sf_tgamma.c b/newlib/libm/mathfp/sf_tgamma.c index 11b7a37aa..f4d145634 100644 --- a/newlib/libm/mathfp/sf_tgamma.c +++ b/newlib/libm/mathfp/sf_tgamma.c @@ -14,6 +14,7 @@ */ #include +#include #ifdef __STDC__ float tgammaf(float x) @@ -24,7 +25,7 @@ { float y; int local_signgam; - y = __ieee754_gammaf_r(x,&local_signgam); + y = gammaf_r(x,&local_signgam); if (local_signgam < 0) y = -y; #ifdef _IEEE_LIBM return y; @@ -33,11 +34,17 @@ if(!finitef(y)&&finitef(x)) { if(floorf(x)==x&&x<=(float)0.0) - /* tgammaf pole */ - return (float)__kernel_standard((double)x,(double)x,141); + { + /* tgammaf pole */ + errno = EDOM; + return HUGE_VAL; + } else - /* tgammaf overflow */ - return (float)__kernel_standard((double)x,(double)x,140); + { + /* tgammaf overflow */ + errno = ERANGE; + return HUGE_VAL; + } } return y; #endif -- cgit v1.2.3