[Cfp-interest 2498] Re: 5.2.4.2.3 and IEC 60559

Vincent Lefevre vincent at vinc17.net
Thu Aug 4 06:43:12 PDT 2022


On 2022-08-04 14:34:47 +0100, Mike Cowlishaw wrote:
> > On 2022-08-01 22:46:01 -0500, Fred J. Tydeman wrote:
> > > It appears to me that section 5.2.4.2.3 assumes that decimal 
> > > floating point (DFP) is IEC 60559 DFP..
> > > Yet, I do not see such a requirement in 5.2.4.2.3.
> > > 
> > > I do see in 6.2.5#12 that the formats are IEC 60559 DFP.
> > 
> > I think that should also be put in 5.2.4.2.3.
> > 
> > BTW, does the standard clearly say that these types are optional?
> 
> I thought all floating-points types are optional, since they don't
> have to be implemented on machines that don't have FP hardware?

float, double and long double are not optional. Machines that don't
have hardware FP need to implement FP in software. BTW, that's why
on 32-bit ARM, long double = double (to simplify and make it faster
than a larger format).

> > This just seems to be suggested by 5.2.4.2.3, but 6.2.5#12 says no 
> > more than "There are three decimal floating types, designated as 
> > _Decimal32, _Decimal64, and _Decimal128.
> > Respectively, they have the IEC 60559 formats: decimal32, decimal64, 
> > and decimal128.
> > Decimal floating types are real floating types.", which could be 
> > interpreted as such types being mandatory.
> 
> The 'real' here is meant to be a reference to them being approximations to
> the real numbers, I suspect.

The "real" is not the issue. The issue is "There are" without
"optionally" or similar.

> > Compare with _Complex, for which it is said "Complex types are a 
> > conditional feature that implementations need not support;".
> 
> Which also would seem to be superfluous.  I think pointing this out all over
> the place is just noise.  And also, I think at some point one has to draw a
> line and call this one 'done'.  Time to start a wish/errata list, perhaps,
> for the next revision.

Only the "that implementations need not support" is superfluous.
And "optional" would be better than "conditional", IMHO.

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