Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Double factorial

Name: Anonymous 2009-02-27 13:02

GHCi, version 6.8.2: http://www.haskell.org/ghc/  :ihbt for help
Loading package base ... linking ... done.
Prelude> let fact n = product [1..n]
Prelude> fact 5
120
Prelude> let doubleFact = fact.fact
Prelude> doubleFact 3
720
Prelude>

Name: Anonymous 2009-02-27 15:50

>>6,7
http://www.luschny.de/math/factorial/FastFactorialFunctions.htm
The algorithm PrimeSwing, because it is the (asymptotical) fastest algorithm known to compute n!. The algorithm is based on the notion of the 'Swing Numbers' and computes n! via the prime factorization of these numbers.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List