Function reference · Math
factorial
Returns the factorial, n!.
Integers are computed exactly, and half-integers give exact values with sqrt(pi). Other numbers use the gamma function. You can also write n! or fact(n); the result is written with fact.
The largest exact input is set by MAX_FACTORIAL_INPUT (see Settings).
Notation
factorial(args)
Write it in an expression: nerdamer('factorial(5)'), or in the Playground.
nerdamer.factorial
nerdamer.factorial(...args: [x]): Expression
A method on the default import. Arguments can be strings, as in Notation.
Examples
Other numbers use the gamma function.
evaluate(factorial(2.5))
// → 3.3233509704478425512Open in PlaygroundAlso called
fact
