Round to Odd #
For an inexact real input, oddRound selects the odd member of the two adjacent integers.
Exact integers are unchanged. Applied to a binary scaled mantissa, this is the usual round-to-odd
or jamming rule: discarded information is recorded by setting the least-significant retained bit.
Preserve integers; otherwise select the odd integer among floor x and floor x + 1.
Instances For
Exact integers are fixed by round-to-odd.
Round-to-odd is monotone and fixes every integer.
Round-to-odd with at least two extra binary digits prevents nearest-even double rounding on the
integer grid. roundAtScale_nearestEven_after_odd_binary_extra transports this to any fixed grid;
no floating-point (exponent-dependent) version is proved in this library.
Round-to-odd on a finer binary grid prevents nearest-even double rounding on a coarser grid.
The coarse grid has positive spacing step; the intermediate grid is finer by extra + 2 binary
digits. Both grids are fixed, so the theorem applies to fixed-point and affine-quantization grids.
It does not cover floating-point formats, whose spacing depends on the exponent of the value.
If x is not representable, round-to-odd selects an odd scaled integer mantissa.
Round-to-odd produces a value in the selected generic format.
Semantic round-to-odd specification at the grid exponent selected for the input.
An exact input is unchanged. An inexact result is a directed neighbor whose integer mantissa
is odd at exponent. Fixing this exponent matters: every nonzero binary dyadic has an odd
mantissa at some exponent, which alone would not characterize round-to-odd.
Instances For
Generic rounding with oddRound satisfies the round-to-odd point specification.