[Haskell-cafe] ANN: combinatorics

Balazs Komuves bkomuves at gmail.com
Mon Jan 30 18:55:22 CET 2012

> --------------------------------------------
> -- combinatorics 0.1.0
> --------------------------------------------
> The combinatorics package offers efficient *exact* computation of common
> combinatorial functions like the binomial coefficients and factorial.
> (For fast *approximations*, see the math-functions package instead.)

Shameless self-promotion: The combinat package (which deliberately
does not try to own the valuable namespace Math.Combinatorics) is
a more extensive combinatorics library:


While the main focus is the generation of combinatorial objects themselves,
counting functions and common number sequences like the above are
also offered.

Even though the binomial and factorial definition in this package are the
naive ones, a quick experiment imply that the differences start show
themselves around 100,000 factorial, or choosing 50,000 elements out
of 100,000, which is probably a rather specialized use case.

The primes function in the combinat package is based on an old Cafe
thread, and actually seems to be faster than the one in the combinatorics

In any case, I may switch to the faster algorithms in the future :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120130/1e78eedd/attachment.htm>

More information about the Haskell-Cafe mailing list