diff options
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/e_log10l.c | 3 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/e_log10l.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_log10l.c b/sysdeps/ieee754/ldbl-128/e_log10l.c index b403f815fb..618255f2fa 100644 --- a/sysdeps/ieee754/ldbl-128/e_log10l.c +++ b/sysdeps/ieee754/ldbl-128/e_log10l.c @@ -193,6 +193,9 @@ __ieee754_log10l (long double x) if (hx >= 0x7fff000000000000LL) return (x + x); + if (x == 1.0L) + return 0.0L; + /* separate mantissa from exponent */ /* Note, frexp is used so that denormal numbers diff --git a/sysdeps/ieee754/ldbl-128ibm/e_log10l.c b/sysdeps/ieee754/ldbl-128ibm/e_log10l.c index 1a6a4a0fa3..7477791b77 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_log10l.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_log10l.c @@ -195,6 +195,9 @@ __ieee754_log10l (long double x) if (hx >= 0x7ff0000000000000LL) return (x + x); + if (x == 1.0L) + return 0.0L; + /* separate mantissa from exponent */ /* Note, frexp is used so that denormal numbers |