Function reference · Math
factorial
Computes the factorial of an expression.
Non-negative integers are evaluated exactly. Supported half-integers are reduced to closed forms involving sqrt(pi), and non-integer numerical evaluation can use the gamma function.
The compatibility spelling fact is an alias of factorial.
Examples
These examples use Nerdamer Notation.
Evaluate an integer factorial exactly.
factorial(5) // → 120
Reduce a half-integer factorial symbolically.
factorial(1/2) // → (1/2)*pi^(1/2)
Interfaces
The same operation is available through the interfaces below.
Nerdamer Notation
Use this form inside input passed to nerdamer(...).
factorial(arg1)
nerdamer.factorial
Call the operation through the default nerdamer import.
nerdamer.factorial(x: Expression): Expression
Parameters
| Name | Type | Description |
|---|---|---|
x | Expression | The expression to compute the factorial of. |
Returns
Expression — The factorial of `x`.
Aliases
fact
