Commit 917f7643 authored by David G. Andersen's avatar David G. Andersen Committed by Robert Griesemer

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
parent 21de1ab3
......@@ -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()
......
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