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

Re: Decimal Array range

by ikegami (Pope)
on Dec 21, 2010 at 18:14 UTC ( #878331=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for (my $i = 0; $i < 100; $i += 0.1) {
       say $i;
    }
    
  2. or download this
    ...
    99.7999999999986
    99.8999999999986
    99.9999999999986
    
  3. or download this
    for (my $_ = 0*10; $_ < 100*10; ++$_) {
       my $i = $_/10;
       say $i;
    }
    
  4. or download this
    ...
    99.7
    99.8
    99.9
    
  5. or download this
    for (0*10..100*10) {
       my $i = $_/10;
       say $i;
    }
    
  6. or download this
    map $_/10, 0*10..100*10
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2016-06-28 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (360 votes). Check out past polls.