Charles Greathouse on Mon, 06 Nov 2023 20:13:52 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Testing numbers to see if they look algebraic


It often happens that I'm looking to see if a number is algebraic, but I'm not sure what degree it might be or how complex the polynomial might be. I tend to run a loop like

\p1000
for(n=2,100, if(#Str(algdep(x, n)) < 750, print("Possibly algebraic of degree ", n)))

adjusting the degrees, precision, and character tolerance (generrally 75-80% of the precision) as needed. If it finds something, I can eyeball the polynomial and replicate with higher precision (and possibly, depending on the definition of x, prove the relation).

Is there a better way to do this sort of exploratory analysis? (Of course a more complicated version with lindep can search for versions with known transcendental constants as well.)