NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #319 most downloaded on crates.io
Rational numbers implementation for Rust
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.9 years
Most releases are documented
notes for 13 of 20 stable releases
1 version withdrawn
withdrawn after publishing
10 years old
21 releases · first in 2016
chore: Release num-rational version 0.4.2
chore: Release num-rational version 0.4.2
Ratio::approximate_float_unsigned to convert FloatCore types to unsignedconst ZERO and ONE, and implement num_traits::ConstZero and ConstOneRatio::into_raw to deconstruct the numerator and denominatorContributors: @cuviper, @Enyium, @flavioroth, @waywardmonkeys
[Fewer clone calls are used when reducing a new Ratio ][98].
One column per quarter.
clone calls are used when reducing a new Ratio<T>.Ratio<T> now implements Default, returning a zero value.Contributors: @cuviper, @lemmih, @MattX
[The Rational alias for Ratio is now deprecated][92]. It is recommended to use specific type sizes for numeric computation, like Rational32 and Ration…
num-bigint dependency is now 0.4.Rational alias for Ratio<usize> is now deprecated. It is
recommended to use specific type sizes for numeric computation, like
Rational32 and Rational64.Contributors: @cuviper, @vks
[Fix always rebuilding with --remap-path-prefix][88]
Contributors: @Nemo157
[Handle to_f64() with raw division by zero][83].
Contributors: @cuviper, @zetok
[Ratio now implements ToPrimitive][52].
Ratio now implements ToPrimitive.Ratio now implements additional formatting traits:
Binary, Octal, LowerHex, UpperHex, LowerExp, UpperExpPow implementations have been expanded.
Pow<BigInt> and Pow<BigUint> are now implemented.Pow<_> for &Ratio<T> now uses &T: Pow.pow method now uses &T: Pow.num-rational now requires Rust 1.31 or greater.
std enabled.
std uses alloc on Rust 1.36+.Contributors: @cuviper, @MattX, @maxbla
[Fixed CheckedDiv when both dividend and divisor are 0][74].
[Ratio now performs earlier reductions to avoid overflow with +-*/% operators][42].
Ratio now performs earlier reductions to avoid overflow with +-*/% operators.Ratio::{new_raw, numer, denom} are now const fn for Rust 1.31 and later.autocfg build dependency to 1.0.Contributors: @cuviper, @dingelish, @jimbo1qaz, @maxbla
[Ratio now implements Zero::set_zero and One::set_one][47].
Contributors: @cuviper, @ignatenkobrain, @vks
Maintenance release to fix html_root_url.
html_root_url.[Ratio now implements One::is_one and the Inv trait][19].
Ratio now implements One::is_one and the Inv trait.Ratio now implements Sum and Product.Ratio now supports i128 and u128 components with Rust 1.26+.Ratio now implements the Pow trait.num-rational now requires rustc 1.15 or greater.std feature, enabled by default, along with the
implication that building without this feature makes this a #![no_std]
crate. A few methods now require FloatCore instead of Float.serde dependency has been updated to 1.0, and rustc-serialize
is no longer supported by num-rational.num-bigint dependency has been updated to 0.2, and should be
enabled using the bigint-std feature. In the future, it may be possible
to use the bigint feature with no_std.Contributors: @clarcharr, @cuviper, @Emerentius, @robomancer-or, @vks
Nothing published for this version
Maintenance release to update dependencies.
[num-rational now has its own source repository][num-356] at [rust-num/num-rational][home].
Ratio now implements CheckedAdd, CheckedSub, CheckedMul, and CheckedDiv.Ratio now implements AddAssign, SubAssign, MulAssign, DivAssign, and RemAssign
with either Ratio or an integer on the right side. The non-assignment operators now also
accept integers as an operand.Ratio operators now make fewer clone() calls.Thanks to @c410-f3r, @cuviper, and @psimonyi for their contributions!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →