From 0816432918ee0e4f1cf06b2a3100935e6293788b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 7 Dec 2015 09:52:31 -0500 Subject: [PATCH] math/big: fix misuse of Unicode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ˆ (U+02C6) is a circumflex accent, not an exponentiation operator. In the rest of the source code for this package, exponentation is written as **, so do the same here. Change-Id: I107b85be242ab79d152eb8a6fcf3ca2b197d7658 Reviewed-on: https://go-review.googlesource.com/17671 Reviewed-by: Robert Griesemer --- src/math/big/nat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/math/big/nat.go b/src/math/big/nat.go index 54f4011ca59..f0a8339ee71 100644 --- a/src/math/big/nat.go +++ b/src/math/big/nat.go @@ -1062,7 +1062,7 @@ func (z nat) expNNMontgomery(x, y, m nat) nat { x = rr // Ideally the precomputations would be performed outside, and reused - // k0 = -mˆ-1 mod 2ˆ_W. Algorithm from: Dumas, J.G. "On Newton–Raphson + // k0 = -m**-1 mod 2**_W. Algorithm from: Dumas, J.G. "On Newton–Raphson // Iteration for Multiplicative Inverses Modulo Prime Powers". k0 := 2 - m[0] t := m[0] - 1 @@ -1072,7 +1072,7 @@ func (z nat) expNNMontgomery(x, y, m nat) nat { } k0 = -k0 - // RR = 2ˆ(2*_W*len(m)) mod m + // RR = 2**(2*_W*len(m)) mod m RR = RR.setWord(1) zz = zz.shl(RR, uint(2*numWords*_W)) _, RR = RR.div(RR, zz, m)