]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use non-signaling floating-point comparisons in math functions.
authorAurelien Jarno <aurelien@aurel32.net>
Sun, 19 Feb 2012 10:20:18 +0000 (11:20 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 19 Feb 2012 10:20:18 +0000 (11:20 +0100)
41 files changed:
ChangeLog
math/w_acos.c
math/w_acosf.c
math/w_acosh.c
math/w_acoshf.c
math/w_acoshl.c
math/w_acosl.c
math/w_asin.c
math/w_asinf.c
math/w_asinl.c
math/w_atanh.c
math/w_atanhf.c
math/w_atanhl.c
math/w_exp2.c
math/w_exp2f.c
math/w_exp2l.c
math/w_j0.c
math/w_j0f.c
math/w_j0l.c
math/w_j1.c
math/w_j1f.c
math/w_j1l.c
math/w_jn.c
math/w_jnf.c
math/w_log.c
math/w_log10.c
math/w_log10f.c
math/w_log10l.c
math/w_log2.c
math/w_log2f.c
math/w_log2l.c
math/w_logf.c
math/w_logl.c
math/w_sqrt.c
math/w_sqrtf.c
math/w_sqrtl.c
sysdeps/ieee754/dbl-64/e_atanh.c
sysdeps/ieee754/dbl-64/w_exp.c
sysdeps/ieee754/flt-32/e_atanhf.c
sysdeps/ieee754/flt-32/w_expf.c
sysdeps/ieee754/ldbl-96/w_expl.c

index 906b3eee02bc8a1c89671b48d5985604f7e9b25f..98dce70996ff347fd62dce8d57639d9704ad5609 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2012-02-19  Aurelien Jarno  <aurelien@aurel32.net>
+
+       * math/w_acos.c: Use non-signaling floating-point comparisons.
+       * math/w_acosf.c: Likewise.
+       * math/w_acosh.c: Likewise.
+       * math/w_acoshf.c: Likewise.
+       * math/w_acoshl.c: Likewise.
+       * math/w_acosl.c: Likewise.
+       * math/w_asin.c: Likewise.
+       * math/w_asinf.c: Likewise.
+       * math/w_asinl.c: Likewise.
+       * math/w_atanh.c: Likewise.
+       * math/w_atanhf.c: Likewise.
+       * math/w_atanhl.c: Likewise.
+       * math/w_exp2.c: Likewise.
+       * math/w_exp2f.c: Likewise.
+       * math/w_exp2l.c: Likewise.
+       * math/w_j0.c: Likewise.
+       * math/w_j0f.c: Likewise.
+       * math/w_j0l.c: Likewise.
+       * math/w_j1.c: Likewise.
+       * math/w_j1f.c: Likewise.
+       * math/w_j1l.c: Likewise.
+       * math/w_jn.c: Likewise.
+       * math/w_jnf.c: Likewise.
+       * math/w_log.c: Likewise.
+       * math/w_log10.c: Likewise.
+       * math/w_log10f.c: Likewise.
+       * math/w_log10l.c: Likewise.
+       * math/w_log2.c: Likewise.
+       * math/w_log2f.c: Likewise.
+       * math/w_log2l.c: Likewise.
+       * math/w_logf.c: Likewise.
+       * math/w_logl.c: Likewise.
+       * math/w_sqrt.c: Likewise.
+       * math/w_sqrtf.c: Likewise.
+       * math/w_sqrtl.c: Likewise.
+       * sysdeps/ieee754/dbl-64/e_atanh.c: Likewise.
+       * sysdeps/ieee754/dbl-64/w_exp.c: Likewise.
+       * sysdeps/ieee754/flt-32/e_atanhf.c: Likewise.
+       * sysdeps/ieee754/flt-32/w_expf.c: Likewise.
+       * sysdeps/ieee754/ldbl-96/w_expl.c: Likewise.
+
 2012-02-19  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #9739]
index 3138408ff493916e3cf486452e7c055c12dcf9f2..0490933291c8b71037b848b561b007f7a8fb5949 100644 (file)
@@ -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,8 @@
 double
 __acos (double x)
 {
-  if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabs (x), 1.0), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       /* acos(|x|>1) */
       feraiseexcept (FE_INVALID);
index 0e41a2c47b506e17b809334b516b3e0fef01e7c8..2500a7d774085a80b7f196e98a4a6e03cb0bf9d4 100644 (file)
@@ -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,8 @@
 float
 __acosf (float x)
 {
-  if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       /* acos(|x|>1) */
       feraiseexcept (FE_INVALID);
index 0bd2686464f92b14623a5947d2b6ddcc37ab06cb..d6329878a3a154506f6ec9fc516cdbd926efa137 100644 (file)
@@ -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.
 
@@ -24,7 +24,7 @@
 double
 __acosh (double x)
 {
-  if (__builtin_expect (x < 1.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isless (x,  1.0), 0) && _LIB_VERSION != _IEEE_)
     /* acosh(x<1) */
     return __kernel_standard (x, x, 29);
 
index c59bf94d10b12e98f7e4cbeb78d780101c783d57..f77df2b82e5178d4364315122507633dc3643f26 100644 (file)
@@ -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.
 
@@ -24,7 +24,7 @@
 float
 __acoshf (float x)
 {
-  if (__builtin_expect (x < 1.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isless (x, 1.0f), 0) && _LIB_VERSION != _IEEE_)
     /* acosh(x<1) */
     return __kernel_standard_f (x, x, 129);
 
index 819bdfce1019a62a8803192103c29873c0e9258b..cc823b88e913a22e0d099f3db0408a64c24d866a 100644 (file)
@@ -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.
 
@@ -24,7 +24,7 @@
 long double
 __acoshl (long double x)
 {
-  if (__builtin_expect (x < 1.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isless (x, 1.0L), 0) && _LIB_VERSION != _IEEE_)
     /* acosh(x<1) */
     return __kernel_standard (x, x, 229);
 
index 641706864e42fee4da8df0405dd3f326e82efc0f..05023b4298782388c9422ed49362a8db1c5091d2 100644 (file)
@@ -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,8 @@
 long double
 __acosl (long double x)
 {
-  if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       /* acos(|x|>1) */
       feraiseexcept (FE_INVALID);
index d4e89ce72e3f01304fd8d209e754851651676a5b..0fa9487a3049ceb9355a862b9242bbf8308c7360 100644 (file)
@@ -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,8 @@
 double
 __asin (double x)
 {
-  if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabs (x),  1.0), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       /* asin(|x|>1) */
       feraiseexcept (FE_INVALID);
index 270961fbd0bc6b5f809b6507ae9228f5c9f7912e..c28edabcf6026a3a8779132ba0842fd40b5127c8 100644 (file)
@@ -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,8 @@
 float
 __asinf (float x)
 {
-  if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       /* asin(|x|>1) */
       feraiseexcept (FE_INVALID);
index 32e5273375b7752e2aa06933fd52b46aa3327681..e4036d880604ae58973b43164cd645563a515bdb 100644 (file)
@@ -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,8 @@
 long double
 __asinl (long double x)
 {
-  if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       /* asin(|x|>1) */
       feraiseexcept (FE_INVALID);
index 1022bd52d263969856d72ad4040e2731f030b8fd..190d2e9d97bbcee7261fd71832e9c4592be373ae 100644 (file)
@@ -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.
 
@@ -24,7 +24,8 @@
 double
 __atanh (double x)
 {
-  if (__builtin_expect (fabs (x) >= 1.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreaterequal (fabs (x), 1.0), 0)
+      && _LIB_VERSION != _IEEE_)
     return __kernel_standard (x, x,
                              fabs (x) > 1.0
                              ? 30              /* atanh(|x|>1) */
index 3c8cf8304a8a32a19e0c6529ea7684ab192404b6..e0c5dc39b4bccd0c8fbbd31917fa29d9a5833525 100644 (file)
@@ -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.
 
@@ -24,7 +24,8 @@
 float
 __atanhf (float x)
 {
-  if (__builtin_expect (fabsf (x) >= 1.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreaterequal (fabsf (x), 1.0f), 0)
+      && _LIB_VERSION != _IEEE_)
     return __kernel_standard_f (x, x,
                                fabsf (x) > 1.0f
                                ? 130           /* atanh(|x|>1) */
index f582acfcdade3e3bb557988be552f0c2db2b93b5..319535d1721621a9e936ed67849ae1e2b4cb344b 100644 (file)
@@ -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.
 
@@ -24,7 +24,8 @@
 long double
 __atanhl (long double x)
 {
-  if (__builtin_expect (fabsl (x) >= 1.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreaterequal (fabsl (x), 1.0L), 0)
+      && _LIB_VERSION != _IEEE_)
     return __kernel_standard (x, x,
                              fabsl (x) > 1.0L
                              ? 230             /* atanh(|x|>1) */
index bf223265cb476e243608431e113fe2259956d2e7..7a3b0afb74d224206f1b1ce6cfeab6cc64dc8168 100644 (file)
@@ -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));
index 7215fcaf4cb99a3b183a7ab06300d97437cc439f..c4e9e941640be66ba32a726d1f3d1f5a6fcc58f8 100644 (file)
@@ -12,7 +12,8 @@ static const float u_threshold = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
 float
 __exp2f (float 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_ && __finitef (x))
     /* exp2 overflow: 144, exp2 underflow: 145 */
     return __kernel_standard_f (x, x, 144 + (x <= o_threshold));
index ac8d231e2c69e408ded8260bcf626de328a38896..442a637347e19685d8ace82682a5e97622df10ae 100644 (file)
@@ -13,7 +13,8 @@ static const long double u_threshold
 long double
 __exp2l (long 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_ && __finitel (x))
     /* exp2 overflow: 244, exp2 underflow: 245 */
     return __kernel_standard (x, x, 244 + (x <= o_threshold));
index 1dff8b4d5a422ab1cb84351b94716e1e2dd0e129..f8d37247565c2a3f01262ad3b5efd8f31c3d5597 100644 (file)
@@ -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,8 @@
 double
 j0 (double x)
 {
-  if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     /* j0(|x|>X_TLOSS) */
     return __kernel_standard (x, x, 34);
 
@@ -40,7 +41,8 @@ strong_alias (j0, j0l)
 double
 y0 (double x)
 {
-  if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       if (x < 0.0)
        {
index fc52f26d99e7fe76a9d424229a1722474c87e83d..cef36aab1b5775d9ccdfdf04d47b160c72efd24a 100644 (file)
@@ -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
 j0f (float x)
 {
-  if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
+  if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
       && _LIB_VERSION != _IEEE_)
     /* j0(|x|>X_TLOSS) */
     return __kernel_standard_f (x, x, 134);
@@ -38,7 +38,8 @@ j0f (float x)
 float
 y0f (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)
index 8d72d504f53c3730c572caeab0548358bf0e9476..144f33c0dbbeb93f39bc9b38a6db1288e39a0d13 100644 (file)
@@ -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,8 @@
 long double
 __j0l (long double x)
 {
-  if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     /* j0(|x|>X_TLOSS) */
     return __kernel_standard (x, x, 234);
 
@@ -38,7 +39,8 @@ weak_alias (__j0l, j0l)
 long double
 __y0l (long double x)
 {
-  if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       if (x < 0.0L)
        {
index 358e0e192b6dd4f613060c3278243243b044936f..e9a5357b76beb51993ec17658555c529c1a7ce90 100644 (file)
@@ -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,8 @@
 double
 j1 (double x)
 {
-  if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     /* j1(|x|>X_TLOSS) */
     return __kernel_standard (x, x, 36);
 
@@ -40,7 +41,8 @@ strong_alias (j1, j1l)
 double
 y1 (double x)
 {
-  if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       if (x < 0.0)
        {
index 096fdf56926e2449d38787d488c202267a854d43..29bd949eeabc3abccca97190448727e7922ad9ca 100644 (file)
@@ -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,8 @@
 float
 j1f (float x)
 {
-  if (__builtin_expect (fabsf (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     /* j1(|x|>X_TLOSS) */
     return __kernel_standard_f (x, x, 136);
 
@@ -37,7 +38,8 @@ j1f (float x)
 float
 y1f (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)
index 93e4ee458d1593b52f53621353303b048272dca1..01b8551252dd80ce78a2fc92cae6d8ead7188544 100644 (file)
@@ -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,8 @@
 long double
 __j1l (long double x)
 {
-  if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     /* j1(|x|>X_TLOSS) */
     return __kernel_standard (x, x, 236);
 
@@ -38,7 +39,8 @@ weak_alias (__j1l, j1l)
 long double
 __y1l (long double x)
 {
-  if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       if (x < 0.0L)
        {
index f0dd8c60383f34bb3fb2667f9fbe24830ac6672a..fd3fb162f2ab8bfc587ab9c2743135ea063110f5 100644 (file)
@@ -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,8 @@
 double
 jn (int n, double x)
 {
-  if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     /* jn(n,|x|>X_TLOSS) */
     return __kernel_standard (n, x, 38);
 
@@ -40,7 +41,8 @@ strong_alias (jn, jnl)
 double
 yn (int n, double x)
 {
-  if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
+      && _LIB_VERSION != _IEEE_)
     {
       if (x < 0.0)
        {
index ef29eb45ba21c4a099d0307a67fcda0945843084..36d6f6d57337edc0dd8eb9ba9eb089bb256db96c 100644 (file)
@@ -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)
index efc1c4c0719c2ea8e177251623164d09b233d0d8..ec33605f3700068f4f41804abdb62d141408d4e2 100644 (file)
@@ -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 @@
 double
 __log (double x)
 {
-  if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0)
        {
index 2717ade12757301ac5cc744062c17e1cebb537f0..fe799ad07eccea9a96bd0c7664bd49c40495f18a 100644 (file)
@@ -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 @@
 double
 __log10 (double x)
 {
-  if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0)
        {
index 60737ca832ecf25dee1ca744f95a6a26c3ecb7c6..4b821f71309947d172d923a672079676075458e7 100644 (file)
@@ -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
 __log10f (float x)
 {
-  if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0f)
        {
index b26f18c2a2b0c7af04756b20806e8e5ca31c4629..0e5a137508fd9f6aee8e0f8643bf10cb2b44b7ea 100644 (file)
@@ -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 @@
 long double
 __log10l (long double x)
 {
-  if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0L)
        {
index 998e5d9b70bd77b89912db419864a5ffc98a43bc..e58e10979d1beea1c9afa84870c77f147572e427 100644 (file)
@@ -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 @@
 double
 __log2 (double x)
 {
-  if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0)
        {
index 6d91bf4e7a3035a3995942963d5648c236243619..6963ed2119f785f518ab5eb1ba503b833b9ecce2 100644 (file)
@@ -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
 __log2f (float x)
 {
-  if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0)
        {
index e51c1bcd277799079607be28075e9a056d1c81a3..eed04ff6cc594270fe5aa18dde53df560a1894f5 100644 (file)
@@ -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 @@
 long double
 __log2l (long double x)
 {
-  if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0L)
        {
index 8aa27c872bf81927dcf1b1fbcc34a9a5ccb8ab0f..38d408f1829e2defd0a13cb832778249506d733e 100644 (file)
@@ -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
 __logf (float x)
 {
-  if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0f)
        {
index a3139ff7039a90af097982438514612c1208d27b..593b37d81fa969af35ee806ea1ea1eae13910a82 100644 (file)
@@ -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 @@
 long double
 __logl (long double x)
 {
-  if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
     {
       if (x == 0.0L)
        {
index 409a6dfa1202a890becf602c10f75f5e6984d75b..f6ba5423a817c5b3b50d9585a26cffaac6db4f8f 100644 (file)
@@ -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.
 
@@ -24,7 +24,7 @@
 double
 __sqrt (double x)
 {
-  if (__builtin_expect (x < 0.0, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isless (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
     return __kernel_standard (x, x, 26); /* sqrt(negative) */
 
   return __ieee754_sqrt (x);
index 3c3d2f8dfc09d1022164f4cba64a2671939af0a0..c128e9b554691705aed9b11f20c25db5655a2ad6 100644 (file)
@@ -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.
 
@@ -24,7 +24,7 @@
 float
 __sqrtf (float x)
 {
-  if (__builtin_expect (x < 0.0f, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isless (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
     return __kernel_standard_f (x, x, 126); /* sqrt(negative) */
 
   return __ieee754_sqrtf (x);
index 5e18f44c32f03b81779c85f52a2e30ad7d0a5bcf..2a4a0481b06be32c775344bf97cbad560a566409 100644 (file)
@@ -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.
 
@@ -24,7 +24,7 @@
 long double
 __sqrtl (long double x)
 {
-  if (__builtin_expect (x < 0.0L, 0) && _LIB_VERSION != _IEEE_)
+  if (__builtin_expect (isless (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
     return __kernel_standard (x, x, 226); /* sqrt(negative) */
 
   return __ieee754_sqrtl (x);
index 9fc21abe2d661dcf7b81401e581be70b4159c170..5f471b1d7993a18dfc24d7aa30741aa8480d2d83 100644 (file)
@@ -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.
 
@@ -46,7 +46,7 @@ __ieee754_atanh (double x)
 {
   double xa = fabs (x);
   double t;
-  if (xa < 0.5)
+  if (isless (xa, 0.5))
     {
       if (__builtin_expect (xa < 0x1.0p-28, 0))
        {
@@ -57,11 +57,11 @@ __ieee754_atanh (double x)
       t = xa + xa;
       t = 0.5 * __log1p (t + t * xa / (1.0 - xa));
     }
-  else if (__builtin_expect (xa < 1.0, 1))
+  else if (__builtin_expect (isless (xa, 1.0), 1))
     t = 0.5 * __log1p ((xa + xa) / (1.0 - xa));
   else
     {
-      if (xa > 1.0)
+      if (isgreater (xa, 1.0))
        return (x - x) / (x - x);
 
       return x / 0.0;
index ee42587be497af5da93bee707b7f9362aadecc1f..b584ed83d97e77745d8a461394682418ff45c47c 100644 (file)
@@ -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.
 
@@ -28,12 +28,12 @@ u_threshold= -7.45133219101941108420e+02;  /* 0xc0874910, 0xD52D3051 */
 double
 __exp (double x)
 {
-  if (__builtin_expect (x > o_threshold, 0))
+  if (__builtin_expect (isgreater (x, o_threshold), 0))
     {
       if (_LIB_VERSION != _IEEE_)
        return __kernel_standard_f (x, x, 6);
     }
-  else if (__builtin_expect (x < u_threshold, 0))
+  else if (__builtin_expect (isless (x, u_threshold), 0))
     {
       if (_LIB_VERSION != _IEEE_)
        return __kernel_standard_f (x, x, 7);
index 75ed6917e9cb7feb55700fac656be46e5339107e..7af2f6ce6715e8ecd077f27105b8035314c9611c 100644 (file)
@@ -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.
 
@@ -46,7 +46,7 @@ __ieee754_atanhf (float x)
 {
   float xa = fabsf (x);
   float t;
-  if (xa < 0.5f)
+  if (isless (xa, 0.5f))
     {
       if (__builtin_expect (xa < 0x1.0p-28f, 0))
        {
@@ -57,11 +57,11 @@ __ieee754_atanhf (float x)
       t = xa + xa;
       t = 0.5f * __log1pf (t + t * xa / (1.0f - xa));
     }
-  else if (__builtin_expect (xa < 1.0f, 1))
+  else if (__builtin_expect (isless (xa, 1.0f), 1))
     t = 0.5f * __log1pf ((xa + xa) / (1.0f - xa));
   else
     {
-      if (xa > 1.0f)
+      if (isgreater (xa, 1.0f))
        return (x - x) / (x - x);
 
       return x / 0.0f;
index 550087231989473b1c18cfd462562f6fbce9f302..bc3b2f67901cfef09b9a868d011b6c054be4bd12 100644 (file)
@@ -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.
 
@@ -28,12 +28,12 @@ u_threshold= -1.0397208405e+02;  /* 0xc2cff1b5 */
 float
 __expf (float x)
 {
-  if (__builtin_expect (x > o_threshold, 0))
+  if (__builtin_expect (isgreater (x, o_threshold), 0))
     {
       if (_LIB_VERSION != _IEEE_)
        return __kernel_standard_f (x, x, 106);
     }
-  else if (__builtin_expect (x < u_threshold, 0))
+  else if (__builtin_expect (isless (x, u_threshold), 0))
     {
       if (_LIB_VERSION != _IEEE_)
        return __kernel_standard_f (x, x, 107);
index ec9d8a78843e5dbe8972077de023696ce508c90c..d61c0a37bbc6fae0be463b49e992c6d4d37992b1 100644 (file)
@@ -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.
 
@@ -30,12 +30,12 @@ u_threshold= -1.140019167866942050398521670162263001513e4;
 long double
 __expl (long double x)
 {
-  if (__builtin_expect (x > o_threshold, 0))
+  if (__builtin_expect (isgreater (x, o_threshold), 0))
     {
       if (_LIB_VERSION != _IEEE_)
        return __kernel_standard (x, x, 206);
     }
-  else if (__builtin_expect (x < u_threshold, 0))
+  else if (__builtin_expect (isless (x, u_threshold), 0))
     {
       if (_LIB_VERSION != _IEEE_)
        return __kernel_standard (x, x, 207);