w_sinhf_compat.c 925 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* w_sinhf.c -- float version of w_sinh.c.
  2. * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
  3. */
  4. /*
  5. * ====================================================
  6. * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  7. *
  8. * Developed at SunPro, a Sun Microsystems, Inc. business.
  9. * Permission to use, copy, modify, and distribute this
  10. * software is freely granted, provided that this notice
  11. * is preserved.
  12. * ====================================================
  13. */
  14. /*
  15. * wrapper sinhf(x)
  16. */
  17. #include <math.h>
  18. #include <math_private.h>
  19. #include <math-svid-compat.h>
  20. #include <libm-alias-float.h>
  21. #if LIBM_SVID_COMPAT
  22. float
  23. __sinhf (float x)
  24. {
  25. float z = __ieee754_sinhf (x);
  26. if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
  27. && _LIB_VERSION != _IEEE_)
  28. return __kernel_standard_f (x, x, 125); /* sinhf overflow */
  29. return z;
  30. }
  31. libm_alias_float (__sinh, sinh)
  32. #endif