-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add unsigned(T)
in addition to existing unsigned(x::XBS)
.
#2
base: master
Are you sure you want to change the base?
Conversation
This is in addition to the existing `unsigned(x)`, `signed(x)`. Also extends `unsigned` and `signed` so you can call them on already unsigned/signed types (keeping with the Base integers)
Thanks for your PR! I'm in favor of such functionality, but remember having a hard time choosing a name. When looking at the documentation of There is also the function What do you think? |
Oh, huh, you're totally right! I hadn't even noticed that there wasn't a corresponding hmm those are all good points. Thanks for pointing out I think we should ask around a bit about why julia doesn't have a way to convert between the signed/unsigned types easily, and then follow whatever consensus arises there. Thanks for pointing me in that direction! :) |
:) I opened JuliaLang/julia#30444 to discuss it! :) |
ad092c6
to
c9a3e7e
Compare
I think JuliaLang/julia#34864 eventually did add support for this in Base, so this PR might actually be good to go now? Sorry i let it languish for so long!! |
@NHDaly looks like you need to resolve the conflicts on this PR |
Thanks Curtis. Finally done so |
:) I noticed that these methods were missing.
Thanks for the really handy package!! :)
Adds methods to
unsigned
andsigned
that take types instead of values. Also extends both to work over allXBI
, not justXBS
/XBU
, so that you can callunsigned(UInt256)
without an error.