Successor and Predecessor #
The neighboring values follow Flocq's Core/Ulp.v. At a positive radix boundary, the spacing
below the value can differ from the spacing above it, so predPos uses the preceding
magnitude's exponent in that case.
Previous-value formula for a nonnegative input.
Instances For
Successor in the generic format, defined by positive spacing and sign symmetry.
Instances For
Predecessor, defined as the negated successor of the negated input.
Instances For
The successor of zero is the format's zero ULP.
The predecessor of zero is the negated zero ULP.
The positive predecessor formula never exceeds its input.
Away from zero, the positive predecessor formula is strictly smaller than its input.
Successor never falls below its input.
Predecessor never exceeds its input.
Successor is strictly larger away from zero.
Predecessor is strictly smaller away from zero.
A positive representable value's successor does not exceed its magnitude boundary.
The successor of a positive representable value is representable.
Subtracting one ULP from a positive representable value that is not a radix boundary remains representable in the same magnitude bin.
Subtracting the preceding-bin spacing from a representable radix power is representable.
The predecessor formula for a positive representable input yields a representable value.
The successor of every representable value is representable.
The predecessor of every representable value is representable.
No representable value lies strictly between a positive grid point and its successor.