Function reference · Math

dfact

Returns the double factorial, n·(n-2)·(n-4)·….

Integers are computed exactly. Other numbers use the gamma function: call evaluate for their value. The largest exact input is set by MAX_DFACT_INPUT (see Settings).

Notation

dfact(x)

Write it in an expression: nerdamer('dfact(6)'), or in the Playground.

nerdamer.dfact

nerdamer.dfact(x: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

6·4·2.

dfact(6)
// → 48
Open in Playground

7·5·3·1.

dfact(7)
// → 105
Open in Playground

A non-integer.

evaluate(dfact(5/2))
// → 2.4070694561160438698
Open in Playground

Also called

dfactorial

← Back to Function reference