back to list

decimal to fraction

🔗John Starrett <jstarret@carbon.cudenver.edu>

9/11/2000 7:38:59 AM

There may be some more clever ways to turn decimals to fractions, but here is one way. Take for
example 1.125. The last place is the thousandth's place so you have 1125/1000. Factor out 25/25
and you have 45/40. Factor out 5/5 and you have 9/8, a nice familiar ratio. For repeating
decimals, take as an example 1.142857142857..... Let's call this x. We want to get rid of the
repeating part, which repeats after the millionth's place, so we multiply x by 1,000,000 to get
1,142,857.142857142857... Now subtract the smaller from the larger-- 1,000,000 x - x = 999,999 x,
that is 1142857.142857142857... - 1.142857142857... = 1142856. Therefore 999999 x = 1142856, or
x = 1,142,856/999,999. After some tedious factoring, we find 1,142,856/999,999 = 8/7, one of my
favorite ratios.

--
John Starrett
"We have nothing to fear but the scary stuff."

🔗Joseph Pehrson <pehrson@pubmedia.com>

9/11/2000 8:21:53 AM

--- In tuning@egroups.com, John Starrett <jstarret@c...> wrote:

http://www.egroups.com/message/tuning/12635

> There may be some more clever ways to turn decimals to fractions,
but here is one way. Take for
> example 1.125. The last place is the thousandth's place so you have
1125/1000. Factor out 25/25
> and you have 45/40. Factor out 5/5 and you have 9/8, a nice
familiar
ratio. For repeating
> decimals, take as an example 1.142857142857..... Let's call this x.
We want to get rid of the
> repeating part, which repeats after the millionth's place, so we
multiply x by 1,000,000 to get
> 1,142,857.142857142857... Now subtract the smaller from the
larger--
1,000,000 x - x = 999,999 x,
> that is 1142857.142857142857... - 1.142857142857... = 1142856.
Therefore 999999 x = 1142856, or
> x = 1,142,856/999,999. After some tedious factoring, we find
1,142,856/999,999 = 8/7, one of my
> favorite ratios.
>

Thanks, so much, John, for this post. The first part with the finate
decimal places, of course, I knew... but I have to admit I "forgot"
about how to convert repeating decimals. It seems as though I did
learn this at some point... but it was "long gone..."

Thanks again!
_________ _____ ____ __ __ _
Joseph Pehrson

🔗Peter Mulkers <P.MULKERS@GMX.NET>

9/14/2000 5:13:27 AM

> From: John Starrett <jstarret@carbon.cudenver.edu>
>
> There may be some more clever ways to turn decimals to fractions,
> but here is one way. Take for example 1.125. The last place is the
> thousandth's place so you have 1125/1000. Factor out 25/25 and you
> have 45/40. Factor out 5/5 and you have 9/8, a nice familiar ratio.
>
> For repeating decimals, take as an example 1.142857142857.....
> Let's call this x. We want to get rid of the repeating part, which
> repeats after the millionth's place, so we multiply x by 1,000,000
> to get 1,142,857.142857142857... Now subtract the smaller from the
> larger-- 1,000,000 x - x = 999,999 x,
> that is 1142857.142857142857... - 1.142857142857... = 1142856.
> Therefore 999999 x = 1142856, or x = 1,142,856/999,999.
> After some tedious factoring, we find 1,142,856/999,999 = 8/7,
> one of my favorite ratios.

And this is another way.
(based on continued-fractions and the idea of Euclid's Algorithm)
Only useful on Computer or Pocket-Calculator.
Always exact for rational numbers.
Works as well for repeating decimals.
Approximated for irrational numbers.
No tedious factoring.
Easy to program.
Who will buy? :)
---------------------------------------------------------
ex.1:

given rational number: 1.13207...

factor1 1.13207...
factor2 1/(O.13207...) = 7.57142...
factor3 1/(0.57142...) = 1.75
factor4 1/(0.75) = 1.33333...
factor5 1/(0.33333...) = 3
____________*
numerator: 60

denominator: 60/(1.13207...) = 53

fraction: 1.13207... = 60/53

---------------------------------------------------------
ex.2:

given rational number: 1.14285...

factor1 1.14285...
factor2 1/(0.14285...) = 7
____________*
numerator: 8

denominator: 8/(1.14285... ) = 7

fraction: 1.14285... = 8/7

---------------------------------------------------------

(Was discussed before 12mars1999)

Peter