Mail Archives: djgpp-workers/2000/03/22/04:50:30
>
>
> On Tue, 21 Mar 2000 ams AT ludd DOT luth DOT se wrote:
>
> > The copysign functions produce a value with the magnitude of x and the
> > sign of y. They produce a NaN (with the sign of y) if x is a NaN."
> >
> > This means the standard do think that NaNs have a sign (however
> > misguided that is)
>
> No, they only think a NaN *might* have a sign. If there's no notion
> of a sign of a NaN, the copying a sign to it does nothing.
>
> > hence we really do need to print the "-" of a negative NaN. Period.
>
> I don't see how this argument changes anything.
>
> I really think that it's up to us to decide what we think is
> appropriate in this case. The standard clearly doesn't provide enough
> guidance on this issue. Even this last argument seems to be
> far-fetched (why should the standard hide such an important info in
> the description of an obscure function?).
It's not an argument whether the NaNs should be printed with a sign or
not. It's just confirmation (for me) that the impression I had when
first reading about "[-]nan" that everything in that passage implied
that if the sign bit is set it should be printed.
This newly discovered part, shows (IMHO) that the sign of NaN should
be treated like any other sign.
I. e. the standard consequently states that the sign bit of a NaN
should be honoured in all operations.
Right,
MartinS
- Raw text -