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
90d0c331
Commit
90d0c331
authored
May 18, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
big: bug fix for division
Fixes #784. R=rsc CC=golang-dev
https://golang.org/cl/1196043
parent
2db47c90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
nat.go
src/pkg/big/nat.go
+7
-2
No files found.
src/pkg/big/nat.go
View file @
90d0c331
...
...
@@ -528,10 +528,15 @@ func (z nat) divLarge(u, uIn, v nat) (q, r nat) {
n
:=
len
(
v
)
m
:=
len
(
uIn
)
-
n
// determine if z can be reused
if
alias
(
z
,
uIn
)
||
alias
(
z
,
v
)
{
z
=
nil
// z is an alias for uIn or v - cannot reuse
}
q
=
z
.
make
(
m
+
1
)
qhatv
:=
make
(
nat
,
n
+
1
)
if
alias
(
u
,
uIn
)
{
u
=
nil
// u is an alias for uIn - cannot reuse
if
alias
(
u
,
uIn
)
||
alias
(
u
,
v
)
{
u
=
nil
// u is an alias for uIn
or v
- cannot reuse
}
u
=
u
.
make
(
len
(
uIn
)
+
1
)
u
.
clear
()
...
...
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