You might want to look at Pari/GP ( http://pari.math.u-bordeaux.fr/ ) for ideas of what kind of functions to supply. Also, as a source of ideas for algorithms. Mike Matsko ----- Original Message ----- From: "Max Rabkin" <max.rabkin@gmail.com> To: "Andrew Wagner" <wagner.andrew@gmail.com> Cc: "R.A. Niemeijer" <r.a.niemeijer@tue.nl>, haskell-cafe@haskell.org Sent: Tuesday, April 14, 2009 12:35:19 PM GMT -05:00 US/Canada Eastern Subject: Re: [Haskell-cafe] Looking for the fastest Haskell primes algorithm On Tue, Apr 14, 2009 at 2:47 PM, Andrew Wagner <wagner.andrew@gmail.com> wrote:
Some other ideas for things to put in this package possibly: is_prime :: Int -> Bool
I'd also add isProbablePrime using a Miller-Rabin test or somesuch, for use with large numbers. It'd have to be in a monad which supplies randomness, of course. But to start with, I'd just package what I had and put it on Hackage. --Max _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe