Safe norm and normalization guards
Library · Source module
Safe norm and normalization guards
A rounded self-dot with error below one is positive on a nonzero decoded vector. A square root with relative error below one preserves that positivity, supplying the divisor guard. Zero vectors produce zero norms even though the norm contract is stated through an intermediate self-dot.
Main results
* NLAlib.Ops.StdModel.dec_sqrt_pos: positivity of the computed square root on its domain. * NLAlib.Ops.IsNrm2Err.dec_pos_iff: the computed norm detects decoded zero vectors.