Mail Archives: djgpp-workers/1999/01/20/06:07:30
On Wed, 20 Jan 1999, Eli Zaretskii wrote:
>
> On Tue, 19 Jan 1999, Hans-Bernhard Broeker wrote:
>
> > To give my personal view of this: subnormals really should not give any
> > exceptional behaviour in printf(). We should strive to ensure that
> > printf() of such a number does produce a valid answer, if possible.
> > Printing NaN would be a lie, simply put.
>
> Well, then, what's your vote about what it *should* print?
It should print the actual value. After all, even an unnormalized fp
number does have a value. It'll be smaller than LBDL_MIN, I think, but
it's there. Of course, it my turn out to be quite tricky to get this done
right (we'ld have to normalize the number ourselves, by multiplying it by,
say, 1e100, and then keep in mind to modify the exponent of the printed
number accordingly).
If that can't be done, printing 'FP:unnormal' or anything like that seems
reasonable, as long as we don't print 'NaN'.
On a side issue: as per the C9x standard, it seems we'll have to change
from 'NaN' and 'Inf' to 'nan' and 'inf' at some point in time. Might be a
good idea to do it now, while we're at it...
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -