feat:node-modules

This commit is contained in:
houjunxiang
2025-11-24 10:26:18 +08:00
parent 753766893b
commit 8a3e48d856
8825 changed files with 567399 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
import { factory } from '../../utils/factory.js';
import { sechNumber } from '../../plain/number/index.js';
var name = 'sech';
var dependencies = ['typed', 'BigNumber'];
export var createSech = /* #__PURE__ */factory(name, dependencies, _ref => {
var {
typed,
BigNumber: _BigNumber
} = _ref;
/**
* Calculate the hyperbolic secant of a value,
* defined as `sech(x) = 1 / cosh(x)`.
*
* To avoid confusion with the matrix hyperbolic secant, this function does
* not apply to matrices.
*
* Syntax:
*
* math.sech(x)
*
* Examples:
*
* // sech(x) = 1/ cosh(x)
* math.sech(0.5) // returns 0.886818883970074
* 1 / math.cosh(0.5) // returns 0.886818883970074
*
* See also:
*
* cosh, csch, coth
*
* @param {number | BigNumber | Complex} x Function input
* @return {number | BigNumber | Complex} Hyperbolic secant of x
*/
return typed(name, {
number: sechNumber,
Complex: x => x.sech(),
BigNumber: x => new _BigNumber(1).div(x.cosh())
});
});