# Convert this into fractional number step by step?

3.41287548754875...

Convert the above number to a rational number?

I was reviewing some pre calculus on my own but couldn't figure this out.

• Hint: Call your number $x$. Then $10000x-x$ is a terminating decimal (when you do the subtraction, the repeating tails cancel out), which you hopefully know how to express in rational form. Now you just have to solve the linear equation $$1000x-x=\frac{\text{something}}{\text{something else}}$$ May 3, 2016 at 12:30
• thanks Sir! I was doing 1000000x - x, which was wrong. Thanks for help. May 3, 2016 at 12:34
• How come you choose to multiply both side by 10^4 but not 10^5? Although it's right to do that but how com you figure it out with any other questio? May 3, 2016 at 12:36
• The period is 4 digits long, so in order to shift it enough for one copy of the period to cancel out its neighboring copy, it must be shifted by 4 digit positions. That corresponds to multiplying by $10^4$. May 3, 2016 at 12:38
• Ahhh! You thought me a very elementary but important thing today. Sorry for such a simple question on mathoverflow but I really thank you for that!!! May 3, 2016 at 12:39

$$0.412\overline{8754}=\frac{4128754-412}{9999000}$$

Edit: the numerator is the difference of the number build by the preperiod followed by the period, in our case $4128754$, and the preperiod, here $412$. For the denominator, write down as much nines as the period is long, here $9999$, followed by as much zeros as the preperiod is long, in our case $000$.

• Thanks for the help! Although whoever down voted, he must've done it accidentally, as I can't do a downvote because of not having enough points. ;-) May 3, 2016 at 12:46
• At the time the answer contained only an assertion of what the result is, nothing that actually told the OP anything useful. I'm still unconvinced that this cookbook procedure helps provide any understanding, but I'll retract the downvote now that there's at least some English prose ... May 3, 2016 at 12:48
• Maybe it doesn't help understanding, but converts very quickly. Aug 4, 2016 at 9:54

General method:

• Let $x$ denote the input number
• Let $|n|$ denote the number of decimal digits in $n$
• Split $x$ into the following parts:
• $\color\red{A}=$ the integer part, i.e., $\lfloor{x}\rfloor$
• $\color\green{B}=$ the fraction part's non-periodic prefix
• $\color\orange{C}=$ the fraction part's periodic postfix

Then:

$$x=\frac{(10^{|B|+|C|}-10^{|B|})\color\red{A}+(10^{|C|}-1)\color\green{B}+\color\orange{C}}{10^{|B|+|C|}-10^{|B|}}$$

For example, if $x=3.412\overline{8754}$:

• $A=3$
• $B=412$
• $C=8754$

Then:

$$x=\frac{(10^{3+4}-10^{3})\cdot\color\red{3}+(10^{4}-1)\cdot\color\green{412}+\color\orange{8754}}{10^{3+4}-10^{3}}=\frac{34125342}{9999000}$$