Generic.comb_mul: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/math/generic.bend as Generic Lines 481-485 of bend-collections@1.0.0.0/src/math/generic.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/math/generic.bend&start_line=481&end_line=485 import Base import bend-collections@1.0.0.0/src/math/num.bend as N # C(n, i+1) = (r / g) * ((n - i) / ((i + 1) / g)) with r = C(n, i) and # g = gcd(r, i + 1): exact, and it overflows only if C(n, i+1) does (C(n, i) # grows for i < n / 2) def comb_mul(~T: Data, ~op: N.Op -> T, ~test: N.Test -> Bool, +r: T, +t: T, +j: T, +g: T) -> T & Bool: mul_by(~T, ~op, ~test, op(N.Quot{t, op(N.Quot{j, g})}), (op(N.Quot{r, g}), True{})) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/generic.bend&name=mul_by https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/num.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/num.bend&name=Test