Repeating Decimals
Repeating Decimals
Have you ever been curious and wanted to know how you could take a repeating decimal and represent it as a fraction? Odds are, the answer is “No.”
However, I feel like it’s something you may perhaps find interesting enough to read this post. So, I’m going to teach you! Take a seat.
Prerequisite information
There are two concepts in math called “Sequences” and “Series.” Without going into so much detail as to bore you, I’ll give you a quick working definition just to get the point across.
Sequence: A Sequence is a list of things (usually numbers) that are in order.
Example:
5,10,15,20,25,30,35,40,45,50, . . . 5*(n-1), 5*(n), 5*(n+1) . . .
Essentially, it’s a pattern that continues on to ‘infinity’. The previous sequence can be defined as 5*n with n being the term of the sequence. The first term, as you can see, is 5*1 = 5. The second term is 5*2 = 10. The 100th term, then, would be 5*100 = 500.
Series: A Series is the summation of the first infinite terms in a Sequence. (if we take every term in the sequence to infinity and add them together, what would it equal?)
Example:
If we were to write this out it would look something like this:
The real question is, "Infinity is impossible to reach, so how in the world do we add all of these terms together?"
Fortunately for us, this is a well-studied and commonly used series known as a Geometric Series. In fact, it's exactly what we're going to use to turn decimals into fractions!
Geometric Series:
Where:
a is the first term (what would the value of the Sequence be if we plugged in n=1?)
r is the "common ratio" (how is the value changing between terms?)
The idea is that we can calculate the sum of this special series with the equation a/(1-r) where a and r are the previously defined terms. Here is a quick example:
Application of information
Whew, now that we got the dirty work out of the way!
Ex 1) Represent 0.19191919191919. . . as a fraction
First of all, how can we strategically represent this number? How about:
It should be obvious, then, that the first term is what? (you guessed it!) 19/100
And the common ratio (how the term is changing) is what? (of course!) 1/100
And, for the sake of verification:
https://www.google.com/search?q=19%2F99 ... 2&ie=UTF-8
Yay!
Ex 2) Represent 0.153215321532. . . as a fraction
Based off of the previous example, we have a really good idea of where to start for this one
Similarly, we can see that the first term is (1532/10000) and the common ratio is (1/10000).
Verification
Your turn!
By now, perhaps you've noticed a pattern? How about you try doing the following:
Represent 9.720572057205. . . as a fraction (proper or improper)
However, I feel like it’s something you may perhaps find interesting enough to read this post. So, I’m going to teach you! Take a seat.
Prerequisite information
There are two concepts in math called “Sequences” and “Series.” Without going into so much detail as to bore you, I’ll give you a quick working definition just to get the point across.
Sequence: A Sequence is a list of things (usually numbers) that are in order.
Example:
5,10,15,20,25,30,35,40,45,50, . . . 5*(n-1), 5*(n), 5*(n+1) . . .
Essentially, it’s a pattern that continues on to ‘infinity’. The previous sequence can be defined as 5*n with n being the term of the sequence. The first term, as you can see, is 5*1 = 5. The second term is 5*2 = 10. The 100th term, then, would be 5*100 = 500.
Series: A Series is the summation of the first infinite terms in a Sequence. (if we take every term in the sequence to infinity and add them together, what would it equal?)
Example:
If we were to write this out it would look something like this:
The real question is, "Infinity is impossible to reach, so how in the world do we add all of these terms together?"
Fortunately for us, this is a well-studied and commonly used series known as a Geometric Series. In fact, it's exactly what we're going to use to turn decimals into fractions!
Geometric Series:
Where:
a is the first term (what would the value of the Sequence be if we plugged in n=1?)
r is the "common ratio" (how is the value changing between terms?)
The idea is that we can calculate the sum of this special series with the equation a/(1-r) where a and r are the previously defined terms. Here is a quick example:
Application of information
Whew, now that we got the dirty work out of the way!
Ex 1) Represent 0.19191919191919. . . as a fraction
First of all, how can we strategically represent this number? How about:
It should be obvious, then, that the first term is what? (you guessed it!) 19/100
And the common ratio (how the term is changing) is what? (of course!) 1/100
And, for the sake of verification:
https://www.google.com/search?q=19%2F99 ... 2&ie=UTF-8
Yay!
Ex 2) Represent 0.153215321532. . . as a fraction
Based off of the previous example, we have a really good idea of where to start for this one
Similarly, we can see that the first term is (1532/10000) and the common ratio is (1/10000).
Verification
Your turn!
By now, perhaps you've noticed a pattern? How about you try doing the following:
Represent 9.720572057205. . . as a fraction (proper or improper)
"Dream as if you'll live forever,
Live as if you'll die today." -James Dean
Re: Repeating Decimals
8836 / 909Ratchet wrote:Represent 9.720572057205. . . as a fraction (proper or improper)
9 + 655 / 909
Re: Repeating Decimals
Good job
My solution:
The interesting trick (that you may pick up from the examples) is that you can find any repeating decimal's fraction by making the denominator have the same number of 9's as the numerator has digits. (the denominator is always 9(s))
Maybe that doesn't make sense, so I'll show you visually:
My solution:
The interesting trick (that you may pick up from the examples) is that you can find any repeating decimal's fraction by making the denominator have the same number of 9's as the numerator has digits. (the denominator is always 9(s))
Maybe that doesn't make sense, so I'll show you visually:
"Dream as if you'll live forever,
Live as if you'll die today." -James Dean
Re: Repeating Decimals
Just to be more confusing (lol) here's yet another way:
97196 / 9999
The amount of 9s in the denominator determine how many digits are repeated (as was said).
Should the numerator have more digits, this creates an "overlap" in the repeating digits.
Here is an example:
1111 / 9999 = 0.11111111
That is 4 digits that repeat (all are 1s).
Now:
11111 / 9999 = 1.11121112
That is 4 digits that repeat, and what happens to that extra digit (the very left out of 5), it gets added on to the digit place before (before the segment of 4).
In this case, the 1 (whole number, left side of the decimal) was added before the first instance of the repeating 4 digits.
After the first "1111" repeated, sticking on the next will add on an extra 1 just like the whole number was added.
This changes the previous "1111" into "1112":This is a pattern that can be used to "add" any combination together to get the end results you're looking for.
Not that the repeated digits depend on the denominator, yet the numerator defines the digits that get repeated.
The above examples repeats 4 digit places, using 5 digits each time (the extra digit is added onto the last digit from the previous repetition).
So for this example, you can also do
That's not the way originally did it, but I figure some people might find this pattern also interesting.
Hope that made sense. It should certainly make more sense than the way I originally did it..which might just be luck xD
Though this method will give you an unsimplified and improper fraction, you will still get your answer.
97196 / 9999
The amount of 9s in the denominator determine how many digits are repeated (as was said).
Should the numerator have more digits, this creates an "overlap" in the repeating digits.
Here is an example:
1111 / 9999 = 0.11111111
That is 4 digits that repeat (all are 1s).
Now:
11111 / 9999 = 1.11121112
That is 4 digits that repeat, and what happens to that extra digit (the very left out of 5), it gets added on to the digit place before (before the segment of 4).
In this case, the 1 (whole number, left side of the decimal) was added before the first instance of the repeating 4 digits.
After the first "1111" repeated, sticking on the next will add on an extra 1 just like the whole number was added.
This changes the previous "1111" into "1112":
Code: Select all
0.000000000000
1.111100000000
0.000111110000 (added on)
1.111211110000
0.000000011111 (added on)
1.111211121111
etc..
Not that the repeated digits depend on the denominator, yet the numerator defines the digits that get repeated.
The above examples repeats 4 digit places, using 5 digits each time (the extra digit is added onto the last digit from the previous repetition).
So for this example, you can also do
Code: Select all
0.000000000000
9.719600000000
9.720571960000
9.720572057196
etc..
That's not the way originally did it, but I figure some people might find this pattern also interesting.
Hope that made sense. It should certainly make more sense than the way I originally did it..which might just be luck xD
Though this method will give you an unsimplified and improper fraction, you will still get your answer.
Re: Repeating Decimals
That is definitely cool I hadn't tried experimenting with other ways to get the same results. Interesting! Mathgasm!
"Dream as if you'll live forever,
Live as if you'll die today." -James Dean
- Lucifer
- Project Developer
- Posts: 8640
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
Re: Repeating Decimals
**** this shit. I got my first B in college because off this shit.
Y'all are assholes.
Y'all are assholes.
Re: Repeating Decimals
Yeah! What he said!
I was totally in your shoes, I hated math at first. But, lately, I've started actually applying higher order math to my engineering curriculum and suddenly it's much, much more interesting. You know that argument "blah blah when will we ever use this shit?" Well, I'm proud to say I'm using the shit I learn now It's exciting!
I was totally in your shoes, I hated math at first. But, lately, I've started actually applying higher order math to my engineering curriculum and suddenly it's much, much more interesting. You know that argument "blah blah when will we ever use this shit?" Well, I'm proud to say I'm using the shit I learn now It's exciting!
"Dream as if you'll live forever,
Live as if you'll die today." -James Dean
Re: Repeating Decimals
pretty pictures, cpus dont use fractions.
CLAPCLAP!
CLAPCLAP!
Re: Repeating Decimals
http://en.wikipedia.org/wiki/Computer_n ... _in_binary
CPUs do use fractions, just not in the way you might think.
About CPUs as well as how I originally solved this:
Decimals, fractions, whole or mixed numbers, polynomials (and other algebraic junk), etc.; these are all just a method of representing a value.
Fractions are a ratio between (any) 2 numbers.
1 / 2 is a half of the whole. But you can also read it as 1 divided by 2 (all fractions are just a division), which puts out 0.5.
Decimals are a ratio (fraction) between a number and 10 (base 10 math).
0.5 * 10 = 5; 5 / 10 = 1 / 2 = 0.5. A decimal can always be related to 10 (or a multiple thereof, like 100), to put out the corresponding fraction.
These are only ways of representing a value; we aren't actually working with the value itself, the value is being representing in a form we can work with.
IMO - once you can "see" the values for what they are, conversions between them become as natural as knowing your times tables.
Once 0.5 and 1 / 2 become one and the same to you, math gets a whole lot easier.
CPUs don't have to care about representation so long as they can know the value in their own way (they can represent a fraction without using a fraction like you might).
Saying CPUs don't use fractions is like saying a CPU cannot divide or relate numbers as a ratio.
CPUs do use fractions, just not in the way you might think.
About CPUs as well as how I originally solved this:
Decimals, fractions, whole or mixed numbers, polynomials (and other algebraic junk), etc.; these are all just a method of representing a value.
Fractions are a ratio between (any) 2 numbers.
1 / 2 is a half of the whole. But you can also read it as 1 divided by 2 (all fractions are just a division), which puts out 0.5.
Decimals are a ratio (fraction) between a number and 10 (base 10 math).
0.5 * 10 = 5; 5 / 10 = 1 / 2 = 0.5. A decimal can always be related to 10 (or a multiple thereof, like 100), to put out the corresponding fraction.
These are only ways of representing a value; we aren't actually working with the value itself, the value is being representing in a form we can work with.
IMO - once you can "see" the values for what they are, conversions between them become as natural as knowing your times tables.
Once 0.5 and 1 / 2 become one and the same to you, math gets a whole lot easier.
CPUs don't have to care about representation so long as they can know the value in their own way (they can represent a fraction without using a fraction like you might).
Saying CPUs don't use fractions is like saying a CPU cannot divide or relate numbers as a ratio.
Re: Repeating Decimals
No, cpus dont use fractions, they divide, then use the resulting number, doing it badly is how the first pentium bug happened. Thats exactly why floats and doubles exist.
Re: Repeating Decimals
Lol, I'm wondering if you read my post and/or visited that link..
A simple way to put it: a decimal (float or double) is nothing but a fraction, just represented in a way more convenient to a CPU.
The link I provided shows how binary (CPUs) work with fractions.
So yes, they do use "fractions" but to a CPU it is just a value (like any other value).
In the end, a fraction and a decimal are the same thing. (kind of what I was saying for the way I solved this thread's challenge)
A CPU doesn't use a numerator and denominator...it doesn't need to.
Durf wrote:(all fractions are just a division)
Durf wrote:These are only ways of representing a value; we aren't actually working with the value itself, the value is being representing in a form we can work with.
Durf wrote:CPUs don't have to care about representation so long as they can know the value in their own way
^ note that last oneDurf wrote:Saying CPUs don't use fractions is like saying a CPU cannot divide or relate numbers as a ratio.
^ this is basically what I said. But the difference is that humans like to think that actually matters./dev/null wrote:No, cpus dont use fractions, they divide, then use the resulting number
A simple way to put it: a decimal (float or double) is nothing but a fraction, just represented in a way more convenient to a CPU.
The link I provided shows how binary (CPUs) work with fractions.
So yes, they do use "fractions" but to a CPU it is just a value (like any other value).
In the end, a fraction and a decimal are the same thing. (kind of what I was saying for the way I solved this thread's challenge)
A CPU doesn't use a numerator and denominator...it doesn't need to.
Re: Repeating Decimals
Fractions are not quite the same, though they are similar. Ignoring the difference in how they are presented to humans, there are still notable differences. For instance, in the most common bases used on cpus 1/7th is a ********** to represent accurately.
Now granted, you could make a cpu that used base 7, but I dunno if its been done, or how useful it would be. Thats why we settled on hex, it has the least amount of edge cases without being unwieldly.
Now granted, you could make a cpu that used base 7, but I dunno if its been done, or how useful it would be. Thats why we settled on hex, it has the least amount of edge cases without being unwieldly.
Re: Repeating Decimals
Yea...not much one can do about the limitations of the cpu..
For those who are curious, the basic explanation is that, for something special like 1/7 or pi, a cpu only has a finite number of digits to represent it with.
However, those numbers have infinite digits. Rounding errors will occur, and for some applications; a cpu is not accurate/precise as it should be.
Some explanations
Going off what was said:
1 / 7 = 0.142857142857142857... (142857 repeating)
= 142857 / 999999
^ at first that looked weird to me, so I did this:
999999 / 7 = 142857
1000000 / 7 = 142857.142857... (repeating)
^ then later, while working on a song for Melodious Tron (Zelda - Lost Woods), I noticed that number within the midi file:Notice the tempo (this was after being put through a tool to convert the midi into text information)
The BPM is 70.
60 / 70 = 6 / 7 = 0.857142857142... (857142 repeating)
^ this interested me quite a bit, so I did some more reading into it:
http://en.wikipedia.org/wiki/142857_(number)
Turns out it is quite the special number.
I wonder if a quantum computer would fair any better at accurately representing 1/7..
For those who are curious, the basic explanation is that, for something special like 1/7 or pi, a cpu only has a finite number of digits to represent it with.
However, those numbers have infinite digits. Rounding errors will occur, and for some applications; a cpu is not accurate/precise as it should be.
Some explanations
Going off what was said:
1 / 7 = 0.142857142857142857... (142857 repeating)
= 142857 / 999999
^ at first that looked weird to me, so I did this:
999999 / 7 = 142857
1000000 / 7 = 142857.142857... (repeating)
^ then later, while working on a song for Melodious Tron (Zelda - Lost Woods), I noticed that number within the midi file:
Code: Select all
MFile 1 14 384
MTrk
0 TimeSig 4/4 24 8
0 Tempo 857142
0 Meta TrkEnd
TrkEnd
The BPM is 70.
60 / 70 = 6 / 7 = 0.857142857142... (857142 repeating)
^ this interested me quite a bit, so I did some more reading into it:
http://en.wikipedia.org/wiki/142857_(number)
Turns out it is quite the special number.
I wonder if a quantum computer would fair any better at accurately representing 1/7..