printf("%.0f", 0.1) => 0.
Fifer, Eric
EFifer@sanwaint.com
Wed Aug 16 04:32:00 GMT 2000
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: printf.patch
Type: text/x-diff
Size: 582 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20000816/a11d9d31/attachment.bin>
More information about the Newlib
mailing list