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

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 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)]

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://434602]
[Discipulus]: ah! holidays i hope..
Discipulus without Corion and with choroba in another timezone the monastery was silent.. I was silbing alone in the cloister
[choroba]: Yes, I feel alone in the cyberspace...
[choroba]: Not many occasions to talk to my wife, either :-(
Discipulus s/silbing/whistle/ dunno from where this word was in my mind..

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2017-02-22 08:42 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (325 votes). Check out past polls.