Commit 483e0315 authored by Robert Griesemer's avatar Robert Griesemer

- binomial implementation (fixing broken build)

R=r
OCL=18738
CL=18738
parent 175dd773
......@@ -841,6 +841,11 @@ export func Fact(n uint) *Natural {
}
export func Binomial(n, k uint) *Natural {
return MulRange(n-k+1, n).Div(MulRange(1, k));
}
func (x *Natural) Gcd(y *Natural) *Natural {
// Euclidean algorithm.
for !y.IsZero() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment