claimroutineinferred_dep
Exact quotient and root by correction tests
Correction tests make quotient and root exact from estimates off by one
turns approximate outputs into exact division and root
Claim·§10 Exact division and integer square root·inside corExact division and square root in multiplication time
Statement (paper)
With , the approximate reciprocal and square-root routines followed by the exact correction steps produce , and exactly: the floor of differs from by at most one, and the floor of the shifted root approximation differs from by at most one, so the tests , , and yield the exact values, all computed on -bit quantities in time plus overhead for descriptors, scans and padding.
In plain English
With working precision , the approximate reciprocal and square-root routines give a quotient estimate and a root estimate that are each off by at most one from and . The tests , , and then fix them to the exact values, using only -bit arithmetic in time plus overhead.
Why it's here
This turns the approximate Newton outputs (the reciprocal and square-root accuracy claims) into exact integer division with remainder and exact integer square root. Precision keeps the error below one unit, so a single correction step suffices. The cost claim for the Newton routines, together with a constant number of multiplications from the main theorem, gives the corollary's bound.
Classified routine:
This is the textbook reduction of exact division and integer square root to Newton iteration with a final ±1 correction, as in Brent–Zimmermann, Modern Computer Arithmetic. Here it is applied to the earlier precision and cost claims.
Uses
Used by
Nothing in the paper
Sources
PaperOpen
- Section
- §10 Exact division and integer square root
- Page
- —
- Label
—- Line
sections/09-exact-arithmetic.tex:129
Leannot aligned
Phase 2 aligns this node to a Lean declaration.
Friction
- infoinferred_depoutline: "Exact quotient and root by correction tests" rests on claim-cor-exact-arithmetic-3
- infoinferred_depoutline: "Exact quotient and root by correction tests" rests on claim-cor-exact-arithmetic-4
- infoinferred_depoutline: "Exact quotient and root by correction tests" rests on claim-cor-exact-arithmetic-5
- infoinferred_depoutline: "Exact quotient and root by correction tests" rests on thm:main