w_sinhf.c 911 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. float
  20. sinhf (float x)
  21. {
  22. #if defined(__UCLIBC_HAS_FENV__)
  23. float z = (float) __ieee754_sinh ((double) x);
  24. if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
  25. && _LIB_VERSION != _IEEE_)
  26. return __kernel_standard_f (x, x, 125); /* sinhf overflow */
  27. return z;
  28. #else
  29. return (float) __ieee754_sinh ((double) x);
  30. #endif
  31. }