Opened 6 years ago
Closed 6 years ago
#17399 closed defect (fixed)
fix coefficients for symbolic series
Reported by:  rws  Owned by:  

Priority:  major  Milestone:  sage6.5 
Component:  symbolics  Keywords:  
Cc:  kcrisman  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Bruno Grenet 
Report Upstream:  N/A  Work issues:  
Branch:  0b9914f (Commits)  Commit:  0b9914f8b6cd4cb0f885f0550bfd375d80495a71 
Dependencies:  #17438  Stopgaps: 
Description (last modified by )
There is no SR.function that gets the coefficients of SR.series; rather, coeffs()
etc give confusing results; truncate()
must be prepended manually.
sage: x=var('x') sage: s=(1/(1x)).series(x,6) sage: s.coeffs() [[x^5 + x^4 + x^3 + x^2 + x + Order(x^6) + 1, 0]] sage: s.coefficient(4) 0
Working around with s.truncate()
is only a fig leaf.
Extracted from http://ask.sagemath.org/question/24968/coefficientsinpolynomialringoversymbolicring/
Change History (12)
comment:1 Changed 6 years ago by
 Description modified (diff)
comment:2 Changed 6 years ago by
 Cc kcrisman added
comment:3 Changed 6 years ago by
 Branch set to u/rws/fix_coefficients_for_symbolic_series
comment:4 Changed 6 years ago by
 Commit set to 32ae67c2fe24800943b883fe7f591bea784e5789
 Status changed from new to needs_review
comment:5 Changed 6 years ago by
 Dependencies set to #17438
 Status changed from needs_review to needs_work
comment:6 Changed 6 years ago by
 Commit changed from 32ae67c2fe24800943b883fe7f591bea784e5789 to 6cd5286d987cf944621fb7666f1756b7785bcd0b
Branch pushed to git repo; I updated commit sha1. New commits:
99820cf  17399: roll back previous commit to allow merge of 17428

d7da52c  17438: implement coeff list

9452fa9  17438: deprecate ex.coeff/coeffs()

0fec129  17438: implement ex.list()

168b659  Merge branch 'u/rws/coefficients_of_symbolic_expressions_revamp' of trac.sagemath.org:sage into t/17399/fix_coefficients_for_symbolic_series

6cd5286  17399: handle series in ex.coefficients()

comment:7 Changed 6 years ago by
 Status changed from needs_work to needs_review
comment:8 Changed 6 years ago by
 Status changed from needs_review to needs_work
You have introduced lines made of blank symbols in src/sage/symbolic/expression.pyx
. Please replace them by empty lines. It seems to be the case also on the code introduced for the related ticket #17348. Maybe you could replace all of them in expression.pyx
at once.
Note. With sed
: sed i e "s/^ *$//" src/sage/symbolic/expression.pyx
.
comment:9 Changed 6 years ago by
 Commit changed from 6cd5286d987cf944621fb7666f1756b7785bcd0b to 0b9914f8b6cd4cb0f885f0550bfd375d80495a71
Branch pushed to git repo; I updated commit sha1. New commits:
0b9914f  17399: remove whitespace changes

comment:10 Changed 6 years ago by
 Status changed from needs_work to needs_review
comment:11 Changed 6 years ago by
 Reviewers set to Bruno Grenet
 Status changed from needs_review to positive_review
Thanks, LGTM.
comment:12 Changed 6 years ago by
 Branch changed from u/rws/fix_coefficients_for_symbolic_series to 0b9914f8b6cd4cb0f885f0550bfd375d80495a71
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
17399: do not let maxima handle ex.series coefficients