Back to Forum | View unanswered posts | View active topics
|
Page 1 of 1
|
[ 3 posts ] |
|
Author |
Message |
coeff
|
Post subject: which function can generate the coefficients of a polynomial Posted: Sat Feb 20, 2016 4:44 am |
|
|
which function can generate the coefficients of a polynomial?
|
|
Top |
|
|
pankajsejwal
|
Post subject: Re: which function can generate the coefficients of a polynomial Posted: Sun Apr 17, 2016 9:17 pm |
|
Joined: Sat Apr 16, 2016 7:25 pm Posts: 8
|
I am not aware of any existing function but this might help,
proc pcoeffs(poly p) { list st; for(int i=0;i<size(p);i++) { st=insert(st,leadcoef(p)); p=p-lead(p); } st=insert(st,leadcoef(p[size(p)])); return(st); }
Usage: ring r = 0,x,dp; > pcoeffs(3x3-2x+4); [1]: 4 [2]: -2 [3]: 3
|
|
Top |
|
|
gorzel
|
Post subject: Re: which function can generate the coefficients of a polynomial Posted: Fri Apr 29, 2016 2:50 pm |
|
Joined: Wed Mar 03, 2010 5:08 pm Posts: 108 Location: Germany, Münster
|
|
Top |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
It is currently Fri May 13, 2022 10:58 am
|
|