Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: convert output from exponentional notation to normal

by hdb (Monsignor)
on Mar 19, 2013 at 14:51 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1024316]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found