Fix TestExpRotation1BlockOfFour on arm64 - #252
Merged
thomas-vilte merged 2 commits intoSep 17, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #252 +/- ##
=======================================
Coverage 94.11% 94.11%
=======================================
Files 63 63
Lines 11119 11119
=======================================
Hits 10465 10465
Misses 453 453
Partials 201 201
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
FrantaBOT
approved these changes
Sep 17, 2026
zshang-oai
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
TestExpRotation1BlockOfFourcompares the unrolledexpRotation1with a scalar reference usingassert.Equal. On arm64 the compiler contracts the multiply-adds into FMA, and it does so differently for the two versions, so they drift in the last float32 bit (-6.7551584vs-6.755159). The test only passed on amd64, and on the macOS runner, because that job runs with-race, which changes codegen enough to hide it.The rotation itself is fine, so this only changes the test, to
InDeltaSlicewith a 1e-5 tolerance. The largest difference I saw was about 6e-7 on values up to ~10, so this leaves room for a few ulps while still catching a real mistake in the unrolled path.With this change,
go test ./...passes on arm64 without-race(qemu, Go 1.27). Before, this was the only failing test. amd64 passes with and without-race.Reference issue
Fixes #241