# Suggest an irrational number from decimal one

I want to know is there any function in Mathematica that suggests a simple irrational number combination for decimal one?

For example, if I give 0.804738 then I get (Sqrt + 1)/3.

(EDIT)

Or consider 1.301290284568573 = π/(Sqrt + 1).

It seems for the first example RootApproximant gives the correct answer but for the second its answer is not useful at all.

• Have you seen RootApproximant? Apr 10, 2021 at 2:31
• Thank you! This works for this number. But I suggest that, for example, 0.8185261683292934 should be related to sqrt with simple relation. Apr 10, 2021 at 2:36
• I want a function that also predicts something like \pi, RootApproximant[[Pi]] is not that. Apr 10, 2021 at 3:30
• Pi*RootApproximant[1.30129028/Pi] Apr 10, 2021 at 4:43
• AskConstants is pretty amazing for this task. Apr 10, 2021 at 6:56

Try WolframAlpha

guess[x_]:=WolframAlpha["identify "<>ToString@x]  • There's no need for coding here: you can get the same effect by pressing "=" twice and entering the number (or any W$\alpha$ query) directly. Apr 10, 2021 at 8:12
• Thank you. Yes, it works. Apr 11, 2021 at 1:56

AskConstants is extremely powerful. For the second example it gives several results:

(-1 + Sqrt) \[Pi]
\[Pi] Tanh[ArcCosh/4]
\[Pi] Sqrt[ModularLambda[I Sqrt]]
(1 + Sqrt) \[Pi] Sqrt[ModularLambda[2 I]]
1/2 \[Pi] Tanh[ArcCoth[2 + Sqrt] + ArcCsch] • While this package might be powerful, it is huge (!) and strangely organized. I read  INSTALL.nb and  LOAD_ASKCONSTANTS.nb twice, and still could not figure out how to install this thing. Apr 11, 2021 at 16:07