This is the mail archive of the
cygwin-developers@sources.redhat.com
mailing list for the Cygwin project.
printf("%.0f", 0.1) => 0.
- To: "'cygwin-developers at sources dot redhat dot com'" <cygwin-developers at sources dot redhat dot com>
- Subject: printf("%.0f", 0.1) => 0.
- From: "Fifer, Eric" <EFifer at sanwaint dot com>
- Date: Wed, 16 Aug 2000 12:31:31 +0100
- Cc: "'newlib at sources dot redhat dot com'" <newlib at sources dot redhat dot com>
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
printf.patch