diff --git a/Cargo.toml b/Cargo.toml index 7fff0cf..2ee5278 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,14 +7,14 @@ [package] name = "fixed" -version = "1.7.0" +version = "1.8.0" authors = ["Trevor Spiteri "] description = "Fixed-point numbers" documentation = "https://docs.rs/fixed" repository = "https://gitlab.com/tspiteri/fixed" readme = "README.md" -keywords = ["mathematics", "numerics"] -categories = ["algorithms", "data-structures", "no-std", "science"] +keywords = ["fixed", "fixed-point", "mathematics", "numerics"] +categories = ["algorithms", "embedded", "mathematics", "no-std"] license = "MIT/Apache-2.0" edition = "2018" autobenches = false diff --git a/README.md b/README.md index 00c2e79..7d9cfca 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ The conversions supported cover the following cases. ## What’s new -### Version 1.8.0 news (unreleased) +### Version 1.8.0 news (2021-04-20) * The following constants and method were added to all fixed-point numbers, to the [`Fixed`][tf-1-8] trait, and to the [`Wrapping`][w-1-8] and @@ -115,161 +115,34 @@ The conversions supported cover the following cases. [`const_bitxor`][f-cbx-1-8] * Many methods were marked with the `must_use` attribute. -[f-cba-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_bitand -[f-cbo-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_bitor -[f-cbx-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_bitxor -[f-cdi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_div_int -[f-cma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_mul_acc -[f-cn-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_not -[f-cr-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_rem -[f-cre-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_rem_euclid -[f-d-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#associatedconstant.DELTA -[f-ma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.mul_acc -[f-o-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#associatedconstant.ONE -[f-odi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.overflowing_div_int -[f-oma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.overflowing_mul_acc -[f-re-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.rem_euclid -[f-sdei-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.saturating_div_euclid_int -[f-sma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.saturating_mul_acc -[f-srei-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.saturating_rem_euclid_int -[f-udi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_div_int -[f-uma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_mul_acc -[f-ur-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_rem -[f-ure-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_rem_euclid -[f-uri-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_rem_int -[f-wdi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.wrapping_div_int -[f-wma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.wrapping_mul_acc -[f-z-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#associatedconstant.ZERO -[tf-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/traits/trait.Fixed.html -[u-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.Unwrapped.html -[w-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.Wrapping.html - -### Version 1.7.0 news (2021-03-25) - - * The crate now requires rustc version 1.50.0 or later. - * The following methods are now `const` functions: - * [`next_power_of_two`][f-npot-1-7], - [`checked_next_power_of_two`][f-cnpot-1-7], - [`wrapping_next_power_of_two`][f-wnpot-1-7] - * The following constant and methods were added to all fixed-point numbers, to - the [`Fixed`][tf-1-7] trait, and to the [`Wrapping`][w-1-7] and - [`Unwrapped`][u-1-7] wrappers: - * [`IS_SIGNED`][f-is-1-7] - * [`from_be`][f-fb-1-7], [`from_le`][f-fl-1-7] - * [`to_be`][f-tb-1-7], [`to_le`][f-tl-1-7] - * [`swap_bytes`][f-sb-1-7] - * [`reverse_bits`][f-rb-1-7] - * [`mean`][f-m-1-7] - * The following methods were added to the [`Wrapping`][w-1-7] and - [`Unwrapped`][u-1-7] wrappers: - * [`from_be_bytes`][f-fbb-1-7], [`from_le_bytes`][f-flb-1-7], - [`from_ne_bytes`][f-fnb-1-7] - * [`to_be_bytes`][f-tbb-1-7], [`to_le_bytes`][f-tlb-1-7], - [`to_ne_bytes`][f-tnb-1-7] - * The following methods were added to all unsigned fixed-point types, to the - [`FixedUnsigned`][tfu-1-7] trait, and to the [`Wrapping`][w-1-7] and - [`Unwrapped`][u-1-7] wrappers for unsigned numbers: - * [`significant_bits`][f-signi-1-7] - * [`highest_one`][f-ho-1-7] - * The [`signed_bits`][f-signe-1-7] method was added to all signed fixed-point - types, to the [`FixedSigned`][tfs-1-7] trait, and to the [`Wrapping`][w-1-7] - and [`Unwrapped`][u-1-7] wrappers for signed numbers. - * The following constants, which are available in other programming language - standard libraries, were added to the [`consts`][c-1-7] module and as - associated constants to fixed-point types: - * [`SQRT_PI`][c-rp-1-7] (Go), [`FRAC_1_SQRT_PI`][c-1rp-1-7] (C++) - * [`SQRT_3`][c-r3-1-7] (C++), [`FRAC_1_SQRT_3`][c-1r3-1-7] (C++) - * [`SQRT_E`][c-re-1-7] (Go) - * [`SQRT_PHI`][c-rf-1-7] (Go) - * [`GAMMA`][c-g-1-7] (C++) - * [`CATALAN`][c-c-1-7] (Julia) - * [`Sum`] and [`Product`] are now supertraits of the [`Fixed`][tf-1-7] trait. - * The [`F128Bits`][f128-1-7] type was added to support conversions and - comparisons between fixed-point numbers and *binary128* floating-point - numbers. - * The features that previously required the [`az`][feat-dep-1-7] and - [`f16`][feat-dep-1-7] optional features are now always provided. The - [`az`][feat-dep-1-7] and [`f16`][feat-dep-1-7] optional features are now - deprecated and have no effect. - * For the experimental feature [`num-traits`][feat-exp-1-7], the following - traits were implemented for all fixed-point numbers: - * [`OverflowingAdd`][nt-0-2-oa], [`OverflowingSub`][nt-0-2-os], - [`OverflowingMul`][nt-0-2-om] - -[`Product`]: https://doc.rust-lang.org/nightly/core/iter/trait.Product.html -[`Sum`]: https://doc.rust-lang.org/nightly/core/iter/trait.Sum.html -[c-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/index.html -[c-1r3-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.FRAC_1_SQRT_3.html -[c-1rp-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.FRAC_1_SQRT_PI.html -[c-c-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.CATALAN.html -[c-g-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.GAMMA.html -[c-r3-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.SQRT_3.html -[c-re-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.SQRT_E.html -[c-rf-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.SQRT_PHI.html -[c-rp-1-7]: https://docs.rs/fixed/~1.7/fixed/consts/constant.SQRT_PI.html -[f-cnpot-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU32.html#method.checked_next_power_of_two -[f-fb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_be -[f-fbb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_be_bytes -[f-fl-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_le -[f-flb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_le_bytes -[f-fnb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_ne_bytes -[f-ho-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU32.html#method.highest_one -[f-is-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#associatedconstant.IS_SIGNED -[f-m-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.mean -[f-npot-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU32.html#method.next_power_of_two -[f-rb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.reverse_bits -[f-sb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.swap_bytes -[f-signe-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.signed_bits -[f-signi-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU32.html#method.significant_bits -[f-tb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.to_be -[f-tbb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.to_be_bytes -[f-tl-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.to_le -[f-tlb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.to_le_bytes -[f-tnb-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.to_ne_bytes -[f-wnpot-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU32.html#method.wrapping_next_power_of_two -[f128-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.F128Bits.html -[feat-dep-1-7]: https://docs.rs/fixed/~1.7/fixed/#deprecated-optional-features -[feat-exp-1-7]: https://docs.rs/fixed/~1.7/fixed/#experimental-optional-features -[nt-0-2-oa]: https://docs.rs/num-traits/^0.2/num_traits/ops/overflowing/trait.OverflowingAdd.html -[nt-0-2-om]: https://docs.rs/num-traits/^0.2/num_traits/ops/overflowing/trait.OverflowingMul.html -[nt-0-2-os]: https://docs.rs/num-traits/^0.2/num_traits/ops/overflowing/trait.OverflowingSub.html -[tf-1-7]: https://docs.rs/fixed/~1.7/fixed/traits/trait.Fixed.html -[tfs-1-7]: https://docs.rs/fixed/~1.7/fixed/traits/trait.FixedSigned.html -[tfu-1-7]: https://docs.rs/fixed/~1.7/fixed/traits/trait.FixedUnsigned.html -[u-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.Unwrapped.html -[w-1-7]: https://docs.rs/fixed/~1.7/fixed/struct.Wrapping.html - -### Version 1.6.0 news (2021-02-05) - - * The crate now requires rustc version 1.47.0 or later. - * The optional [*az* crate] dependency was updated to [version 1.1][az-1-1]. - * The [`unsigned_abs`][f-ua-1-6] method was added to all signed fixed-point - types and to the [`FixedSigned`][tfs-1-6] trait. - * The following methods are now `const` functions: - * [`checked_neg`][f-cn-1-6], [`checked_add`][f-cad-1-6], - [`checked_sub`][f-cs-1-6], [`checked_mul_int`][f-cmi-1-6], - [`checked_shl`][f-cshl-1-6], [`checked_shr`][f-cshr-1-6], - [`checked_abs`][f-cab-1-6] - * The [`unwrapped_to_fixed`][f-utf-1-6] method was added to the - [`ToFixed`][f-tf-1-6] trait. - * The [`unwrapped_from_fixed`][f-uff-1-6] method was added to the - [`FromFixed`][f-ff-1-6] trait. - -[*az* crate]: https://crates.io/crates/az -[az-1-1]: https://docs.rs/az/~1.1/az/index.html -[f-cab-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.checked_abs -[f-cad-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.checked_add -[f-cmi-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.checked_mul_int -[f-cn-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.checked_neg -[f-cs-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.checked_sub -[f-cshl-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.checked_shl -[f-cshr-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.checked_shr -[f-ff-1-6]: https://docs.rs/fixed/~1.6/fixed/traits/trait.FromFixed.html -[f-tf-1-6]: https://docs.rs/fixed/~1.6/fixed/traits/trait.ToFixed.html -[f-ua-1-6]: https://docs.rs/fixed/~1.6/fixed/struct.FixedI32.html#method.unsigned_abs -[f-uff-1-6]: https://docs.rs/fixed/~1.6/fixed/traits/trait.FromFixed.html#method.unwrapped_from_fixed -[f-utf-1-6]: https://docs.rs/fixed/~1.6/fixed/traits/trait.ToFixed.html#method.unwrapped_to_fixed -[tfs-1-6]: https://docs.rs/fixed/~1.6/fixed/traits/trait.FixedSigned.html +[f-cba-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_bitand +[f-cbo-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_bitor +[f-cbx-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_bitxor +[f-cdi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_div_int +[f-cma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_mul_acc +[f-cn-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_not +[f-cr-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_rem +[f-cre-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_rem_euclid +[f-d-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#associatedconstant.DELTA +[f-ma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.mul_acc +[f-o-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#associatedconstant.ONE +[f-odi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.overflowing_div_int +[f-oma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.overflowing_mul_acc +[f-re-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.rem_euclid +[f-sdei-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.saturating_div_euclid_int +[f-sma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.saturating_mul_acc +[f-srei-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.saturating_rem_euclid_int +[f-udi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_div_int +[f-uma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_mul_acc +[f-ur-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_rem +[f-ure-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_rem_euclid +[f-uri-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_rem_int +[f-wdi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.wrapping_div_int +[f-wma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.wrapping_mul_acc +[f-z-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#associatedconstant.ZERO +[tf-1-8]: https://docs.rs/fixed/~1.8/fixed/traits/trait.Fixed.html +[u-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.Unwrapped.html +[w-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.Wrapping.html ### Other releases @@ -351,7 +224,7 @@ crate, add it as a dependency inside [*Cargo.toml*]: ```toml [dependencies] -fixed = "1.7" +fixed = "1.8" ``` The *fixed* crate requires rustc version 1.50.0 or later. @@ -375,7 +248,7 @@ To enable features, you can add the dependency like this to [*Cargo.toml*]: ```toml [dependencies.fixed] -version = "1.7" +version = "1.8" features = ["serde"] ``` @@ -395,10 +268,10 @@ updated to an incompatible newer version. The following optional features are deprecated and may be removed in the next major version of the crate. - 1. `az`, has no effect. Previously required to enable the cast traits provided - by the [*az* crate]. Now these cast traits are always provided. - 2. `f16`, has no effect. Previously required to provide conversion to/from - [`f16`] and [`bf16`]. Now these conversions are always provided. + 1. `az`, has no effect. Previously required for the cast traits from the [*az* + crate]. Now these cast traits are always provided. + 2. `f16`, has no effect. Previously required for conversion to/from [`f16`] and + [`bf16`]. Now these conversions are always provided. ## License @@ -427,52 +300,52 @@ shall be dual licensed as above, without any additional terms or conditions. [*serde* crate]: https://crates.io/crates/serde [*typenum* crate]: https://crates.io/crates/typenum [CORDIC]: https://en.wikipedia.org/wiki/CORDIC -[FixedI32]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html -[FixedU32]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU32.html +[FixedI32]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html +[FixedU32]: https://docs.rs/fixed/~1.8/fixed/struct.FixedU32.html [LICENSE-APACHE]: https://www.apache.org/licenses/LICENSE-2.0 [LICENSE-MIT]: https://opensource.org/licenses/MIT -[U0]: https://docs.rs/fixed/~1.7/fixed/types/extra/type.U0.html -[U12]: https://docs.rs/fixed/~1.7/fixed/types/extra/type.U12.html -[U24]: https://docs.rs/fixed/~1.7/fixed/types/extra/type.U24.html -[U32]: https://docs.rs/fixed/~1.7/fixed/types/extra/type.U32.html +[U0]: https://docs.rs/fixed/~1.8/fixed/types/extra/type.U0.html +[U12]: https://docs.rs/fixed/~1.8/fixed/types/extra/type.U12.html +[U24]: https://docs.rs/fixed/~1.8/fixed/types/extra/type.U24.html +[U32]: https://docs.rs/fixed/~1.8/fixed/types/extra/type.U32.html [`Binary`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html [`Display`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html [`Error`]: https://doc.rust-lang.org/nightly/std/error/trait.Error.html -[`FixedI128`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI128.html -[`FixedI16`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI16.html -[`FixedI32`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html -[`FixedI64`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI64.html -[`FixedI8`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI8.html -[`FixedU128`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU128.html -[`FixedU16`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU16.html -[`FixedU32`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU32.html -[`FixedU64`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU64.html -[`FixedU8`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedU8.html -[`FromFixed`]: https://docs.rs/fixed/~1.7/fixed/traits/trait.FromFixed.html +[`FixedI128`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI128.html +[`FixedI16`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI16.html +[`FixedI32`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html +[`FixedI64`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI64.html +[`FixedI8`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI8.html +[`FixedU128`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedU128.html +[`FixedU16`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedU16.html +[`FixedU32`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedU32.html +[`FixedU64`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedU64.html +[`FixedU8`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedU8.html +[`FromFixed`]: https://docs.rs/fixed/~1.8/fixed/traits/trait.FromFixed.html [`FromStr`]: https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html [`From`]: https://doc.rust-lang.org/nightly/core/convert/trait.From.html -[`I20F12`]: https://docs.rs/fixed/~1.7/fixed/types/type.I20F12.html -[`I4F12`]: https://docs.rs/fixed/~1.7/fixed/types/type.I4F12.html -[`I4F4`]: https://docs.rs/fixed/~1.7/fixed/types/type.I4F4.html +[`I20F12`]: https://docs.rs/fixed/~1.8/fixed/types/type.I20F12.html +[`I4F12`]: https://docs.rs/fixed/~1.8/fixed/types/type.I4F12.html +[`I4F4`]: https://docs.rs/fixed/~1.8/fixed/types/type.I4F4.html [`Into`]: https://doc.rust-lang.org/nightly/core/convert/trait.Into.html -[`LosslessTryFrom`]: https://docs.rs/fixed/~1.7/fixed/traits/trait.LosslessTryFrom.html -[`LosslessTryInto`]: https://docs.rs/fixed/~1.7/fixed/traits/trait.LosslessTryInto.html -[`LossyFrom`]: https://docs.rs/fixed/~1.7/fixed/traits/trait.LossyFrom.html -[`LossyInto`]: https://docs.rs/fixed/~1.7/fixed/traits/trait.LossyInto.html +[`LosslessTryFrom`]: https://docs.rs/fixed/~1.8/fixed/traits/trait.LosslessTryFrom.html +[`LosslessTryInto`]: https://docs.rs/fixed/~1.8/fixed/traits/trait.LosslessTryInto.html +[`LossyFrom`]: https://docs.rs/fixed/~1.8/fixed/traits/trait.LossyFrom.html +[`LossyInto`]: https://docs.rs/fixed/~1.8/fixed/traits/trait.LossyInto.html [`LowerHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html [`Octal`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html -[`ParseFixedError`]: https://docs.rs/fixed/~1.7/fixed/struct.ParseFixedError.html -[`ToFixed`]: https://docs.rs/fixed/~1.7/fixed/traits/trait.ToFixed.html -[`U20F12`]: https://docs.rs/fixed/~1.7/fixed/types/type.U20F12.html +[`ParseFixedError`]: https://docs.rs/fixed/~1.8/fixed/struct.ParseFixedError.html +[`ToFixed`]: https://docs.rs/fixed/~1.8/fixed/traits/trait.ToFixed.html +[`U20F12`]: https://docs.rs/fixed/~1.8/fixed/types/type.U20F12.html [`UpperHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html [`bf16`]: https://docs.rs/half/^1/half/struct.bf16.html -[`checked_from_num`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.checked_from_num +[`checked_from_num`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_from_num [`f16`]: https://docs.rs/half/^1/half/struct.f16.html -[`from_num`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_num -[`from_str_binary`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_str_binary -[`from_str_hex`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_str_hex -[`from_str_octal`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.from_str_octal +[`from_num`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.from_num +[`from_str_binary`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.from_str_binary +[`from_str_hex`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.from_str_hex +[`from_str_octal`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.from_str_octal [`i32`]: https://doc.rust-lang.org/nightly/std/primitive.i32.html -[`to_num`]: https://docs.rs/fixed/~1.7/fixed/struct.FixedI32.html#method.to_num +[`to_num`]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.to_num [`u32`]: https://doc.rust-lang.org/nightly/std/primitive.u32.html [const generics]: https://github.com/rust-lang/rust/issues/44580 diff --git a/RELEASES.md b/RELEASES.md index b489c0f..df03bdf 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5,7 +5,7 @@ modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. --> -Version 1.8.0 (unreleased) +Version 1.8.0 (2021-04-20) ========================== * The following constants were added to all fixed-point numbers, to the @@ -35,34 +35,34 @@ Version 1.8.0 (unreleased) [`const_bitxor`][f-cbx-1-8] * Many methods were marked with the `must_use` attribute. -[f-cba-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_bitand -[f-cbo-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_bitor -[f-cbx-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_bitxor -[f-cdi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_div_int -[f-cma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_mul_acc -[f-cn-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.const_not -[f-cr-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_rem -[f-cre-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.checked_rem_euclid -[f-d-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#associatedconstant.DELTA -[f-ma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.mul_acc -[f-o-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#associatedconstant.ONE -[f-odi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.overflowing_div_int -[f-oma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.overflowing_mul_acc -[f-re-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.rem_euclid -[f-sdei-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.saturating_div_euclid_int -[f-sma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.saturating_mul_acc -[f-srei-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.saturating_rem_euclid_int -[f-udi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_div_int -[f-uma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_mul_acc -[f-ur-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_rem -[f-ure-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_rem_euclid -[f-uri-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.unwrapped_rem_int -[f-wdi-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.wrapping_div_int -[f-wma-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#method.wrapping_mul_acc -[f-z-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.FixedI32.html#associatedconstant.ZERO -[tf-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/traits/trait.Fixed.html -[u-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.Unwrapped.html -[w-1-8]: https://tspiteri.gitlab.io/fixed/dev/fixed/struct.Wrapping.html +[f-cba-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_bitand +[f-cbo-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_bitor +[f-cbx-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_bitxor +[f-cdi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_div_int +[f-cma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_mul_acc +[f-cn-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.const_not +[f-cr-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_rem +[f-cre-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.checked_rem_euclid +[f-d-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#associatedconstant.DELTA +[f-ma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.mul_acc +[f-o-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#associatedconstant.ONE +[f-odi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.overflowing_div_int +[f-oma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.overflowing_mul_acc +[f-re-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.rem_euclid +[f-sdei-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.saturating_div_euclid_int +[f-sma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.saturating_mul_acc +[f-srei-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.saturating_rem_euclid_int +[f-udi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_div_int +[f-uma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_mul_acc +[f-ur-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_rem +[f-ure-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_rem_euclid +[f-uri-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.unwrapped_rem_int +[f-wdi-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.wrapping_div_int +[f-wma-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#method.wrapping_mul_acc +[f-z-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.FixedI32.html#associatedconstant.ZERO +[tf-1-8]: https://docs.rs/fixed/~1.8/fixed/traits/trait.Fixed.html +[u-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.Unwrapped.html +[w-1-8]: https://docs.rs/fixed/~1.8/fixed/struct.Wrapping.html Version 1.7.0 (2021-03-25) ========================== diff --git a/src/lib.rs b/src/lib.rs index a269480..dedd003 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,7 +169,7 @@ crate, add it as a dependency inside [*Cargo.toml*]: ```toml [dependencies] -fixed = "1.7" +fixed = "1.8" ``` The *fixed* crate requires rustc version 1.50.0 or later. @@ -193,7 +193,7 @@ To enable features, you can add the dependency like this to [*Cargo.toml*]: ```toml [dependencies.fixed] -version = "1.7" +version = "1.8" features = ["serde"] ``` @@ -213,10 +213,10 @@ updated to an incompatible newer version. The following optional features are deprecated and may be removed in the next major version of the crate. - 1. `az`, has no effect. Previously required to enable the cast traits provided - by the [*az* crate]. Now these cast traits are always provided. - 2. `f16`, has no effect. Previously required to provide conversion to/from - [`f16`] and [`bf16`]. Now these conversions are always provided. + 1. `az`, has no effect. Previously required for the cast traits from the [*az* + crate]. Now these cast traits are always provided. + 2. `f16`, has no effect. Previously required for conversion to/from [`f16`] and + [`bf16`]. Now these conversions are always provided. ## License @@ -276,7 +276,7 @@ shall be dual licensed as above, without any additional terms or conditions. */ #![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs)] -#![doc(html_root_url = "https://docs.rs/fixed/~1.7")] +#![doc(html_root_url = "https://docs.rs/fixed/~1.8")] #![doc(test(attr(deny(warnings))))] #![cfg_attr(feature = "fail-on-warnings", deny(warnings))] #![allow(clippy::manual_map, clippy::wrong_self_convention)]