[cfp-interest 3491] C2Y's canonicalise() in AnnexF - F.10.9.7

Damian McGuckin damianm at esi.com.au
Sat May 31 18:46:53 PDT 2025


Looking at the sentence-by-sentence text in F.10.9.7 which deals with
special cases/issues of the canonicalize() floating point routine.

Consider:

 	The canonicalize functions produce 451) the canonical version of the
 	representation in the object pointed to by the argument x.

This looks more like text which is better suited to Section 7? Hmmm????

COnsider:

 	If the input *x is a signaling NaN, the "invalid" floating-point
 	exception is raised and a (canonical) quiet NaN (which should be
 	the canonical version of that signaling NaN made quiet) is produced.

Writing this in the form of the rest of Annex F, should this not say

 	canonicalize(cx, x) returns a canonical (quiet) NaN and raises the
 	"invalid" floating-point exception when *x is a signaling NaN.

Is using 'when' instead of 'for' mathematically correct?  It reads better

The rest of the explanation should be inferred from Section 7 and if it is 
not clear enough there, then why not enhance the text in Section 7.

Consider:

 	For quiet NaN, infinity, and finite inputs, the functions raise no
 	floating-point exceptions.

That is the default/normative for all but a quiet NaN. Note quite sure 
how to write this case to fit in with the style of Annex F. How about:

 	canonicalize(cx, x) returns a canonical (quiet) NaN when *x is a
 	quiet NaN.

As a quiet NaN is normative, you do not need to say quiet but do we need 
to emphasise it? Section 7 already says the result is a canonalical quiet 
NaN the way I read it.

Comments - Damian


More information about the cfp-interest mailing list