**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: http://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:

http://octave.sourceforge.net/

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...

**Signing Up**

Integer Basicthat needs to work with decimal fractions +-32,000•00000and even double precision variables need to use some of the techniques you describe here.

And some I did not know. I especially like the over-bar description of endless repeating fractions.

A

wound up looking like: That is to say, totally f-d up, and unreadable. 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.

I think I fixed all the damage, but if I didn't please comment, I mean, in the unlikely event that someone besides me actually reads this 'ible.