APLX Help : Help on APL language : APL Primitives : ! Binomial




Twoargument form See also oneargument form Factorial or Gamma function In its twoargument form, with positive arguments, 2 ! 4 (Number of unique pairs from a population 6 of 4) 3 ! 20 (Number of groups of three from a 1140 population of 20) 2 ! 6 12 20 (Number of pairs from a population 15 66 190 of 6 12 20 respectively) TABLE1 ← 2 3⍴⍳6 TABLE2 ← 2 3 ⍴ 3 6 9 12 15 18 TABLE1 ! TABLE2 (TABLE1 is table of group sizes, TABLE2 3 15 84 is table of populations) 495 3003 18564 Other cases, such as negative or noninteger arguments, are also catered for. The various results that can be obtained are: Left Right RightLeft Result Argument Argument +ve +ve +ve (!RIGHT)÷(!LEFT)×!RIGHTLEFT +ve +ve ve 0 +ve ve ve (¯1*LEFT)×LEFT!LEFTRIGHT+1 ve +ve +ve 0 ve ve +ve (¯1*RIGHTLEFT)×(RIGHT+1)!(LEFT+1) ve ve ve 0 

APLX Help : Help on APL language : APL Primitives : ! Binomial

Copyright © 19962010 MicroAPL Ltd