Debian Codegraph @

.cargo/vendor/half/CHANGELOG.md

raw
1 # Changelog
2
3 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
4 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
6 ## [Unreleased]
7
8 ## [2.4.1] - 2024-04-06 <a name="2.4.1"></a>
9 ### Fixed
10 - Missing macro import causing build failure on `no_std` + `alloc` feature set. Fixes [#107].
11 - Clippy warning on nightly rust.
12
13 ## [2.4.0] - 2024-02-25 <a name="2.4.0"></a>
14 ### Added
15 - Optional `rkyv` support. Fixes [#100], by [@comath].
16 - New `num-traits` implementations: `AsPrimitive<f16>` for `bf16` and `AsPrimitive<bf16>` for
17 `f16`, allowing lossy conversions between the two types. By [@charles-r-earp].
18 - `Cargo.lock` added to vcs as is now recommended for library crates.
19 ### Fixed
20 - Remove some unit NaN conversion sign tests due to non-deterministic hardware. Fixes [#103].
21 - Redundant import warnings on nightly Rust.
22
23 ## [2.3.1] - 2023-06-24 <a name="2.3.1"></a>
24 ### Fixed
25 - Compile error on x86 (not x86_64) targets. Fixes [#93].
26
27 ## [2.3.0] - 2023-06-24 <a name="2.3.0"></a>
28 ### Added
29 - Support for Kani Rust Verifier. By [@cameron1024].
30 - Support for `rand_distr::Distribution` implementations behind `rand_distr` optional cargo
31 feature. By [@coreylowman].
32 - Floating point formatting options in `Display` and `Debug` implementations. By [@eiz].
33
34 ### Changed
35 - **Breaking Change** Minimum supported Rust version is now 1.70.
36 - **Breaking Change** Minimum supported Rust version policy reverted to original policy of allowing
37 minimum supported Rust version updates for minor releases instead of only major to avoid
38 segmentation and allow optimizing hardware implementations without unnecessary major releases.
39 - Hardware intrinsics/assembly is finally available on stable Rust, including using hardware
40 feature detection (`std` only), including:
41 - AArch64 now uses FP16 hardware instructions for conversions and math operations when
42 available.
43 - x86/x86-64 now uses F16C hardware instructions for conversions (but no math operations) when
44 available. Fixes [#54].
45
46 ### Deprecated
47 - `use-intrinsics` cargo feature no longer used. Hardware support will now always be used whenever
48 possible. A future version may output deprecation warnings if this feature is enabled.
49
50 ### Fixed
51 - Improve code generation of `leading_zeros` functions by inlining. By [@encounter].
52 - `Sum` implementation of `bf16` incorrectly performed product instead of sum. By [@wx-csy].
53 - Compile failed when `serde` cargo feature enabled but `std` not enabled.
54 - Incorrect black boxing of benchmark tests.
55 - Rustdoc cfg display on docs.rs not getting enabled.
56
57 ## [2.2.1] - 2023-01-08 <a name="2.2.1"></a>
58 ### Changed
59 - Reduced unnecessary bounds checks for SIMD operations on slices. By [@Shnatsel].
60 - Further slice conversion optimizations for slices. Resolves [#66].
61
62 ## [2.2.0] - 2022-12-30 <a name="2.2.0"></a>
63 ### Added
64 - Add `serialize_as_f32` and `serialize_as_string` functions when `serde` cargo feature is enabled.
65 They allowing customizing the serialization by using
66 `#[serde(serialize_with="f16::serialize_as_f32")]` attribute in serde derive macros. Closes [#60].
67 - Deserialize now supports deserializing from `f32`, `f64`, and string values in addition to its
68 previous default deserialization. Closes [#60].
69
70 ### Changed
71 - Add `#[inline]` on fallback functions, which improved conversion execution on non-nightly rust
72 by up to 50%. By [@Shnatsel].
73
74 ## [2.1.0] - 2022-07-18 <a name="2.1.0"></a>
75 ### Added
76 - Add support for target_arch `spirv`. Some traits and functions are unavailble on this
77 architecture. By [@charles-r-earp].
78 - Add `total_cmp` method to both float types. Closes [#55], by [@joseluis].
79
80 ## [2.0.0] - 2022-06-21 <a name="2.0.0"></a>
81 ### Changed
82 - **Breaking Change** Minimum supported Rust version is now 1.58.
83 - **Breaking Change** `std` is now enabled as a default cargo feature. Disable default features to
84 continue using `no_std` support.
85 - Migrated to Rust Edition 2021.
86 - Added `#[must_use]` attributes to functions, as appropriate.
87
88 ### Fixed
89 - Fix a soundness bug with `slice::as_ptr` not correctly using mutable reference. By [@Nilstrieb].
90
91 ### Added
92 - Added `const` conversion methods to both `f16` and `bf16`. These methods never use hardware
93 intrinsics, unlike the current conversion methods, which is why they are separated into new
94 methods. The following `const` methods were added:
95 - `from_f32_const`
96 - `from_f64_const`
97 - `to_f32_const`
98 - `to_f64_const`
99 - Added `Neg` trait support for borrowed values `&f16` and `&bf16`. By [@pthariensflame].
100 - Added `AsPrimitive` implementations from and to self, `usize`, and `isize`. By [@kali].
101
102 ### Removed
103 - **Breaking Change** The deprecated `serialize` cargo feature has been removed. Use `serde` cargo
104 feature instead.
105 - **Breaking Change** The deprecated `consts` module has been removed. Use associated constants on
106 `f16` instead.
107 - **Breaking Change** The following deprecated functions have been removed:
108 - `f16::as_bits`
109 - `slice::from_bits_mut`
110 - `slice::to_bits_mut`
111 - `slice::from_bits`
112 - `slice::to_bits`
113 - `vec::from_bits`
114 - `vec::to_bits`
115
116 ## [1.8.2] - 2021-10-22 <a name="1.8.2"></a>
117 ### Fixed
118 - Remove cargo resolver=2 from manifest to resolve errors in older versions of Rust that still
119 worked with 1.8.0. Going forward, MSRV increases will be major version increases. Fixes [#48].
120
121 ## [1.8.1] - 2021-10-21 - **Yanked** <a name="1.8.1"></a>
122 ### ***Yanked***
123 *Not recommended due to introducing compilation error in Rust versions that worked with 1.8.0.*
124 ### Changed
125 - Now uses cargo resolver version 2 to prevent dev-dependencies from enabling `std` feature on
126 optional dependencies.
127
128 ### Fixed
129 - Fixed compile failure when `std` feature is not enabled and `num-traits` is enabled under new
130 resolver. Now properly uses `libm` num-traits feature.
131
132 ## [1.8.0] - 2021-10-13 <a name="1.8.0"></a>
133 ### Changed
134 - Now always implements `Add`, `Div`, `Mul`, `Neg`, `Rem`, and `Sub` traits.
135 Previously, these were only implemented under the `num-traits` feature. Keep in mind they still
136 convert to `f32` and back in the implementation.
137 - Minimum supported Rust version is now 1.51.
138 - Made crate package [REUSE compliant](https://reuse.software/).
139 - Docs now use intra-doc links instead of manual (and hard to maintain) links.
140 - The following methods on both `f16` and `bf16` are now `const`:
141 - `to_le_bytes`
142 - `to_be_bytes`
143 - `to_ne_bytes`
144 - `from_le_bytes`
145 - `from_be_bytes`
146 - `from_ne_bytes`
147 - `is_normal`
148 - `classify`
149 - `signum`
150
151 ### Added
152 - Added optional implementations of `zerocopy` traits `AsBytes` and `FromBytes`
153 under `zerocopy` cargo feature. By [@samcrow].
154 - Implemented the `core::iter::Product` and `core::iter::Sum` traits, with the same caveat as above
155 about converting to `f32` and back under the hood.
156 - Added new associated const `NEG_ONE` to both `f16` and `bf16`.
157 - Added the following new methods on both `f16` and `bf16`:
158 - `copysign`
159 - `max`
160 - `min`
161 - `clamp`
162
163 ### Fixed
164 - Fixed a number of minor lints discovered due to improved CI.
165
166 ## [1.7.1] - 2021-01-17 <a name="1.7.1"></a>
167 ### Fixed
168 - Docs.rs now generates docs for `bytemuck` and `num-traits` optional features.
169
170 ## [1.7.0] - 2021-01-17 <a name="1.7.0"></a>
171 ### Added
172 - Added optional implementations of `bytemuck` traits `Zeroable` and `Pod` under `bytemuck` cargo
173 feature. By [@charles-r-earp].
174 - Added optional implementations of `num-traits` traits `ToPrimitive` and `FromPrimitive` under
175 `num-traits` cargo feature. By [@charles-r-earp].
176 - Added implementations of `Binary`, `Octal`, `LowerHex`, and `UpperHex` string format traits to
177 format raw `f16`/`bf16` bytes to string.
178
179 ### Changed
180 - `Debug` trait implementation now formats `f16`/`bf16` as float instead of raw bytes hex. Use newly
181 implemented formatting traits to format in hex instead of `Debug`. Fixes [#37].
182
183
184 ## [1.6.0] - 2020-05-09 <a name="1.6.0"></a>
185 ### Added
186 - Added `LOG2_10` and `LOG10_2` constants to both `f16` and `bf16`, which were added to `f32` and
187 `f64` in the standard library in 1.43.0. By [@tspiteri].
188 - Added `to_le/be/ne_bytes` and `from_le/be/ne_bytes` to both `f16` and `bf16`, which were added to
189 the standard library in 1.40.0. By [@bzm3r].
190
191 ## [1.5.0] - 2020-03-03 <a name="1.5.0"></a>
192 ### Added
193 - Added the `alloc` feature to support the `alloc` crate in `no_std` environments. By [@zserik]. The
194 `vec` module is now available with either `alloc` or `std` feature.
195
196 ## [1.4.1] - 2020-02-10 <a name="1.4.1"></a>
197 ### Fixed
198 - Added `#[repr(transparent)]` to `f16`/`bf16` to remove undefined behavior. By [@jfrimmel].
199
200 ## [1.4.0] - 2019-10-13 <a name="1.4.0"></a>
201 ### Added
202 - Added a `bf16` type implementing the alternative
203 [`bfloat16`](https://en.wikipedia.org/wiki/Bfloat16_floating-point_format) 16-bit floating point
204 format. By [@tspiteri].
205 - `f16::from_bits`, `f16::to_bits`, `f16::is_nan`, `f16::is_infinite`, `f16::is_finite`,
206 `f16::is_sign_positive`, and `f16::is_sign_negative` are now `const` fns.
207 - `slice::HalfBitsSliceExt` and `slice::HalfBitsSliceExt` extension traits have been added for
208 performing efficient reinterpret casts and conversions of slices to and from `[f16]` and
209 `[bf16]`. These traits will use hardware SIMD conversion instructions when available and the
210 `use-intrinsics` cargo feature is enabled.
211 - `vec::HalfBitsVecExt` and `vec::HalfFloatVecExt` extension traits have been added for
212 performing efficient reinterpret casts to and from `Vec<f16>` and `Vec<bf16>`. These traits
213 are only available with the `std` cargo feature.
214 - `prelude` has been added, for easy importing of most common functionality. Currently the
215 prelude imports `f16`, `bf16`, and the new slice and vec extension traits.
216 - New associated constants on `f16` type to replace deprecated `consts` module.
217
218 ### Fixed
219 - Software conversion (when not using `use-intrinsics` feature) now matches hardware rounding
220 by rounding to nearest, ties to even. Fixes [#24], by [@tspiteri].
221 - NaN value conversions now behave like `f32` to `f64` conversions, retaining sign. Fixes [#23],
222 by [@tspiteri].
223
224 ### Changed
225 - Minimum rustc version bumped to 1.32.
226 - Runtime target host feature detection is now used if both `std` and `use-intrinsics` features are
227 enabled and the compile target host does not support required features.
228 - When `use-intrinsics` feature is enabled, will now always compile and run without error correctly
229 regardless of compile target options.
230
231 ### Deprecated
232 - `consts` module and all its constants have been deprecated; use the associated constants on `f16`
233 instead.
234 - `slice::from_bits` has been deprecated; use `slice::HalfBitsSliceExt::reinterpret_cast` instead.
235 - `slice::from_bits_mut` has been deprecated; use `slice::HalfBitsSliceExt::reinterpret_cast_mut`
236 instead.
237 - `slice::to_bits` has been deprecated; use `slice::HalfFloatSliceExt::reinterpret_cast` instead.
238 - `slice::to_bits_mut` has been deprecated; use `slice::HalfFloatSliceExt::reinterpret_cast_mut`
239 instead.
240 - `vec::from_bits` has been deprecated; use `vec::HalfBitsVecExt::reinterpret_into` instead.
241 - `vec::to_bits` has been deprecated; use `vec::HalfFloatVecExt::reinterpret_into` instead.
242
243 ## [1.3.1] - 2019-10-04 <a name="1.3.1"></a>
244 ### Fixed
245 - Corrected values of constants `EPSILON`, `MAX_10_EXP`, `MAX_EXP`, `MIN_10_EXP`, and `MIN_EXP`
246 in `consts` module, as well as setting `consts::NAN` to match value of `f32::NAN` converted to
247 `f16`. By [@tspiteri].
248
249 ## [1.3.0] - 2018-10-02 <a name="1.3.0"></a>
250 ### Added
251 - `slice::from_bits_mut` and `slice::to_bits_mut` for conversion between mutable `u16` and `f16`
252 slices. Fixes [#16], by [@johannesvollmer].
253
254 ## [1.2.0] - 2018-09-03 <a name="1.2.0"></a>
255 ### Added
256 - `slice` and optional `vec` (only included with `std` feature) modules for conversions between
257 `u16` and `f16` buffers. Fixes [#14], by [@johannesvollmer].
258 - `to_bits` added to replace `as_bits`. Fixes [#12], by [@tspiteri].
259 ### Fixed
260 - `serde` optional dependency no longer uses its default `std` feature.
261 ### Deprecated
262 - `as_bits` has been deprecated; use `to_bits` instead.
263 - `serialize` cargo feature is deprecated; use `serde` instead.
264
265 ## [1.1.2] - 2018-07-12 <a name="1.1.2"></a>
266 ### Fixed
267 - Fixed compilation error in 1.1.1 on rustc < 1.27, now compiles again on rustc >= 1.10. Fixes
268 [#11].
269
270 ## [1.1.1] - 2018-06-24 - **Yanked** <a name="1.1.1"></a>
271 ### ***Yanked***
272 *Not recommended due to introducing compilation error on rustc versions prior to 1.27.*
273 ### Fixed
274 - Fix subnormal float conversions when `use-intrinsics` is not enabled. By [@Moongoodboy-K].
275
276 ## [1.1.0] - 2018-03-17 <a name="1.1.0"></a>
277 ### Added
278 - Made `to_f32` and `to_f64` public. Fixes [#7], by [@PSeitz].
279
280 ## [1.0.2] - 2018-01-12 <a name="1.0.2"></a>
281 ### Changed
282 - Update behavior of `is_sign_positive` and `is_sign_negative` to match the IEEE754 conforming
283 behavior of the standard library since Rust 1.20.0. Fixes [#3], by [@tspiteri].
284 - Small optimization on `is_nan` and `is_infinite` from [@tspiteri].
285 ### Fixed
286 - Fix comparisons of +0 to -0 and comparisons involving negative numbers. Fixes [#2], by
287 [@tspiteri].
288 - Fix loss of sign when converting `f16` and `f32` to `f16`, and case where `f64` NaN could be
289 converted to `f16` infinity instead of NaN. Fixes [#5], by [@tspiteri].
290
291 ## [1.0.1] - 2017-08-30 <a name="1.0.1"></a>
292 ### Added
293 - More README documentation.
294 - Badges and categories in crate metadata.
295 ### Changed
296 - `serde` dependency updated to 1.0 stable.
297 - Writing changelog manually.
298
299 ## [1.0.0] - 2017-02-03 <a name="1.0.0"></a>
300 ### Added
301 - Update to `serde` 0.9 and stable Rust 1.15 for `serialize` feature.
302
303 ## [0.1.1] - 2017-01-08 <a name="0.1.1"></a>
304 ### Added
305 - Add `serde` support under new `serialize` feature.
306 ### Changed
307 - Use `no_std` for crate by default.
308
309 ## 0.1.0 - 2016-03-17 <a name="0.1.0"></a>
310 ### Added
311 - Initial release of `f16` type.
312
313 [#2]: https://github.com/starkat99/half-rs/issues/2
314 [#3]: https://github.com/starkat99/half-rs/issues/3
315 [#5]: https://github.com/starkat99/half-rs/issues/5
316 [#7]: https://github.com/starkat99/half-rs/issues/7
317 [#11]: https://github.com/starkat99/half-rs/issues/11
318 [#12]: https://github.com/starkat99/half-rs/issues/12
319 [#14]: https://github.com/starkat99/half-rs/issues/14
320 [#16]: https://github.com/starkat99/half-rs/issues/16
321 [#23]: https://github.com/starkat99/half-rs/issues/23
322 [#24]: https://github.com/starkat99/half-rs/issues/24
323 [#37]: https://github.com/starkat99/half-rs/issues/37
324 [#48]: https://github.com/starkat99/half-rs/issues/48
325 [#55]: https://github.com/starkat99/half-rs/issues/55
326 [#60]: https://github.com/starkat99/half-rs/issues/60
327 [#66]: https://github.com/starkat99/half-rs/issues/66
328 [#54]: https://github.com/starkat99/half-rs/issues/54
329 [#93]: https://github.com/starkat99/half-rs/issues/54
330 [#100]: https://github.com/starkat99/half-rs/issues/100
331 [#103]: https://github.com/starkat99/half-rs/issues/103
332 [#107]: https://github.com/starkat99/half-rs/issues/107
333
334 [@tspiteri]: https://github.com/tspiteri
335 [@PSeitz]: https://github.com/PSeitz
336 [@Moongoodboy-K]: https://github.com/Moongoodboy-K
337 [@johannesvollmer]: https://github.com/johannesvollmer
338 [@jfrimmel]: https://github.com/jfrimmel
339 [@zserik]: https://github.com/zserik
340 [@bzm3r]: https://github.com/bzm3r
341 [@charles-r-earp]: https://github.com/charles-r-earp
342 [@samcrow]: https://github.com/samcrow
343 [@pthariensflame]: https://github.com/pthariensflame
344 [@kali]: https://github.com/kali
345 [@Nilstrieb]: https://github.com/Nilstrieb
346 [@joseluis]: https://github.com/joseluis
347 [@Shnatsel]: https://github.com/Shnatsel
348 [@cameron1024]: https://github.com/cameron1024
349 [@encounter]: https://github.com/encounter
350 [@coreylowman]: https://github.com/coreylowman
351 [@wx-csy]: https://github.com/wx-csy
352 [@eiz]: https://github.com/eiz
353 [@comath]: https://github.com/comath
354
355
356 [Unreleased]: https://github.com/starkat99/half-rs/compare/v2.4.1...HEAD
357 [2.4.1]: https://github.com/starkat99/half-rs/compare/v2.4.0...v2.4.1
358 [2.4.0]: https://github.com/starkat99/half-rs/compare/v2.3.1...v2.4.0
359 [2.3.1]: https://github.com/starkat99/half-rs/compare/v2.3.0...v2.3.1
360 [2.3.0]: https://github.com/starkat99/half-rs/compare/v2.2.1...v2.3.0
361 [2.2.1]: https://github.com/starkat99/half-rs/compare/v2.2.0...v2.2.1
362 [2.2.0]: https://github.com/starkat99/half-rs/compare/v2.1.0...v2.2.0
363 [2.1.0]: https://github.com/starkat99/half-rs/compare/v2.0.0...v2.1.0
364 [2.0.0]: https://github.com/starkat99/half-rs/compare/v1.8.2...v2.0.0
365 [1.8.2]: https://github.com/starkat99/half-rs/compare/v1.8.1...v1.8.2
366 [1.8.1]: https://github.com/starkat99/half-rs/compare/v1.8.0...v1.8.1
367 [1.8.0]: https://github.com/starkat99/half-rs/compare/v1.7.1...v1.8.0
368 [1.7.1]: https://github.com/starkat99/half-rs/compare/v1.7.0...v1.7.1
369 [1.7.0]: https://github.com/starkat99/half-rs/compare/v1.6.0...v1.7.0
370 [1.6.0]: https://github.com/starkat99/half-rs/compare/v1.5.0...v1.6.0
371 [1.5.0]: https://github.com/starkat99/half-rs/compare/v1.4.1...v1.5.0
372 [1.4.1]: https://github.com/starkat99/half-rs/compare/v1.4.0...v1.4.1
373 [1.4.0]: https://github.com/starkat99/half-rs/compare/v1.3.1...v1.4.0
374 [1.3.1]: https://github.com/starkat99/half-rs/compare/v1.3.0...v1.3.1
375 [1.3.0]: https://github.com/starkat99/half-rs/compare/v1.2.0...v1.3.0
376 [1.2.0]: https://github.com/starkat99/half-rs/compare/v1.1.2...v1.2.0
377 [1.1.2]: https://github.com/starkat99/half-rs/compare/v1.1.1...v1.1.2
378 [1.1.1]: https://github.com/starkat99/half-rs/compare/v1.1.0...v1.1.1
379 [1.1.0]: https://github.com/starkat99/half-rs/compare/v1.0.2...v1.1.0
380 [1.0.2]: https://github.com/starkat99/half-rs/compare/v1.0.1...v1.0.2
381 [1.0.1]: https://github.com/starkat99/half-rs/compare/v1.0.0...v1.0.1
382 [1.0.0]: https://github.com/starkat99/half-rs/compare/v0.1.1...v1.0.0
383 [0.1.1]: https://github.com/starkat99/half-rs/compare/v0.1.0...v0.1.1