2007/7/26, Marcin Tyman <m.tyman / interia.pl>:
> I didn't mean to truncate all. But i.e. to round to several places after
> dot.

Usually it's better to calculate with full precision and round when
printing, e.g. using printf of

irb(main):022:0> "%4.1f" % 1.0
=> " 1.0"
irb(main):023:0> "%4.1f" % 1.04
=> " 1.0"
irb(main):024:0> "%4.1f" % 1.05
=> " 1.1"

Kind regards

robert