about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32/s_logbf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/s_logbf.c')
-rw-r--r--sysdeps/ieee754/flt-32/s_logbf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/s_logbf.c b/sysdeps/ieee754/flt-32/s_logbf.c
index ba0267ebcb..9ae20e332a 100644
--- a/sysdeps/ieee754/flt-32/s_logbf.c
+++ b/sysdeps/ieee754/flt-32/s_logbf.c
@@ -15,6 +15,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <fix-int-fp-convert-zero.h>
 
 float
 __logbf (float x)
@@ -33,6 +34,8 @@ __logbf (float x)
          though it were normalized.  */
       rix -= __builtin_clz (ix) - 9;
     }
+  if (FIX_INT_FP_CONVERT_ZERO && rix == 127)
+    return 0.0f;
   return (float) (rix - 127);
 }
 weak_alias (__logbf, logbf)