Positive directed rounding for arbitrary executable float formats #
The shift-based directed rounders used by Model are related to the independent Flocq-style
real semantics at the scaled-mantissa boundary, before subnormal and normal values are packed
into interchange fields.
All definitions are uniform in FloatFormat.
Independent directed semantics #
Round a real downward on the gradual-underflow grid of fmt, before overflow handling.
Instances For
Round a real upward on the gradual-underflow grid of fmt, before overflow handling.
Instances For
Downward rounding fixes zero.
Upward rounding fixes zero.
Executable scaled-mantissa rounding #
Floor a natural mantissa after expressing it at targetExponent.
Instances For
Ceil a natural mantissa after expressing it at targetExponent.
Instances For
Ceiling alignment preserves nonzeroness of a positive mantissa.
Floor alignment never exceeds ceiling alignment at the same exponent.
Ceiling alignment is at most one unit above floor alignment.
Downward shifting computes the integer floor of a scaled positive dyadic.
Upward shifting computes the integer ceiling of a scaled positive dyadic.
Floor alignment at any target exponent is a lower bound for the exact dyadic magnitude.
Ceiling alignment at any target exponent is an upper bound for the exact dyadic magnitude.