summaryrefslogtreecommitdiff
path: root/libc/math/s_ctanhf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/math/s_ctanhf.c')
-rw-r--r--libc/math/s_ctanhf.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libc/math/s_ctanhf.c b/libc/math/s_ctanhf.c
index c331dbaab..6cb3a2cc9 100644
--- a/libc/math/s_ctanhf.c
+++ b/libc/math/s_ctanhf.c
@@ -1,5 +1,5 @@
/* Complex hyperbole tangent for float.
- Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,8 +21,7 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
-#include "math_private.h"
+#include <math_private.h>
__complex__ float
@@ -30,9 +29,9 @@ __ctanhf (__complex__ float x)
{
__complex__ float res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
- if (__isinff (__real__ x))
+ if (__isinf_nsf (__real__ x))
{
__real__ res = __copysignf (1.0, __real__ x);
__imag__ res = __copysignf (0.0, __imag__ x);
@@ -46,10 +45,8 @@ __ctanhf (__complex__ float x)
__real__ res = __nanf ("");
__imag__ res = __nanf ("");
-#ifdef FE_INVALID
- if (__isinff (__imag__ x))
+ if (__isinf_nsf (__imag__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else