jiangchengfeiyi-xiaochengxu/node_modules/mathjs/lib/esm/function/trigonometry/sinh.js
2025-01-02 11:13:50 +08:00

35 lines
893 B
JavaScript

import { factory } from '../../utils/factory.js';
import { sinhNumber } from '../../plain/number/index.js';
var name = 'sinh';
var dependencies = ['typed'];
export var createSinh = /* #__PURE__ */factory(name, dependencies, _ref => {
var {
typed
} = _ref;
/**
* Calculate the hyperbolic sine of a value,
* defined as `sinh(x) = 1/2 * (exp(x) - exp(-x))`.
*
* To avoid confusion with the matrix hyperbolic sine, this function does
* not apply to matrices.
*
* Syntax:
*
* math.sinh(x)
*
* Examples:
*
* math.sinh(0.5) // returns number 0.5210953054937474
*
* See also:
*
* cosh, tanh
*
* @param {number | BigNumber | Complex} x Function input
* @return {number | BigNumber | Complex} Hyperbolic sine of x
*/
return typed(name, {
number: sinhNumber,
'Complex | BigNumber': x => x.sinh()
});
});