diff options
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_logb.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_logb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_logb.c b/sysdeps/ieee754/dbl-64/s_logb.c index 7a6c49abf5..3a26b18f78 100644 --- a/sysdeps/ieee754/dbl-64/s_logb.c +++ b/sysdeps/ieee754/dbl-64/s_logb.c @@ -18,6 +18,7 @@ #include <math.h> #include <math_private.h> +#include <fix-int-fp-convert-zero.h> double __logb (double x) @@ -41,6 +42,8 @@ __logb (double x) ma = __builtin_clz (ix); rix -= ma - 12; } + if (FIX_INT_FP_CONVERT_ZERO && rix == 1023) + return 0.0; return (double) (rix - 1023); } weak_alias (__logb, logb) |