Click or drag to resize
AdvancedIntegerMathDoubleFactorial Method
Computes the double factorial of the given 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 DoubleFactorial(
	int n
)

Parameters

n
Type: SystemInt32
The argument, which must be positive.

Return Value

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

The double factorial of an integer is the product all integers of the same parity, up to and including the integer. Thus 5! = 5 * 3 * 1 = 15 and 6! = 6 * 4 * 2 = 48.

See Also