diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c b/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c index 3b5a1a8414..abbd694eea 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c @@ -27,6 +27,9 @@ __getpayloadl (const long double *x) double xhi = ldbl_high (*x); uint64_t ix; EXTRACT_WORDS64 (ix, xhi); + if ((ix & 0x7ff0000000000000ULL) != 0x7ff0000000000000ULL + || (ix & 0xfffffffffffffULL) == 0) + return -1; ix &= 0x7ffffffffffffULL; if (FIX_INT_FP_CONVERT_ZERO && ix == 0) return 0.0L; |