This is the mail archive of the cygwin-developers@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: printf("%.0f", 0.1) => 0.


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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]