summary refs log tree commit diff
path: root/math/s_cproj.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-08-20 19:41:15 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-08-20 19:41:15 +0000
commitc980f2f4fe0f5d301f706017a1f7e4e942193ec0 (patch)
treea8a3c9c159747a9eed2acaa20a65e19d8b23a5c4 /math/s_cproj.c
parent0716c4fc9fff70870e28f84d18ddbce1db162101 (diff)
downloadglibc-c980f2f4fe0f5d301f706017a1f7e4e942193ec0.tar.gz
glibc-c980f2f4fe0f5d301f706017a1f7e4e942193ec0.tar.xz
glibc-c980f2f4fe0f5d301f706017a1f7e4e942193ec0.zip
Fix cproj handling of (finite, NaN) arguments (bug 15531).
Diffstat (limited to 'math/s_cproj.c')
-rw-r--r--math/s_cproj.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/math/s_cproj.c b/math/s_cproj.c
index c0be4618db..98f1a4c4b2 100644
--- a/math/s_cproj.c
+++ b/math/s_cproj.c
@@ -24,9 +24,7 @@
 __complex__ double
 __cproj (__complex__ double x)
 {
-  if (isnan (__real__ x) && isnan (__imag__ x))
-    return x;
-  else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+  if (__isinf_ns (__real__ x) || __isinf_ns (__imag__ x))
     {
       __complex__ double res;