compute double factorial
expression, not a negative integer
integer greater than or equal to −1
The m! and factorial(m) commands return the factorial of m.
If m is a positive integer, Maple returns the product of the numbers from 1 to m. If m is 0 (zero), Maple returns 1 (one).
If m is a (real or complex) floating-point number, Maple returns the generalized factorial function result calculated using GAMMA(m+1).
If m is a negative integer, Maple returns an error.
The doublefactorial(n) command returns the double factorial of n, defined in terms of the generalized factorial as
FunctionAdvisor( definition, doublefactorial );
doublefactorial⁡n=2n2⁢2π14−cos⁡π⁢n4⁢n2!,with no restrictions on ⁡n
When n is a positive integer, this definition is equivalent to the product:
n⁡n−2...642 if n is an even, positive integer
n⁡n−2...531 if n is an odd, positive integer
Note: In Maple, !! is used for repeated factorials and so it does not indicate the double factorial.
The type function perceives the factorial function as of type function and as of type "!", while it perceives doublefactorial as of type function only.
The internal representation of an unevaluated factorial uses the standard representation of functions, with the function name factorial. Thus to the op function, the 0th operand of m! is factorial.
The factorial of a negative integer cannot be calculated. The function GAMMA(m+1) is used to calculate the factorial of a floating point number, real or complex.
Error, numeric exception: division by zero
The doublefactorial(n) command is not the same as !!. There are no restrictions on the value of n because of the way the function is defined.
The 0th operand of m! is factorial.
Command-line Edit History
Download Help Document
What kind of issue would you like to report? (Optional)