]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: fix misuse of Unicode
authorRuss Cox <rsc@golang.org>
Mon, 7 Dec 2015 14:52:31 +0000 (09:52 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 11 Dec 2015 03:37:57 +0000 (03:37 +0000)
ˆ (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 <gri@golang.org>
src/math/big/nat.go

index 54f4011ca5919ff6b60b597180000fc84fa60891..f0a8339ee710be59a08c08f98e040e1a06e9e255 100644 (file)
@@ -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)