13 KiB
13 KiB
Changelog
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
2.1.0 - 2022-07-18
Added
- Add support for target_arch
spirv. Some traits and functions are unavailble on this architecture. By @charles-r-earp. - Add
total_cmpmethod to both float types. Closes #55, by @joseluis.
2.0.0 - 2022-06-21
Changed
- Breaking Change Minimum supported Rust version is now 1.58.
- Breaking Change
stdis now enabled as a default cargo feature. Disable default features to continue usingno_stdsupport. - Migrated to Rust Edition 2021.
- Added
#[must_use]attributes to functions, as appropriate.
Fixed
- Fix a soundness bug with
slice::as_ptrnot correctly using mutable reference. By @Nilstrieb.
Added
- Added
constconversion methods to bothf16andbf16. These methods never use hardware intrinsics, unlike the current conversion methods, which is why they are separated into new methods. The followingconstmethods were added:from_f32_constfrom_f64_constto_f32_constto_f64_const
- Added
Negtrait support for borrowed values&f16and&bf16. By @pthariensflame. - Added
AsPrimitiveimplementations from and to self,usize, andisize. By @kali.
Removed
- Breaking Change The deprecated
serializecargo feature has been removed. Useserdecargo feature instead. - Breaking Change The deprecated
constsmodule has been removed. Use associated constants onf16instead. - Breaking Change The following deprecated functions have been removed:
f16::as_bitsslice::from_bits_mutslice::to_bits_mutslice::from_bitsslice::to_bitsvec::from_bitsvec::to_bits
1.8.2 - 2021-10-22
Fixed
- Remove cargo resolver=2 from manifest to resolve errors in older versions of Rust that still worked with 1.8.0. Going forward, MSRV increases will be major version increases. Fixes #48.
1.8.1 - 2021-10-21 - Yanked
Yanked
Not recommended due to introducing compilation error in Rust versions that worked with 1.8.0.
Changed
- Now uses cargo resolver version 2 to prevent dev-dependencies from enabling
stdfeature on optional dependencies.
Fixed
- Fixed compile failure when
stdfeature is not enabled andnum-traitsis enabled under new resolver. Now properly useslibmnum-traits feature.
1.8.0 - 2021-10-13
Changed
- Now always implements
Add,Div,Mul,Neg,Rem, andSubtraits. Previously, these were only implemented under thenum-traitsfeature. Keep in mind they still convert tof32and back in the implementation. - Minimum supported Rust version is now 1.51.
- Made crate package REUSE compliant.
- Docs now use intra-doc links instead of manual (and hard to maintain) links.
- The following methods on both
f16andbf16are nowconst:to_le_bytesto_be_bytesto_ne_bytesfrom_le_bytesfrom_be_bytesfrom_ne_bytesis_normalclassifysignum
Added
- Added optional implementations of
zerocopytraitsAsBytesandFromBytesunderzerocopycargo feature. By @samcrow. - Implemented the
core::iter::Productandcore::iter::Sumtraits, with the same caveat as above about converting tof32and back under the hood. - Added new associated const
NEG_ONEto bothf16andbf16. - Added the following new methods on both
f16andbf16:copysignmaxminclamp
Fixed
- Fixed a number of minor lints discovered due to improved CI.
1.7.1 - 2021-01-17
Fixed
- Docs.rs now generates docs for
bytemuckandnum-traitsoptional features.
1.7.0 - 2021-01-17
Added
- Added optional implementations of
bytemucktraitsZeroableandPodunderbytemuckcargo feature. By @charles-r-earp. - Added optional implementations of
num-traitstraitsToPrimitiveandFromPrimitiveundernum-traitscargo feature. By @charles-r-earp. - Added implementations of
Binary,Octal,LowerHex, andUpperHexstring format traits to format rawf16/bf16bytes to string.
Changed
Debugtrait implementation now formatsf16/bf16as float instead of raw bytes hex. Use newly implemented formatting traits to format in hex instead ofDebug. Fixes #37.
1.6.0 - 2020-05-09
Added
- Added
LOG2_10andLOG10_2constants to bothf16andbf16, which were added tof32andf64in the standard library in 1.43.0. By @tspiteri. - Added
to_le/be/ne_bytesandfrom_le/be/ne_bytesto bothf16andbf16, which were added to the standard library in 1.40.0. By @bzm3r.
1.5.0 - 2020-03-03
Added
- Added the
allocfeature to support thealloccrate inno_stdenvironments. By @zserik. Thevecmodule is now available with eitherallocorstdfeature.
1.4.1 - 2020-02-10
Fixed
- Added
#[repr(transparent)]tof16/bf16to remove undefined behavior. By @jfrimmel.
1.4.0 - 2019-10-13
Added
- Added a
bf16type implementing the alternativebfloat1616-bit floating point format. By @tspiteri. f16::from_bits,f16::to_bits,f16::is_nan,f16::is_infinite,f16::is_finite,f16::is_sign_positive, andf16::is_sign_negativeare nowconstfns.slice::HalfBitsSliceExtandslice::HalfBitsSliceExtextension traits have been added for performing efficient reinterpret casts and conversions of slices to and from[f16]and[bf16]. These traits will use hardware SIMD conversion instructions when available and theuse-intrinsicscargo feature is enabled.vec::HalfBitsVecExtandvec::HalfFloatVecExtextension traits have been added for performing efficient reinterpret casts to and fromVec<f16>andVec<bf16>. These traits are only available with thestdcargo feature.preludehas been added, for easy importing of most common functionality. Currently the prelude importsf16,bf16, and the new slice and vec extension traits.- New associated constants on
f16type to replace deprecatedconstsmodule.
Fixed
- Software conversion (when not using
use-intrinsicsfeature) now matches hardware rounding by rounding to nearest, ties to even. Fixes #24, by @tspiteri. - NaN value conversions now behave like
f32tof64conversions, retaining sign. Fixes #23, by @tspiteri.
Changed
- Minimum rustc version bumped to 1.32.
- Runtime target host feature detection is now used if both
stdanduse-intrinsicsfeatures are enabled and the compile target host does not support required features. - When
use-intrinsicsfeature is enabled, will now always compile and run without error correctly regardless of compile target options.
Deprecated
constsmodule and all its constants have been deprecated; use the associated constants onf16instead.slice::from_bitshas been deprecated; useslice::HalfBitsSliceExt::reinterpret_castinstead.slice::from_bits_muthas been deprecated; useslice::HalfBitsSliceExt::reinterpret_cast_mutinstead.slice::to_bitshas been deprecated; useslice::HalfFloatSliceExt::reinterpret_castinstead.slice::to_bits_muthas been deprecated; useslice::HalfFloatSliceExt::reinterpret_cast_mutinstead.vec::from_bitshas been deprecated; usevec::HalfBitsVecExt::reinterpret_intoinstead.vec::to_bitshas been deprecated; usevec::HalfFloatVecExt::reinterpret_intoinstead.
1.3.1 - 2019-10-04
Fixed
- Corrected values of constants
EPSILON,MAX_10_EXP,MAX_EXP,MIN_10_EXP, andMIN_EXPinconstsmodule, as well as settingconsts::NANto match value off32::NANconverted tof16. By @tspiteri.
1.3.0 - 2018-10-02
Added
slice::from_bits_mutandslice::to_bits_mutfor conversion between mutableu16andf16slices. Fixes #16, by @johannesvollmer.
1.2.0 - 2018-09-03
Added
sliceand optionalvec(only included withstdfeature) modules for conversions betweenu16andf16buffers. Fixes #14, by @johannesvollmer.to_bitsadded to replaceas_bits. Fixes #12, by @tspiteri.
Fixed
serdeoptional dependency no longer uses its defaultstdfeature.
Deprecated
as_bitshas been deprecated; useto_bitsinstead.serializecargo feature is deprecated; useserdeinstead.
1.1.2 - 2018-07-12
Fixed
- Fixed compilation error in 1.1.1 on rustc < 1.27, now compiles again on rustc >= 1.10. Fixes #11.
1.1.1 - 2018-06-24 - Yanked
Yanked
Not recommended due to introducing compilation error on rustc versions prior to 1.27.
Fixed
- Fix subnormal float conversions when
use-intrinsicsis not enabled. By @Moongoodboy-K.
1.1.0 - 2018-03-17
Added
1.0.2 - 2018-01-12
Changed
- Update behavior of
is_sign_positiveandis_sign_negativeto match the IEEE754 conforming behavior of the standard library since Rust 1.20.0. Fixes #3, by @tspiteri. - Small optimization on
is_nanandis_infinitefrom @tspiteri.
Fixed
- Fix comparisons of +0 to -0 and comparisons involving negative numbers. Fixes #2, by @tspiteri.
- Fix loss of sign when converting
f16andf32tof16, and case wheref64NaN could be converted tof16infinity instead of NaN. Fixes #5, by @tspiteri.
1.0.1 - 2017-08-30
Added
- More README documentation.
- Badges and categories in crate metadata.
Changed
serdedependency updated to 1.0 stable.- Writing changelog manually.
1.0.0 - 2017-02-03
Added
- Update to
serde0.9 and stable Rust 1.15 forserializefeature.
0.1.1 - 2017-01-08
Added
- Add
serdesupport under newserializefeature.
Changed
- Use
no_stdfor crate by default.
0.1.0 - 2016-03-17
Added
- Initial release of
f16type.