bits, both the return value and r are set to ulong.max as an error sentinel (the checked callers avoid these cases).
BigInt.div128
private
ulong div128(ulong u1, ulong u0, ulong v, out ulong r) static pure nothrow @nogc @trustedDivides the 128-bit value (u1 << 64 | u0) by v, returning the quotient and setting r to the remainder.
Parameters
u1 | The high 64 bits of the dividend. |
u0 | The low 64 bits of the dividend. |
v | The divisor. |
r | Set to the remainder. |
Returns
The quotient. If v is 0, or the quotient would not fit in 64