#20243: Count real roots of polynomials using Sturm sequences
-------------------------------------+-------------------------------------
Reporter: kedlaya | Owner: kedlaya
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-7.2
Component: algebra | Resolution:
Keywords: polynomials, | Merged in:
root-counting, days71 | Reviewers:
Authors: Kiran Kedlaya | Work issues:
Report Upstream: N/A | Commit:
Branch: | e0136a792224bd38b0219d9637686d748551a197
u/kedlaya/count_real_roots_of_polynomials_using_sturm_sequences| Stopgaps:
Dependencies: #20256 |
-------------------------------------+-------------------------------------
Comment (by kedlaya):
Replying to [comment:30 jdemeyer]:
> Replying to [comment:29 kedlaya]:
> > I'm not sure checking the base ring is the right approach; one use
case that was already suggested above is a polynomial over CC which
happens to have real coefficients.
>
> The Sage philosophy is usually that the base ring matters. So, if the
polynomial defined over CC happens to have real coefficients, that's an
accident. It doens't mean that functions expecting real input should work.
Here is a better solution: make the function work on complex inputs! Now I
first attempt a conversion to RR, and if no exception is raised I pass the
(unconverted) input directly to PARI; that way, exact inputs stay exact.
If that fails, I convert to CC (allowing an exception through if it
occurs), and take the GCD of the polynomial with its conjugate (and strip
off the leading coefficient) to get a polynomial with real coefficients
and all the same real roots as before.
--
Ticket URL: <http://trac.sagemath.org/ticket/20243#comment:32>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.