This is the mail archive of the
cygwin-developers@sources.redhat.com
mailing list for the Cygwin project.
Re: printf("%.0f", 0.1) => 0.
- To: "'cygwin-developers at sources dot redhat dot com'" <cygwin-developers at sources dot redhat dot com>
- Subject: Re: printf("%.0f", 0.1) => 0.
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Wed, 16 Aug 2000 13:49:54 -0400
- References: <779F20BCCE5AD31186A50008C75D997917177B@silldn_mail1.sanwaint.com>
- Reply-To: cygwin-developers at sources dot redhat dot com
Could you send this patch to the newlib mailing list? The newlib
maintainers have to approve this patch.
cgf
On Wed, Aug 16, 2000 at 12:31:31PM +0100, Fifer, Eric wrote:
>
>I discovered this when testing the latest Perl:
>
> main()
> {
> printf("%.0f\n", 0.1);
> printf("%.0f\n", -0.1);
> }
>
>Produces:
>
> 0.
> -0.
>
>The trailing dot is the problem. Attached is a suggested
>change that seems to fix the problem and not introduce any
>others.
>
>Regards,
>
>Eric Fifer
>
--
cgf@cygnus.com Cygnus Solutions, a Red Hat company
http://sourceware.cygnus.com/ http://www.redhat.com/