Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Split range 0 to M into N non-overlapping (roughly equal) ranges.

by mr_mischief (Monsignor)
on Mar 16, 2011 at 04:50 UTC ( [id://893494]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [chris@pineapple ranges-892828]$ perl ranges -M=15 -N=12
     0 : from       0 to       0 (      1)
    ...
     9 : from      10 to      10 (      1)
    10 : from      11 to      11 (      1)
    11 : from      12 to      12 (      1)
    
  2. or download this
    [chris@pineapple ranges-892828]$ perl -Mbignum ranges -M=14 -N=11
     0 : from       0 to       0 (      1)
    ...
     9 : from      10 to      10 (      1)
    10 : from      11 to      11 (      1)
    11 : from      12 to      13 (      2)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-24 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found