Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Fucking sprintf rounding - how does it work?

by daxim (Chaplain)
on Sep 03, 2012 at 17:13 UTC ( #991485=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -e'printf qq[%s => %.68f => %.1f\n], (qq[0.${_}5]) x 3 for (0..
    +9)'
    0.05 => 0.050000000000000000000677626357803440271254658000543713569641
    +11328125 => 0.1
    ...
    0.75 => 0.750000000000000000000000000000000000000000000000000000000000
    +00000000 => 0.8
    0.85 => 0.850000000000000000021684043449710088680149056017398834228515
    +62500000 => 0.9
    0.95 => 0.949999999999999999989157978275144955659925471991300582885742
    +18750000 => 0.9
    
  2. or download this
    $ perl -V
    
  3. or download this
    Summary of my perl5 (revision 5 version 16 subversion 0) configuration
    +:
    
    ...
        /home/daxim/local/share/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_
    +64-linux-thread-multi-ld
        /home/daxim/local/share/perlbrew/perls/perl-5.16.0/lib/5.16.0
        .
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-20 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (156 votes), past polls