!
compute factorial
factorial
doublefactorial
compute double factorial
Calling Sequence
Parameters
Description
Examples
m!
factorial(m)
doublefactorial(n)
m
-
expression, not a negative integer
n
integer greater than or equal to
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 (zero), Maple returns (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 );
When n is a positive integer, this definition is equivalent to the product:
if n is an even, positive integer
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 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.
See Also
binomial
Command-line Edit History
convert
escape
FunctionAdvisor
GAMMA
initialfunctions
type/factorial
Download Help Document