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

Function mul

src/compute-engine/interval/arithmetic.ts:93–101  ·  view source on GitHub ↗
(
  a: Interval | IntervalResult,
  b: Interval | IntervalResult
)

Source from the content-addressed store, hash-verified

91 * If inputs are IntervalResults, propagates errors (empty, entire, singular).
92 */
93export function mul(
94 a: Interval | IntervalResult,
95 b: Interval | IntervalResult
96): IntervalResult {
97 const unwrapped = unwrapOrPropagate(a, b);
98 if (!Array.isArray(unwrapped)) return unwrapped;
99 const [aVal, bVal] = unwrapped;
100 return ok(_mul(aVal, bVal));
101}
102
103/**
104 * Divide two intervals (or IntervalResults).

Callers 2

remainderFunction · 0.90

Calls 3

unwrapOrPropagateFunction · 0.90
okFunction · 0.90
_mulFunction · 0.85

Tested by

no test coverage detected