math/big: fix Exp when exponent is 1
Fixed bug that caused Exp(x, y, m) ( i.e. x**y (mod m) ) to return x instead of x (mod m) when y == 1. See issue page on github for more details. Added test case Fixes #9826 Change-Id: Ibabb58275a20c4231c9474199b7f1c10e54241ce Reviewed-on: https://go-review.googlesource.com/8409Reviewed-by: Robert Griesemer <gri@golang.org>
Showing
Please
register
or
sign in
to comment