[Cfp-interest 2078] Re: Underflow

Vincent Lefevre vincent at vinc17.net
Wed Jul 28 02:40:56 PDT 2021


On 2021-07-24 20:11:38 -0600, Fred J. Tydeman wrote:
> On Tue, 20 Jul 2021 12:41:18 -0700 Jim Thomas wrote:
> >       The result underflows if it is subnormal, inexact zero, or inexact with the magnitude of the minimum normalized number in the type 249).
> 
> The result underflows if it is subnormal or an inexact zero. In
> addition, a result that has the magnitude of the minimum normalized
> number in the type may be an underflow.

This may be OK with IEEE 754 types, but not with the general FP model
of ISO C, where you may have numbers less than the minimum normalized
number in magnitude, but are not subnormals, nor zero. So, I think
that "subnormal" should be avoided. Another issue is how you can
decide that the result is an inexact zero, assuming that correct
rounding is not required.

Something like:

The result shall underflow if it is nonzero and its magnitude is
less than the one of the minimum normalized number in the type.
The result may underflow if it is zero or has the magnitude of
the minimum normalized number in the type, but if it is known to
be an exact zero, it shall not underflow.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the Cfp-interest mailing list