NLA-lib Explorer

Fixture: two precisions in one program

Library · Source module

Fixture: two precisions in one program

NLAlib.Ops.Examples.mulAddMixed computes z := x y + w with the product in the precision Lo, a cast, and the sum in the precision Hi. The signature contains scalar arithmetic at two tags and a cast between them.

Main results

* NLAlib.Ops.Examples.runs_mulAddMixed: for every interpretation satisfying the contracts of the two tags (two machines, two unit roundoffs) and of an exact cast, |ẑ - (x y + w)| ≤ u_hi |x y + w| + (1 + u_hi) u_lo |x y|, with one multiplication counted at Lo, one addition at Hi and one cast. * NLAlib.Ops.Examples.sumSeq_satisfies_at: sequential summation at a tag is the same implementation with the same certificate; nothing is rewritten for a tag. * NLAlib.Ops.Examples.exists_isMixed: the contracts of the two tags and of the cast can be met together.

Declarations