aboutsummaryrefslogtreecommitdiff
path: root/math/w_exp2.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2012-02-19 11:20:18 +0100
committerAurelien Jarno <aurelien@aurel32.net>2012-02-19 11:20:18 +0100
commit92221550d72bafcd322ac5ab2a951054184b7f1a (patch)
treea48ab236bb1d2c3f29138d04500129fa230ed2e6 /math/w_exp2.c
parentebaf36ebd838cec73c00433e7b3d41c9d126fe47 (diff)
downloadglibc-92221550d72bafcd322ac5ab2a951054184b7f1a.tar
glibc-92221550d72bafcd322ac5ab2a951054184b7f1a.tar.gz
glibc-92221550d72bafcd322ac5ab2a951054184b7f1a.tar.bz2
glibc-92221550d72bafcd322ac5ab2a951054184b7f1a.zip
Use non-signaling floating-point comparisons in math functions.
Diffstat (limited to 'math/w_exp2.c')
-rw-r--r--math/w_exp2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/math/w_exp2.c b/math/w_exp2.c
index bf223265cb..7a3b0afb74 100644
--- a/math/w_exp2.c
+++ b/math/w_exp2.c
@@ -12,7 +12,8 @@ static const double u_threshold = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
double
__exp2 (double x)
{
- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
+ if (__builtin_expect (islessequal (x, u_threshold)
+ || isgreater (x, o_threshold), 0)
&& _LIB_VERSION != _IEEE_ && __finite (x))
/* exp2 overflow: 44, exp2 underflow: 45 */
return __kernel_standard (x, x, 44 + (x <= o_threshold));