Correctness of fixed and scientific decimal output #
The notation scanner recovers the decimal value selected by rounding in the fixed and
scientific styles of format. Fixed output has at most half a decimal place of nearest-even
error, and scientific output inherits the significant-digit bound. Neither decimal-point placement
nor exponent notation introduces additional rounding. Every style raises at most inexact, and the
exact styles raise nothing.
Nearest-even rounding on any decimal grid changes the value by at most half a grid unit.
Fixed output denotes the decimal selected by rounding, without an extra rounding step.
Scientific output denotes the decimal selected by rounding, without an extra rounding step.
Fixed rounding preserves the sign, including when the result is zero.
Scientific rounding preserves the sign, including when the result is zero.
Fixed output raises inexact exactly when the rounding changes the numerical value.
Scientific output raises inexact exactly when the rounding changes the numerical value.
Text output can raise only inexact, so the other four exception indicators stay clear.
Exact decimal output raises none of the five exception indicators.
Exact hexadecimal output raises none of the five exception indicators.
A finite model's fixed output denotes its exact dyadic value rounded to places places.
A finite model's scientific output denotes its exact dyadic value rounded to places + 1
significant digits.
The fixed-point string has at most half a last-place unit of nearest-even error.
The scientific string inherits the nearest-even significant-digit error bound.