The standard model of floating-point arithmetic with gradual underflow #
Rounding a real x onto the gradual-underflow grid of fmt satisfies
round x = x * (1 + δ) + η, with |δ| ≤ u, |η| ≤ η₀, and δ * η = 0.
For nearest rounding, u = 2^(-p) with p = fracWidth + 1, and η₀ = 2^(emin - 1) is half
the subnormal spacing, where emin = minSubnormalExponent. For binary32 these are 2^(-24) and
2^(-150). Any valid rounding function, including the directed ones, satisfies the same model
with 2 * u and 2 * η₀. At most one of the two error terms is nonzero: η = 0 in the normal
range and δ = 0 below it. The real grid has no overflow, so the grid theorems need no range
hypothesis. The executable corollaries use IEEE descriptors and require the stated domain and
finiteness hypotheses.
Addition and subtraction are sharper. Below the normal range, the exact sum of two grid points is
itself a grid point, so the underflow term vanishes and fl(x + y) = (x + y) * (1 + δ).
References #
- N. J. Higham, Accuracy and Stability of Numerical Algorithms, 2nd ed., SIAM, 2002, Section 2.1, equations (2.8) and (2.9).
- J. W. Demmel, "Underflow and the Reliability of Numerical Software," SIAM J. Sci. Stat. Comput. 5(4), 1984. https://doi.org/10.1137/0905062
- J. R. Hauser, "Handling Floating-Point Exceptions in Numeric Programs," ACM TOPLAS 18(2), 1996. https://doi.org/10.1145/227699.227701
The unit roundoff 2^(-precision) of nearest rounding to fmt.
Instances For
Half the subnormal spacing of fmt, 2^(minSubnormalExponent - 1). This bounds the absolute
error of nearest rounding below the normal range.
Instances For
The unit roundoff as a power of two.
The underflow allowance as a power of two.
Twice the unit roundoff is the relative spacing 2^(1 - precision) of the normal grid.
Twice the underflow allowance is the subnormal spacing 2^minSubnormalExponent.
Below the normal range, one ULP is the fixed subnormal spacing.
In the normal range, one ULP is at most 2^(1 - precision) times the magnitude.
Standard model with gradual underflow for any nearest rounding onto the grid of fmt, with
either tie-breaking rule: round x = x * (1 + δ) + η, |δ| ≤ 2^(-precision),
|η| ≤ 2^(minSubnormalExponent - 1), and δ * η = 0.
Standard model with gradual underflow for any valid rounding onto the grid of fmt, including
the directed roundings: round x = x * (1 + δ) + η, |δ| ≤ 2^(1 - precision),
|η| ≤ 2^minSubnormalExponent, and δ * η = 0.
Standard model with gradual underflow for nearest-even rounding onto the grid of fmt:
roundAt fmt x = x * (1 + δ) + η, |δ| ≤ 2^(-precision),
|η| ≤ 2^(minSubnormalExponent - 1), and δ * η = 0. For binary32 the bounds are 2^(-24) and
2^(-150).
Standard model with gradual underflow for downward rounding onto the grid of fmt.
Standard model with gradual underflow for upward rounding onto the grid of fmt.
Standard model with gradual underflow for rounding toward zero onto the grid of fmt.
Exact addition below the normal range #
Nearest-even rounding of a sum of two grid points has a relative error of at most
2^(-precision) and no underflow term. Below the normal range the sum is itself a grid point.
For an IEEE descriptor, addition with finite operands and result has relative error at most
2^(-precision), with no underflow term:
toReal (add x y) = (toReal x + toReal y) * (1 + δ).
For an IEEE descriptor, subtraction with finite operands and result has relative error at most
2^(-precision), with no underflow term:
toReal (sub x y) = (toReal x - toReal y) * (1 + δ).
For an IEEE descriptor, addition with finite operands and result has absolute error at most
2^(-precision) * |x + y|.
For an IEEE descriptor, subtraction with finite operands and result has absolute error at most
2^(-precision) * |x - y|.
Standard model for finite IEEE executable operations #
Standard model with gradual underflow for IEEE multiplication with finite operands and result.
Standard model with gradual underflow for IEEE division with finite operands and result and a nonzero divisor.
Standard model with gradual underflow for IEEE square root on a finite nonnegative input, including either signed zero.
Standard model with gradual underflow for IEEE fused multiply-add with finite operands and result.
Standard model with gradual underflow for a finite cast to an IEEE destination, using the constants of the destination format.
IEEE-source specialization of toReal_cast_standardModel_of_isIEEE_destination.