# How to find simple rational numbers close to the decimal representation

It is a simple practical question.

I am reverse-engineering poorly documented calculations made by someone else. I frequently find a mysterious number 0.0329. I'm quite certain it is some kind of simple fraction, but how can I find it?

Since the algorithm, which tries to match simple fractions to a given decimal representation should be fairly easy to write, I'm sure someone else did it and I don't have to reinvent the wheel. I just don't know where to look and what phrase to put on Google.

Can someone help me, please?

-
Do you mean that you are looking for smth like: given a decimal number $x$ and a precision $\epsilon$ find the smallest integer $m,n$ such that $$\left|x - \frac mn\right|<\epsilon$$ – S.D. Nov 30 '12 at 9:53

Type in your decimal expansion here, http://www.mindspring.com/~alanh/fracs.html, it should give you a list of succsessivly more accurate rational approximations to your decimal expression.

If you don't think the decimal expansion is rational, type it on http://www.wolframalpha.com/ they can compare it with irrational constants and outputs of transcendetal functions, like if I typed in the first 7 digits of $\sin(3/6)$, they would list that as a probable result.

-
Try also the Continued Fraction Calculator. – lhf Nov 30 '12 at 11:54