Mail Archives: djgpp-workers/2000/03/15/11:13:53
On Wed, 15 Mar 2000, Dieter Buerssner wrote:
> In the footnote
> 236) An implementation may use the n-char-sequence to determine
> extra information to be represented in the NaN’s significand.
Yep, I've seen this, but it doesn't have any clues about printing
"nan(sqrt)" or some such.
> > Did you check the latest library? AFAIK, it doesn't suppress the sign
> > of a NaN anymore, at least not in all cases.
>
> I just checked. If I have not done anything stupid, it still
> suppresses the sign (as suggested by the source of doprint).
??? Here's a snippet from doprnt.c, which was added in preparation for
v2.03:
*buf = NULL;
size = cvtl(_ldouble, prec, flags, &softsign, *fmt, buf,
buf + sizeof(buf));
/*
* If the format specifier requested an explicit sign,
* we print a negative sign even if no significant digits
* will be shown, and we also print a sign for a NaN. In
* other words, "%+f" might print -0.000000, +NaN and -NaN.
*/
if (softsign || (sign == '+' && (neg_ldouble || nan_p == -1)))
sign = '-';
nan_p = 0;
Perhaps you tried without the sign in the format specifier? That case
was left alone on purpose; see the discussions on djgpp-workers about 10
months ago (IIRC).
- Raw text -