# Can I absolutely rely on CountRoots and RootIntervals?

I have some polynomials of high degree with coefficients of the form a + b Sqrt[5] where a, b are integers (or at least rationals).

I want to rigorously determine when they have all real roots - that means symbolically, and not numerically.

It seems to me that CountRoots and RootIntervals do actually work exactly (presumably via Sturm sequences or similar) when the polynomials have integer coefficients, but do they work correctly and exactly for ANY symbolically defined coefficients?

• No reports of errors on this site. Aug 31 '16 at 3:13
• Sorry, I should have been clearer. Are the implementations in Mathematica known to be implementations of exact algorithms? Aug 31 '16 at 5:04

Yes, CountRoots and RootIntervals use exact algorithms. For non-polynomial functions CountRoots may use numeric integration, but if it does it issues a warning message.
In[1]:= CountRoots[1 - x + Gamma[x], {x, 2 - I, 4 + I}]