diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-05-26 20:24:08 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-05-26 20:24:08 +0000 |
commit | 47023889431f41fa4e408ba468096b7040caaa11 (patch) | |
tree | 11d6fc1c1eb971e3177650edbe3c7f3d1d6361c9 /libc/sysdeps/ieee754/ldbl-128/s_logbl.c | |
parent | a2c69819561df393e300481562d300f12ee5bc69 (diff) |
Merge changes between r18730 and r18761 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@18762 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/ieee754/ldbl-128/s_logbl.c')
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-128/s_logbl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libc/sysdeps/ieee754/ldbl-128/s_logbl.c b/libc/sysdeps/ieee754/ldbl-128/s_logbl.c index cf6003e05..3ba67b7bd 100644 --- a/libc/sysdeps/ieee754/ldbl-128/s_logbl.c +++ b/libc/sysdeps/ieee754/ldbl-128/s_logbl.c @@ -41,10 +41,12 @@ __logbl (long double x) { /* POSIX specifies that denormal number is treated as though it were normalized. */ - int m1 = (hx == 0) ? 0 : __builtin_clzll (hx); - int m2 = (lx == 0) ? 0 : __builtin_clzll (lx); - int ma = (m1 == 0) ? m2 + 64 : m1; - return -16382.0 + (long double)(15 - ma); + int ma; + if (hx == 0) + ma = __builtin_clzll (lx) + 64; + else + ma = __builtin_clzll (hx); + ex -= ma - 16; } return (long double) (ex - 16383); } |