summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 17:58:54 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 17:58:54 +0000
commit1ba06384fb715fb7732b20911ffc56a61d16cb0d (patch)
tree0fcfaf14f40169b289044495b1984a5fa3e0e965 /sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c
parent1af57d5793424a5a6ec542d0a5ef0b7c4f312623 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/sysvshm' into t/sysvshm
Diffstat (limited to 'sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c')
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c b/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c
index 5ccb78cf03..f08d5b337d 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c
@@ -81,7 +81,7 @@ __ieee754_log2 (double x)
if (hx < INT64_C(0x0010000000000000))
{ /* x < 2**-1022 */
if (__glibc_unlikely ((hx & UINT64_C(0x7fffffffffffffff)) == 0))
- return -two54 / (x - x); /* log(+-0)=-inf */
+ return -two54 / fabs (x); /* log(+-0)=-inf */
if (__glibc_unlikely (hx < 0))
return (x - x) / (x - x); /* log(-#) = NaN */
k -= 54;