Skip to main content

Double factorial

The double factorial of a non-negative integer n, denoted by n!!, is defined as the product of all integers between 1 and nn that have the same parity as nn:

n!!=n·(n-2)·(n-4)4·2if n is evenn·(n-2)·(n-4)3·1if n is odd

0!!=1 by convention.

Syntax

Integer!!

Description

Given an integer between 1 and 65535, returns n!!n!!.

symbols.double_factorial.calc.png