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

Function roundTerminal

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

Source from the content-addressed store, hash-verified

567 * @internal
568 */
569export const roundTerminal = (n: bigint): bigint => {
570 const pos = n >= bigint0 ? 0 : 1
571 return Number(`${n}`[pos]) < 5 ? bigint0 : bigint1
572}
573
574/**
575 * Divides `BigDecimal`s safely.

Callers 1

divideWithPrecisionFunction · 0.85

Calls 1

NumberFunction · 0.70

Tested by

no test coverage detected