bfloat roots of polynomials



maxima-bounces at math.utexas.edu wrote on 09/04/2007 12:12:27 PM:

> Stavros Macrakis wrote:
> > I'd suggest having polyroots take explicit polynomials rather than
> > coefficient vectors as input.
> > 
> >           -s
> 
> Yes.  Laziness on my part, plus I wasn't exactly sure what the correct 
> way was of getting the coefficients from the polynomial.


I think that

  (%i4) list_of_poly_coeffs(p,x) := (p : rat(p,x), 
makelist(ratcoef(p,x,k),k,0,hipow(p,x)))$

works OK:

  (%i5) list_of_poly_coeffs(prod(x + k,k,1,5),x);
  (%o5) [120,274,225,85,15,1]

BW