Repository navigation
fix(recovery): preserve signed zero in forecast clamp - #1442
Merged
Merged
Conversation
9 of 10 tasks
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.
What this PR does
Defines and implements one exact cross-platform contract for
RecoveryForecaster.clamp: for finite ordered bounds, a value numerically equal to an inclusive bound is already in range, so clamp returnsxitself and preserves its IEEE-754 signed-zero bit. This removes the Swift/Kotlin drift reported in bhelm#56 with the minimal mirrored production change.Mirrored tests cover all four
x = ±0.0lower/upper boundary shapes and adjacent below/interior/above ordinary values.Type of change
How it was tested
origin/main(d347cbf668ee619dcd0850ed94bacdec461b87b9).-Xmx1536m.StrandAnalyticssuite (1,436 tests, 2 skipped, 0 failures) and full Android:app:testFullDebugUnitTest.lo <= hidomain, and verified the fork/upstream patch IDs are identical.Checklist
swift testinPackages/<name>) — focused test passed here; full suite passed on the equivalent fork patch and CI will run this branchandroid/(./gradlew testFullDebugUnitTest) — focused test passed here; full suite passed on the equivalent fork patch and CI will run this branchStrandDesigntokens — no hardcoded colors, fonts, or spacingdocs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystoresRelated issues
Addresses bhelm#56