summaryrefslogtreecommitdiff
path: root/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c')
-rw-r--r--libc/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c b/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c
index 185dd05be..40b888813 100644
--- a/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c
+++ b/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c
@@ -36,8 +36,8 @@ __logb (double x)
return x * x;
if (__builtin_expect (ex == 0, 0))
{
- int m = (ix == 0) ? 0 : __builtin_clzll (ix);
- return -1022.0 + (double)(11 -m);
+ int m = __builtin_clzll (ix);
+ ex -= m - 12;
}
return (double) (ex - 1023);
}