Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
483e0315
Commit
483e0315
authored
Nov 07, 2008
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- binomial implementation (fixing broken build)
R=r OCL=18738 CL=18738
parent
175dd773
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
bignum.go
src/lib/bignum.go
+5
-0
No files found.
src/lib/bignum.go
View file @
483e0315
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment