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.
This commit is contained in:
Siddhesh Poyarekar
2019-11-20 17:48:16 +05:30
committed by Ron Evans
parent 7592b3460d
commit e7c254d2f0

View File

@@ -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 {