NLA-lib Explorer

Accumulated rounding errors

Library · Source module

Accumulated rounding errors

The rounding factor <!-- value Computation.roundingFactor n u --> \gamma_n = (1 - u)^{-n} - 1, NLAlib.Computation.roundingFactor n u, of [CarsonMaShao2026, (3)], and its algebra: a product of n factors (1 + \delta_i)^{\pm 1} with \lvert \delta_i \rvert \le u < 1 is 1 + \theta_n with \lvert \theta_n \rvert \le \gamma_n, with no condition on nu, and the composition rule (1 + \gamma_k)(1 + \gamma_j) = 1 + \gamma_{k+j} holds with equality. It is at most Higham's nu/(1 - nu) when nu < 1 [Higham2002, §3.1]. A rounding error analysis tracks the number of factors with NLAlib.Computation.IsRoundingProduct (closed under products, inverses and ratios, the counts adding) and evaluates \gamma_n only at the end. The relation NLAlib.Computation.RelErr u a z says that z is a with relative error at most u, the error clause of the standard model.

Main definitions

* NLAlib.Computation.roundingFactor: \gamma_n. * NLAlib.Computation.RelErr: relative error at most u. * NLAlib.Computation.IsRoundingProduct: 1 + \theta is a product of j factors (1 + \delta_i)^{\pm 1}, \lvert \delta_i \rvert \le u (Higham's \theta_j).

Main results

* NLAlib.Computation.abs_prod_one_add_zpow_sub_one_le: the product of n factors (1 + \delta_i)^{\pm 1} is 1 + \theta_n, \lvert \theta_n \rvert \le \gamma_n, for u < 1. * NLAlib.Computation.roundingFactor_add_add_mul: \gamma_k + \gamma_j + \gamma_k\gamma_j = \gamma_{k+j}. * NLAlib.Computation.abs_one_add_mul_one_add_sub_one_le: (1 + \theta_k)(1 + \theta_j) = 1 + \theta_{k+j}. * NLAlib.Computation.roundingFactor_le: \gamma_n \le nu/(1 - nu) for nu < 1. * NLAlib.Computation.IsRoundingProduct.abs_le, NLAlib.Computation.IsRoundingProduct.mul, NLAlib.Computation.IsRoundingProduct.inv, NLAlib.Computation.IsRoundingProduct.div: [Higham2002, Lemma 3.3] for products of rounding errors, with the ratio rule (1 + \theta_k)/(1 + \theta_j) = 1 + \theta_{k+j} for all j, k. * NLAlib.Computation.isRoundingProduct_iff: the values 1 + \theta_j fill the interval [(1 - u)^j, (1 - u)^{-j}]. * NLAlib.Computation.exists_isRoundingProduct_sum_mul_one_add_eq: a weighted mean of 1 + \theta_j's is a 1 + \theta_j.

Declarations