## Purpose

## Return value

## Syntax

`=FACTDOUBLE(number)`

*number*- A number greater than or equal to -1.

## How to use

The FACTDOUBLE function returns the double factorial of a number. A double factorial is calculated differently for even and odd numbers. For an even number, **n**, it's the product of all even integers less than or equal to **n** and greater than or equal to 2. For an odd number, the double factorial is the product of all odd integers less than or equal to **n** and greater than or equal to 1. The double factorial for both zero and -1 are defined as 1. For numbers less than -1, a double factorial is not defined.

FACTDOUBLE takes just one argument, *number*, which should be a positive integer. If *number* is not an integer, the decimal portion of *number* will be removed before the factorial is calculated.

### Examples

For even numbers, the double factorial is the product of all even integers less than or equal to *number* and greater than or equal to 2. For example, the double factorial of 8 is 384:

```
=FACTDOUBLE(8)
=8*6*4*2
=384
```

For odd numbers, the double factorial is the product of all odd integers less than or equal to *number* and greater than or equal to 1. The double factorial of 7 is 105:

```
=FACTDOUBLE(7)
=7*5*3*1
=105
```

The double factorial for zero and -1 are defined as 1:

```
=FACTDOUBLE(0) // returns 1
=FACTDOUBLE(-1) // returns 1
```

### Notes

- If
*number*is negative, FACTDOUBLE will return the #NUM! error. - If
*number*is not an integer it will be truncated to an integer, then solved. - If
*number*is not numeric, FACTDOUBLE will return the #VALUE! error.