Convert decimal number to rational
By default, literal numbers are represented in rational form:
Additionally, Num(str)
can be used for parsing a decimal expansion into rational form:
Output:
For rational approximations, the Number .rat_approx
method can be used:
Last updated