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

Instead of a `Vec` using a `Cow

Fixes #285 This will allow for const creation of BigUint etc. I started off by just doing BigUint to give an idea of what it would take. Please use this...

I would like to have a way to make a `BigInt` into its absolute value in place, i.e. taking `&mut self`. Seems like a good approach would be to add...

```rust use num_bigint::BigUint; fn main() { let small = 32768usize; let big = BigUint::from(small); println!("{small:x} {big:x}"); println!("{small:x?} {big:x?}"); } ``` Prints: ``` 8000 8000 8000 32768 ``` It should print:...

Similarly to how multiplication uses different algorithms depending on some conditions, GCD could be optimized by using more than 1 algorithm. It should look something like this: https://github.com/Rudxain/EsoMath.js/blob/8c896b3804b40b8c0307a0a32c10264ff82a52b5/src/mod/factors.js#L52-L178 > [!note]...

enhancement

For now, this is implemented as an `"inline"` crate feature, because the performance tradeoffs are not clear. Some of the benchmarks in the repo are significantly faster, but there are...

During the addition/subtraction loops, there is performance to be gained by specifying the exact assembly instructions. The performance gain start to be felt after 1,000bit integers, and are maximal around...