$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...
In reply to Re: Re: Re: Rounding With sprintf anomaly?
by riffraff
in thread Rounding With sprintf anomaly?
by oakbox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |