Package: effect
Module: BigInt
Returns the JavaScript remainder of dividing one bigint by another.
When to use
Use when you want native remainder semantics, including signed remainders and a thrown division-by-zero error.
Gotchas
Throws a RangeError when the divisor is 0n.
Example (Calculating remainders)
import { BigInt } from "effect"
BigInt.remainder(10n, 3n) // 1n
BigInt.remainder(15n, 4n) // 3n
See
divide for quotient calculation with division-by-zero represented as Option.noneSignature
declare const remainder: { (divisor: bigint): (self: bigint) => bigint; (self: bigint, divisor: bigint): bigint; }
Since v4.0.0