[cfp-interest 3469] Re: frexp() in Annex F
Vincent Lefevre
vincent at vinc17.net
Mon May 26 00:53:09 PDT 2025
On 2025-05-26 14:38:37 +1000, Damian McGuckin wrote:
> Currently, the special cases of frexp() are explained using a sentence
> constructed as.
>
> frexp(...) returns RESULT, and stores THING
>
> frexp(...) stores THING (and returns RESULT)
>
> What is the point of
>
> a) the comma in the first case, and
>
> b) parenthesising the result (where the input in NaN).
>
> Comments please?
About b, I suppose that this is because the return result is just
recalled, as it has already been specified in F.10p14: for the other
functions, the case of the NaN argument is always absent. IMHO, the
parenthesised text should be removed or changed into a footnote.
> In a desire for consistency, should these say
>
> returns RESULT and stores THING
> OR
> stores THING and returns RESULT
"stores THING and returns RESULT" seems more logical, as returning
a value is always the thing that occurs last.
But I would avoid "stores" as this says what an implementation does
rather than a status or a property (but the implementation does not
have to store anything in the ±∞ case). For instance, I would say:
"the object pointed to by p contains an unspecified value".
--
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 / Pascaline project (LIP, ENS-Lyon)
More information about the cfp-interest
mailing list