/* Complex hyperbolic tangent for float types.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <complex.h>
#include <fenv.h>
#include <math.h>
#include <math_private.h>
+#include <math-underflow.h>
#include <float.h>
CFLOAT
}
else
{
- __real__ res = M_NAN;
+ if (__real__ x == 0)
+ __real__ res = __real__ x;
+ else
+ __real__ res = M_NAN;
__imag__ res = M_NAN;
if (isinf (__imag__ x))