commands → factorial

factorial(n)

The factorial command computes n! = n*(n-1)*(n-2)*...*2*1 where n is a non-negative integer.

Examples

factorial(10);
	3628800

10*9*8*7*6*5*4*3*2*1;
	3628800

References

Gullberg, Jan. Mathematics: From the Birth of Numbers. Norton, 1996.