Further routines Polynomials Selections Making and building

Making and building

The routines for making or building are the following ones:
Example:
main()
{
OP a,b,c;
anfang();
a = callocobject();
b = callocobject();
c = callocobject();
m_il_v(2,a);m_i_i(1L,s_v_i(a,0L)); m_i_i(2L,s_v_i(a,1L));
m_i_i(7L,b);
b_skn_po(a,b,NULL,c);
println(c);
freeall(c);
ende();
}

The output is the polynomial 7ab2.

As in the other cases, too, if we use m_skn_po instead of b_skn_po, we work with copies of the self part, next part and koeff part. So we have to call freeall(b) and freeall(c) at the end of the routine:
Example:
main()
{
OP a,b,c;
anfang();
a = callocobject(); b = callocobject(); c = callocobject();
m_il_v(2,a);m_i_i(1L,s_v_i(a,0L)); m_i_i(2L,s_v_i(a,1L));
m_i_i(7L,b);
m_skn_po(a,b,NULL,c);
println(c); 
freeall(a); freeall(b); freeall(c);
ende();
}
Here the output is the polynomial 7ab2 again.
The routines
b_s_po,m_s_po
help to generate a POLYNOMobject, where the self-part is given by the self parameter and the coefficent is given by the INTEGERobject 1. The next part is NULL, which means we have a POLYNOMobject which consists only of one MONOM object.
harald.fripertinger "at" uni-graz.at, May 26, 2011

Further routines Polynomials Selections Uni-Graz Mathematik Making and building Valid HTML 4.0 Transitional Valid CSS!