-
Notifications
You must be signed in to change notification settings - Fork 240
libm: Improved integer utilities, implement shifts and bug fixes for i256 and u256 #961
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
Conversation
25c375f
to
c1c50ee
Compare
The implementations all look pretty great to me. Would it be possible to extend the fuzz tests in There are also some benchmarks, it would be good to basically copy the compiler-builtins/libm-test/benches/icount.rs Lines 57 to 127 in 0bbec72
|
I've now added both of those. |
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.
Awesome, thanks for the improvements!
i256
andu256
<<
and-
(previously just>>
and+
)Ord
correctly (the previousPartialOrd
was broken)i256::SIGNED
totrue
The above mentioned operators are now included in theMinInt
-trait.(Never mind, that would need additional changes in compiler-builtins, so I removed it for now.)
The
Int
-trait is extended withtrailing_zeros
,carrying_add
, andborrowing_sub
.