num-bigint
num-bigint copied to clipboard
Big integer types for Rust
Hi, I've looking to assign a big number to an integer in rust with this lib. The docs doesn't clearly mentions how to initialise it. Following is my code ```rs...
The carry from a multiply or a multiply-accumulate is a single word, so update the functions to clarify that. Use a temporary double word for the computation. And rename "acc"...
`rust-gmp`, `ramp`, and `apint` are all unmaintained so I removed them. I added a column for fundamental features the crates have and added some new rows.
Now that a common trait for this has been sorted out (https://github.com/rust-num/num-traits/issues/159 implemented and merged in https://github.com/rust-num/num-traits/pull/195), we can now close https://github.com/rust-num/num-bigint/issues/146 by implementing the trait for `BigInt`s. This commit...
Fixes #205. This does not add bitwise-or and bitwise-xor operations between signed integers and BigUint, because there is no good way to represent negative numbers with a BigUint (see #184)....
With `try_reserve` available for `Vec`, the checked operations (e.g. [checked_add](https://docs.rs/num-bigint/0.4.3/num_bigint/struct.BigInt.html#method.checked_add)) could return `None` when out of memory. Is this extension possible in [checked traits](https://docs.rs/num-traits/0.2.15/num_traits/ops/checked/index.html)?
See also: rust-num/num-integer#47
`From for {numeric}` has been around in `std` since 1.28, so it would make sense to have it for `BigInt` and `BigUint` too.
Out of 110 lifetime generics in 20 files, only 23 in 4 files were necessary for compilation. This should make code more readable and not affect behavior in any way....