delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/15/11:13:53

Date: Wed, 15 Mar 2000 17:56:23 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Dieter Buerssner <buers AT gmx DOT de>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Unnormals???
In-Reply-To: <200003151548.RAA22975@is.elta.co.il>
Message-ID: <Pine.SUN.3.91.1000315175135.20407H@is>
MIME-Version: 1.0
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id LAA17469
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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019