Native integer square root for band parameters #
Main results #
BandPreparation.exec_root: successive squared comparisons compute the ordinary natural square root within5 * sqrt k + 6instructions, with every trial square proved to fit.
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)) :
The root loop uses only increment, multiplication and unsigned comparison. The bound on trial squares is derived from the original count, including the first failing trial.