mirror of
https://github.com/tgorordo/WignerSymbols.jl.git
synced 2026-06-05 15:42:15 -07:00
improve primebinomial
This commit is contained in:
parent
0e056691cb
commit
f1fcb1876d
1 changed files with 2 additions and 4 deletions
|
|
@ -407,9 +407,7 @@ end
|
|||
|
||||
function primebinomial(n::BigInt, k::BigInt)
|
||||
num = copy(primefactorial(n))
|
||||
den = copy(primefactorial(k))
|
||||
den = mul!(den, primefactorial(n - k))
|
||||
res = divexact!(num, den)
|
||||
return res
|
||||
divexact!(num, primefactorial(k))
|
||||
return divexact!(num, primefactorial(n-k))
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue