num-bigint icon indicating copy to clipboard operation
num-bigint copied to clipboard

Big integer types for Rust

Results 78 num-bigint issues
Sort by recently updated
recently updated
newest added

In the [plain_modpow](https://github.com/rust-num/num-bigint/blob/39d4d9b18c8f27a20713c8b9a8faf1d75062d1fe/src/biguint.rs#L2263) function, there are a lot of bitshifts and no comments, combined with the fact that I am more a mathematician than a programmer, I don't really know...

It would be nice to have a method for getting the memory consumption of `BigInt`s and `BigUInt`s. In particular this crate is being used by RustPython, and the python spec...

Well, i have an big int with ~50K digits. And when i want to print it/write it to file, to_string() takes very much. Is there a way to boost this?...

Does this support arbitrary size integers? From a quick look at the source code it looks like it does. If that is indeed the case, it might be better to...

Hello, I'll like to implement some sort of custom version of `biguint::to_bitwise_digits_le` that take a `&mut [u8]` instead of allocating a `Vec`. For this I'd need access to the `BigDigit`s,...

num-bigint 0.3 introduced 128 bit integer support, which significantly improves modular exponentation. On my machine with arbitrary 256 bit inputs, `modpow()` improved from 94 ms to 24 ms from num-bigint...

```rust fn compare_owned(a: BigInt, b: BigUint) -> std::cmp::Ordering { // Does not clone. a.cmp(BigInt::from_biguint(Sign::Plus, b)) } fn compare_reference(a: &BigInt, b: &BigUint) -> std::cmp::Ordering { // How to do this without...

I see we have floor division and the corresponding modulo operations via the Integer trait. However methods for the subtly different Euclidean division and modulo operations were added to the...

enhancement

For parity with primitives and other standard types, the following features would be amazing - [ ] `core::ops::Not` and `std::ops::Not` for `BigUint` - [ ] Checked operations for `BigUint`, e.g....

It seems impossible from the public API to overwrite the memory occupied by a `BigUint`. This is a dealbreaker for cryptographic applications since a BigUint may contain private keys for...