Robbepop / apint

Arbitrary precision integers library.
Other
26 stars 4 forks source link

Adding "pow" method #62

Open Titaniumtown opened 3 years ago

Titaniumtown commented 3 years ago

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.

Robbepop commented 3 years ago

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.

Gelbpunkt commented 3 years ago

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.

Robbepop commented 3 years ago

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.