Thanks for the correction...I've been caught by this before.Maybe just
(%i11) list_of_poly_coeffs(p,x) := (p : expand(p),
makelist(coeff(p,x,k),k,0,hipow(p,x)))$
(%i12) list_of_poly_coeffs(prod(x + k * 4.2b0,k,1,5),x);
(%o12) [1.568294784b5,8.52604704b4,1.66698b4,1.4994b3,6.3b1,1]
BW
macrakis at gmail.com wrote on 09/04/2007 02:11:08 PM:
> On 9/4/07, Barton Willis <willisb at unk.edu> wrote:
> > (%i4) list_of_poly_coeffs(p,x) := (p : rat(p,x),
> > makelist(ratcoef(p,x,k),k,0,hipow(p,x)))$
>
> Alas, this won't work for bfloats. For floats, you can set
> keepfloat:true. If I remember correctly, implementing keepfloat:all
> might be non-trivial because the rat package assumes that coefficients
> are atoms. Or maybe it's enough to change its test (don't have source
> here at work).
>
> -s