Commit 08164329 authored by Russ Cox's avatar Russ Cox

math/big: fix misuse of Unicode

ˆ (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/17671Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
parent 251e5006
......@@ -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)
......
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