Click or drag to resize
AdvancedIntegerMathLogFactorial Method
Computes the logrithm of the factorial of an integer.

Namespace:  Meta.Numerics.Functions
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 3.1.0.0 (3.1.0.0)
Syntax
public static double LogFactorial(
	int n
)

Parameters

n
Type: SystemInt32
The argument, which must be non-negative.

Return Value

Type: Double
The value of ln(n!).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionn is negative.
Remarks

This function provides accurate values of ln(n!) even for values of n which would cause n! to overflow.

See Also