MCPcopy Create free account
hub / github.com/Effect-TS/effect / roundTerminal

Function roundTerminal

packages/effect/src/BigDecimal.ts:526–529  ·  view source on GitHub ↗
(n: bigint)

Source from the content-addressed store, hash-verified

524 * @internal
525 */
526export const roundTerminal = (n: bigint): bigint => {
527 const pos = n >= bigint0 ? 0 : 1
528 return Number(`${n}`[pos]) < 5 ? bigint0 : bigint1
529}
530
531/**
532 * Divides `BigDecimal`s safely.

Callers 1

divideWithPrecisionFunction · 0.85

Calls 1

NumberInterface · 0.70

Tested by

no test coverage detected