From e7c254d2f09e9e39d365b7422d62215b510ae6e0 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Wed, 20 Nov 2019 17:48:16 +0530 Subject: [PATCH] Tolerate imprecise result in SolvePoly The SolvePoly test TestSolvePoly generates a result that is slightly imprecise on aarch64 (~2.75e-62) as opposed to a precise result on x86_64. This change adjusts the test to tolerate this imprecision. --- core_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core_test.go b/core_test.go index 8a8155f4..b5c8b002 100644 --- a/core_test.go +++ b/core_test.go @@ -1140,9 +1140,9 @@ func TestSolvePoly(t *testing.T) { diffError := SolvePoly(coeffs, &roots, 300) - expectedDiffError := 0.0 - if diffError != expectedDiffError { - t.Errorf("TestSolvePoly was not exact, got an error of %f and should have been %f", diffError, expectedDiffError) + diffTolerance := 1.0e-61 + if diffError > diffTolerance { + t.Errorf("TestSolvePoly was not exact, got an error of %e and should have been less than %f", diffError, diffTolerance) } if roots.GetFloatAt(0, 0) != 7.0 {