From 634ad96ecf95cc2336a3ecbd03a9f7862f91570e Mon Sep 17 00:00:00 2001 From: maze Date: Thu, 9 Oct 2025 12:01:01 +0200 Subject: [PATCH] We cannot test smaller than our constant epsilon --- protocol/detest_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol/detest_test.go b/protocol/detest_test.go index 0c0bf5d..8851a8d 100644 --- a/protocol/detest_test.go +++ b/protocol/detest_test.go @@ -66,8 +66,8 @@ func TestCompareFloats(t *testing.T) { }, { name: "very small numbers a < b", - a: 1e-15, - b: 2e-15, + a: 1e-9, + b: 2e-9, expected: -1, }, @@ -87,13 +87,13 @@ func TestCompareFloats(t *testing.T) { { name: "zero less than small positive", a: 0.0, - b: 1e-20, + b: 1e-9, expected: -1, }, { name: "zero greater than small negative", a: 0.0, - b: -1e-20, + b: -1e-9, expected: 1, },