You're here because you have a question, a math question.

I don't know who asked you this math question. Maybe it was your math teacher, or your mother, or a friend, or your employer. Or maybe this is a math question you have asked yourself.

Still the question remains, like a splinter in your mind:

Decimal to Fraction?

The answers are out there Neo, and they're waiting for you. When you're ready, this instructable will help those answers to find you.

By the way, this phrase, "Decimal to Fraction", denotes a topic, one of several in an official Instructables contest (the details of which I found here: https://www.instructables.com/contest/burningquestions65/ ) Also per the rules of this contest, the phrase "Decimal to Fraction" is the title of this Instructable.

Anyway, I should get back to explaining, or perhaps guessing, why you're here.

You are here because you wish to covert a positive rational number in decimal form into a fraction, a ratio of two integers. Or perhaps you want the answer in the form of a mixed fraction, the sum of an integer and a proper fraction.

Below I have written some question-answers, with the decimal representation "question" part on the left side of these equations, and the "answers" in fraction and mixed fraction forms, on the right side.
3.125 = 3125/1000 = 25/8 = 3 + 125/1000 = 3 + 1/8 0.00314 = 314/100000 = 157/50000 3.141414... = 311/99 = 3 + 14/99 3.456666... = 3111/900 = 1037/300 = 3 + 137/300

Is this the form of the question you had in mind?

Step 3 and Step 9 demonstrate methods for the easy case of converting a regular, non-repeating, decimal number.

Methods for converting a repeating decimal number are revealed in Step 7, and using a slightly different trick in Step 11. The method shown in Step 7, the Subtraction Trick, is best if you want your answer left in the form of an improper fraction. The method in Step 11 quickly takes you to an answer in mixed fraction form.

The other Steps, {1,2,4,5,6,8,10,12}, are there to explain everything else that I felt was worth explaining.

There's a very good chance you are reading this by way of a computer of some kind. If you already own a computer, and you have a burning desire to solve math problems, there's no reason why you should not have a copy of Octave. Octave is an advanced numerical problem solving tool. It's the open-source clone of a commercial product called MATLAB. Basically Octave is a mutant calculator on steroids! If you want to do some serious number crunching, and you want to do it for free (minus the effort of installing it and learning how to use it), you want a copy of Octave. It's waiting for you, here:

This instructable might quote some Octave code in a few places. The same commands usually work with MATLAB. Also your expensive graphing calculator might be able to do some, but not all, of the tricks Octave/MATLAB can do.

Of course for the purist, there's always pencil and paper...

Step 1: In the Beginning...

Building bigger numbers out of smaller numbers is one of the grand traditions of mathematics.

In the beginning there were only ten numerals, the set {0,1,2,3,4,5,6,7,8,9}.

Then came the larger decimal integers, constructed from non-negative powers of 10, for example:

1024 = 1*103 + 0*102 + 2*101 + 4*100

Then came the fractions, also called ratios. A fraction is a number constructed from two numbers connected by a division operator. Like this:


The number on top is called the numerator, and the number on the bottom is called the denominator.

In the beginning, fractions only had integers for their numerators and denominators, and even today the oldest and noblest of fractions are still ratios of two integers.

The invention of fractions made it possible to express positive numbers smaller than 1. Even today those fractions absolutely smaller than 1 are honored with the title proper.

Then came negative numbers.

Then came exponents.

Then came the decimal point.

The decimal point gave decimal numbers the ability to become smaller than 1, like fractions could. e.g.

0.25 < 1

The breakthrough that made this possible were fractional powers of 10, {1/10, 1/100, 1/1000, ...}, or equivalently the powers of 10 with negative exponents.

0.25 = 2*10-1 + 5*10-2

Remarkably, a decimal number, with digits on both sides of the decimal point, can express its bigness and its smallness at the same time!


1024.25 = 1*103 + 0*102 + 2*101 + 4*100 + 2*10-1 + 5*10-2
I do a lot of work using an <u>Integer Basic</u> that needs to work with decimal fractions +-32,000&bull;00000<br> and even double precision variables need to use some of the techniques you describe here.<br> <br> And some I did not know.&nbsp; I especially like the over-bar description of endless repeating fractions.<br> <br> A
I&nbsp;just noticed that, for some reason, a bunch of line-breaks were missing from certain parts of this instructable, so that text that used to look like:<br /> <blockquote> <div>equation1<br /> equation2<br /> equation3</div> </blockquote>wound up looking like:<blockquote> <div>equation1equation2equation3</div> </blockquote>That is to say, totally f-d up, and unreadable.&nbsp; I suspect this was the work of some Official Instructables robot going through and updating the markup language, which they change every so often for some reason. &nbsp;<br /> <br /> I think I&nbsp;fixed all the damage, but if I didn't please comment, I&nbsp;mean, in the unlikely event that someone besides me actually reads this 'ible.<br />
A handy way to remember the decimals in sevenths (mentioned in the 7th step) is 7 14 28 5.. Two times 7 is 14, two times 14 is 28, two times 28 is 56 but the repeat starts after the 5 so you only end up with 7 14 28 5..restart 7 14.. and so on. Any /7 remainder in decimals you only have to check what digit to start with - 2/7 -> 20/7 first digit will be 2. Then go from there, 0.285714285... Not that relevant to factoring, but kind of neat.
That is kind of neat ...7 14 28 5 ... Among the fractions {1/2, 1/3, 1/4, 1/5,1/6,1/7,1/8, 1/9} , 1/7 is the one with the weirdest decimal representation, and the hardest to remember... Thanks for the tip!
No prob. It's kind of a neat party trick (for very specific geekly parties) to quote percentages of stuff that there happens to be seven of. Aww man, twenty eight point five seven one four two percent of my meatballs are burned!
s/factoring/fraction to decimal/g
I noticed the proof in Step 10 had some kinda serious typos, places where "-n" that should have been "+n", and a "greater than" sign that should have been "greater than or equals". I decided these were serious enough to re-edit the picture containing this proof and upload it again. Hopefully that will be the last correction.
Hey everybody! Thank you to whoever it is who voted/decided this instructable was a winner for answering the "Decimal to Fraction" question. The subject of repeating decimals has always been interesting to me, especially repeating nines. One thing I forgot to mention in this instructable is the cultural phenomena of marketeers who offer their wares with prices ending in nines, e.g. $0.99 < $1.00 $19.99 < $20.00 The other day I found a beautiful 1.999 in the wild, and I decided to take a picture of this and add it to Step 10. BTW, if this ible has any really obvious errors, e.g. math errors, please point them out to me. Any other comments, positive or negative, are also welcome.

About This Instructable




Bio: I've built some weird stuff over the years, but most of that stuff has remained unseen by the world outside of me and a ... More »
More by Jack A Lopez:Piezo Pen Pulsed Power Source Phosphorescent Notepad Convert a bar of soap into fatty acids 
Add instructable to: