1
0
mirror of https://github.com/golang/go synced 2024-11-20 09:44:45 -07:00

math/big: Remove unnecessary test from nat.go multiplication

The switch at the beginning of the function already ensures n > 1,
so testing for n < 2 is redundant.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6350051
This commit is contained in:
David G. Andersen 2012-07-02 15:30:00 -07:00 committed by Robert Griesemer
parent 21de1ab359
commit 917f764382

View File

@ -396,7 +396,7 @@ func (z nat) mul(x, y nat) nat {
}
// use basic multiplication if the numbers are small
if n < karatsubaThreshold || n < 2 {
if n < karatsubaThreshold {
z = z.make(m + n)
basicMul(z, x, y)
return z.norm()