w_coshl_compat.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* w_acoshl.c -- long double version of w_acosh.c.
  2. * Conversion to long double by Ulrich Drepper,
  3. * Cygnus Support, drepper@cygnus.com.
  4. * Optimizations bu Ulrich Drepper <drepper@gmail.com>, 2011.
  5. */
  6. /*
  7. * ====================================================
  8. * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  9. *
  10. * Developed at SunPro, a Sun Microsystems, Inc. business.
  11. * Permission to use, copy, modify, and distribute this
  12. * software is freely granted, provided that this notice
  13. * is preserved.
  14. * ====================================================
  15. */
  16. /*
  17. * wrapper coshl(x)
  18. */
  19. #include <math.h>
  20. #include <math_private.h>
  21. #include <math-svid-compat.h>
  22. #include <libm-alias-ldouble.h>
  23. #if LIBM_SVID_COMPAT
  24. long double
  25. __coshl (long double x)
  26. {
  27. long double z = __ieee754_coshl (x);
  28. if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
  29. && _LIB_VERSION != _IEEE_)
  30. return __kernel_standard_l (x, x, 205); /* cosh overflow */
  31. return z;
  32. }
  33. libm_alias_ldouble (__cosh, cosh)
  34. #endif