Perl Monk, Perl Meditation | |
PerlMonks |
Re: Rounding to a Given Number of Significant Figures Rather Than Decimal Placesby davis (Vicar) |
on Jan 13, 2003 at 13:58 UTC ( [id://226455]=note: print w/replies, xml ) | Need Help?? |
Hi, welcome to Perl, and welcome to PerlMonks If you haven't yet heard of it, now's the time to check out the CPAN, where you can get pre-built and pre-tested1 modules to do common tasks. A quick trawl through the Math:: namespace revealed the Math::SigFigs module, which, once installed, can be used like this:
1. Don't underestimate the importance of the tested status. The modules will (usually) have been used by many people, on many platforms, and problems will hopefully have been reported back to the module author and fixed. You'll hear many people saying "Don't re-invent the wheel"; testing is just one reason why not. Is this going out live? No, Homer, very few cartoons are broadcast live - it's a terrible strain on the animator's wrist
In Section
Seekers of Perl Wisdom
|
|