Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Wrong calculations in for loop

by Anonymous Monk
on Aug 22, 2012 at 12:55 UTC ( #989020=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $zmax = 60;    # Maximum depth in your model
    my $dz = 0.05;    # Grid spacing in z-direction
    ...
    for (my $i=0; $i <= $zmax; $i = $i+$dz) {
       print $i."\n";
    }
    
  2. or download this
    3.6
    3.65
    3.69999999999999
    3.74999999999999
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-08-27 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls