Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Printf/Sprintf Behavior Change

by McA (Curate)
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 chilling in the Monastery: (12)
As of 2014-08-27 16:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (244 votes), past polls