aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/libm-ieee754/e_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-ieee754/e_log.c')
-rw-r--r--sysdeps/libm-ieee754/e_log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/libm-ieee754/e_log.c b/sysdeps/libm-ieee754/e_log.c
index f584694686..e4e6eab6c5 100644
--- a/sysdeps/libm-ieee754/e_log.c
+++ b/sysdeps/libm-ieee754/e_log.c
@@ -106,8 +106,8 @@ static double zero = 0.0;
k=0;
if (hx < 0x00100000) { /* x < 2**-1022 */
if (((hx&0x7fffffff)|lx)==0)
- return -two54/zero; /* log(+-0)=-inf */
- if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
+ return -two54/(x-x); /* log(+-0)=-inf */
+ if (hx<0) return (x-x)/(x-x); /* log(-#) = NaN */
k -= 54; x *= two54; /* subnormal number, scale up x */
GET_HIGH_WORD(hx,x);
}