Repository navigation
Use all.equal for event comparison in single-analysis test - #682
Merged
Merged
Conversation
The "Single analysis" assertion compared x1$analysis$event against u2$Events with %==% (testit's identical()), which failed on aarch64-linux due to a last-bit floating-point difference (279.72639477630287 vs 279.72639477630293). Switch to all.equal(), matching the "Multiple analysisTimes" assertion which already uses it for the same event comparison. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The platform floating-point difference that triggered the arm64 failure is ~5e-14, far below the default all.equal tolerance of ~1.5e-8. Set tolerance = 1e-13 so the assertion still absorbs cross-platform float noise while catching any meaningful regression. Applied to both the single- and multiple-analysis event comparisons. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
yihui
force-pushed
the
fix-arm64-event-tolerance
branch
from
October 2, 2026 19:11
f5e9b49 to
096b1d3
Compare
jdblischak
approved these changes
Oct 2, 2026
Collaborator
Author
|
Now it passes on arm64 Linux: https://github.com/r-universe/merck/actions/runs/37053673682/job/110994423760 |
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.
Problem
R CMD check fails on
aarch64-unknown-linux-gnu(discovered via r-universe check log):%==%istestit'sidentical()— exact. The two values differ only in the last bit, a platform floating-point artifact.Fix
Switch the single-analysis event comparison to
all.equal(), matching the "Multiple analysisTimes" assertion which already usesall.equal()for the sameeventvsEventscomparison.🤖 Generated with Claude Code