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

Adds and edits docs

Hi guys, I am using `serde_json` to deserialize a JSON file into a struct, `MyStruct` ```rust use std::{io::BufReader, fs::File}; use serde::Deserialize; use num_bigint::BigInt; #[derive(Deserialize, Debug)] struct MyStruct { num: BigInt,...

repro: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b18dc13a3c981c6351d3cdd6e24a8715 One quick fix for this would be to override the trait default, cast to signed, and then make sure the coefficients are the positive form after (e.g., by...

Hello, I am running into issues trying to convert an arbitrarily large `BigUint` into a fixed size [`crypto_bigint::Uint`](https://docs.rs/crypto-bigint/latest/crypto_bigint/struct.UInt.html) (Specifically, I'm working with [`p384`](https://docs.rs/p384/latest/p384/) elliptic curve). To ensure the number fits...

Propose to introduce the `BigIntRef` and `BigUintRef` type, and the definition should be: ```rust struct BigUintRef, } ``` And implement all ops on them. The feature is useful when we...

In num-bigint/src/bigint.rs and num-bigint/src/biguint.rs, I think the code should check modulus != 0 and exponent >= 0/modulus != 0 as comments mentioned before use them to avoid possible panic. num-bigint/src/bigint.rs...

`BigUint::from_str_radix("aa", 16)` results in ``` help: the following trait is implemented but not in scope; perhaps add a `use` for it: | 1 + use num_traits::Num; ``` So I need...

This commit implements [number theoretic transform (NTT)](https://en.wikipedia.org/wiki/Discrete_Fourier_transform_over_a_ring#Number-theoretic_transform) for large integer multiplication (issue #169). * To simplify implementation the [Schönhage–Strassen algorithm](https://en.wikipedia.org/wiki/Sch%C3%B6nhage%E2%80%93Strassen_algorithm) was not used. Instead, three distinct 64-bit primes were carefully...

Earlier versions won't see the incompatible updates at all!

The multiplication method is provided, but raising a sign to an integer power is also a common use-case I think? ```rust #[inline] fn sign_powi(sign: Sign, pow: T) -> Sign {...