# Revision history [back]

The answer of slelievre is already the best one can do in such situations, without taking a piece of paper and writing down the explicit amplification with the conjugate of the denominator $$\frac{2(2378\sqrt 2-3363)}{408\sqrt 2-557}= \frac{2(2378\sqrt 2-3363)(-408\sqrt 2-557)}{(408\sqrt 2-557)(-408\sqrt 2-557)}$$ and computing the numerator and the denominator explicitly (by hand or using sage).

Alternatively:

• Ask for the minimal polynomial of the given expression.
• Use the conversion to the number field $\Bbb Q(\sqrt 2)$. (With care for other number fields, i.e. in this example check that $\sqrt 2>0$ is correctly taken as the "value" of the generator...)

In code:

sage: u = 2*(2378*sqrt(2) - 3363)/(408*sqrt(2) - 577)
sage: var('x');

sage: solve(u.minpoly()(x) == 0, x)
[x == -4*sqrt(2) + 6, x == 4*sqrt(2) + 6]
sage: u.n()
0.343145749747913