Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Eliminating Trailing Zeros

by jmcnamara (Monsignor)
on Jul 17, 2003 at 15:18 UTC ( [id://275243]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        $ perl -e 'printf "%2.4g\n", 23.05'
        23.05
        $ perl -e 'printf "%2.4g\n", 23.00'
        23
    
  2. or download this
        g    The  double  argument  is converted in style f or e
             (or E for G conversions).  
    ...
             Trailing zeros are removed from the fractional part
             of  the result;
             ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (1)
As of 2024-04-19 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found