for (0.35,0.45){print sprintf("%.1f",$_);print "\n"} # result: 0.3 0.5
That won't work for accounting: you always need to round up.
Dave
In reply to Re: Re: Fixed precision numbers
by dash2
in thread Fixed precision numbers
by iburrell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |