]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/ieee754/dbl-64/w_exp.c
Use non-signaling floating-point comparisons in math functions.
[thirdparty/glibc.git] / sysdeps / ieee754 / dbl-64 / w_exp.c
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);