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-128ibm/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-128ibm/s_logbl.c')
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-128ibm/s_logbl.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_logbl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_logbl.c index 678b6cad5..92ce2c189 100644 --- a/libc/sysdeps/ieee754/ldbl-128ibm/s_logbl.c +++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_logbl.c @@ -30,7 +30,7 @@ __logbl (long double x) GET_LDOUBLE_WORDS64 (hx, lx, x); hx &= 0x7fffffffffffffffLL; /* high |x| */ - if ((hx | (lx & 0x7fffffffffffffffLL)) == 0) + if (hx == 0) return -1.0 / fabs (x); if (hx >= 0x7ff0000000000000LL) return x * x; @@ -38,10 +38,7 @@ __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 -1022.0 + (long double)(11 - ma); + rhx -= __builtin_clzll (hx) - 12; } return (long double) (rhx - 1023); } |