mirror of
https://github.com/gonum/gonum.git
synced 2025-10-23 23:23:15 +08:00
blas/gonum/internal/math32: deflake test
This commit is contained in:
@@ -35,6 +35,9 @@ func TestCopySign(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestHypot(t *testing.T) {
|
func TestHypot(t *testing.T) {
|
||||||
|
// tol is increased for Hypot to avoid failures
|
||||||
|
// related to https://github.com/gonum/gonum/issues/110.
|
||||||
|
const tol = 1e-6
|
||||||
f := func(x struct{ X, Y float32 }) bool {
|
f := func(x struct{ X, Y float32 }) bool {
|
||||||
y := Hypot(x.X, x.Y)
|
y := Hypot(x.X, x.Y)
|
||||||
if math.Hypot(float64(x.X), float64(x.Y)) > math.MaxFloat32 {
|
if math.Hypot(float64(x.X), float64(x.Y)) > math.MaxFloat32 {
|
||||||
|
Reference in New Issue
Block a user