# lagrange_polynom

### synopsis: INT lagrange_polynom(OP a,b,c)

### description:

This routine computes the Lagrange polynomial which interpolates at the points in the VECTOR object a (which must be pairwise different), with the values in the VECTOR object b, which must be as long as a, the result is a POLYNOM object c, in one variable.### example:

#include "def.h" #include "macro.h" main() { OP a,b,c; anfang(); a=callocobject(); b=callocobject(); c=callocobject(); m_il_v(2L,a); m_i_i(1L, s_v_i(a,0L)); m_i_i(7L, s_v_i(a,1L)); m_il_v(2L,b); m_i_i(5L, s_v_i(b,0L)); m_i_i(7L, s_v_i(b,1L)); lagrange_polynom(a,b,c);println(c); freeall(a); freeall(b); freeall(c); ende(); }

Send comments or suggestions to:

symmetrica (at) symmetrica.de

this page was automatically generated on So Jan 4 10:36:01 CET 2009 on the machine btn6xf