m68k: avoid invalid exception for ccosh(NaN+iNaN)
authorAndreas Schwab <schwab@linux-m68k.org>
Sat, 25 Feb 2012 17:18:00 +0000 (18:18 +0100)
committerAndreas Schwab <schwab@linux-m68k.org>
Sat, 25 Feb 2012 17:18:32 +0000 (18:18 +0100)
ChangeLog.m68k
sysdeps/m68k/m680x0/fpu/s_ccosh.c

index e40c284..02d1355 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-25  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * sysdeps/m68k/m680x0/fpu/s_ccosh.c: Avoid raising invalid
+       exception for NaN+iNaN.
+
 2012-02-24  Andreas Schwab  <schwab@linux-m68k.org>
 
        * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update ULPs.
index d272e98..7f1c8ab 100644 (file)
@@ -1,5 +1,5 @@
 /* Complex cosine hyperbole function.  m68k fpu version
-   Copyright (C) 1997, 1999, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2010, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 
@@ -67,7 +67,7 @@ s(__ccosh) (__complex__ float_type x)
          if (rx_cond & __M81_COND_INF)
            __real__ retval = s(fabs) (__real__ x);
          else
-           __real__ retval = 0.0/0.0;
+           __real__ retval = s(__nan) ("");
          __imag__ retval = __imag__ x - __imag__ x;
        }
     }