I can't seem to see how to show a repeating decimal as a fraction in a cloud notebook:
Example: 0.183...
Sorry if this is obvious, can't seem to see it.
Thanks for the help, I think I like the function better; it matches the solution in my text book.
Hi Christopher,
To construct a Rational from a repeating decimal
Rational
FromDigits[{{{1, 8, 3}}, 0}] (* 61/333 *)
That's surprising; I was expecting something more along the lines of: Fraction[0.183...]
Well, you could do something like this, which is the way we would do it manually
fraction[f_, n_] := Round[f*10^n]/(10^n - 1) fraction[0.183, 3] (* 61/333 *) fraction[0.183, 4] (* 610/3333 *) fraction[0.142857, 6] (* 1/7 *)