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

Function floor

src/compute-engine/interval/elementary.ts:420–430  ·  view source on GitHub ↗
(x: Interval | IntervalResult)

Source from the content-addressed store, hash-verified

418 acc = prodExact(acc, sq, p) ? p : nextUp(p);
419 }
420 k = Math.floor(k / 2);
421 if (k > 0) {
422 const p = sq * sq;
423 sq = prodExact(sq, sq, p) ? p : nextUp(p);
424 }
425 }
426 return acc;
427}
428
429/** A LOWER bound of `v^n`, by the same chain as `powChainUp` with every
430 * uncertified product moved one ulp down. An overflowed product answers
431 * `Number.MAX_VALUE`, which is below the true value it stands for. */
432function powChainDown(v: number, n: number): number {
433 let acc = 1;

Callers 1

Calls 3

unwrapOrPropagateFunction · 0.90
okFunction · 0.90
floorMethod · 0.45

Tested by

no test coverage detected