September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,5 @@
|
|||
function binom(integer n, k)
|
||||
return factorial(n)/(factorial(k)*factorial(n-k))
|
||||
end function
|
||||
|
||||
?binom(5,3)
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
include builtins\bigatom.e
|
||||
|
||||
function ba_binom(integer n, k)
|
||||
bigatom r = ba_new(1)
|
||||
for i=1 to k do
|
||||
r = ba_divide(ba_multiply(r,n-i+1),i)
|
||||
end for
|
||||
return r
|
||||
end function
|
||||
|
||||
?ba_sprintf("%B",ba_binom(5,3))
|
||||
?ba_sprintf("%B",ba_binom(100,50))
|
||||
?ba_sprintf("%B",ba_binom(60,30))
|
||||
?ba_sprintf("%B",ba_binom(1200,120))
|
||||
Loading…
Add table
Add a link
Reference in a new issue