( a: Interval | IntervalResult, b: Interval | IntervalResult )
| 91 | * If inputs are IntervalResults, propagates errors (empty, entire, singular). |
| 92 | */ |
| 93 | export 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). |
no test coverage detected