Rng::fill_bytesto improve performance, instead of repeated
gen::<u32>calls. The also affects the implementations of the other
randtraits. This may potentially change the values produced by some seeded RNGs on previous versions, but the values were tested to be stable with
BigUintnow implement operators with 128-bit integers.
Contributors: @cuviper, @dignifiedquire, @mancabizjak, @Robbepop, @TheIronBorn, @thomwiggers
Sumfor iterators of any item that we can
Add, respectively. For example, a factorial can now be simply:
let f: BigUint = (1u32..1000).product();
BigIntnow supports two's-complement logic operations, namely
Not. These act conceptually as if each number had an infinite prefix of
1bits for positive or negative.
BigIntnow supports assignment operators like
BigUintnow support conversions with
u128, if sufficient compiler support is detected.
BigUintnow implement rand's
SampleUniformtrait, and a custom
RandomBitsdistribution samples by bit size.
num-bigintnow requires rustc 1.15 or greater.
stdfeature, and won't build without it. This is in preparation for someday supporting
serdedependency has been updated to 1.0, still disabled by default. The
rustc-serializecrate is no longer supported by
randdependency has been updated to 0.5, now disabled by default. This requires rustc 1.22 or greater for
rand's own requirement.
Shr for BigIntnow rounds down rather than toward zero, matching the behavior of the primitive integers for negative values.
ParseBigIntErroris now an opaque type.
big_digitmodule is no longer public, nor are the
ZERO_BIG_DIGITconstant that were re-exported in the crate root. Public APIs which deal in digits, like
BigUint::from_slice, will now always be base-
Contributors: @clarcharr, @cuviper, @dodomorandi, @tiehuis, @tspiteri
Contributors: @cuviper, @Robbepop
BigInt::modpowperforms signed modular exponentiation, using the existing
BigUint::modpowand rounding negatives similar to
lcmnow avoids creating a large intermediate product.
gcdnow uses Stein's algorithm with faster shifts instead of division.
randsupport is now extended to 0.4 (while still allowing 0.3).
Contributors: @cuviper, @Emerentius, @ignatenkobrain, @mhogrefe
No prior release notes were kept. Thanks all the same to the many contributors that have made this crate what it is!