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/ldbl-96 | |
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/ldbl-96')
-rw-r--r-- | sysdeps/ieee754/ldbl-96/e_lgammal_r.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c index fecbee9b2a..36e336565c 100644 --- a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c +++ b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c @@ -11,9 +11,9 @@ /* Long double expansions are Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov> - and are incorporated herein by permission of the author. The author + and are incorporated herein by permission of the author. The author reserves the right to distribute this material elsewhere under different - copying permissions. These modifications are distributed here under + copying permissions. These modifications are distributed here under the following terms: This library is free software; you can redistribute it and/or @@ -302,7 +302,11 @@ __ieee754_lgammal_r (x, signgamp) ix = se & 0x7fff; if ((ix | i0 | i1) == 0) - return one / fabsl (x); + { + if (se & 0x8000) + *signgamp = -1; + return one / fabsl (x); + } ix = (ix << 16) | (i0 >> 16); |