Rational semantics and correctness of exact fixed point #
A coefficient m with d fractional radix digits denotes m / β^d; the numerical system and
erased proof views relate the runtime operations to rational arithmetic. Common-scale addition
is exact; multiplication changes the scale to the sum of the operand fractional-digit counts.
Import Exact.Runtime for the representation and executable functions. The configured family
uses the refinement theorems here to provide the same operations through ExecFloat.
The exact rational numerical system at one fixed radix and scale.
Instances For
A fixed-point code with an erased proof of its complete denotation.
Instances For
A fixed-point code with an erased proof of its exact rational value.
Instances For
Arithmetic refinement #
Decoding exact fixed-point negation gives rational negation.
Representation in the fixed-point numerical system is equality of decoded rationals.
Fixed-point addition is a finite refinement of rational addition.
Fixed-point negation exactly refines rational negation.
Fixed-point subtraction exactly refines rational subtraction.
Multiplication composes the two fixed scales and refines rational multiplication exactly.