w_sinh.c 832 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* @(#)w_sinh.c 1.3 95/01/18 */
  2. /*
  3. * ====================================================
  4. * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  5. *
  6. * Developed at SunSoft, a Sun Microsystems, Inc. business.
  7. * Permission to use, copy, modify, and distribute this
  8. * software is freely granted, provided that this notice
  9. * is preserved.
  10. * ====================================================
  11. */
  12. /*
  13. * wrapper sinh(x)
  14. */
  15. #include "fdlibm.h"
  16. #ifdef __STDC__
  17. double sinh(double x) /* wrapper sinh */
  18. #else
  19. double sinh(x) /* wrapper sinh */
  20. double x;
  21. #endif
  22. {
  23. #ifdef _IEEE_LIBM
  24. return __ieee754_sinh(x);
  25. #else
  26. double z;
  27. z = __ieee754_sinh(x);
  28. if(_LIB_VERSION == _IEEE_) return z;
  29. if(!finite(z)&&finite(x)) {
  30. return __kernel_standard(x,x,25); /* sinh overflow */
  31. } else
  32. return z;
  33. #endif
  34. }