Also, change last reference to __sqrt into __sqrt to easily.
+2011-10-22 Ulrich Drepper <drepper@gmail.com>
+
+ * math/math_private.h: Define __nan, __nanf, __nanl.
+ * math/s_cacosh.c: Include <math_private.h>.
+ * math/s_cacoshl.c: Likewise.
+ * math/s_casinh.c: Likewise.
+ * math/s_casinhf.c: Likewise.
+ * math/s_casinhl.c: Likewise.
+ * math/s_ccos.c: Rely entire on ccosh.
+ * math/s_ccosf.c: Rely entire on ccoshf.
+ * math/s_ccosl.c: Rely entirely on ccoshl.
+ * math/s_ccosh.c: Add branch predicion helpers. Add branch prediction.
+ Remove tests for FE_INVALID.
+ * math/s_ccoshf.c: Likewise.
+ * math/s_ccoshl.c: Likewise.
+ * math/s_csin.c: Likewise.
+ * math/s_csinf.c: Likewise.
+ * math/s_csinh.c Likewise.
+ * math/s_csinhf.c: Likewise.
+ * math/s_csinhl.c: Likewise.
+ * math/s_csinl.c: Likewise.
+ * math/s_ctan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_acosh.c: Use __ieee754_sqrt.
+ * sysdeps/ieee754/flt-32/e_acoshf.c: Use __ieee754_sqrtf.
+ * sysdeps/ieee754/ldbl-96/e_acoshl.c: Use __ieee754_sqrtl.
+
2011-10-21 Ulrich Drepper <drepper@gmail.com>
* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Fix
#define libc_feupdateenvf(e) (void) feupdateenv (e)
#define libc_feupdateenvl(e) (void) feupdateenv (e)
+#define __nan(str) \
+ (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
+#define __nanf(str) \
+ (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
+#define __nanl(str) \
+ (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
+
#endif /* _MATH_PRIVATE_H_ */
/* Return arc hyperbole cosine for double value.
- Copyright (C) 1997, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ double
/* Return arc hyperbole cosine for long double value.
- Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ long double
/* Return arc hyperbole sine for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ double
/* Return arc hyperbole sine for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ float
/* Return arc hyperbole sine for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ long double
__complex__ double
__ccos (__complex__ double x)
{
- __complex__ double res;
+ __complex__ double y;
- if (!isfinite (__real__ x) || __isnan (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nan ("");
- __imag__ res = 0.0;
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
-#ifdef FE_INVALID
- if (__isinf_ns (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinf_ns (__imag__ x))
- {
- __real__ res = HUGE_VAL;
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf_ns (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccosh (y);
- }
-
- return res;
+ return __ccosh (y);
}
weak_alias (__ccos, ccos)
#ifdef NO_LONG_DOUBLE
__complex__ float
__ccosf (__complex__ float x)
{
- __complex__ float res;
+ __complex__ float y;
- if (!isfinite (__real__ x) || __isnanf (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanf ("");
- __imag__ res = 0.0;
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
-#ifdef FE_INVALID
- if (__isinf_nsf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinf_nsf (__imag__ x))
- {
- __real__ res = HUGE_VALF;
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinf_nsf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshf (y);
- }
-
- return res;
+ return __ccoshf (y);
}
#ifndef __ccosf
weak_alias (__ccosf, ccosf)
/* Complex cosine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinh_val = __ieee754_sinh (__real__ x);
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
__real__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else if (rcls == FP_INFINITE)
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __imag__ x * __copysign (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinix, cosix;
__imag__ retval = (__copysign (HUGE_VAL, sinix)
* __copysign (1.0, __real__ x));
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = HUGE_VAL;
+ __imag__ retval = __imag__ x * __copysign (1.0, __real__ x);
+ }
else
{
/* The addition raises the invalid exception. */
__real__ retval = HUGE_VAL;
__imag__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
/* Complex cosine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinh_val = __ieee754_sinhf (__real__ x);
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
__real__ retval = __nanf ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __imag__ x * __copysignf (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinix, cosix;
__imag__ retval = (__copysignf (HUGE_VALF, sinix)
* __copysignf (1.0, __real__ x));
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = HUGE_VALF;
+ __imag__ retval = __imag__ x * __copysignf (1.0, __real__ x);
+ }
else
{
/* The addition raises the invalid exception. */
/* Complex cosine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinh_val = __ieee754_sinhl (__real__ x);
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
__real__ retval = __nanl ("") + __nanl ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __imag__ x * __copysignl (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinix, cosix;
__imag__ retval = (__copysignl (HUGE_VALL, sinix)
* __copysignl (1.0, __real__ x));
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = HUGE_VALL;
+ __imag__ retval = __imag__ x * __copysignl (1.0, __real__ x);
+ }
else
{
/* The addition raises the invalid exception. */
__real__ retval = HUGE_VALL;
__imag__ retval = __nanl ("") + __nanl ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
__complex__ long double
__ccosl (__complex__ long double x)
{
- __complex__ long double res;
+ __complex__ long double y;
- if (!isfinite (__real__ x) || __isnanl (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanl ("");
- __imag__ res = 0.0;
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
-#ifdef FE_INVALID
- if (__isinf_nsl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinf_nsl (__imag__ x))
- {
- __real__ res = HUGE_VALL;
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinf_nsl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshl (y);
- }
-
- return res;
+ return __ccoshl (y);
}
weak_alias (__ccosl, ccosl)
/* Complex sine function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
__real__ x = fabs (__real__ x);
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
double sinh_val = __ieee754_sinh (__imag__ x);
__real__ retval = __nan ("");
__imag__ retval = __imag__ x;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nan ("");
__imag__ retval = __nan ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
__real__ retval = __nan ("");
__imag__ retval = HUGE_VAL;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
/* Complex sine function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
__real__ x = fabsf (__real__ x);
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
float sinh_val = __ieee754_sinhf (__imag__ x);
__real__ retval = __nanf ("");
__imag__ retval = __imag__ x;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
__real__ retval = __nanf ("");
__imag__ retval = HUGE_VALF;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
/* Complex sine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
__real__ x = fabs (__real__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinh_val = __ieee754_sinh (__real__ x);
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nan ("");
__imag__ retval = __nan ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
else if (rcls == FP_INFINITE)
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinix, cosix;
if (negate)
__real__ retval = -__real__ retval;
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
+ __imag__ retval = __imag__ x;
+ }
else
{
/* The addition raises the invalid exception. */
__real__ retval = HUGE_VAL;
__imag__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
/* Complex sine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
__real__ x = fabsf (__real__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinh_val = __ieee754_sinhf (__real__ x);
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanf ("") + __nanf ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinix, cosix;
if (negate)
__real__ retval = -__real__ retval;
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
+ __imag__ retval = __imag__ x;
+ }
else
{
/* The addition raises the invalid exception. */
/* Complex sine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
__real__ x = fabsl (__real__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinh_val = __ieee754_sinhl (__real__ x);
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanl ("") + __nanl ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinix, cosix;
if (negate)
__real__ retval = -__real__ retval;
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
+ __imag__ retval = __imag__ x;
+ }
else
{
/* The addition raises the invalid exception. */
/* Complex sine function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
__real__ x = fabsl (__real__ x);
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
long double sinh_val = __ieee754_sinhl (__imag__ x);
__real__ retval = __nanl ("");
__imag__ retval = __imag__ x;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
__real__ retval = __nanl ("");
__imag__ retval = HUGE_VALL;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
{
__complex__ double res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
if (__isinf_ns (__imag__ x))
{
__real__ res = __nan ("");
__imag__ res = __nan ("");
-#ifdef FE_INVALID
if (__isinf_ns (__real__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
return __ieee754_log(2.0*x-one/(x+__ieee754_sqrt(t-one)));
} else { /* 1<x<2 */
t = x-one;
- return __log1p(t+__sqrt(2.0*t+t*t));
+ return __log1p(t+__ieee754_sqrt(2.0*t+t*t));
}
}
strong_alias (__ieee754_acosh, __acosh_finite)
return __ieee754_logf((float)2.0*x-one/(x+__ieee754_sqrtf(t-one)));
} else { /* 1<x<2 */
t = x-one;
- return __log1pf(t+__sqrtf((float)2.0*t+t*t));
+ return __log1pf(t+__ieee754_sqrtf((float)2.0*t+t*t));
}
}
strong_alias (__ieee754_acoshf, __acoshf_finite)
return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one)));
} else { /* 1<x<2 */
t = x-one;
- return __log1pl(t+__sqrtl(2.0*t+t*t));
+ return __log1pl(t+__ieee754_sqrtl(2.0*t+t*t));
}
}
strong_alias (__ieee754_acoshl, __acoshl_finite)