math: don't use integer division that truncates to zero

Change-Id: I7389da0c3a63fea3be5c820f2ce0d0168a95ab4c
Reviewed-on: https://go-review.googlesource.com/c/go/+/373377
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Dan Kortschak 2021-12-21 21:49:50 +10:30 committed by Ian Lance Taylor
parent 55a60cadc3
commit 2981fc7f16

View file

@ -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)},