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

Function asec

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

Source from the content-addressed store, hash-verified

481}
482
483/**
484 * Inverse secant: asec(x) = acos(1/x).
485 *
486 * Domain: |x| >= 1. Has a singularity at x = 0.
487 */
488export function asec(x: Interval | IntervalResult): IntervalResult {
489 const unwrapped = unwrapOrPropagate(x);
490 if (!Array.isArray(unwrapped)) return unwrapped;
491 const [xVal] = unwrapped;
492 if (containsZero(xVal)) {
493 return { kind: 'singular', at: 0 };
494 }

Callers 1

Calls 5

unwrapOrPropagateFunction · 0.90
containsZeroFunction · 0.90
divFunction · 0.90
okFunction · 0.90
acosFunction · 0.85

Tested by

no test coverage detected