Bounded fixed-point conversion proofs #
The fixed-integer codec theorems connect each conversion policy to its signed coefficient: rejecting conversion preserves an in-range coefficient, wrapping takes centered reduction, and saturation clamps to the signed range. These relations retain the complete outcome and status.
Wrapping delivers the centered remainder of the nearest-even coefficient.
An in-range coefficient is preserved, including the sole zero-width coefficient.
Saturating conversion delivers the clamped nearest-even coefficient at every width.
Finite observations are handled by the selected bounded-overflow policy.
Bounded fixed point has no infinity code.
Bounded fixed point has no exceptional code.
run meets spec: its outcomes satisfy the coefficient, range, and status clauses.
For each policy and input, spec admits at most one outcome.
An outcome meets spec exactly when it is the outcome of run.
The installed decoder exposes the exact stored rational.
Rejecting conversion reports outOfRange exactly when the rejecting constructor fails.