Debian Codegraph @

debian/rust-vendor/num-bigint/RELEASES.md

raw
1 # Release 0.4.8 (2026-07-04)
2
3 - [Fixed a regression in the B-Z division algorithm.][349]
4
5 [349]: https://github.com/rust-num/num-bigint/pull/349
6
7 **Contributors**: @cuviper
8
9 # Release 0.4.7 (2026-07-02)
10
11 - [Inline single-digit values.][307] This reduces heap allocations, and
12 also enables `const ONE`, `const NEG_ONE`, and `const fn new_const`.
13 - [Use divide and conquer in `to_radix_digits`,][316] also implementing
14 the Burnikel-Ziegler algorithm to speed up large divisions in general.
15 - [Implement `LowerBounded` for `BigUint`.][330]
16
17 [307]: https://github.com/rust-num/num-bigint/pull/307
18 [316]: https://github.com/rust-num/num-bigint/pull/316
19 [330]: https://github.com/rust-num/num-bigint/pull/330
20
21 **Contributors**: @cp289, @cuviper, @hkalbasi, @mikem8891, @pRizz, @tyilo, @xtqqczze
22
23 # Release 0.4.6 (2024-06-27)
24
25 - [Fixed compilation on `x86_64-unknown-linux-gnux32`.][312]
26
27 **Contributors**: @cuviper, @ralphtandetzky, @yhx-12243
28
29 [312]: https://github.com/rust-num/num-bigint/pull/312
30
31 # Release 0.4.5 (2024-05-06)
32
33 - [Upgrade to 2021 edition, **MSRV 1.60**][292]
34 - [Add `const ZERO` and implement `num_traits::ConstZero`][298]
35 - [Add `modinv` methods for the modular inverse][288]
36 - [Optimize multiplication with imbalanced operands][295]
37 - [Optimize scalar division on x86 and x86-64][236]
38
39 **Contributors**: @cuviper, @joelonsql, @waywardmonkeys
40
41 [236]: https://github.com/rust-num/num-bigint/pull/236
42 [288]: https://github.com/rust-num/num-bigint/pull/288
43 [292]: https://github.com/rust-num/num-bigint/pull/292
44 [295]: https://github.com/rust-num/num-bigint/pull/295
45 [298]: https://github.com/rust-num/num-bigint/pull/298
46
47 # Release 0.4.4 (2023-08-22)
48
49 - [Implemented `From<bool>` for `BigInt` and `BigUint`.][239]
50 - [Implemented `num_traits::Euclid` and `CheckedEuclid` for `BigInt` and `BigUint`.][245]
51 - [Implemented ties-to-even for `BigInt` and `BigUint::to_f32` and `to_f64`.][271]
52 - [Implemented `num_traits::FromBytes` and `ToBytes` for `BigInt` and `BigUint`.][276]
53 - Limited pre-allocation from serde size hints against potential OOM.
54 - Miscellaneous other code cleanups and maintenance tasks.
55
56 **Contributors**: @AaronKutch, @archseer, @cuviper, @dramforever, @icecream17,
57 @icedrocket, @janmarthedal, @jaybosamiya, @OliveIsAWord, @PatrickNorton,
58 @smoelius, @waywardmonkeys
59
60 [239]: https://github.com/rust-num/num-bigint/pull/239
61 [245]: https://github.com/rust-num/num-bigint/pull/245
62 [271]: https://github.com/rust-num/num-bigint/pull/271
63 [276]: https://github.com/rust-num/num-bigint/pull/276
64
65 # Release 0.4.3 (2021-11-02)
66
67 - [GHSA-v935-pqmr-g8v9]: [Fix unexpected panics in multiplication.][228]
68
69 **Contributors**: @arvidn, @cuviper, @guidovranken
70
71 [228]: https://github.com/rust-num/num-bigint/pull/228
72 [GHSA-v935-pqmr-g8v9]: https://github.com/rust-num/num-bigint/security/advisories/GHSA-v935-pqmr-g8v9
73
74 # Release 0.4.2 (2021-09-03)
75
76 - [Use explicit `Integer::div_ceil` to avoid the new unstable method.][219]
77
78 **Contributors**: @catenacyber, @cuviper
79
80 [219]: https://github.com/rust-num/num-bigint/pull/219
81
82 # Release 0.4.1 (2021-08-27)
83
84 - [Fixed scalar divide-by-zero panics.][200]
85 - [Implemented `DoubleEndedIterator` for `U32Digits` and `U64Digits`.][208]
86 - [Optimized multiplication to avoid unnecessary allocations.][199]
87 - [Optimized string formatting for very large values.][216]
88
89 **Contributors**: @cuviper, @PatrickNorton
90
91 [199]: https://github.com/rust-num/num-bigint/pull/199
92 [200]: https://github.com/rust-num/num-bigint/pull/200
93 [208]: https://github.com/rust-num/num-bigint/pull/208
94 [216]: https://github.com/rust-num/num-bigint/pull/216
95
96 # Release 0.4.0 (2021-03-05)
97
98 ### Breaking Changes
99
100 - Updated public dependences on [arbitrary, quickcheck][194], and [rand][185]:
101 - `arbitrary` support has been updated to 1.0, requiring Rust 1.40.
102 - `quickcheck` support has been updated to 1.0, requiring Rust 1.46.
103 - `rand` support has been updated to 0.8, requiring Rust 1.36.
104 - [`Debug` now shows plain numeric values for `BigInt` and `BigUint`][195],
105 rather than the raw list of internal digits.
106
107 **Contributors**: @cuviper, @Gelbpunkt
108
109 [185]: https://github.com/rust-num/num-bigint/pull/185
110 [194]: https://github.com/rust-num/num-bigint/pull/194
111 [195]: https://github.com/rust-num/num-bigint/pull/195
112
113 # Release 0.3.3 (2021-09-03)
114
115 - [Use explicit `Integer::div_ceil` to avoid the new unstable method.][219]
116
117 **Contributors**: @catenacyber, @cuviper
118
119 # Release 0.3.2 (2021-03-04)
120
121 - [The new `BigUint` methods `count_ones` and `trailing_ones`][175] return the
122 number of `1` bits in the entire value or just its least-significant tail,
123 respectively.
124 - [The new `BigInt` and `BigUint` methods `bit` and `set_bit`][183] will read
125 and write individual bits of the value. For negative `BigInt`, bits are
126 determined as if they were in the two's complement representation.
127 - [The `from_radix_le` and `from_radix_be` methods][187] now accept empty
128 buffers to represent zero.
129 - [`BigInt` and `BigUint` can now iterate digits as `u32` or `u64`][192],
130 regardless of the actual internal digit size.
131
132 **Contributors**: @BartMassey, @cuviper, @janmarthedal, @sebastianv89, @Speedy37
133
134 [175]: https://github.com/rust-num/num-bigint/pull/175
135 [183]: https://github.com/rust-num/num-bigint/pull/183
136 [187]: https://github.com/rust-num/num-bigint/pull/187
137 [192]: https://github.com/rust-num/num-bigint/pull/192
138
139 # Release 0.3.1 (2020-11-03)
140
141 - [Addition and subtraction now uses intrinsics][141] for performance on `x86`
142 and `x86_64` when built with Rust 1.33 or later.
143 - [Conversions `to_f32` and `to_f64` now return infinity][163] for very large
144 numbers, rather than `None`. This does preserve the sign too, so a large
145 negative `BigInt` will convert to negative infinity.
146 - [The optional `arbitrary` feature implements `arbitrary::Arbitrary`][166],
147 distinct from `quickcheck::Arbitrary`.
148 - [The division algorithm has been optimized][170] to reduce the number of
149 temporary allocations and improve the internal guesses at each step.
150 - [`BigInt` and `BigUint` will opportunistically shrink capacity][171] if the
151 internal vector is much larger than needed.
152
153 **Contributors**: @cuviper, @e00E, @ejmahler, @notoria, @tczajka
154
155 [141]: https://github.com/rust-num/num-bigint/pull/141
156 [163]: https://github.com/rust-num/num-bigint/pull/163
157 [166]: https://github.com/rust-num/num-bigint/pull/166
158 [170]: https://github.com/rust-num/num-bigint/pull/170
159 [171]: https://github.com/rust-num/num-bigint/pull/171
160
161 # Release 0.3.0 (2020-06-12)
162
163 ### Enhancements
164
165 - [The internal `BigDigit` may now be either `u32` or `u64`][62], although that
166 implementation detail is not exposed in the API. For now, this is chosen to
167 match the target pointer size, but may change in the future.
168 - [No-`std` is now supported with the `alloc` crate on Rust 1.36][101].
169 - [`Pow` is now implemented for bigint values][137], not just references.
170 - [`TryFrom` is now implemented on Rust 1.34 and later][123], converting signed
171 integers to unsigned, and narrowing big integers to primitives.
172 - [`Shl` and `Shr` are now implemented for a variety of shift types][142].
173 - A new `trailing_zeros()` returns the number of consecutive zeros from the
174 least significant bit.
175 - The new `BigInt::magnitude` and `into_parts` methods give access to its
176 `BigUint` part as the magnitude.
177
178 ### Breaking Changes
179
180 - `num-bigint` now requires Rust 1.31 or greater.
181 - The "i128" opt-in feature was removed, now always available.
182 - [Updated public dependences][110]:
183 - `rand` support has been updated to 0.7, requiring Rust 1.32.
184 - `quickcheck` support has been updated to 0.9, requiring Rust 1.34.
185 - [Removed `impl Neg for BigUint`][145], which only ever panicked.
186 - [Bit counts are now `u64` instead of `usize`][143].
187
188 **Contributors**: @cuviper, @dignifiedquire, @hansihe,
189 @kpcyrd, @milesand, @tech6hutch
190
191 [62]: https://github.com/rust-num/num-bigint/pull/62
192 [101]: https://github.com/rust-num/num-bigint/pull/101
193 [110]: https://github.com/rust-num/num-bigint/pull/110
194 [123]: https://github.com/rust-num/num-bigint/pull/123
195 [137]: https://github.com/rust-num/num-bigint/pull/137
196 [142]: https://github.com/rust-num/num-bigint/pull/142
197 [143]: https://github.com/rust-num/num-bigint/pull/143
198 [145]: https://github.com/rust-num/num-bigint/pull/145
199
200 # Release 0.2.6 (2020-01-27)
201
202 - [Fix the promotion of negative `isize` in `BigInt` assign-ops][133].
203
204 **Contributors**: @cuviper, @HactarCE
205
206 [133]: https://github.com/rust-num/num-bigint/pull/133
207
208 # Release 0.2.5 (2020-01-09)
209
210 - [Updated the `autocfg` build dependency to 1.0][126].
211
212 **Contributors**: @cuviper, @tspiteri
213
214 [126]: https://github.com/rust-num/num-bigint/pull/126
215
216 # Release 0.2.4 (2020-01-01)
217
218 - [The new `BigUint::to_u32_digits` method][104] returns the number as a
219 little-endian vector of base-2<sup>32</sup> digits. The same method on
220 `BigInt` also returns the sign.
221 - [`BigUint::modpow` now applies a modulus even for exponent 1][113], which
222 also affects `BigInt::modpow`.
223 - [`BigInt::modpow` now returns the correct sign for negative bases with even
224 exponents][114].
225
226 [104]: https://github.com/rust-num/num-bigint/pull/104
227 [113]: https://github.com/rust-num/num-bigint/pull/113
228 [114]: https://github.com/rust-num/num-bigint/pull/114
229
230 **Contributors**: @alex-ozdemir, @cuviper, @dingelish, @Speedy37, @youknowone
231
232 # Release 0.2.3 (2019-09-03)
233
234 - [`Pow` is now implemented for `BigUint` exponents][77].
235 - [The optional `quickcheck` feature enables implementations of `Arbitrary`][99].
236 - See the [full comparison][compare-0.2.3] for performance enhancements and more!
237
238 [77]: https://github.com/rust-num/num-bigint/pull/77
239 [99]: https://github.com/rust-num/num-bigint/pull/99
240 [compare-0.2.3]: https://github.com/rust-num/num-bigint/compare/num-bigint-0.2.2...num-bigint-0.2.3
241
242 **Contributors**: @cuviper, @lcnr, @maxbla, @mikelodder7, @mikong,
243 @TheLetterTheta, @tspiteri, @XAMPPRocky, @youknowone
244
245 # Release 0.2.2 (2018-12-14)
246
247 - [The `Roots` implementations now use better initial guesses][71].
248 - [Fixed `to_signed_bytes_*` for some positive numbers][72], where the
249 most-significant byte is `0x80` and the rest are `0`.
250
251 [71]: https://github.com/rust-num/num-bigint/pull/71
252 [72]: https://github.com/rust-num/num-bigint/pull/72
253
254 **Contributors**: @cuviper, @leodasvacas
255
256 # Release 0.2.1 (2018-11-02)
257
258 - [`RandBigInt` now uses `Rng::fill_bytes`][53] to improve performance, instead
259 of repeated `gen::<u32>` calls. The also affects the implementations of the
260 other `rand` traits. This may potentially change the values produced by some
261 seeded RNGs on previous versions, but the values were tested to be stable
262 with `ChaChaRng`, `IsaacRng`, and `XorShiftRng`.
263 - [`BigInt` and `BigUint` now implement `num_integer::Roots`][56].
264 - [`BigInt` and `BigUint` now implement `num_traits::Pow`][54].
265 - [`BigInt` and `BigUint` now implement operators with 128-bit integers][64].
266
267 **Contributors**: @cuviper, @dignifiedquire, @mancabizjak, @Robbepop,
268 @TheIronBorn, @thomwiggers
269
270 [53]: https://github.com/rust-num/num-bigint/pull/53
271 [54]: https://github.com/rust-num/num-bigint/pull/54
272 [56]: https://github.com/rust-num/num-bigint/pull/56
273 [64]: https://github.com/rust-num/num-bigint/pull/64
274
275 # Release 0.2.0 (2018-05-25)
276
277 ### Enhancements
278
279 - [`BigInt` and `BigUint` now implement `Product` and `Sum`][22] for iterators
280 of any item that we can `Mul` and `Add`, respectively. For example, a
281 factorial can now be simply: `let f: BigUint = (1u32..1000).product();`
282 - [`BigInt` now supports two's-complement logic operations][26], namely
283 `BitAnd`, `BitOr`, `BitXor`, and `Not`. These act conceptually as if each
284 number had an infinite prefix of `0` or `1` bits for positive or negative.
285 - [`BigInt` now supports assignment operators][41] like `AddAssign`.
286 - [`BigInt` and `BigUint` now support conversions with `i128` and `u128`][44],
287 if sufficient compiler support is detected.
288 - [`BigInt` and `BigUint` now implement rand's `SampleUniform` trait][48], and
289 [a custom `RandomBits` distribution samples by bit size][49].
290 - The release also includes other miscellaneous improvements to performance.
291
292 ### Breaking Changes
293
294 - [`num-bigint` now requires rustc 1.15 or greater][23].
295 - [The crate now has a `std` feature, and won't build without it][46]. This is
296 in preparation for someday supporting `#![no_std]` with `alloc`.
297 - [The `serde` dependency has been updated to 1.0][24], still disabled by
298 default. The `rustc-serialize` crate is no longer supported by `num-bigint`.
299 - [The `rand` dependency has been updated to 0.5][48], now disabled by default.
300 This requires rustc 1.22 or greater for `rand`'s own requirement.
301 - [`Shr for BigInt` now rounds down][8] rather than toward zero, matching the
302 behavior of the primitive integers for negative values.
303 - [`ParseBigIntError` is now an opaque type][37].
304 - [The `big_digit` module is no longer public][38], nor are the `BigDigit` and
305 `DoubleBigDigit` types and `ZERO_BIG_DIGIT` constant that were re-exported in
306 the crate root. Public APIs which deal in digits, like `BigUint::from_slice`,
307 will now always be base-`u32`.
308
309 **Contributors**: @clarcharr, @cuviper, @dodomorandi, @tiehuis, @tspiteri
310
311 [8]: https://github.com/rust-num/num-bigint/pull/8
312 [22]: https://github.com/rust-num/num-bigint/pull/22
313 [23]: https://github.com/rust-num/num-bigint/pull/23
314 [24]: https://github.com/rust-num/num-bigint/pull/24
315 [26]: https://github.com/rust-num/num-bigint/pull/26
316 [37]: https://github.com/rust-num/num-bigint/pull/37
317 [38]: https://github.com/rust-num/num-bigint/pull/38
318 [41]: https://github.com/rust-num/num-bigint/pull/41
319 [44]: https://github.com/rust-num/num-bigint/pull/44
320 [46]: https://github.com/rust-num/num-bigint/pull/46
321 [48]: https://github.com/rust-num/num-bigint/pull/48
322 [49]: https://github.com/rust-num/num-bigint/pull/49
323
324 # Release 0.1.44 (2018-05-14)
325
326 - [Division with single-digit divisors is now much faster.][42]
327 - The README now compares [`ramp`, `rug`, `rust-gmp`][20], and [`apint`][21].
328
329 **Contributors**: @cuviper, @Robbepop
330
331 [20]: https://github.com/rust-num/num-bigint/pull/20
332 [21]: https://github.com/rust-num/num-bigint/pull/21
333 [42]: https://github.com/rust-num/num-bigint/pull/42
334
335 # Release 0.1.43 (2018-02-08)
336
337 - [The new `BigInt::modpow`][18] performs signed modular exponentiation, using
338 the existing `BigUint::modpow` and rounding negatives similar to `mod_floor`.
339
340 **Contributors**: @cuviper
341
342 [18]: https://github.com/rust-num/num-bigint/pull/18
343
344
345 # Release 0.1.42 (2018-02-07)
346
347 - [num-bigint now has its own source repository][num-356] at [rust-num/num-bigint][home].
348 - [`lcm` now avoids creating a large intermediate product][num-350].
349 - [`gcd` now uses Stein's algorithm][15] with faster shifts instead of division.
350 - [`rand` support is now extended to 0.4][11] (while still allowing 0.3).
351
352 **Contributors**: @cuviper, @Emerentius, @ignatenkobrain, @mhogrefe
353
354 [home]: https://github.com/rust-num/num-bigint
355 [num-350]: https://github.com/rust-num/num/pull/350
356 [num-356]: https://github.com/rust-num/num/pull/356
357 [11]: https://github.com/rust-num/num-bigint/pull/11
358 [15]: https://github.com/rust-num/num-bigint/pull/15
359
360
361 # Prior releases
362
363 No prior release notes were kept. Thanks all the same to the many
364 contributors that have made this crate what it is!
365