Documentation/Calc Functions/FACTDOUBLE

Function name:
FACTDOUBLE

Category:
Add-in

Summary:
Calculates the double factorial of a non-negative integer value. If n is an even positive integer, its double factorial is the product of all even integers in the range [2, n]; if n is an odd positive integer, its double factorial is the product of all odd integers in the range [1, n]. The double factorial of n is usually denoted by n!!.

Syntax:
FACTDOUBLE(Number)

Returns:
Returns a positive integer, which is the double factorial of the supplied number.

Arguments:
Number is a non-negative integer, or a reference to the cell containing that integer, whose double factorial value is to be calculated.


 * If Number is non-numeric, then FACTDOUBLE reports a #VALUE! error.
 * If Number is a non-integer value, then FACTDOUBLE truncates it to an integer.
 * If, after any truncation, Number is less than 0 or greater than 300, then FACTDOUBLE reports an invalid argument error (Err:502).

Additional details:
By definition FACTDOUBLE(0) = 1.

For an even positive integer ne: $$\text{ FACTDOUBLE }(n_e)~=~n_e\times(n_e-2)\times(n_e-4)\times...\times\:4\:\times\:2$$

For an odd positive integer no: $$\text{ FACTDOUBLE }(n_o)~=~n_o\times(n_o-2)\times(n_o-4)\times...\times\:3\:\times\:1$$

More information can be found at Wikipedia's Double factorial page.

Related LibreOffice functions:
FACT

GAMMA

ODF standard:
Section 6.16.33, part 2

Equivalent Excel functions:
FACTDOUBLE