Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Math 101 anyone?

by gawatkins (Monsignor)
on Oct 12, 2004 at 20:10 UTC ( #398675=note: print w/replies, xml ) Need Help??


in reply to Math 101 anyone?

Hello smcone,

You can use the sprintf function to round your numbers to 2 decimal places, something like this:.

perl -e "print sprintf ('%.2f', (100.10-100));"

Thanks,
Greg W.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://398675]
help
Chatterbox?
[LanX]: The old chromosone question ... Why Y???
[zentara]: Y succeeds X then preceeds Z . There is a deep meaning in that :-)
[zentara]: unicorns have a Z chromosome

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-03-30 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (362 votes). Check out past polls.