-
Notifications
You must be signed in to change notification settings - Fork 56
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
Easier working with native numbers #585
Comments
That would require an impl with I guess specifically for the case of Do you want this just for |
Sorry my example is bad, I am happy with just |
Would manually writing implementations be the best way to go about this? This is a lot of repetitive implementations. I just did it locally for multiplying If you do not make it work with &{integer}, the number of implementations is divided by 2. |
Here's a start which impls If that pattern seems acceptable I can do it for |
Would it be possible to have this for ConstMontyForm too? Right now this is even more cumbersome than for BoxedUint, because one has to go from native numbers to Uint and then to ConstMontyForm. let a: ConstMontyForm<...> = ...;
let b = a * ConstMontyForm::new(&Uint::from(3u32)); // today
let b = a * 3u32; // should be easily possible |
In my usage with
BoxedUint
I am really missing comparison and calculations withu32
andu64
at least, currently it is quite inefficient as I have to do the followingThe text was updated successfully, but these errors were encountered: