NLA-lib Explorer

NLAlib.newtonSchulzTest

Library · def

The Newton–Schulz stopping test at the stored threshold \eta: every real and imaginary part of every entry of \mathbf{T} = \mathrm{mm}(\mathbf{A}, \mathbf{A}) - \mathbf{I} (rounded shift) lies in [-\eta, \eta], by the machine's comparisons. [Shah2024, Algorithm 1], there \|\mathbf{I} - \mathbf{T}\|_{\max} \le \eta.

NLAlib.newtonSchulzTest.{u_1, u_2, u_3} {F : Type u_1} {Su : Type u_2} {Sg : Type u_3} {n : ℕ}
  (M : FloatMachine F Su Sg) (η : F) (A : Matrix (Fin n) (Fin n) (F × F)) : Bool

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.NewtonSchulzSign.