[Cfp-interest 2081] Re: Underflow

Vincent Lefevre vincent at vinc17.net
Thu Jul 29 09:08:17 PDT 2021


On 2021-07-29 08:07:17 -0600, Fred J. Tydeman wrote:
> On Wed, 28 Jul 2021 11:40:56 +0200 Vincent Lefevre wrote:
> >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
> 
> Care to give an example in either real hardware or the C FP model?

The C FP model is given in 5.2.4.2.2, where subnormal FP numbers
are defined as x ≠ 0, e = e_min, f_1 = 0. Thus the minimum positive
subnormal is 2^(e_min - p). So, for instance, if the implementation
provides a number that is between 0 and 2^(e_min - p), it cannot be
a subnormal. An implementation that implements FP types as unums
would be in this case.

Note also that there is already a possible issue with the definition
of normal numbers, which doesn't match the practice for long double
on PowerPC (which corresponds to the double-double format). I've
started a discussion "isnormal and non-FP values: possible defect"
on comp.std.c about that.

-- 
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