|
D.7.2.5 interpolate
Procedure from library solve.lib (see solve_lib).
- Usage:
- interpolate(p,v,d); p,v=ideals of numbers, d=integer
- Assume:
| ground field K are the rational numbers,
p and v consists of elements of the ground field K
with the following number of elements:
size(p) = n and size(v)=N=(d+1)^n with n equals
the number of variables,
p is considered as point in K^n and with
pi=(p[1]^i,..,p[n]^i), i=1,..,N the returned
polynomial f satisfies f(pi) = v[i]
(p[j] != -1,0,1);
|
- Return:
| the unique polynomial f of degree n*d with prescribed
values v at certain points p1,..,pN derived from p;
|
- Note:
- mainly useful when n=1, i.e. f is satisfying
| f(p^(i-1)) = v[i], i=1..d+1
|
Example:
| 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
|
|