Another thing you can do is to convert your mystery number into continuous fraction and look for repetitions. It is known that quadratic irrationalities have repeating continued fraction representation. For example, 1/sqrt(6)=[0;2,2,4,2,4,2,4...] (2,4 part repeats infinitely)

So, for example, if you start with approximation to 1/sqrt(6)=0.4082482905 (without knowing it is 1/sqrt(6)) and start obtaining its continued fraction elements you will get

[0; 2 2 4 2 4 2 4 2 4 2 3 19 1 16 4 2 1 2]

It is easy to suspect that [0; 2 (2 4)*] is a candidate and non-periodicity is due to inaccuracy of approximation.

Then using simple algebra you convert [0;2 (2 4)*] to a form (U+sqrt(D))/V, which is sqrt(6)/6, which is 1/sqrt(6)

Unfortunately this only works for mystery numbers in the form of (U+sqrt(D))/V. Say, sqrt(2)+sqrt(3) does not have repeating continued fraction and will need different method to guess tha form.

**Edited by nsg, 03 March 2013 - 05:34 PM.**