in reply to Re: Fixed precision numbers
in thread Fixed precision numbers
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Fixed precision numbers
by Juerd (Abbot) on Feb 25, 2003 at 22:39 UTC | |
by dash2 (Hermit) on Feb 25, 2003 at 23:15 UTC |