From: Martin Stromberg Message-Id: <200003151643.RAA20668@mars.lu.erisoft.se> Subject: Re: Unnormals??? To: djgpp-workers AT delorie DOT com Date: Wed, 15 Mar 2000 17:43:20 +0100 (MET) In-Reply-To: from "Eli Zaretskii" at Mar 15, 2000 05:56:23 PM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 special(), last in doprnt.c; not shown above). But I could be wrong... U2, October, MartinS