Math387.Fact Method

function Fact(const N: Integer): Double;

Factorial N!.

#NameTypeDescription
1NInteger

Returns: Double - the factorial (=n!) of n.

Remarks:

First 50 numbers are precomputed. Although the argument is integer, the result is real. The result can exceed integer range. If you exceed the TSample range the function returns Inf.