in reply to Re: Re: Rounding With sprintf anomaly?
in thread Rounding With sprintf anomaly?

I think if you want a proper rounding, you do this:

$x=int($num+0.5);

This gets rid of all those oddities, like a number looking like 5.5, but actually being 4.9999999....

Sorry, typo, should be 5.499999...