diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-10-06 18:37:30 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-10-06 18:37:30 +0000 |
commit | c039eedd66aff3706fede2188d920e173543b8e8 (patch) | |
tree | 7caae3bc57aa7ff2781e7e32c4dc4c8925ad096a /sysdeps/ieee754/flt-32 | |
parent | 718946816cf60374f9d8f674d3ed649fdb33205a (diff) | |
download | glibc-c039eedd66aff3706fede2188d920e173543b8e8.tar.gz glibc-c039eedd66aff3706fede2188d920e173543b8e8.tar.xz glibc-c039eedd66aff3706fede2188d920e173543b8e8.zip |
[BZ #4407]
* sysdeps/ieee754/dbl-64/e_lgamma_r.c: Fix *signgamp for -0.0. * sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise. * sysdeps/ieee754/ldbl-96/e_lgammal_r.c: Likewise. * math/libm-test.inc: Add test for this case. Half the patch by Christian Iseli <christian.iseli@licr.org>.
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r-- | sysdeps/ieee754/flt-32/e_lgammaf_r.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/ieee754/flt-32/e_lgammaf_r.c b/sysdeps/ieee754/flt-32/e_lgammaf_r.c index 5ebebb77af..0ed2610085 100644 --- a/sysdeps/ieee754/flt-32/e_lgammaf_r.c +++ b/sysdeps/ieee754/flt-32/e_lgammaf_r.c @@ -164,7 +164,12 @@ static float zero= 0.0000000000e+00; *signgamp = 1; ix = hx&0x7fffffff; if(ix>=0x7f800000) return x*x; - if(ix==0) return one/fabsf(x); + if(ix==0) + { + if (hx < 0) + *signgamp = -1; + return one/fabsf(x); + } if(ix<0x1c800000) { /* |x|<2**-70, return -log(|x|) */ if(hx<0) { *signgamp = -1; |