The FACTDOUBLE function returns the double factorial of a given Number.
This function takes a single Number as input. It outputs that Number's double factorial. In other words, given some Number n, FACTDOUBLE returns n!!.
Declaration
FACTDOUBLE(n) -> double_factorial
Parameters
n (required, type: Number
)
The number for which you want to calculate the double factorial.
Return Values
double_factorial (type: Number
)
The double factorial of the given Number n.
Examples
The following example returns the double factorial of 6:
FACTDOUBLE(6) -> 48
The following example returns the double factorial of 7:
FACTDOUBLE(7) -> 105
If given a non-integer Number as input, the FACTDOUBLE function will return the double factorial of the given number rounded down to the nearest integer. In the following example, FACTDOUBLE is given the number 7.9 as input, and it returns the double factorial of 7:
FACTDOUBLE(7.9) -> 105
If given a Number less than one as input, the FACTDOUBLE function will return the Number 1. In the following example, the FACTDOUBLE function is given the number 0.9 as input, and it returns 1:
FACTDOUBLE(0.9) -> 1
FACTDOUBLE will return the same output if given an negative number as input, such as in the following example:
FACTDOUBLE(-6) -> 1