Subnormal Floating-Point Representations #
This module defines SubnormRep, the sign/mantissa representation of subnormal
floating-point numbers, its rational interpretation, rounding to subnormals, and
the validity and error properties of subnormal rounding.
Negate a subnormal representation by flipping its sign bit.
Instances For
A subnormal representation is nonzero when its mantissa is nonzero.
Instances For
Round a rational down to a subnormal representation.
Equations
Instances For
theorem
subnormal_round_coe
{C : FloatCfg}
(r : IntRounder)
[rh : ValidRounder r]
{s : SubnormRep C}
(h : s.nonzero)
:
theorem
subnormal_round_le_of_le
{C : FloatCfg}
(r : IntRounder)
[rh : ValidRounder r]
(q1 q2 : ℚ)
(h : q1 ≤ q2)
:
A subnormal rounding map is valid if it never overflows the precision on inputs below the smallest normal magnitude.
Instances For
theorem
subnormal_up_minus_down
{C : FloatCfg}
(q : ℚ)
:
subnormalToQ (subnormalRound roundup q) - subnormalToQ (subnormalRound rounddown q) ≤ 2 ^ C.emin * (↑C.prec)⁻¹