Comment #28 on issue 51 by [email protected]: RootOf for polynomial equations
http://code.google.com/p/sympy/issues/detail?id=51

The proposed API for RootOf is way too complex IMHO. Calling RootOf(...) should do only one thing: construct an object representing a root of some polynomial. Letting it return either a root or a list according to complex rules about the arguments is confusing. The fact that RootOf(poly, 1) returns something completely different from RootOf(poly, True) is particularly bad, I think.

My proposition:
The basic template (and the actual publicly visible structure) of RootOf should be RootOf(poly, k) where poly is a (univariate) Poly and k is an Integer. Anything that can be converted unambiguously to this form should be accepted, but nothing else. This can be done very simply by calling 'poly = Poly(poly)' and 'k = Integer(k)' at the beginning of RootOf.__new__.

Also, I don't understand the remark about multivariate polynomials as I don't see how the concept of root makes sense in that case.

BTW, I find the name 'RootOf' rather weird. Why the 'Of'? Why not simply 'Root' or, to avoid ambiguity, 'PolyRoot'?

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to