[cfp-interest 3497] Re: frexp() in Annex F
Vincent Lefevre
vincent at vinc17.net
Mon Jun 2 00:51:47 PDT 2025
On 2025-05-31 15:30:26 +1000, Damian McGuckin wrote:
> On Fri, 30 May 2025, Vincent Lefevre wrote:
> > > Hmmmm. Possibly replace both it and the item prior with
> > >
> > > frexp (x, p) returns x with an unspecified value in the object
> > > pointed to by p when x is a NaN or |x| = OO
> > >
> > > where OO is my bad attempt at infinity. Should 'when' be a 'for'?
> >
> > "returns x" is incorrect for NaN because it might not be the same NaN.
>
> I think F.10.1.#17 says it should be. But let's not go there.
Note that this is a "should", not a "shall".
> What do you think of?
>
> frexp (NaN, p) (returns a NaN and) leaves the object pointed to by
> p containing an unspecified value
>
> which handles the normative case correctly and reads correctly in English.
> It does not specify what the function has to do, just the net result.
OK, unless something better is found later.
--
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