NLA-lib Explorer

NLAlib.newtonSchulzLoop

Library · def

The Newton–Schulz loop with at most N steps: return \mathbf{A} if it passes the test at threshold \eta (NLAlib.newtonSchulzTest) or N = 0, and otherwise continue from the rounded step NLAlib.newtonSchulzRounded. Algorithm: newton-schulz-sign

NLAlib.newtonSchulzLoop.{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) :
  ℕ → Matrix (Fin n) (Fin n) (F × F) → Matrix (Fin n) (Fin n) (F × F)

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.NewtonSchulzSign.