num-bigint
num-bigint copied to clipboard
Big integer types for Rust
Hi. I have input data in a raw buffer. I am doing this: ``` let data : &Vec< u8 >; let data_big = BigUint::from_bytes_le( &data ); ``` I would like...
An attempt at solving #226. Adds `.set_sign()` and `Mul`/`MulAssign` for `BigInt`. The current behaviour is that `.set_sign(s)` sets the sign if `s` is either `Plus` or `Minus`. If `s` is...
Currently, the only way to directly change the sign of a `BigInt` is to use`.into_parts()` and then `BigInt::from_biguint()`. It would be more convenient if we could directly set the sign,...
These are two more integer methods we don't have on `BigUint`, which would be nice to have. Unresolved questions: - [x] Currently, `next_power_of_two` takes `self` by value instead of reference,...
This might be better suited behind a new feature gate? We're trying to use `num-bigint` in a WASM project that's running on [CosmWasm](https://docs.cosmwasm.com/docs/0.16/). The code compiles fine, but when trying...
At the moment build script turns on a feature that uses LLVM instrinsics for additions. Unfortunately cranelift backend does not support those instinsics (and potentially other) yet, so can it...
This is a proof of concept. I'd like to discuss possible designs and pathways to getting something like this merged. # Motivation Using `BigInt` with mostly small (
This is a question (or a feature request, if it doesn't exist). Is it possible to use a BigInt as a seed for a PRNG, and if so are there...
Found a strange edge case with one number I was working with, this is a binary saved sha1 hash for those curious and is throwing off everything I am doing....
The benefits of using criterion are discussed in #85.