about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32/s_getpayloadf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/flt-32/s_getpayloadf.c')
-rw-r--r--sysdeps/ieee754/flt-32/s_getpayloadf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/s_getpayloadf.c b/sysdeps/ieee754/flt-32/s_getpayloadf.c
index e1d22473ff..1baad4847e 100644
--- a/sysdeps/ieee754/flt-32/s_getpayloadf.c
+++ b/sysdeps/ieee754/flt-32/s_getpayloadf.c
@@ -27,6 +27,9 @@ __getpayloadf (const float *x)
 {
   uint32_t ix;
   GET_FLOAT_WORD (ix, *x);
+  if ((ix & 0x7f800000) != 0x7f800000
+      || (ix & 0x7fffff) == 0)
+    return -1;
   ix &= 0x3fffff;
   if (FIX_INT_FP_CONVERT_ZERO && ix == 0)
     return 0.0f;