about summary refs log tree commit diff
path: root/math/w_log2.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_log2.c
parentebaf36ebd838cec73c00433e7b3d41c9d126fe47 (diff)
downloadglibc-92221550d72bafcd322ac5ab2a951054184b7f1a.tar.gz
glibc-92221550d72bafcd322ac5ab2a951054184b7f1a.tar.xz
glibc-92221550d72bafcd322ac5ab2a951054184b7f1a.zip
Use non-signaling floating-point comparisons in math functions.
Diffstat (limited to 'math/w_log2.c')
-rw-r--r--math/w_log2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/math/w_log2.c b/math/w_log2.c
index 998e5d9b70..e58e10979d 100644
--- a/math/w_log2.c
+++ b/math/w_log2.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 @@
 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)
 	{