Home Online Manual
Back: mp_res_mat
Forward: fglm_solve
FastBack: presolve_lib
FastForward: triang_lib
Up: solve_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.8.3.5 interpolate

Procedure from library solve.lib (see solve_lib).

interpolate(p,v,d); p,v=ideals of numbers, d=integer

Ground field K is the field of rational numbers, p and v are lists of elements of the ground field K with p[j] != -1,0,1, size(p) = n (= number of vars) and size(v)=N=(d+1)^n.

poly f, the unique polynomial f of degree n*d with prescribed values v[i] at the points p(i)=(p[1]^(i-1),..,p[n]^(i-1)), i=1,..,N.

mainly useful when n=1, i.e. f is satisfying f(p^(i-1)) = v[i], i=1..d+1.

LIB "solve.lib";
ring r1 = 0,(x),lp;
// determine f with deg(f) = 4 and
// v = values of f at points 3^0, 3^1, 3^2, 3^3, 3^4
ideal v=16,0,11376,1046880,85949136;
interpolate( 3, v, 4 );
==> 2x4-22x2+36
See also: vandermonde.