You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support to add castable values (e.g. f + 1u8, 1u8 will be transparently casted to Fraction with .into())
Support to sub castable values (e.g. f - 1u8, 1u8 will be transparently casted to Fraction with .into())
Support to div castable values (e.g. f / 1u8, 1u8 will be transparently casted to Fraction with .into())
Support to mul castable values (e.g. f * 1u8, 1u8 will be transparently casted to Fraction with .into())
Support to add_assign castable values (e.g. f += 1u8, 1u8 will be transparently casted to Fraction with .into())
Support to sub_assign castable values (e.g. f -= 1u8, 1u8 will be transparently casted to Fraction with .into())
Support to div_assign castable values (e.g. f /= 1u8, 1u8 will be transparently casted to Fraction with .into())
Support to mul_assign castable values (e.g. f *= 1u8, 1u8 will be transparently casted to Fraction with .into())
Changed
Refactoring of the fraction module. std::ops implementations moved into separate submodules.
generic::read_generic_integer performance improved for when target type matches source (~83% improvement, which is 5 times faster).
As the result this can affect GenericFraction::from performance for non-float types.
From<(A, B)> implementation is migrated to GenericFraction::new_generic (~85% performance improvement and with no heap allocations, which is ~7 times faster).