Opened 8 years ago
Closed 8 years ago
#731 closed bug (fixed)
problem with latex.lib
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | dontKnow | Milestone: | Release 4-0-0 |
Component: | singular-libs | Version: | 4-0-2 |
Keywords: | latex.lib | Cc: | hannes |
Description
Liebes Singular-Team,
ich habe gerade ein Problem mit latex.lib entdeckt.
Ich glaube es hat etwas damit zu tun, dass man die Schreibweise der Koeffizienten in Ringen mit Parametern geändert hat.
Liebe Grüße,
Oleksandr Iena
Hier ist ein typisches Beispiel.
//-------------------------------- LIB "latex.lib"; //a rather small problem ring q=(0,R),( c), dp; poly f= (R^2-R)*c; f; // this works texobj("", f); //now multiply f by 1/2 f=1/2*f; f; //this gives a wrong result // the fraction is empty //one bracket is either missing or too much texobj("", f); //one can make the problem even worse ring q1=(0,R),( c(1)), dp; poly f= (R^2-R)*c(1); f; // this works texobj("", f); //now multiply f by 1/2 f=1/2*f; f; //this time it does not even return something, //it looks like nothing happens, // one needs to abort the process texobj("", f); $ //---------------------------------------
So sieht es bei mir aus:
SINGULAR / A Computer Algebra System for Polynomial Computations / version 4.0.2 0< by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann \ Feb 2015 FB Mathematik der Universitaet, D-67653 Kaiserslautern \ bug_latex_lib.sng 1> LIB "latex.lib"; // ** loaded /usr/bin/../share/singular/LIB/latex.lib (4.0.0.0,Jun_2013) // ** loaded /usr/bin/../share/singular/LIB/inout.lib (4.0.0.0,Jun_2013) bug_latex_lib.sng 2> bug_latex_lib.sng 3. //a rather small problem bug_latex_lib.sng 4. ring q=(0,R),( c), dp; bug_latex_lib.sng 5> poly f= (R^2-R)*c; bug_latex_lib.sng 6> f; (R2-R)*c bug_latex_lib.sng 7> // this works bug_latex_lib.sng 8. texobj("", f); $$ \begin{array}{rl} & (R^{2}-R)\cdot c\\ \end{array} $$ bug_latex_lib.sng 9> //now multiply f by 1/2 bug_latex_lib.sng 10. f=1/2*f; bug_latex_lib.sng 11> f; (R2-R)/2*c bug_latex_lib.sng 12> //this gives a wrong result bug_latex_lib.sng 13. texobj("", f); $$ \begin{array}{rl} & (R^{2}-R)\frac{}{})\cdot c\\ \end{array} $$ bug_latex_lib.sng 14> bug_latex_lib.sng 15. bug_latex_lib.sng 16. //one can make the problem even worse bug_latex_lib.sng 17. bug_latex_lib.sng 18. ring q1=(0,R),( c(1)), dp; bug_latex_lib.sng 19> //echo=2; bug_latex_lib.sng 20. poly f= (R^2-R)*c(1); bug_latex_lib.sng 21> f; (R^2-R)*c(1) bug_latex_lib.sng 22> // this works bug_latex_lib.sng 23. texobj("", f); $$ \begin{array}{rl} & (R^{2}-R)\cdot c_{1}\\ \end{array} $$ bug_latex_lib.sng 24> //now multiply f by 1/2 bug_latex_lib.sng 25. f=1/2*f; bug_latex_lib.sng 26> f; (R^2-R)/2*c(1) bug_latex_lib.sng 27> //this time it does not even return something, one needs to abort the process bug_latex_lib.sng 28. texobj("", f); // ** Interrupt at cmd:`and` in line:'whileif (!(s[i]>="0" and s[i]<="9")) break;' abort after this command(a), abort immediately(r), print backtrace(b), continue(c) or quit Singular(q) ? halt 2
Attachments (2)
Change History (5)
Changed 8 years ago by
Changed 8 years ago by
Attachment: | latex.2.lib added |
---|
comment:1 Changed 8 years ago by
Cc: | hannes added |
---|
Hallo Oleksandr,
hier ist ein Patch. Dein Beispiel lauft nun durch:
> LIB "latex.lib"; > ring q=(0,R),( c), dp; > poly f= (R^2-R)*c; > f; (R2-R)*c > texobj("", f); $$ \begin{array}{rl} & (R^{2}-R)\cdot c\\ \end{array} $$ > f=1/2*f; > f; (R2-R)/2*c > texobj("", f); $$ \begin{array}{rl} & \frac{R^{2}-R}{2}\cdot c\\ \end{array} $$ > . . ring q1=(0,R),( c(1)), dp; > poly f= (R^2-R)*c(1); > f; (R^2-R)*c(1) > . texobj("", f); $$ \begin{array}{rl} & (R^{2}-R)\cdot c_{1}\\ \end{array} $$ > f=1/2*f; > f; (R^2-R)/2*c(1) > texobj("", f); $$ \begin{array}{rl} & \frac{R^{2}-R}{2}\cdot c_{1}\\ \end{array} $$
Da nun die Ausgabe des Nenners bei Ringen anders ist, je nachdem ob ein Minimalpolynom gesetzt ist, hier noch ein weiterer Test:
ring ra =(0,a),(x,y,z),dp; > poly f = 1/(a2+2)*x2+2/a*x +(a+1)/3; > f; 1/(a2+2)*x2+2/(a)*x+(a+1)/3 // <-- Nenner ausserhalb der Klammer > texpoly("",f); $\frac{1}{a^{2}+2}\cdot x^{2}+\frac{2}{a}\cdot x+\frac{a+1}{3}$ > ring ra_mipo = (0,a),(x,y),dp; > minpoly = a2-a+1; > poly f = 1/(a2+2)*x2+2/a*x +(a+1)/3; > f; (-1/3a+2/3)*x2+(-2a+2)*x+(1/3a+1/3) // <-- Nenner innerhalb der Klammer > texpoly("",f); $-(\frac{1}{3}a-\frac{2}{3})\cdot x^{2}-(2a-2)\cdot x+(\frac{1}{3}a+\frac{1}{3})$
Dies library muesste nun jemand einchecken.
Allgemeine Frage, an wen auch immer:
Weshalb wurde etwas fuer den Typ qring geaendert?
Meine Abfragen
if (typeofd=="ring" or typeofd=="qring")
wurden zu
if (typeofd=="ring") { return(texring("",d));}
bzw.:
if (size(ideal(r))>0) /*qring*/
(Dass attachment ist dopppelt)
comment:2 Changed 8 years ago by
Antwort zur Frage: im Rahmen allgemeinerer Ringe ist der Typ von R/I "ring". (Es gibt keine Objekte vom Typ "qring" in Singular 4)
comment:3 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
fixed with a2ed44a2e1ec64715d6cdec60ca82a014689a3ca
bugfix for denominators