Quick doubt on converting a decimal to a fraction

I'm trying to solve a problem that requires me to find the roots of the equation

$-{x}^{4}+10{x}^{2}-x-20=0$

By making use of Newton's method, symbolab's equation calculator has found one root to be

$x\approx -\mathrm{2.79129...}:x=-\frac{\sqrt{21}+1}{2}$

My question is pretty basic, actually: how did they convert the decimal number on the left to the neat faction on the right? I couldn't get to it the way I've learned to convert decimals. Thanks very much in advance.

I'm trying to solve a problem that requires me to find the roots of the equation

$-{x}^{4}+10{x}^{2}-x-20=0$

By making use of Newton's method, symbolab's equation calculator has found one root to be

$x\approx -\mathrm{2.79129...}:x=-\frac{\sqrt{21}+1}{2}$

My question is pretty basic, actually: how did they convert the decimal number on the left to the neat faction on the right? I couldn't get to it the way I've learned to convert decimals. Thanks very much in advance.