summaryrefslogtreecommitdiff
path: root/libc/sysdeps/ieee754/flt-32/s_logbf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/ieee754/flt-32/s_logbf.c')
-rw-r--r--libc/sysdeps/ieee754/flt-32/s_logbf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libc/sysdeps/ieee754/flt-32/s_logbf.c b/libc/sysdeps/ieee754/flt-32/s_logbf.c
index 025c70de7..e2b3aaa62 100644
--- a/libc/sysdeps/ieee754/flt-32/s_logbf.c
+++ b/libc/sysdeps/ieee754/flt-32/s_logbf.c
@@ -31,8 +31,7 @@ __logbf (float x)
{
/* POSIX specifies that denormal number is treated as
though it were normalized. */
- int m = (ix == 0) ? 0 : __builtin_clz (ix);
- return -126.0 + (float)(8 - m);
+ rix -= __builtin_clz (ix) - 9;
}
return (float) (rix - 127);
}