aboutsummaryrefslogtreecommitdiff
path: root/math/w_jnf.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_jnf.c
parentebaf36ebd838cec73c00433e7b3d41c9d126fe47 (diff)
downloadglibc-92221550d72bafcd322ac5ab2a951054184b7f1a.zip
glibc-92221550d72bafcd322ac5ab2a951054184b7f1a.tar.gz
glibc-92221550d72bafcd322ac5ab2a951054184b7f1a.tar.bz2
Use non-signaling floating-point comparisons in math functions.
Diffstat (limited to 'math/w_jnf.c')
-rw-r--r--math/w_jnf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/math/w_jnf.c b/math/w_jnf.c
index ef29eb4..36d6f6d 100644
--- a/math/w_jnf.c
+++ b/math/w_jnf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
@@ -25,7 +25,7 @@
float
jnf (int n, float x)
{
- if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
+ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
&& _LIB_VERSION != _IEEE_)
/* jn(n,|x|>X_TLOSS) */
return __kernel_standard_f (n, x, 138);
@@ -38,7 +38,8 @@ jnf (int n, float x)
float
ynf (int n, float x)
{
- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
+ if (__builtin_expect (islessequal (x, 0.0f)
+ || isgreater (x, (float) X_TLOSS), 0)
&& _LIB_VERSION != _IEEE_)
{
if (x < 0.0f)