sinh.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.createSinh = void 0;
  6. var _factory = require("../../utils/factory.js");
  7. var _index = require("../../plain/number/index.js");
  8. var name = 'sinh';
  9. var dependencies = ['typed'];
  10. var createSinh = /* #__PURE__ */(0, _factory.factory)(name, dependencies, function (_ref) {
  11. var typed = _ref.typed;
  12. /**
  13. * Calculate the hyperbolic sine of a value,
  14. * defined as `sinh(x) = 1/2 * (exp(x) - exp(-x))`.
  15. *
  16. * To avoid confusion with the matrix hyperbolic sine, this function does
  17. * not apply to matrices.
  18. *
  19. * Syntax:
  20. *
  21. * math.sinh(x)
  22. *
  23. * Examples:
  24. *
  25. * math.sinh(0.5) // returns number 0.5210953054937474
  26. *
  27. * See also:
  28. *
  29. * cosh, tanh
  30. *
  31. * @param {number | BigNumber | Complex} x Function input
  32. * @return {number | BigNumber | Complex} Hyperbolic sine of x
  33. */
  34. return typed(name, {
  35. number: _index.sinhNumber,
  36. 'Complex | BigNumber': function ComplexBigNumber(x) {
  37. return x.sinh();
  38. }
  39. });
  40. });
  41. exports.createSinh = createSinh;