divMod

fnvoid divMod(const BigInt dividend, const BigInt divisor, out BigInt quotient, out BigInt remainder) pure @safe

Performs division with remainder on two BigInt values.

This is a module-level free function for compatibility with std.bigint. It computes both the quotient and remainder of dividend / divisor.

Parameters

dividendThe number to be divided
divisorThe number to divide by
quotientOutput parameter for the quotient (dividend / divisor)
remainderOutput parameter for the remainder (dividend % divisor)

Throws

Nothing (nothrow), but behavior is undefined if divisor is zero