From c5af0ff12312dc70f281b74cdaa184cac45aa58e Mon Sep 17 00:00:00 2001 From: Thomas Vilte Date: Tue, 15 Sep 2026 18:42:52 -0300 Subject: [PATCH] Compare expRotation1 paths with a tolerance --- internal/celt/pvq_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/celt/pvq_test.go b/internal/celt/pvq_test.go index d2c007a..7611194 100644 --- a/internal/celt/pvq_test.go +++ b/internal/celt/pvq_test.go @@ -60,7 +60,9 @@ func TestExpRotation1BlockOfFour(t *testing.T) { expRotation1Scalar(want, test.length, test.stride, 0.9, 0.4) expRotation1(got, test.length, test.stride, 0.9, 0.4) - assert.Equal(t, want, got) + // arm64 contracts the multiply-adds into FMA, so the unrolled path can + // differ from the scalar one in the last bit. + assert.InDeltaSlice(t, want, got, 0.00001) } }