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

Function _mul

src/compute-engine/interval/arithmetic.ts:63–71  ·  view source on GitHub ↗
(a: Interval, b: Interval)

Source from the content-addressed store, hash-verified

61 * Used by div() and other operations that need plain interval results.
62 */
63export function _mul(a: Interval, b: Interval): Interval {
64 const products = [
65 _prod(a.lo, b.lo),
66 _prod(a.lo, b.hi),
67 _prod(a.hi, b.lo),
68 _prod(a.hi, b.hi),
69 ];
70 return { lo: Math.min(...products), hi: Math.max(...products) };
71}
72
73/**
74 * Endpoint product using the interval convention `0 · ±∞ = 0`.

Callers 2

mulFunction · 0.85
_divFunction · 0.85

Calls 1

_prodFunction · 0.85

Tested by

no test coverage detected