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

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

by mjscott2702 (Pilgrim)
on Dec 31, 2010 at 09:51 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://879915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-16 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found