I'm not suggesting multiplying it back out, but that if comparing to a
polynomial and the factorization has only one term, compare the
polynomial to that single term. I didn't know about the
is_irreducible() function, lol. Guess that would have worked best for
what I needed.
I think the code that would do what I was suggested would be to add
this before 431:
if isinstance(other, Polynomial):
if len(self) == 1 and self[0][1] == 1:
return cmp(self[0][0], other)
Anyways thanks for the tip about is_irreducible().
--
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/sage-support
URL: http://www.sagemath.org