NLA-lib Explorer

The Newton–Schulz iteration for the sign function

Library · Source module

The Newton–Schulz iteration for the sign function

The cubic g(\mathbf{x}) = \tfrac12 \mathbf{x}(3 - \mathbf{x}^2) (NLAlib.newtonSchulz) fixes -1, 0 and 1, with g'(\pm 1) = 0; iterated from a point of (-\sqrt 5, \sqrt 5) other than 0 it converges quadratically to the sign of the point, and an iteration perturbed by an error of size u at each step still reaches \lvert 1 - \mathbf{x}^2 \rvert \le \varepsilon after NLAlib.newtonSchulzSteps \mathbf{x}_0 \varepsilon steps, about 2\log_2(1/\lvert \mathbf{x}_0 \rvert) + \log_2\log_2(1/\varepsilon) ([Shah2024, Section 2]). Applied to a Hermitian matrix through the functional calculus it is the inverse-free iteration for the matrix sign function.

Main definitions

* NLAlib.newtonSchulz: the cubic g. * NLAlib.newtonSchulzSteps: the step count of the perturbed scalar iteration.

Main results

* NLAlib.one_sub_newtonSchulz_sq: 1 - g(\mathbf{x})^2 = (1 - \mathbf{x}^2)^2(4 - \mathbf{x}^2)/4. * NLAlib.div_mul_abs_le_abs_newtonSchulz_of_abs_le: g grows the modulus by 11/8 below 1/2. * NLAlib.mul_newtonSchulz_add_pos, NLAlib.abs_le_abs_newtonSchulz_add: Lemma 2.3. * NLAlib.abs_one_sub_newtonSchulz_add_sq_le, NLAlib.abs_one_sub_newtonSchulz_add_sq_le_add: Lemma 2.4. * NLAlib.abs_one_sub_sq_le_of_newtonSchulzSteps_le: Lemma 2.5.

Declarations