Cross-reference FLOAT_E against e derived in Rust, read through e() - #20
Closed
thedavidmeister wants to merge 1 commit into
Closed
Cross-reference FLOAT_E against e derived in Rust, read through e()#20thedavidmeister wants to merge 1 commit into
thedavidmeister wants to merge 1 commit into
Conversation
Float::e() calls the concrete's e(), which returns LibDecimalFloat.FLOAT_E, so the check reaches the library's Solidity rather than a copied literal. e is derived by the 1/k! series in 512-bit integer arithmetic with guard digits, rounded to nearest at 66 places, and asserted equal both by pack_lossless and through the contract's parser. FLOAT_PI follows the same path once the library release carrying it is pinned here and the concrete exposes pi(). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QyCCzi9WZPhuXcU1hwr2bq
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Author
|
Withdrawn: the cross-reference belongs in rain.math.float beside the constants; it lands there on rain.math.float#274. |
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.
Adds
Float::e(), which calls the concrete'se()and so returnsLibDecimalFloat.FLOAT_Efrom the compiled library, and a Rust cross-reference of that value: e derived by the 1/k! series in 512-bit integer arithmetic with 12 guard digits, rounded to nearest at 66 places, asserted equal to the getter's return both bypack_losslessof the derived coefficient and byFloat::parseof the derived digits through the contract's parser. No literal is mirrored in Rust; what is checked is the library's Solidity, reached through the concrete.FLOAT_PI(rain.math.float#274) takes the same path in a follow-up once that release is pinned here and the concrete exposespi()besidee(). That getter movesDecimalFloat's bytecode, so it is its own change.QA
e_is_e_rounded_to_nearestande_parses_from_its_digits; a one-ulp change toFLOAT_Ein the library fails both, and the series is independent of the library's digits.🤖 Generated with Claude Code
https://claude.ai/code/session_01QyCCzi9WZPhuXcU1hwr2bq