PARTIAL_FACTORIAL Name
PARTIAL_FACTORIAL Purpose
This function calculates the partial factorial n!/(n-m)!.
Category
Mathematics
Calling Sequence
Result = PARTIAL_FACTORIAL( N, M ) Inputs
N: A positive integer (see Purpose).
M: A positive integer (see Purpose).
Output
Result: The value of N!/(N-M)!.
Uses
- Procedure
This function multiplies all numbers between and including N and N-M+1.
Example
Calculate 4!/(4-2)!.
result = partial_factorial( 4, 2 )
The result should be 4*3*2*1/(2*1)=12.
Modification History
Written by: Daithi A. Stone, 2004-11-22.