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

Re: convert output from exponentional notation to normal

by hdb (Prior)
on Mar 19, 2013 at 14:51 UTC ( #1024316=note: print w/replies, xml ) Need Help??


in reply to convert output from exponentional notation to normal

If you want to be more flexible, there is the sprintf function which does the same thing as printf but returns a string. Also, you can put the format into a variable for consistency and flexibility across your program.
$fmt = "%20.18f"; print sprintf( $fmt, 2.19502183680891e-06 )."\n";
For every complex problem there is an answer that is clear, simple, and wrong. H. L. Mencken

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024316]
help
Chatterbox?
and all is quiet...

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













    Results (56 votes). Check out past polls.