Difference between revisions of "Factorial"

m (adding doc status category stub page)
Line 2: Line 2:
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status D]] <!-- For Lumina use, do not change -->
  
{{stub}}
+
= Factorial(n) =
 +
 
 +
Computes the factorial of a positive integer n.  The factorial of a positive integer is defined as:
 +
 
 +
n! = [[Product]](1..n)
 +
 
 +
The factorial function grows very rapidly, resulting in a numeric overflow when n>170.  However, the log factorial can often be used in its place, which can be obtained using:
 +
[[LGamma]](n+1)
 +
 
 +
= Library =
 +
 
 +
Math
 +
 
 +
= See Also
 +
 
 +
* [[GammaFn]] : The gamma function.  n! = [[GammaFn(n+1)]]
 +
* [[LGamma]]: The natural logarithm of the gamma function
 +
* [[Combinations]], [[Permutations]]

Revision as of 19:05, 18 May 2007


Factorial(n)

Computes the factorial of a positive integer n. The factorial of a positive integer is defined as:

n! = Product(1..n)

The factorial function grows very rapidly, resulting in a numeric overflow when n>170. However, the log factorial can often be used in its place, which can be obtained using:

LGamma(n+1)

Library

Math

= See Also

Comments


You are not allowed to post comments.