bigIntModEuclid
bigIntModEuclid(
dividend,divisor):bigint
Defined in: packages/core/src/big-int/mod-euclid.ts:12
Euclidean remainder — always in [0, |divisor|), whatever the signs.
Differs from bigIntMod only when divisor is negative, where the
floored remainder follows the divisor’s sign and this one stays non-negative:
bigIntMod(-7n, -2n) is -1n, bigIntModEuclid(-7n, -2n) is 1n.
Parameters
Section titled “Parameters”dividend
Section titled “dividend”bigint
divisor
Section titled “divisor”bigint
Returns
Section titled “Returns”bigint
Throws
Section titled “Throws”When divisor is zero.