about summary refs log tree commit diff
path: root/math/divtc3.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-08 10:18:26 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-08 10:18:26 -0400
commit7edb55ce06ab1fa716a062cd1cb6682585bb449d (patch)
tree3fed82e7c3f86ac57f3e9d6f314044b7dbdb8d03 /math/divtc3.c
parent187da0aedcd9d0a2fb34477bef41549681ba1273 (diff)
downloadglibc-7edb55ce06ab1fa716a062cd1cb6682585bb449d.tar.gz
glibc-7edb55ce06ab1fa716a062cd1cb6682585bb449d.tar.xz
glibc-7edb55ce06ab1fa716a062cd1cb6682585bb449d.zip
Optimize use of isnan, isinf, finite
Diffstat (limited to 'math/divtc3.c')
-rw-r--r--math/divtc3.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/math/divtc3.c b/math/divtc3.c
index d974ae6454..72bca66d4d 100644
--- a/math/divtc3.c
+++ b/math/divtc3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@redhat.com>, 2005.
 
@@ -55,17 +55,19 @@ __divtc3 (long double a, long double b, long double c, long double d)
 	  x = __copysignl (INFINITY, c) * a;
 	  y = __copysignl (INFINITY, c) * b;
 	}
-      else if ((isinf (a) || isinf (b)) && isfinite (c) && isfinite (d))
+      else if ((__isinf_nsl (a) || __isinf_nsl (b))
+	       && isfinite (c) && isfinite (d))
 	{
-	  a = __copysignl (isinf (a) ? 1 : 0, a);
-	  b = __copysignl (isinf (b) ? 1 : 0, b);
+	  a = __copysignl (__isinf_nsl (a) ? 1 : 0, a);
+	  b = __copysignl (__isinf_nsl (b) ? 1 : 0, b);
 	  x = INFINITY * (a * c + b * d);
 	  y = INFINITY * (b * c - a * d);
 	}
-      else if ((isinf (c) || isinf (d)) && isfinite (a) && isfinite (b))
+      else if ((__isinf_nsl (c) || __isinf_nsl (d))
+	       && isfinite (a) && isfinite (b))
 	{
-	  c = __copysignl (isinf (c) ? 1 : 0, c);
-	  d = __copysignl (isinf (d) ? 1 : 0, d);
+	  c = __copysignl (__isinf_nsl (c) ? 1 : 0, c);
+	  d = __copysignl (__isinf_nsl (d) ? 1 : 0, d);
 	  x = 0.0 * (a * c + b * d);
 	  y = 0.0 * (b * c - a * d);
 	}