Back to Forum | View unanswered posts | View active topics
Topic review - HELP, how do you write a polynomial with symbols (*) and (^) |
Author |
Message |
|
|
Post subject: |
Re: HELP, how do you write a polynomial with symbols (*) and (^) |
|
|
thank you very much! I have far too much time with your help.
thank you very much! I have far too much time with your help.
|
|
|
|
Posted: Mon Jul 12, 2010 7:01 pm |
|
|
|
|
|
Post subject: |
Re: HELP, how do you write a polynomial with symbols (*) and (^) |
|
|
The solution to your problem comes with system variable short http://www.singular.uni-kl.de/Manual/la ... htm#SEC380 To see the actual value just enter short; If you set short=0; then the output contains the * and ^ Each time you change the basering, short will be set to its default value which is: short==1; if all varnames are single letters like x,y,z, but short==0; if at least one of the varnames consists of more than one letter, e.g. if you use varname like x1,x2,x3 or indexed variables like x(1),x(2),x(3). This answers your post scriptum (P.D.). N.B. If you write Singular's polynomials to an extern file, not only to use it as input for other programs but for later input to Singular itself, you should always set in advance short=0;, even if the basering does not need the long format with * and ^as input.
The solution to your problem comes with system variable [b]short[/b] http://www.singular.uni-kl.de/Manual/latest/sing_339.htm#SEC380
To see the actual value just enter [b]short;[/b]
If you set [b]short=0;[/b] then the output contains the * and ^
Each time you change the basering, [b]short[/b] will be set to its default value which is:
[b]short==1;[/b] if all varnames are [b]single[/b] letters like [b]x,y,z[/b], but
[b]short==0;[/b] if at least one of the varnames consists of more than one letter, e.g. if you use varname like [b]x1,x2,x3[/b] or indexed variables like [b]x(1),x(2),x(3)[/b].
This answers your post scriptum (P.D.).
N.B. If you write Singular's polynomials to an extern file, not only to use it as input for other programs but for later input to Singular itself, you should [b]always[/b] set in advance [b]short=0;[/b], even if the basering does not need the long format with * and ^as input.
|
|
|
|
Posted: Tue Jul 06, 2010 9:02 pm |
|
|
|
|
|
Post subject: |
HELP, how do you write a polynomial with symbols (*) and (^) |
|
|
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.
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.
|
|
|
|
Posted: Tue Jul 06, 2010 6:06 pm |
|
|
|
|
|
It is currently Fri May 13, 2022 11:06 am
|
|