Previous Up Next

6.6.1  Factorial: factorial !

The factorial command computes the factorial of a number.
The postfix operator ! is equivalent.


Example.
Input:

factorial(10)

or:

10!

Output:

3628800


The Γ function (see Section 6.8.13) can be used to extend the factorial function to complex numbers. The Γ function is defined for all complex numbers except for zero and the negative integers, and it satisfies Γ(n+1)=n! for all non-negative integers n. So the factorial can be extended to all complex numbers except the negative integers by n!=Γ(n+1).


Examples.


Previous Up Next