Opened 5 years ago
Closed 3 years ago
#23639 closed defect (fixed)
Strange errors with roots() of polynomials over polynomial rings
Reported by:  mmezzarobba  Owned by:  

Priority:  minor  Milestone:  sage8.9 
Component:  algebra  Keywords:  
Cc:  bruno  Merged in:  
Authors:  Bruno Grenet  Reviewers:  Vincent Delecroix 
Report Upstream:  N/A  Work issues:  
Branch:  3bdb49c (Commits, GitHub, GitLab)  Commit:  3bdb49c8b02d14c01c9e92a95e4a2d52d2e9f1d7 
Dependencies:  Stopgaps: 
Description (last modified by )
sage: pol = GF(3)['x']['y'].one() sage: pol.roots() ... TypeError: unable to coerce <class 'sage.rings.polynomial.ideal.Ideal_1poly_field'> to an integer sage: pol.roots(multiplicities=False) ... ValueError: max() arg is an empty sequence
sage: foo = QQ['k']['n'].one() sage: foo.roots(QQ) ... TypeError: base_ring True must be a ring
Change History (8)
comment:1 Changed 5 years ago by
 Description modified (diff)
 Summary changed from Strange errors with roots() of polynomials over polynomial rings over finite fields to Strange errors with roots() of polynomials over polynomial rings
comment:2 Changed 3 years ago by
 Branch set to u/bruno/23639_strange_errors_with_roots
 Milestone changed from sage8.1 to sage8.9
 Status changed from new to needs_review
comment:3 Changed 3 years ago by
 Commit set to a4ca66e06a54740225ffb45230c1b4574554f7fa
comment:4 Changed 3 years ago by
 Reviewers set to Vincent Delecroix
 Status changed from needs_review to needs_work
Please doctest the error
+ if l < 0: + raise ArithmeticError("roots of 0 are not defined")
comment:5 Changed 3 years ago by
 Commit changed from a4ca66e06a54740225ffb45230c1b4574554f7fa to 3bdb49c8b02d14c01c9e92a95e4a2d52d2e9f1d7
Branch pushed to git repo; I updated commit sha1. New commits:
3bdb49c  23639: Doctest null polynomial

comment:6 Changed 3 years ago by
 Status changed from needs_work to needs_review
comment:7 Changed 3 years ago by
 Status changed from needs_review to positive_review
comment:8 Changed 3 years ago by
 Branch changed from u/bruno/23639_strange_errors_with_roots to 3bdb49c8b02d14c01c9e92a95e4a2d52d2e9f1d7
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Bugs fixed. In order of appearance in the description:
p.roots(...)
at line 1755 ofsrc/sage/rings/polynomial/polynomial_ring.py
had problematic parameters