Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is there something you can suggest me that I use to have some more "elegance" appearance, i.e:8.8458e-119 1.06542e-52 2.68e-36 2.91405e-35 0.0190644 0.0205511 0.004
? Note that I have all these number formats and I want to use a command that could apply to all of them. I tried using:8.84e-119 1.06e-52 2.68e-36 2.91e-35 0.019 0.02 0.004
, but it returns all 0 (which is natural of course)... So, can I use something else?$rounded = sprintf("%.3f", $number);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Round numbers?
by AnomalousMonk (Archbishop) on Oct 01, 2009 at 23:28 UTC | |
by Anonymous Monk on Oct 01, 2009 at 23:48 UTC | |
by AnomalousMonk (Archbishop) on Oct 02, 2009 at 00:05 UTC | |
by Anonymous Monk on Oct 02, 2009 at 00:51 UTC |