The FACTDOUBLE function returns the double factorial of a number.
A double factorial is the product of all integers of the same sign that are less than or equal to a given number, with an increment of 2.
Syntax
FACTDOUBLE(value)
Argument |
Description |
Permitted values |
|---|---|---|
value |
Number or reference to a number for which the double factorial is calculated |
0, 1, 2, 3, ... (non-negative integers) or a reference to a cell containing a number |
Examples of use
Calculating the double factorial of the number 5
=FACTDOUBLE(5)
Result: 15, since 5!!=5×3×1.
Calculating the double factorial of the number 6
=FACTDOUBLE(6)
Result: 48, since 6!!=6×4×2.
Notes
–If the argument is not an integer, it is truncated to an integer.
–The double factorial for non-negative integers is defined as:
•n!! = n × (n−2) × (n−4) × ... × 2 — for even numbers.
•n!! = n × (n−2) × (n−4) × ... × 1 — for odd numbers.