#19910 closed defect (duplicate)
degree is very slow on QQbar
Reported by: | zimmerma | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | basic arithmetic | Keywords: | |
Cc: | thome | Merged in: | |
Authors: | Reviewers: | Jeroen Demeyer | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
consider this with Sage 6.10:
sage: b=(QQ['x'](x^17-x+1)).roots(QQbar)[0][0] sage: a=(QQ['x'](x^3-x+1)).roots(QQbar)[0][0] sage: a.degree() 3 sage: b.degree() 17 sage: a -1.324717957244746? sage: b -1.042917732301787? sage: a+b -2.367635689546533? sage: %time (a+b).degree() CPU times: user 3.65 s, sys: 0 ns, total: 3.65 s Wall time: 3.64 s 51
Why does it takes more than 3 seconds to compute 3*17
?
Change History (7)
comment:1 Changed 5 years ago by
- Milestone changed from sage-7.1 to sage-duplicate/invalid/wontfix
- Reviewers set to Jeroen Demeyer
- Status changed from new to needs_review
comment:2 Changed 5 years ago by
- Status changed from needs_review to positive_review
comment:3 Changed 5 years ago by
comment:4 Changed 5 years ago by
All right, x1000 improvement with #18356 (needs review)
sage: b=(QQ['x'](x^17-x+1)).roots(QQbar)[0][0] sage: pb = b.minpoly() sage: a=(QQ['x'](x^3-x+1)).roots(QQbar)[0][0] sage: pa = a.minpoly() sage: %time p = pa.composed_op(pb, operator.add) CPU times: user 4 ms, sys: 0 ns, total: 4 ms Wall time: 3.04 ms sage: p.degree() 51
comment:5 Changed 5 years ago by
All right, x1000 improvement with #18356 (needs review)
excellent! Paul
comment:6 Changed 5 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
comment:7 Changed 5 years ago by
Note: See
TracTickets for help on using
tickets.
Duplicate of #18333.