MacrosΒ§
ConstantsΒ§
- BURNIKEL_
ZIEGLER_ πTHRESHOLD - FAST_
DIV_ πWIDE
FunctionsΒ§
- div_
half π - For small divisors, we can divide without promoting to
DoubleBigDigitby using half-size pieces of digit, like long-division. - div_rem π
- div_
rem_ πburnikel_ ziegler - This algorithm is from Burnikel and Ziegler, βFast Recursive Divisionβ, Algorithm 1. It is a recursive algorithm that divides the dividend and divisor into blocks of digits and uses a divide-and-conquer approach to find the quotient.
- div_
rem_ πcore - An implementation of the base division algorithm. Knuth, TAOCP vol 2 section 4.3.1, algorithm D, with an improvement from exercises 19-21.
- div_
rem_ πcow - div_
rem_ πdigit - div_
rem_ πref - div_
wide π - x86 and x86_64 can use a real
divinstruction. - rem_
digit π - sub_
mul_ πdigit_ same_ len - Subtract a multiple. a -= b * c Returns a borrow (if a < b then borrow > 0).