fact
Factorial.
Syntax
Section titled “Syntax”v = fact(number)Description
Section titled “Description”Returns n! — the product of all integers from 1 to number. number must be a non-negative integer; the fractional part is truncated.
Examples
Section titled “Examples”fact(5) % 120fact(10) % 3628800See also
Section titled “See also”factdouble— Double factorial.combin— Number of unordered selections (combinations) ofkfromn.permut— Number of ordered selections (permutations) ofkfromn.multinomial— Multinomial coefficient.