I tried a minimal example for kStd and I didn't get the same answer the interpreter gives. What am I doing wrong? Is it one of the parameters of kStd?
Thanks!
char **nm=(char**)omalloc(3*sizeof(char*)); nm[0]=omStrDup("x"); nm[1]=omStrDup("y"); nm[2]=omStrDup("z"); R=rDefault(0,3,nm); rChangeCurrRing(R);
// create the polynomial 3x^2y^22xy^3+3x^2 p1 = p_ISet(3,R); pSetExp(p1,1,2); pSetExp(p1,2,2); p2 = p_ISet(2,R); pSetExp(p2,1,1); pSetExp(p2,2,3); p1 = p_Add_q(p1, p2, R); p2 = p_ISet(3,R); pSetExp(p2,1,2); p1 = p_Add_q(p1, p2, R);
// 2x^3y3x^2y^2+3y^2 p2 = p_ISet(2, R); pSetExp(p2, 1, 3); pSetExp(p2, 2, 1); p3 = p_ISet(3, R); pSetExp(p3, 1, 2); pSetExp(p3, 2, 2); p2 = p_Add_q(p2, p3, R); p3 = p_ISet(3, R); pSetExp(p3, 2, 2); p2 = p_Add_q(p2, p3, R);
// 2z p3 = p_ISet(2,R); pSetExp(p3, 3, 1); I=idInit(3); id_InsertPolyWithTests(I, 0, p1, true, true, R); id_InsertPolyWithTests(I, 1, p2, true, true, R); id_InsertPolyWithTests(I, 2, p3, true, true, R);
J = kStd(I, NULL, testHomog, NULL, NULL, 0, 0, NULL); for ( int i = 0; i < idSize(J); i++ ) pWrite(J>m[i]);

