Making and building |
which stand for
m_skn_po, b_skn_po, b_s_po, m_s_po,
make_self_koeff_next_polynom,
build_self_koeff_next_polynom,
build_self_polynom,
make_self_polynom.
INT b_skn_po(OP s,k,n,p), INT m_skn_po(OP s,k,n,p),
INT b_s_po(OP s,p), INT m_s_po(OP s,p),
Example: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:
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.
Example:The routinesHere the output is the polynomial 7ab2 again.
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(); }
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.
b_s_po,m_s_po
Making and building |