Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: How to control no. of digits on exponent

by mjscott2702 (Pilgrim)
on Dec 31, 2010 at 09:51 UTC ( #879915=note: print w/ replies, xml ) Need Help??


in reply to Re: How to control no. of digits on exponent
in thread How to control no. of digits on exponent

From (s)printf perldoc:

Note that the number of exponent digits in the scientific notation produced by %e, %E, %g and %G for numbers with the modulus of the exponent less than 100 is system-dependent: it may be three or less (zero-padded as necessary). In other words, 1.23 times ten to the 99th may be either "1.23e99" or "1.23e099".

So as ikegami points out, you would have to manually strip leading 0's from the exponent.


Comment on Re^2: How to control no. of digits on exponent

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2014-08-23 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls