Integer destination ranges #
A range check follows exact rational-to-integer rounding. The caller supplies the integer rounder and the policy for failure, allowing IEEE invalid results and Posit integer sentinels to share the same numerical range calculation. Signed and unsigned words are instances of an inclusive integer interval.
Instances For
Membership in the inclusive destination interval.
Instances For
Round first, then test the resulting integer against the destination interval.
Instances For
Signedness and width specify the ordinary numerical range of a word. Reserved bit patterns are a separate format-specific conversion policy.
- signed
(width : ℕ)
: IntegerFormat
Two's-complement numerical range, with width zero containing only zero.
- unsigned
(width : ℕ)
: IntegerFormat
Unsigned numerical range from zero through
2 ^ width - 1.
Instances For
Instances For
Smallest integer accepted by the word format.
Instances For
Largest integer accepted by the word format.
Instances For
Inclusive numerical range; width zero denotes only zero for either signedness.
Instances For
Numerical representability, independently of any reserved bit pattern.