-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpp: Add support for _uint256be literals #596
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #596 +/- ##
==========================================
+ Coverage 92.84% 93.81% +0.96%
==========================================
Files 23 25 +2
Lines 3552 3769 +217
Branches 376 0 -376
==========================================
+ Hits 3298 3536 +238
- Misses 144 233 +89
+ Partials 110 0 -110 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you going to use it?
What will be confusing here is that these literals are required to have exactly 64 hex digits. |
I was adding
Yeah I was wondering if it would make sense make this work on decimal instead. Probably better holding the merge back a bit. |
Unless there exist some simplified algorithm for decimal literals I'm not aware of, this requires implementing multiplication by 10. https://github.com/chfast/intx/blob/master/include/intx/int128.hpp#L893 |
@chfast leaning towards that even with base 16 this may be useful |
Only extending the literal tests, because the other tests are covered via bytes32 tests given uint256be is an alias.
Rebased. I think this is still useful for unit tests, based on |
Only extending the literal tests, because the other tests are covered
via bytes32 tests given uint256be is an alias.