I'm trying to use the external library num with the goal to convert fractions to arbitrarily long decimal points, however, by reading the docs, I cannot find some clarifying example to convert a fraction to a decimal number. Anyone know how?
I think that printing out arbitrary precision decimals is simply a hard problem. I don't see that the GNU Multiple Precision (GMP) Arithmetic Library supports this functionality. While Rust isn't built on top of GMP, if GMP doesn't have it I wouldn't expect Rust to have it.
The best you may be able to do is divide the numerator by the denominator yourself...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With