MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that it may turn out useless, but this is precisely the reason why I'm asking.

Does any one know of an existing piece of code that would find me the best approximation to a given irrational number using ordinary math symbols and known constants like e, pi etc.?

share|cite|improve this question

The Inverse Symbolic Calculator sounds like what you want (it's not clear from your question what form you have the number in to start with).

share|cite|improve this answer
That's exactly what I needed! Thank you. – Ranza Apr 6 '13 at 8:37

You can use LLL or PSLQ to approximate your number by a linear combination over the integers of a given finite set of numbers. Or apply them to logarithms to approximate your number as a product of powers of given numbers. In Maple, use the IntegerRelations package.

share|cite|improve this answer
The identify() function is easier to start with. – Brendan McKay Apr 6 '13 at 12:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.