#rational-numbers

no-std rational_extensions

Extensions for rational numbers

4 releases (2 breaking)

0.4.1 Sep 13, 2023
0.4.0 Apr 12, 2023
0.3.0 Apr 10, 2023
0.1.0 Jan 28, 2023

#1628 in Math

MIT/Apache

20KB
433 lines

rational_extensions

rational_extensions is a library that extends num_rational::Ratio<T> such that strings in decimal notation can be converted into such an instance. One can furthermore control the minimum and maximum number of fractional digits allowed. It also allows one to convert a Ratio<T> into a decimal String controlling how many fractional digits should be used.


lib.rs:

This crate extends how num_rational::Ratio<T> can be converted from a string specifically by allowing decimal notation with the ability to constrain the minimum and maximum number of fractional digits allowed.

Dependencies

~240–480KB