asinh.js 1.1 KB

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