diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-96/s_logbl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-96/s_logbl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sysdeps/ieee754/ldbl-96/s_logbl.c b/sysdeps/ieee754/ldbl-96/s_logbl.c index d8ad4bcfcf..4289be1933 100644 --- a/sysdeps/ieee754/ldbl-96/s_logbl.c +++ b/sysdeps/ieee754/ldbl-96/s_logbl.c @@ -38,10 +38,12 @@ __logbl (long double x) { /* POSIX specifies that denormal number is treated as though it were normalized. */ - int m1 = (ix == 0) ? 0 : __builtin_clz (ix); - int m2 = (lx == 0) ? 0 : __builtin_clz (lx); - int ma = (m1 == 0) ? m2 + 32 : m1; - return -16382.0 - (long double)(ma); + int ma; + if (ix == 0) + ma = __builtin_clz (lx) + 32; + else + ma = __builtin_clz (ix); + es -= ma - 1; } return (long double) (es - 16383); } |