diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-05-10 11:35:11 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-05-10 11:35:11 +0000 |
commit | ab2b94613d85ba9edc659bd5e930b9ab1ec8e8a9 (patch) | |
tree | eedbc98232a3ec938f66bb94cb633845a3e3587a /math/w_tgammaf.c | |
parent | 4c0fe6fe42ecf97c9f7f5a0921638560c89973a2 (diff) | |
download | glibc-ab2b94613d85ba9edc659bd5e930b9ab1ec8e8a9.tar glibc-ab2b94613d85ba9edc659bd5e930b9ab1ec8e8a9.tar.gz glibc-ab2b94613d85ba9edc659bd5e930b9ab1ec8e8a9.tar.bz2 glibc-ab2b94613d85ba9edc659bd5e930b9ab1ec8e8a9.zip |
Fix tgamma errno setting on domain error (bug 6809).
Diffstat (limited to 'math/w_tgammaf.c')
-rw-r--r-- | math/w_tgammaf.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 */ |