bug(?) in clifford_moebius_map
Hello! I've noticed that example code from cs.MS/0410044 ("An Example of Clifford Algebras Calculations with GiNaC") does not work. $ g++ -O0 -g -o parabolic parabolic1-bin.cpp `ginac-config --libs` $ ./parabolic Metric is: e. *** Got problem in vector fields: Expression is a non-scalar Clifford number! *** Got problem in vector fields: Expression is a non-scalar Clifford number! *** Got problem in vector fields: Expression is a non-scalar Clifford number! Vect field Direct In Cayley In Cayley1 Segmentation fault (core dumped) $ ginac-config --version 1.3.3 $ g++ --version g++ (GCC) 4.0.3 20051023 (prerelease) (Debian 4.0.2-3) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I think the reason is that clifford_moebius_map mixes matrices and indexed expressions. $ gdb --silent ./parabolic [some boring stuff snipped] (gdb) break clifford.cpp:1023 (gdb) bt #0 GiNaC::clifford_moebius_map (a=@0x8088548, b=@0x808854c, c=@0x8088550, d=@0x8088554, v=@0x5ca926d4, G=@0x5ca926d0, rl=0 '\0') at clifford.cpp:1203 #1 0x2e89292e in GiNaC::clifford_moebius_map (M=@0x5ca9205c, v=@0x5ca926d4, G=@0x5ca926d0, rl=0 '\0') at clifford.cpp:1210 #2 0x2e8929fb in GiNaC::clifford_moebius_map (M=@0x5ca9205c, v=@0x5ca926d4, G=@0x5ca926d0) at clifford.cpp:1217 #3 0x08052acf in main (argc=1, argv=0x5ca94034) at parabolic1-bin.cpp:604 (gdb) frame 0 #0 GiNaC::clifford_moebius_map (a=@0x8088548, b=@0x808854c, c=@0x8088550, d=@0x8088554, v=@0x5ca926d4, G=@0x5ca926d0, rl=0 '\0') at clifford.cpp:1203 1203 return clifford_to_lst(e, cu, false); (gdb) call e.dbgprint() e~symbol13*[[x],[y]].symbol13*exp(t)*exp(-t)^(-1) (gdb) Due to this meaningless combination of matrix and indexed expression clifford_to_lst fails, and since the example code is not really bullet-proof, the end result is a segfault. Any ideas? Best regards, Alexei -- All science is either physics or stamp collecting.
"SA" == Sheplyakov Alexei <varg@theor.jinr.ru> writes:
SA> Hello! I've noticed that example code from cs.MS/0410044 ("An SA> Example of Clifford Algebras Calculations with GiNaC") does not SA> work. Thank you very much for pointing out. It did have some float point evaluation problem with new version of libraries. I have replaced the paper at arXiv.org already with new version which works with current GiNaC CVS. Best wishes, -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/
Hello, On Mon, Oct 31, 2005 at 04:11:14PM +0000, Vladimir Kisil wrote:
"SA" == Sheplyakov Alexei <varg@theor.jinr.ru> writes:
SA> Hello! I've noticed that example code from cs.MS/0410044 ("An SA> Example of Clifford Algebras Calculations with GiNaC") does not SA> work.
It did have some float point evaluation problem with new version of libraries.
In my case it did not even reach that far due to errors in clifford_moebius_map.
I have replaced the paper at arXiv.org already with new version
Actually, the code in the paper was OK (modulo minor issues like missing #include <cmath>, BTW, it is better to NOT #include <math.h> in C++ code unless you *really* know what are you doing).
which works with current GiNaC CVS.
Old version works with HEAD too. I've missed that comment about version (moreover, the abstract says 1.3 is good enough). So, the actual problem is that clifford_moebius_map in GiNaC 1.3 is broken. Thanks, Alexei -- All science is either physics or stamp collecting.
"SA" == Sheplyakov Alexei <varg@theor.jinr.ru> writes:
SA> Actually, the code in the paper was OK (modulo minor issues like SA> missing #include <cmath>, BTW, it is better to NOT #include SA> <math.h> in C++ code unless you *really* know what are you SA> doing). No, I did not aware of it, thanks for telling me. I have replaced the paper at arXiv.org once more to correct this. SA> version (moreover, the abstract says 1.3 is good enough). So, SA> the actual problem is that clifford_moebius_map in GiNaC 1.3 is SA> broken. As far as I remember this is the bug which leads to dummy index renaming and some other changes outside of clifford.cpp. It seems to be difficult (if ever possible) to fix it within the 1.3 branch, hopefully the 1.4 release will follow within a reasonable time. However if one do need my example to run through 1.3 branch then the first version of the code is still available on arXiv.org and should be working with it. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/
participants (2)
-
varg@theor.jinr.ru
-
Vladimir Kisil