Ask Your Question
2

LaurentPolynomial can't factor constants

asked 2018-12-23 22:28:33 +0100

liu.henry.hl gravatar image

updated 2023-01-09 23:59:48 +0100

tmonteil gravatar image

Hi all,

Many LaurentPolynomials throw errors when I try to factor them. For example:

sage: R.<x,y> = LaurentPolynomialRing(QQ)
sage: R.one().factor()
AttributeError: ...
sage: (x^-1).factor()
AttributeError: ...

This seems to come from the unit part of Polynomial.factor() sometimes (incorrectly) living in Integer Ring, and sometimes (correctly) living in whatever self.parent() is.

Is this intentional or a bug?

Thanks,

Henry

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-12-24 10:19:51 +0100

slelievre gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-12-23 22:28:33 +0100

Seen: 647 times

Last updated: Dec 24 '18