Oh! I see, but i believe that the intervals overlap on the endpoints, is it 
possible to make the intervals completely disjoint??
For example consider the following program:


   - from sympy import Poly
   - from sympy.abc import x
   - from sympy import div, QQ
   - p = Poly(x**6 + 19/5*x**5 + 131/50*x**4 - x**2 - 19/5*x - 131/50, x, 
   domain='QQ')
   - p.intervals()

The intervals that this outputs is: [((-3, -2), 1), ((-1, -1), 1), ((-1, 
0), 1), ((1, 1), 1)]

Here we can see that the point -1 is a common endpoint between the second 
and 

the third term. Is it possible to enforce that there be no common point?


Best

On Tuesday, May 21, 2024 at 10:27:15 AM UTC-7 asme...@gmail.com wrote:

> Yes, this is the case. The documentation for this method could perhaps
> be improved, but the key word is "isolating", meaning each interval
> contains exactly one root. You can also read more about the algorithm
> that is referenced in the docstring
> https://en.wikipedia.org/wiki/Vincent%27s_theorem
>
> Aaron Meurer
>
>
> On Tue, May 21, 2024 at 9:18 AM Chris Smith <smi...@gmail.com> wrote:
> >
> > I strongly suspect that the roots returned by `Poly.intervals` have only 
> one root in them (by definition). If you use `refine_root(lo,hi,eps)` to 
> refine the root bounds to arbitrary width and give it an interval in which 
> there is more than one root, it will raise an error.
> >
> > /c
> > On Tuesday, May 21, 2024 at 6:06:14 AM UTC-5 ani...@gmail.com wrote:
> >>
> >> Is it possible to use SymPy library to get intervals (with rational 
> endpoints) such that there is exactly one root in the interval? I would 
> like to use an implementation of RRI algorithm for my purpose. I believe 
> that the interval function does this. Is this correct? Is it guaranteed 
> that the output intervals are guaranteed to not have any common points?
> >>
> >>
> > --
> > You received this message because you are subscribed to the Google 
> Groups "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sympy+un...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/807f8910-040d-475b-91b6-a5002cedeea0n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/884eb7ff-0762-4771-a81f-930c13dada2dn%40googlegroups.com.

Reply via email to