about summary refs log tree commit diff
path: root/sysdeps/generic/w_tgamma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/w_tgamma.c')
-rw-r--r--sysdeps/generic/w_tgamma.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/generic/w_tgamma.c b/sysdeps/generic/w_tgamma.c
index 2adbc2e14d..6e34b62be4 100644
--- a/sysdeps/generic/w_tgamma.c
+++ b/sysdeps/generic/w_tgamma.c
@@ -39,8 +39,10 @@ static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $";
 	if(_LIB_VERSION == _IEEE_) return y;
 
 	if(!__finite(y)&&__finite(x)) {
-	  if(__floor(x)==x&&x<=0.0)
-	    return __kernel_standard(x,x,41); /* tgamma pole */
+	  if (x == 0.0)
+	    return __kernel_standard(x,x,50); /* tgamma pole */
+	  else if(__floor(x)==x&&x<0.0)
+	    return __kernel_standard(x,x,41); /* tgamma domain */
 	  else
 	    return __kernel_standard(x,x,40); /* tgamma overflow */
 	}