Home Online Manual
Top
Back: scalarProd
Forward: central_lib
FastBack:
FastForward:
Up: bfun_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document
7.5.2.0. vec2poly
Procedure from library bfun.lib (see bfun_lib).

Usage:
vec2poly(v [,i]); v a vector or an intvec, i an optional int

Return:
poly, an univariate polynomial in i-th variable with coefficients given by v

Purpose:
constructs an univariate polynomial in K[var(i)] with given coefficients,
such that the coefficient at var(i)^{j-1} is v[j].

Note:
The optional argument i must be positive, by default i is 1.

Example:
 
LIB "bfun.lib";
ring r = 0,(x,y),dp;
vector v = gen(1) + 3*gen(3) + 22/9*gen(4);
intvec iv = 3,2,1;
vec2poly(v,2);
==> 22/9y3+3y2+1
vec2poly(iv);
==> x2+2x+3