]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - math/s_cexp_template.c
powerpc: Fix build of wcscpy with --disable-multi-arch
[thirdparty/glibc.git] / math / s_cexp_template.c
index a60afe0cac2d8eb250a999b8459b7d04528d366a..c1c74ae0ef2a50b5f9b8ac6bada3e35012273219 100644 (file)
@@ -1,5 +1,5 @@
 /* Return value of complex exponential function for a float type.
-   Copyright (C) 1997-2016 Free Software Foundation, Inc.
+   Copyright (C) 1997-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -21,6 +21,7 @@
 #include <fenv.h>
 #include <math.h>
 #include <math_private.h>
+#include <math-underflow.h>
 #include <float.h>
 
 CFLOAT
@@ -121,10 +122,7 @@ M_DECL_FUNC (__cexp) (CFLOAT x)
       else if (signbit (__real__ x) == 0)
        {
          __real__ retval = M_HUGE_VAL;
-         __imag__ retval = M_NAN;
-
-         if (icls == FP_INFINITE)
-           feraiseexcept (FE_INVALID);
+         __imag__ retval = __imag__ x - __imag__ x;
        }
       else
        {
@@ -151,7 +149,3 @@ M_DECL_FUNC (__cexp) (CFLOAT x)
   return retval;
 }
 declare_mgen_alias (__cexp, cexp)
-
-#if M_LIBM_NEED_COMPAT (cexp)
-declare_mgen_libm_compat (__cexp, cexp)
-#endif