factorial2(n, exact=False)
This is the factorial with every second value skipped. E.g., 7!! = 7 * 5
* 3 * 1
. It can be approximated numerically as:
n!! = special.gamma(n/2+1)*2**((m+1)/2)/sqrt(pi) n odd = 2**(n/2) * (n/2)! n even
Calculate n!!
. Arrays are only supported with :None:None:`exact`
set to False. If n < 0
, the return value is 0.
The result can be approximated rapidly using the gamma-formula above (default). If :None:None:`exact`
is set to True, calculate the answer exactly using integer arithmetic.
Double factorial.
>>> from scipy.special import factorial2
... factorial2(7, exact=False) array(105.00000000000001)
>>> factorial2(7, exact=True) 105See :
The following pages refer to to this document either explicitly or contain code examples using this.
scipy.special._basic.factorial2
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them