NLAlib.Sign.program
Library · def
Newton–Schulz sign iteration with a finite cap. The matrix product is a parameter of the operation signature. The natural-literal operation takes a dimension [k] and writes the machine's rounded literal for k; it does not convert data into an index.
Dimensions are n and cap; input buffers contain the interleaved matrix and the two stored parameters (tolerance followed by scale). The output contains the current Hermitian iterate. Scratch is five scalar cells and two interleaved square matrices. An exhausted cap returns the current iterate; a convergence theorem needs a cap justified by the input and operation model. [Shah2024, Algorithm 1], with a cap and explicit Hermitian completion. Algorithm: newton-schulz-sign
NLAlib.Sign.program {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.CmpTst Tst]
[Ops.Has Ops.IndexOp Op] (mm : Op) : Ops.Stmt Op TstImport NLAlib.Eigensolvers.Sign.Alg.