5.7 KiB
5.7 KiB
Release 0.4.1 (2022-06-23)
- Fewer
clone
calls are used when reducing a newRatio<T>
. - Conversions to floating point are better at avoiding underflow.
Ratio<T>
now implementsDefault
, returning a zero value.
Contributors: @cuviper, @lemmih, @MattX
Release 0.4.0 (2021-03-05)
- The optional
num-bigint
dependency is now 0.4. - The
Rational
alias forRatio<usize>
is now deprecated. It is recommended to use specific type sizes for numeric computation, likeRational32
andRational64
.
Contributors: @cuviper, @vks
Release 0.3.2 (2020-11-06)
Contributors: @Nemo157
Release 0.3.1 (2020-10-29)
- Handle to_f64() with raw division by zero.
- Better document panic behaviour.
- Clarify the license specification as "MIT OR Apache-2.0".
Contributors: @cuviper, @zetok
Release 0.3.0 (2020-06-13)
Enhancements
Ratio
now implementsToPrimitive
.Ratio
now implements additional formatting traits:Binary
,Octal
,LowerHex
,UpperHex
,LowerExp
,UpperExp
- The
Pow
implementations have been expanded.Pow<BigInt>
andPow<BigUint>
are now implemented.Pow<_> for &Ratio<T>
now uses&T: Pow
.- The inherent
pow
method now uses&T: Pow
.
Breaking Changes
num-rational
now requires Rust 1.31 or greater.- The "i128" opt-in feature was removed, now always available.
- The "num-bigint-std" feature replaces "bigint" with
std
enabled.- The "num-bigint" feature without
std
usesalloc
on Rust 1.36+.
- The "num-bigint" feature without
Contributors: @cuviper, @MattX, @maxbla
Release 0.2.4 (2020-03-17)
- Fixed
CheckedDiv
when both dividend and divisor are 0. - Fixed
CheckedDiv
withmin_value()
numerators.
Release 0.2.3 (2020-01-09)
Ratio
now performs earlier reductions to avoid overflow with+-*/%
operators.Ratio::{new_raw, numer, denom}
are nowconst fn
for Rust 1.31 and later.- Updated the
autocfg
build dependency to 1.0.
Contributors: @cuviper, @dingelish, @jimbo1qaz, @maxbla
Release 0.2.2 (2019-06-10)
Contributors: @cuviper, @ignatenkobrain, @vks
Release 0.2.1 (2018-06-22)
- Maintenance release to fix
html_root_url
.
Release 0.2.0 (2018-06-19)
Enhancements
Ratio
now implementsOne::is_one
and theInv
trait.Ratio
now implementsSum
andProduct
.Ratio
now supportsi128
andu128
components with Rust 1.26+.Ratio
now implements thePow
trait.
Breaking Changes
num-rational
now requires rustc 1.15 or greater.- There is now a
std
feature, enabled by default, along with the implication that building without this feature makes this a#![no_std]
crate. A few methods now requireFloatCore
instead ofFloat
. - The
serde
dependency has been updated to 1.0, andrustc-serialize
is no longer supported bynum-rational
. - The optional
num-bigint
dependency has been updated to 0.2, and should be enabled using thebigint-std
feature. In the future, it may be possible to use thebigint
feature withno_std
.
Contributors: @clarcharr, @cuviper, @Emerentius, @robomancer-or, @vks
Release 0.1.42 (2018-02-08)
- Maintenance release to update dependencies.
Release 0.1.41 (2018-01-26)
- num-rational now has its own source repository at rust-num/num-rational.
Ratio
now implementsCheckedAdd
,CheckedSub
,CheckedMul
, andCheckedDiv
.Ratio
now implementsAddAssign
,SubAssign
,MulAssign
,DivAssign
, andRemAssign
with eitherRatio
or an integer on the right side. The non-assignment operators now also accept integers as an operand.Ratio
operators now make fewerclone()
calls.
Thanks to @c410-f3r, @cuviper, and @psimonyi for their contributions!
Prior releases
No prior release notes were kept. Thanks all the same to the many contributors that have made this crate what it is!