Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2002-06-28 00:25:57 +0400
committerThomas Fitzsimmons <fitzsim@redhat.com>2002-06-28 00:25:57 +0400
commitc36e6dd754453b8f57767b19c58d2f832bac8bb0 (patch)
tree84759888d3048b553ba863df9d06c27b8e6cb8e5 /newlib/libm/mathfp/s_tgamma.c
parentbaf051ca35b40c73e98f4b5246be50209cd966a6 (diff)
* 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.
Diffstat (limited to 'newlib/libm/mathfp/s_tgamma.c')
-rw-r--r--newlib/libm/mathfp/s_tgamma.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/newlib/libm/mathfp/s_tgamma.c b/newlib/libm/mathfp/s_tgamma.c
index 2dec8d7e4..4caf27089 100644
--- a/newlib/libm/mathfp/s_tgamma.c
+++ b/newlib/libm/mathfp/s_tgamma.c
@@ -16,6 +16,7 @@
*/
#include <math.h>
+#include <errno.h>
#ifdef __STDC__
double tgamma(double x)
@@ -26,7 +27,7 @@
{
double y;
int local_signgam;
- y = __ieee754_gamma_r(x,&local_signgam);
+ y = gamma_r(x,&local_signgam);
if (local_signgam < 0) y = -y;
#ifdef _IEEE_LIBM
return y;
@@ -35,9 +36,17 @@
if(!finite(y)&&finite(x)) {
if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,41); /* tgamma pole */
+ {
+ /* tgamma pole */
+ errno = EDOM;
+ return HUGE_VAL;
+ }
else
- return __kernel_standard(x,x,40); /* tgamma overflow */
+ {
+ /* tgamma overflow */
+ errno = ERANGE;
+ return HUGE_VAL;
+ }
}
return y;
#endif