Fact function

Syntax

Fact(x)

Description

Use the Fact function to return the factorial of a positive integer x. The factorial of a number x is equal to 1*2*3*...*x. If x is not an integer, it is truncated to an integer.

Returns

Returns a Number equal to the factorial of x.

Example

The example sets &X to 1, 1, 2, then 24. Fact(2) is equal to 1*2; Fact(4) is equal to 1*2*3*4:

&X = Fact(0);
&X = Fact(1);
&X = Fact(2);
&X = Fact(4);

Related Topics