AdvancedIntegerMathDoubleFactorial Method

Computes the double factorial of the given integer.

Definition

Namespace: Meta.Numerics.Functions
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static double DoubleFactorial(
	int n
)

Parameters

n  Int32
The argument, which must be positive.

Return Value

Double
The value of n!!.

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.

Exceptions

See Also