Mail Archives: djgpp-workers/2000/03/22/14:20:29
On 22 Mar 00, at 19:17, Hans-Bernhard Broeker wrote:
> I'm not entirely sure we really need to 'support' unnormals, at all,
> in this way. It think it'd make more sense to silently normalize them,
> and print what they come up as, after normalization, i.e. for an
> unnormal or pseudo-NaN, we'ld print the normalized nunber.
I think, this would be misleading. With my system, arithmetics with
an unnormal results in a NaN. So some code like
long double unnormal;
/* produce an unnormal, perhaps by reading it from a file, or by
thrashing some memory */
/* code doesn't work, put in a debugging printf */
printf("%Lf\n", unnormal); /* prints the renormalized number */
/* work with the number */
unnormal += 1.0;
printf("%Lf\n", unnormal); /* prints nan */
Would hide data inconsistencies longer as needed, and could make it
more difficult to find the bug. (I still like printf for debugging.)
Regards,
Dieter
- Raw text -