Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Answer: How do I round a number?

by buckaduck (Chaplain)
on Apr 23, 2001 at 12:32 UTC ( #74660=categorized answer: print w/replies, xml ) Need Help??

Q&A > math > How do I round a number? - Answer contributed by buckaduck

For scientific applications requiring the use of significant figures ("sig figs"), I strongly recommend the Math::SigFigs module. Unfortunately, the CPAN testers still haven't cleared it for Windows clients, though...
use Math::SigFigs; print FormatSigFigs($number, $digits);

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2016-12-03 23:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (60 votes). Check out past polls.