Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: floating points and sprintf

by petral (Curate)
on Nov 14, 2002 at 18:41 UTC ( #212953=note: print w/replies, xml ) Need Help??


in reply to floating points and sprintf

This may not make your co-worker happy, but:
$ perl -we'printf"%d, %.0f\n",$a=147.2*100,$a' 14719, 14720

  p

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://212953]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2020-01-21 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?