Native integer square root for the band block size #
Main results #
BandPreparation.exec_root: reuseNatSqrt.exec_renameand one final multiplication to compute the ordinary natural square root and its square within5 * Nat.sqrt k + 8native instructions.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BandPreparation.rootRegisters_injective :
The six-register square-root assignment is injective.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BandPreparation.exec_root {w : ℕ} (k : ℕ) (x : WordRAM.Data 96) (hk : x.regs count = k) (ho : x.regs one = 1) (hfit : WordRAM.Fits w (4 * k + 4)) :
Compute the floor square root and its square by renaming NatSqrt.program and charging one
final multiplication. The only intermediate bound is 4*k+4, which covers (sqrt k + 1)².