From ab2b94613d85ba9edc659bd5e930b9ab1ec8e8a9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 10 May 2013 11:35:11 +0000 Subject: Fix tgamma errno setting on domain error (bug 6809). --- math/w_tgammaf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'math/w_tgammaf.c') diff --git a/math/w_tgammaf.c b/math/w_tgammaf.c index 48141354e2..8bb553e47b 100644 --- a/math/w_tgammaf.c +++ b/math/w_tgammaf.c @@ -22,7 +22,8 @@ __tgammaf(float x) int local_signgam; float y = __ieee754_gammaf_r(x,&local_signgam); - if(__builtin_expect(!__finitef(y), 0) && __finitef(x) + if(__builtin_expect(!__finitef(y), 0) + && (__finitef (x) || __isinff (x) < 0) && _LIB_VERSION != _IEEE_) { if (x == (float)0.0) /* tgammaf pole */ -- cgit v1.2.3