MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / asech

Function asech

src/compute-engine/interval/trigonometric.ts:567–575  ·  view source on GitHub ↗
(x: Interval | IntervalResult)

Source from the content-addressed store, hash-verified

565}
566
567/**
568 * Inverse hyperbolic secant: asech(x) = acosh(1/x).
569 *
570 * Domain: (0, 1]. Has a singularity at x = 0.
571 */
572export function asech(x: Interval | IntervalResult): IntervalResult {
573 const unwrapped = unwrapOrPropagate(x);
574 if (!Array.isArray(unwrapped)) return unwrapped;
575 const [xVal] = unwrapped;
576 if (containsZero(xVal)) {
577 return { kind: 'singular', at: 0 };
578 }

Callers 1

Calls 5

unwrapOrPropagateFunction · 0.90
containsZeroFunction · 0.90
divFunction · 0.90
okFunction · 0.90
acoshFunction · 0.85

Tested by

no test coverage detected