HELP, how do you write a polynomial with symbols (*) and (^)
ber · Tue Jul 06, 2010 6:06 pm
Write polynomials in a text file with "write". Singular keeps to the agreement to omit the signs of the product (*) and power (^) between the variables. For example:
ring R=0, (x,y), dp;
poly P=xy2;
P;
=> xy2
I need to write it this way:
=> x*y^2
And then export it.
Singular How can I write in the symbols I need?
Other exemple,
ring R=0, (x,y,z,t,s), dp;
poly Qs=x2+y2-z2-st2;
poly S=x3+y3+z3+xyz+t3;
string sQs=print(Qs,"%s");
string sS=print(S,"%s");
def T=ramificacion_1param(Qs,S); //the calculation procedure
setring T;
divisor_r;
string fichero_text1="divisor_r_unos_Q_"+sQs+"_S_"+sS+".txt";
string fichero_text2="cuadrados_Q_"+sQs+"_S_"+sS+".txt";
write(":w "+fichero_text1,divisor_r_unos);
write(":w "+fichero_text2,cuadrados_R1);
PD: when one defines a ring R = 0 (x (1 .. 3)), dp, Singular shows the polynomial with symbols, but when i define the ring different variable, for example, R = 0 (x, y , Z), dp; shown without symbols.
ring R=0, (x,y), dp;
poly P=xy2;
P;
=> xy2
I need to write it this way:
=> x*y^2
And then export it.
Singular How can I write in the symbols I need?
Other exemple,
ring R=0, (x,y,z,t,s), dp;
poly Qs=x2+y2-z2-st2;
poly S=x3+y3+z3+xyz+t3;
string sQs=print(Qs,"%s");
string sS=print(S,"%s");
def T=ramificacion_1param(Qs,S); //the calculation procedure
setring T;
divisor_r;
string fichero_text1="divisor_r_unos_Q_"+sQs+"_S_"+sS+".txt";
string fichero_text2="cuadrados_Q_"+sQs+"_S_"+sS+".txt";
write(":w "+fichero_text1,divisor_r_unos);
write(":w "+fichero_text2,cuadrados_R1);
PD: when one defines a ring R = 0 (x (1 .. 3)), dp, Singular shows the polynomial with symbols, but when i define the ring different variable, for example, R = 0 (x, y , Z), dp; shown without symbols.