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
- NLAlib.abs_iterate_newtonSchulz_le_one
- NLAlib.abs_iterate_newtonSchulz_sub_one_le
- NLAlib.abs_le_abs_newtonSchulz_add
- NLAlib.abs_le_one_add_of_abs_sub_newtonSchulz_le
- NLAlib.abs_newtonSchulz_le_one
- NLAlib.abs_one_sub_newtonSchulz_add_sq_le
- NLAlib.abs_one_sub_newtonSchulz_add_sq_le_add
- NLAlib.abs_one_sub_sq_le_of_newtonSchulzSteps_le
- NLAlib.div_mul_abs_le_abs_newtonSchulz_of_abs_le
- NLAlib.min_abs_le_abs_of_abs_sub_newtonSchulz_le
- NLAlib.mul_newtonSchulz_add_pos
- NLAlib.newtonSchulz
- NLAlib.newtonSchulzSteps
- NLAlib.newtonSchulzSteps_le_of_le
- NLAlib.newtonSchulzSteps_le_of_le_abs
- NLAlib.newtonSchulzSteps_nonneg
- NLAlib.newtonSchulz_iterate_mem_Ioc
- NLAlib.newtonSchulz_neg
- NLAlib.one_sub_iterate_newtonSchulz_sq_le_pow
- NLAlib.one_sub_newtonSchulz_sq
- NLAlib.tendsto_iterate_newtonSchulz