Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Printf/Sprintf Behavior Change

by McA (Priest)
on Sep 16, 2013 at 16:37 UTC ( #1054314=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print sprintf("%0.02f",0.345);
    
  2. or download this
    perl -E 'print sprintf("%0.18f",0.346);'
    
  3. or download this
    #!/usr/bin/env perl
    use strict;
    ...
    if ($tprice < 1  && length($tprice) > 4) {
        print "SPRINTF - $tprice -  " . sprintf("%0.18f",$tprice) . "\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-12-21 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls