Description Usage Arguments Value References Examples
Factorials are denoted for a positive integer x as x! and are defined as:
x! = (x)(x - 1)(x - 2) \cdots (2)(1)
For example, the factorial of 5 is written as: 5! = (5)(4)(3)(2)(1) = 120
1 | factorial(n)
|
n |
Desired integer to compute factorial |
the factorial, n!, of n
Press, W., Teukolsky, S., Vetterling, W., & Flannery, B. (2007). Numerical recipes (3rd ed.). Cambridge: Cambridge University Press. Weisstein, Eric W. "Factorial." From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/Factorial.html
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.