Algosim documentation: factorial

factorial

The factorial function.

Syntax

Description

For a non-negative integer n, factorial(n) is the product of the n smallest positive integers:

factorial(n) = (k, k, 1, n).

Notes

The postfix operator ! is mapped to the factorial function.

Examples

5!
120
∑(1/k!, k, 0, 100)
2.71828182846	(=e)
SequenceVector(10) @ factorial
(1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800)

See also