Anonymous user
Convert decimal number to rational: Difference between revisions
Convert decimal number to rational (view source)
Revision as of 06:28, 30 August 2011
, 12 years agono edit summary
No edit summary |
|||
Line 572:
0.518518 14/27
0.75 3/4
▲>>> for d in '0.9054054 0.518518 0.75'.split(): print(d, Fraction.from_decimal(Decimal(d)))
0.9054054 4527027/5000000
|