Skip to content

Commit

Permalink
std::math::big: fix allocation handling for left shift
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Sep 8, 2024
1 parent 340b55f commit 5c0508a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions std/math/big/bits.jule
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ fn basicMul(mut &x: bits, mut y: bits): bits {
addRes(r, m)
}
// m<<1
m = m[:len(m)+1]
copy(m[1:], m)
m = append(m[:1], m...)
m[0] = 0b0
}
ret r
Expand Down Expand Up @@ -350,8 +349,7 @@ fn basicSqr(mut &x: bits): bits {
addRes(r, m)
}
// m<<1
m = m[:len(m)+1]
copy(m[1:], m)
m = append(m[:1], m...)
m[0] = 0b0
}
ret r
Expand Down

0 comments on commit 5c0508a

Please sign in to comment.