[GiNaC-list] bug(?) in clifford_moebius_map

Sheplyakov Alexei varg at theor.jinr.ru
Mon Oct 31 12:00:43 CET 2005


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20051031/52b45a38/attachment.pgp


More information about the GiNaC-list mailing list