Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Generating powerset with progressive ordering

by tall_man (Parson)
on Feb 25, 2005 at 18:47 UTC ( #434602=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! /usr/bin/perl
    use strict;
    ...
      my $div = divisors($a);
      print "sorted list of divisors of $N is ",$div,"\n";
    }
    
  2. or download this
    perl ddd.pl 12345
    sorted list of divisors of 12345 is [1,3,5,15,823,2469,4115,12345]
    
  3. or download this
    module Powerset where
    
    ...
    -}
    factor_sqrt n factors =
        fsqrt (sqrt n) 0 (powerset factors)
    
  4. or download this
    Prelude> :l Powerset.hs
    Powerset> factor_sqrt 24777695232 [(2,13),(3,8),(461,1)]
    149364.0
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2014-07-29 05:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls