corollaryroutine
Exact division and square root in multiplication time
So division and square root also take time
payoff of the main theorem
Corollary·
cor:exact-arithmetic·§1.4 Other arithmetic operationsStatement (paper)
There are deterministic machines with fixed finite alphabets and fixed
finite numbers of one-dimensional tapes performing the following tasks
in worst-case time, for every . For
, put and
. If , the division machine takes
and returns , where
and . The square-root machine takes
and returns .
Leading zeroes are allowed, and is as in
Theorem .
In plain English
On fixed-alphabet, fixed-tape deterministic machines, integer division with remainder and integer square root of -bit inputs, with leading zeroes allowed, can be computed exactly in time. Division returns and for , and square root returns , each padded to bits.
Why it's here
This shows that the multiplication bound of the main theorem carries over to division and square root. The proof runs Newton iteration for the reciprocal and the inverse square root with precision doubling, so the total cost is dominated by the last step and is . A final constant-size correction step then makes the quotient, remainder and root exact.
Classified routine:
Follows from the main theorem by the classical Newton-iteration reduction of division and square root to multiplication (e.g. Cook 1966; Brent–Zimmermann, Modern Computer Arithmetic), whose precision doubling keeps the total cost within a constant factor of one multiplication, plus a constant-size final correction.
Uses
Used by
Nothing in the paper
Inside the proof
claimNormalization and rounding conventions for Newton iterationclaimRounded reciprocal Newton step residual boundclaimCapped doubling gives reciprocal to precisionclaimRounded Newton square-root error analysisclaimNewton routines cost O(B(p)) on fixed tapesclaimExact quotient and root by correction tests
Sources
PaperOpen
- Section
- §1.4 Other arithmetic operations
- Page
- —
- Label
cor:exact-arithmetic- Line
sections/00-introduction.tex:194
Leannot aligned
Phase 2 aligns this node to a Lean declaration.