Mail Archives: djgpp-workers/2000/03/15/16:15:38
Eli said:
> On Wed, 15 Mar 2000, Dieter Buerssner wrote:
> > 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).
But the sign of a negative nan and inf should be printed regardless of
any sign format specifier. I don't think it is (from reading the
source of <something...>special(), last in doprnt.c; not shown above).
But I could be wrong...
U2, October,
MartinS
- Raw text -