delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/05/04/13:49:59

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3EB5478B.A8F0CA66@phekda.freeserve.co.uk>
Date: Sun, 04 May 2003 18:02:03 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: gcvt and leading zeroes
References: <3EB39994 DOT 5B197777 AT phekda DOT freeserve DOT co DOT uk> <1190-Sat03May2003221035+0300-eliz AT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Eli Zaretskii wrote:
[snip]
> IIRC, "they" are the Cygnus test suite.  Some of the gcvt tests there
> failed until I added this snippet.

OK.

> Does any standard say that we _must_ produce the leading zero?  If
> not, I'd argue that Perl is being gratuitously restrictive.

No, I don't think the leading zero is required. The standard says:

* you should use sprintf with %g, if you want portable code;
* the output is similar to printf's %g format.

"Similar" is the key word there.

Perl uses sprintf with %g for DJGPP, because its Configure script thinks that
gcvt doesn't work. This is fine - there's no problem.

> We could fix the Cygnus test suite, of course, if that would be a
> lesser evil.  But I'd doubt that suite wants this behavior for
> arbitrary reasons; probably at least newlib behaves like that.

I don't think we need to make any changes.

Thanks, bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


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