apint icon indicating copy to clipboard operation
apint copied to clipboard

Adding "pow" method

Open Titaniumtown opened this issue 5 years ago • 3 comments

Could a method similar to num-bigint's https://docs.rs/num-bigint/0.4.0/num_bigint/struct.BigUint.html#method.pow be added? Thanks.

Titaniumtown avatar Mar 24 '21 18:03 Titaniumtown

Hey, I see absolutely no reason why it should no be possible to add a pow method to this crate's Int and Uint types. Note though that unlike BitUint the result of the pow method would have the same bit-width as its inputs.

Robbepop avatar Mar 24 '21 18:03 Robbepop

Hi, seeing that the owner seems to be active I would like to second this. I currently have to use num-bigint while I would personally prefer apint over it, but all I need is a modpow implementation, which should be possible if % and pow were to be added.

Gelbpunkt avatar Mar 25 '21 09:03 Gelbpunkt

Sorry for my inactivity on this project. It is a long time since I contributed to it myself. I was unsucessfully trying to give it to someone else who has more time to invest into it. I can review PRs but won't accept anything that is going to become a maintenance burden in the long run for the project. Also I am going to improve the CI so that a significant part of the review process is streamlined.

Robbepop avatar Mar 25 '21 09:03 Robbepop