diff options
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_log1pl.c | 5 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/s_log1pl.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c index d8d89f0..4a30af6 100644 --- a/sysdeps/ieee754/ldbl-128/s_log1pl.c +++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c @@ -144,7 +144,10 @@ __log1pl (long double xm1) return xm1; } - x = xm1 + 1.0L; + if (xm1 >= 0x1p113L) + x = xm1; + else + x = xm1 + 1.0L; /* log1p(-1) = -inf */ if (x <= 0.0L) diff --git a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c index a346383..e4bb6e8 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c @@ -140,7 +140,10 @@ __log1pl (long double xm1) if (((hx & 0x7fffffff) | lx) == 0) return xm1; - x = xm1 + 1.0L; + if (xm1 >= 0x1p107L) + x = xm1; + else + x = xm1 + 1.0L; /* log1p(-1) = -inf */ if (x <= 0.0L) |