On Tuesday, May 21, 2024 at 3:49:12 PM UTC-7 Oscar wrote:
On Tue, 21 May 2024 at 22:02, Aaron Meurer <[email protected]> wrote: > > IMO, we should just fix the function to not return intersecting > endpoints in the first place. The intervals aren't really isolating if > they intersect. For rational roots the intervals are of length 0. For irrational roots the root lies in the interior of the interval. In other words what is returned is a set of individual rational points and open intervals on the real line. An open interval might be bounded by one of the rational points but they do not intersect because the interval does not contain its boundary. For rational roots the intervals may not be of length 0. Consider the following program: - from sympy import Poly - from sympy.abc import x - from sympy import div, ZZ, QQ, RR - print(Poly(4*x**2 - 9, x, domain='QQ').intervals()) The polynomial 4x^2 - 9 has rational roots, whereas the output of the print statement is: [((-2, -1), 1), ((1, 2), 1)] All intervals here are of length more than 0. It would be great if in general it is possible that the endpoints of different intervals are never the same. Because, in my use case, I would like to use the points between the endpoints of two consecutive intervals and not inside any interval to find out the sign of the polynomial. For example., with the above two intervals (-2,-1), (1,2) , I would use the points -3,0,3 note that all points are outside the intervals and lie in particular regions not in the intervals. I would like to use these points to find out the sign of the polynomial (4x^2-9) in my use case. It would be great if the tool itself gives separate intervals. Thanking you Best -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/941f206f-b5d1-4eeb-b682-31e1d8a57781n%40googlegroups.com.
