Initial revision
[LeanCalc.git] / help / perm
1 NAME
2     perm - permutation number
3
4 SYNOPSIS
5     perm(x, y)
6
7 TYPES
8     x           int
9     y           int
10
11     return      int
12
13 DESCRIPTION
14     Return the permutation number P(x,y) which is defined as:
15
16                x!
17             --------
18              (x-y)!
19
20     This function computes the number of permutations in which y things
21     may be chosen from x items where order in which they are chosen matters.
22
23 EXAMPLE
24     > print perm(7,3), perm(7,4), perm(7,5), perm(3,0), perm(0,0)
25     210 840 2520 3 0
26
27     > print perm(2^31+1,3)
28     9903520314283042197045510144
29
30 LIMITS
31     x >= y >= 0
32     y < 2^24
33
34 LINK LIBRARY
35     void zperm(NUMBER x, y, *ret)
36
37 SEE ALSO
38     comb, fact
39