For comparison with other CAS choose from: Axiom Derive Maple Mathematica Reduce
algebraic:true;
true
tellrat(sqrt2**2-2);
2 [sqrt2 - 2]
rat(1/(sqrt2+1));
/R/ sqrt2 - 1
ogcd:gcd;
spmod
gcd:'algebraic;
algebraic
rat((x**2+2*sqrt2*x+2)/(x+sqrt2));
/R/ x + sqrt2
rat((x**3+(sqrt2-2)*x**2-(2*sqrt2+3)*x-3*sqrt2)/(x**2-2));
2 x - 2 x - 3 /R/ ------------ x - sqrt2
gcd:ogcd;
spmod
radcan(sqrt(x**2-2*sqrt2*x*y+2*y**2));
2 2 sqrt(2 y - 2 sqrt2 x y + x )
untellrat(sqrt2);
[]
tellrat(sqrt5**2-5,cbrt3**3-3);
3 2 [cbrt3 - 3, sqrt5 - 5]
rat(cbrt3**3);
/R/ 3
rat(sqrt5**2);
/R/ 5
rat(cbrt3);
/R/ cbrt3
rat(sqrt5);
/R/ sqrt5
radcan(sqrt(x**2+2*(sqrt5-cbrt3)*x+5-2*sqrt5*cbrt3+cbrt3**2));
2 2 sqrt(x + (2 sqrt5 - 2 cbrt3) x - 2 cbrt3 sqrt5 + cbrt3 + 5)
untellrat(sqrt5,cbrt3);
[]