ce426f
From 1aa79fbb9921281a8aedfe3eea1f273406b5f24c Mon Sep 17 00:00:00 2001
ce426f
From: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
ce426f
Date: Wed, 30 Jul 2014 11:23:08 -0500
ce426f
Subject: [PATCH] Fix cproj handling of (finite, NaN) arguments (bug 15531).
ce426f
ce426f
commit c980f2f4fe0f5d301f706017a1f7e4e942193ec0
ce426f
Author: Joseph Myers <joseph@codesourcery.com>
ce426f
Date:   Tue Aug 20 19:41:15 2013 +0000
ce426f
ce426f
    Fix cproj handling of (finite, NaN) arguments (bug 15531).
ce426f
ce426f
	* math/s_cprojf.c (__cprojf): Only return an infinity if one part of
ce426f
	argument is infinite.
ce426f
ce426f
This patch is added so as to compile isnan multiarch implementation
ce426f
successfully since __GI___isnanf is missing.This wll be fixed later in master.
ce426f
---
ce426f
 math/s_cprojf.c | 6 ++----
ce426f
 1 file changed, 2 insertions(+), 4 deletions(-)
ce426f
ce426f
diff --git glibc-2.17-c758a686/math/s_cprojf.c glibc-2.17-c758a686/math/s_cprojf.c
ce426f
index 6cbc93b..a0f0af9 100644
ce426f
--- glibc-2.17-c758a686/math/s_cprojf.c
ce426f
+++ glibc-2.17-c758a686/math/s_cprojf.c
ce426f
@@ -1,5 +1,5 @@
ce426f
 /* Compute projection of complex float value to Riemann sphere.
ce426f
-   Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc.
ce426f
+   Copyright (C) 1997-2014 Free Software Foundation, Inc.
ce426f
    This file is part of the GNU C Library.
ce426f
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
ce426f
 
ce426f
@@ -24,9 +24,7 @@
ce426f
 __complex__ float
ce426f
 __cprojf (__complex__ float x)
ce426f
 {
ce426f
-  if (isnan (__real__ x) && isnan (__imag__ x))
ce426f
-    return x;
ce426f
-  else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
ce426f
+  if (__isinf_nsf (__real__ x) || __isinf_nsf (__imag__ x))
ce426f
     {
ce426f
       __complex__ float res;
ce426f
 
ce426f
-- 
ce426f
1.8.3.1
ce426f