Meta.Numerics Library
LogFactorial Method (n)
Meta.NumericsMeta.Numerics.FunctionsAdvancedIntegerMathLogFactorial(Int32)
Computes the logrithm of the factorial of an integer.
Declaration Syntax
C#Visual BasicVisual C++F#
public static double LogFactorial(
	int n
)
Public Shared Function LogFactorial ( _
	n As Integer _
) As Double
public:
static double LogFactorial(
	int n
)
static member LogFactorial : 
        n:int -> float 
Parameters
n (Int32)
The argument, which must be non-negative.
Return Value
The natrual logarithm of the factorial: ln(n!).
Remarks

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

Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionn is negative.
See Also