Skip to content
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

Missing BigInt::pow() + BigUInt::pow() #46

Open
JamesMcGuigan opened this issue Aug 5, 2022 · 0 comments
Open

Missing BigInt::pow() + BigUInt::pow() #46

JamesMcGuigan opened this issue Aug 5, 2022 · 0 comments

Comments

@JamesMcGuigan
Copy link

There are a number of missing functions when comparing num-bigint-dig with num-bigint.

The most noticeable is BigInt::pow(), which is strange because BigInt::modpow() is implemented.

use num_traits::{Num, One, Pow, Signed, Zero};
impl BigInt {
    /// Returns `self ^ exponent`.
    pub fn pow(&self, exponent: u32) -> Self {
        Pow::pow(self, exponent)
    }
}

Unsure how far the codebases have diverged, but it might be worth doing an API review between the two projects (ideally num-bigint-dig should be a drop-in replacement for num-bigint) and potentially performing an unstream merge for any safe new features since the original fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant