aboutsummaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorNicolas Hillegeer <aktau@google.com>2022-03-28 17:40:23 -0700
committerNicolas Hillegeer <aktau@google.com>2022-03-29 06:58:14 -0700
commit50b8f490e1701773254fdbfe0e3fea00ff1f2a68 (patch)
tree04ec11644acabbc5a1c78cb261891334a788ea05 /src/math
parent0af0e193680d4688e1f09c5ca315740571b03eea (diff)
parentc3fcd0117784ac05e35120ac0de6c960b400a31e (diff)
downloadgo-50b8f490e1701773254fdbfe0e3fea00ff1f2a68.tar.xz
[dev.boringcrypto] all: merge master into dev.boringcrypto
Change-Id: I04d511ed8e3e7ca4a3267f226a0c3e248c0f84a9
Diffstat (limited to 'src/math')
-rw-r--r--src/math/all_test.go12
-rw-r--r--src/math/big/nat.go2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/math/all_test.go b/src/math/all_test.go
index c11d823233..8d5e0ad439 100644
--- a/src/math/all_test.go
+++ b/src/math/all_test.go
@@ -1631,8 +1631,8 @@ var vfpowSC = [][2]float64{
{-1, Inf(-1)},
{-1, Inf(1)},
{-1, NaN()},
- {-1 / 2, Inf(-1)},
- {-1 / 2, Inf(1)},
+ {-0.5, Inf(-1)},
+ {-0.5, Inf(1)},
{Copysign(0, -1), Inf(-1)},
{Copysign(0, -1), -Pi},
{Copysign(0, -1), -0.5},
@@ -1652,8 +1652,8 @@ var vfpowSC = [][2]float64{
{0, Inf(1)},
{0, NaN()},
- {1 / 2, Inf(-1)},
- {1 / 2, Inf(1)},
+ {0.5, Inf(-1)},
+ {0.5, Inf(1)},
{1, Inf(-1)},
{1, Inf(1)},
{1, NaN()},
@@ -1681,8 +1681,8 @@ var vfpowSC = [][2]float64{
{2, float64(1 << 32)},
{2, -float64(1 << 32)},
{-2, float64(1<<32 + 1)},
- {1 / 2, float64(1 << 45)},
- {1 / 2, -float64(1 << 45)},
+ {0.5, float64(1 << 45)},
+ {0.5, -float64(1 << 45)},
{Nextafter(1, 2), float64(1 << 63)},
{Nextafter(1, -2), float64(1 << 63)},
{Nextafter(-1, 2), float64(1 << 63)},
diff --git a/src/math/big/nat.go b/src/math/big/nat.go
index 140c619c8c..512b2c229f 100644
--- a/src/math/big/nat.go
+++ b/src/math/big/nat.go
@@ -341,7 +341,7 @@ func karatsuba(z, x, y nat) {
karatsuba(p, xd, yd)
// save original z2:z0
- // (ok to use upper half of z since we're done recursing)
+ // (ok to use upper half of z since we're done recurring)
r := z[n*4:]
copy(r, z[:n*2])