# FACTDOUBLE

**The FACTDOUBLE function returns the double factorial of a given Number.**

This function takes a single [Number](../../variable-data-types/the-number-variable-data-type) as input. It outputs that Number's double factorial. In other words, given some Number _n_, FACTDOUBLE returns _n!!_.&#x20;

#### Declaration

```javascript
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:

```javascript
FACTDOUBLE(6) -> 48
```

The following example returns the double factorial of 7:

```javascript
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:

```javascript
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:

```javascript
FACTDOUBLE(0.9) -> 1
```

FACTDOUBLE will return the same output if given an negative number as input, such as in the following example:

```javascript
FACTDOUBLE(-6) -> 1
```
