Message Boards Message Boards


Recognizing numbers

Posted 10 years ago
5 Replies
7 Total Likes
Python's sympy has a function called nsimplify that can do this: 
>>> from sympy import *
>>> nsimplify(4.242640687119286)
>>> nsimplify(pi, tolerance=1e-7)
exp(141/895 + sqrt(780631)/895)

It finds closed form approximations to numbers.  This looks like a lot of fun (and is potentially useful).
Original source:

So, can Mathematica do this?

POSTED BY: Michael Croucher
5 Replies
Thanks for the replies everyone emoticon
POSTED BY: Michael Croucher
Hello Mike,

One of the very first posts on Mathematica.SE was on a similar topic:

Be sure to look at all answers (not just highly voted ones), and follow the links.  I asked a similar question on MathGroup a few years ago which also has interesting answers:

It was inspired by Maple's identify() function.
POSTED BY: Szabolcs Horvát
BTW the same function was used to recover some of the Ramanujan lost equations, as discussed in this latest Wolfram Blog: After 100 Years, Ramanujan Gap Filled . Below is the image from his "lost notebook" showing some incomplete equations. Click on the link or the image to read the full blog.
POSTED BY: Vitaliy Kaurov
Posted 10 years ago
Built in function
Out = 3*Sqrt[2]
works, and so does the Wolfram|Alpha query with quite a few results: 

Recent post at Wolfram Blog From Close to Perfect—A Triangle Problem  just discussed this very issue.

Hope that helps.
Very nice. Thank you.
POSTED BY: Michael Croucher
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract