Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2016-10-28 11:20 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (381 votes). Check out past polls.