Find the minimal polynomial using lattice basis reduction
First try at double precision
> readlib(lattice):
> Digits := 16;
> e1 := cos(Pi/36);
> r1 := evalf(e1);
> p1 := minpoly(r1,12);
Now redo the computation at 60 digits precision to see the correct answer.
> Digits := 60;
> r1 := evalf(e1);
> p1 := minpoly(r1,12);
Check the above using higher precision and by using the procedure with the option.
> Digits := 2*Digits;
> almost_zero_1 := subs(_X=evalf(e1),p1);
> zero_1 := combine(subs(_X=e1,p1),trig);