http://qs321.pair.com?node_id=410904

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, to round decimals numbers to a price (2 dec)
I have
my $p = &PricePerUnit(..); $units = int(0.5 + ($units*$p*100) )/100;
As I always got s.th. like 123.99, but I don't want 'super-market-prices'!
I 'explode' this calc and I found
int(0.5 + ($units*$p*100) ) => 12400 (ok!!) but now deviding 12400 by 100 I get 123.99 instead of 124.00 or 124
What is my mistake? The accepted non-accuracy can't be that big?

Carl