Thank you for the quick response. Yes, it looks like refine_root() does the job more efficiently. Thank you for the note.
I am facing issues in getting _find_poly_sign_univariate function to work. When I run from sympy import find_poly_sign, I get the following error: ImportError: cannot import name 'find_poly_sign' from 'sympy' (/path_to_python/python3.8/site-packages/sympy/__init__.py) The documentation of SymPy here <https://docs.sympy.org/latest/search.html?q=find_poly_sign&check_keywords=yes&area=default> does not seem to have this function. Would be great to get some pointers on how to import the function in the code. Best On Tuesday, May 21, 2024 at 4:41:35 PM UTC-7 Oscar wrote: > On Wed, 22 May 2024 at 00:23, Ani J <[email protected]> wrote: > > > > 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. > > See the function _find_poly_sign_univariate in > https://github.com/sympy/sympy/issues/26177 > > That function finds points where a univariate polynomial is nonzero > that separate all roots. > > -- > Oscar > -- 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/f10b9d9e-8fbe-4bbe-ba74-8731a49955acn%40googlegroups.com.
