This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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.


"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
>

Patch has been applied to sourceware.

Thanks,

-- Jeff Johnston (Red Hat Inc.)

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