[Cfp-interest 1742] Re: Underflow range error

David Hough CFP pcfp at oakapple.net
Thu Aug 6 09:25:38 PDT 2020


In 754, underflow can be tested before or after rounding.

The default treatment for an exact underflow is to return the exact
result and raise no flag.     If alternate exception handling is enabled
for underflow, it happens even if the default result would have been exact.

The broadest definition of exponent spill is any case when the exact result
magnitude is finite and nonzero and either larger than the largest normal 
or smaller than the smallest normal.    That is independent of rounding mode.
754 underflow-before-rounding works this way.

The narrowest definition of exponent spill is any case when the exact result
differs from the result rounded in a hypothetical format with the same precision
but unbounded exponent range.    A result might spill in one rounding mode
but not in another.
754 overflow works this way.

754 underflow-after-rounding is intermediate between these two extremes.

I'm not sure how any of this should map into C, 
which must also deal with non-754 systems.

https://754r.ucbtest.org/background/exceptions.txt



More information about the Cfp-interest mailing list