1# Release 0.3.0 (2020-06-12)
2
3### Enhancements
4
5- [The internal `BigDigit` may now be either `u32` or `u64`][62], although that
6  implementation detail is not exposed in the API. For now, this is chosen to
7  match the target pointer size, but may change in the future.
8- [No-`std` is now supported with the `alloc` crate on Rust 1.36][101].
9- [`Pow` is now implemented for bigint values][137], not just references.
10- [`TryFrom` is now implemented on Rust 1.34 and later][123], converting signed
11  integers to unsigned, and narrowing big integers to primitives.
12- [`Shl` and `Shr` are now implemented for a variety of shift types][142].
13- A new `trailing_zeros()` returns the number of consecutive zeros from the
14  least significant bit.
15- The new `BigInt::magnitude` and `into_parts` methods give access to its
16  `BigUint` part as the magnitude.
17
18### Breaking Changes
19
20- `num-bigint` now requires Rust 1.31 or greater.
21  - The "i128" opt-in feature was removed, now always available.
22- [Updated public dependences][110]:
23  - `rand` support has been updated to 0.7, requiring Rust 1.32.
24  - `quickcheck` support has been updated to 0.9, requiring Rust 1.34.
25- [Removed `impl Neg for BigUint`][145], which only ever panicked.
26- [Bit counts are now `u64` instead of `usize`][143].
27
28**Contributors**: @cuviper, @dignifiedquire, @hansihe,
29@kpcyrd, @milesand, @tech6hutch
30
31[62]: https://github.com/rust-num/num-bigint/pull/62
32[101]: https://github.com/rust-num/num-bigint/pull/101
33[110]: https://github.com/rust-num/num-bigint/pull/110
34[123]: https://github.com/rust-num/num-bigint/pull/123
35[137]: https://github.com/rust-num/num-bigint/pull/137
36[142]: https://github.com/rust-num/num-bigint/pull/142
37[143]: https://github.com/rust-num/num-bigint/pull/143
38[145]: https://github.com/rust-num/num-bigint/pull/145
39
40# Release 0.2.6 (2020-01-27)
41
42- [Fix the promotion of negative `isize` in `BigInt` assign-ops][133].
43
44**Contributors**: @cuviper, @HactarCE
45
46[133]: https://github.com/rust-num/num-bigint/pull/133
47
48# Release 0.2.5 (2020-01-09)
49
50- [Updated the `autocfg` build dependency to 1.0][126].
51
52**Contributors**: @cuviper, @tspiteri
53
54[126]: https://github.com/rust-num/num-bigint/pull/126
55
56# Release 0.2.4 (2020-01-01)
57
58- [The new `BigUint::to_u32_digits` method][104] returns the number as a
59  little-endian vector of base-2<sup>32</sup> digits. The same method on
60  `BigInt` also returns the sign.
61- [`BigUint::modpow` now applies a modulus even for exponent 1][113], which
62  also affects `BigInt::modpow`.
63- [`BigInt::modpow` now returns the correct sign for negative bases with even
64  exponents][114].
65
66[104]: https://github.com/rust-num/num-bigint/pull/104
67[113]: https://github.com/rust-num/num-bigint/pull/113
68[114]: https://github.com/rust-num/num-bigint/pull/114
69
70**Contributors**: @alex-ozdemir, @cuviper, @dingelish, @Speedy37, @youknowone
71
72# Release 0.2.3 (2019-09-03)
73
74- [`Pow` is now implemented for `BigUint` exponents][77].
75- [The optional `quickcheck` feature enables implementations of `Arbitrary`][99].
76- See the [full comparison][compare-0.2.3] for performance enhancements and more!
77
78[77]: https://github.com/rust-num/num-bigint/pull/77
79[99]: https://github.com/rust-num/num-bigint/pull/99
80[compare-0.2.3]: https://github.com/rust-num/num-bigint/compare/num-bigint-0.2.2...num-bigint-0.2.3
81
82**Contributors**: @cuviper, @lcnr, @maxbla, @mikelodder7, @mikong,
83@TheLetterTheta, @tspiteri, @XAMPPRocky, @youknowone
84
85# Release 0.2.2 (2018-12-14)
86
87- [The `Roots` implementations now use better initial guesses][71].
88- [Fixed `to_signed_bytes_*` for some positive numbers][72], where the
89  most-significant byte is `0x80` and the rest are `0`.
90
91[71]: https://github.com/rust-num/num-bigint/pull/71
92[72]: https://github.com/rust-num/num-bigint/pull/72
93
94**Contributors**: @cuviper, @leodasvacas
95
96# Release 0.2.1 (2018-11-02)
97
98- [`RandBigInt` now uses `Rng::fill_bytes`][53] to improve performance, instead
99  of repeated `gen::<u32>` calls.  The also affects the implementations of the
100  other `rand` traits.  This may potentially change the values produced by some
101  seeded RNGs on previous versions, but the values were tested to be stable
102  with `ChaChaRng`, `IsaacRng`, and `XorShiftRng`.
103- [`BigInt` and `BigUint` now implement `num_integer::Roots`][56].
104- [`BigInt` and `BigUint` now implement `num_traits::Pow`][54].
105- [`BigInt` and `BigUint` now implement operators with 128-bit integers][64].
106
107**Contributors**: @cuviper, @dignifiedquire, @mancabizjak, @Robbepop,
108@TheIronBorn, @thomwiggers
109
110[53]: https://github.com/rust-num/num-bigint/pull/53
111[54]: https://github.com/rust-num/num-bigint/pull/54
112[56]: https://github.com/rust-num/num-bigint/pull/56
113[64]: https://github.com/rust-num/num-bigint/pull/64
114
115# Release 0.2.0 (2018-05-25)
116
117### Enhancements
118
119- [`BigInt` and `BigUint` now implement `Product` and `Sum`][22] for iterators
120  of any item that we can `Mul` and `Add`, respectively.  For example, a
121  factorial can now be simply: `let f: BigUint = (1u32..1000).product();`
122- [`BigInt` now supports two's-complement logic operations][26], namely
123  `BitAnd`, `BitOr`, `BitXor`, and `Not`.  These act conceptually as if each
124  number had an infinite prefix of `0` or `1` bits for positive or negative.
125- [`BigInt` now supports assignment operators][41] like `AddAssign`.
126- [`BigInt` and `BigUint` now support conversions with `i128` and `u128`][44],
127  if sufficient compiler support is detected.
128- [`BigInt` and `BigUint` now implement rand's `SampleUniform` trait][48], and
129  [a custom `RandomBits` distribution samples by bit size][49].
130- The release also includes other miscellaneous improvements to performance.
131
132### Breaking Changes
133
134- [`num-bigint` now requires rustc 1.15 or greater][23].
135- [The crate now has a `std` feature, and won't build without it][46].  This is
136  in preparation for someday supporting `#![no_std]` with `alloc`.
137- [The `serde` dependency has been updated to 1.0][24], still disabled by
138  default.  The `rustc-serialize` crate is no longer supported by `num-bigint`.
139- [The `rand` dependency has been updated to 0.5][48], now disabled by default.
140  This requires rustc 1.22 or greater for `rand`'s own requirement.
141- [`Shr for BigInt` now rounds down][8] rather than toward zero, matching the
142  behavior of the primitive integers for negative values.
143- [`ParseBigIntError` is now an opaque type][37].
144- [The `big_digit` module is no longer public][38], nor are the `BigDigit` and
145  `DoubleBigDigit` types and `ZERO_BIG_DIGIT` constant that were re-exported in
146  the crate root.  Public APIs which deal in digits, like `BigUint::from_slice`,
147  will now always be base-`u32`.
148
149**Contributors**: @clarcharr, @cuviper, @dodomorandi, @tiehuis, @tspiteri
150
151[8]: https://github.com/rust-num/num-bigint/pull/8
152[22]: https://github.com/rust-num/num-bigint/pull/22
153[23]: https://github.com/rust-num/num-bigint/pull/23
154[24]: https://github.com/rust-num/num-bigint/pull/24
155[26]: https://github.com/rust-num/num-bigint/pull/26
156[37]: https://github.com/rust-num/num-bigint/pull/37
157[38]: https://github.com/rust-num/num-bigint/pull/38
158[41]: https://github.com/rust-num/num-bigint/pull/41
159[44]: https://github.com/rust-num/num-bigint/pull/44
160[46]: https://github.com/rust-num/num-bigint/pull/46
161[48]: https://github.com/rust-num/num-bigint/pull/48
162[49]: https://github.com/rust-num/num-bigint/pull/49
163
164# Release 0.1.44 (2018-05-14)
165
166- [Division with single-digit divisors is now much faster.][42]
167- The README now compares [`ramp`, `rug`, `rust-gmp`][20], and [`apint`][21].
168
169**Contributors**: @cuviper, @Robbepop
170
171[20]: https://github.com/rust-num/num-bigint/pull/20
172[21]: https://github.com/rust-num/num-bigint/pull/21
173[42]: https://github.com/rust-num/num-bigint/pull/42
174
175# Release 0.1.43 (2018-02-08)
176
177- [The new `BigInt::modpow`][18] performs signed modular exponentiation, using
178  the existing `BigUint::modpow` and rounding negatives similar to `mod_floor`.
179
180**Contributors**: @cuviper
181
182[18]: https://github.com/rust-num/num-bigint/pull/18
183
184
185# Release 0.1.42 (2018-02-07)
186
187- [num-bigint now has its own source repository][num-356] at [rust-num/num-bigint][home].
188- [`lcm` now avoids creating a large intermediate product][num-350].
189- [`gcd` now uses Stein's algorithm][15] with faster shifts instead of division.
190- [`rand` support is now extended to 0.4][11] (while still allowing 0.3).
191
192**Contributors**: @cuviper, @Emerentius, @ignatenkobrain, @mhogrefe
193
194[home]: https://github.com/rust-num/num-bigint
195[num-350]: https://github.com/rust-num/num/pull/350
196[num-356]: https://github.com/rust-num/num/pull/356
197[11]: https://github.com/rust-num/num-bigint/pull/11
198[15]: https://github.com/rust-num/num-bigint/pull/15
199
200
201# Prior releases
202
203No prior release notes were kept.  Thanks all the same to the many
204contributors that have made this crate what it is!
205
206