Hi! Just a (short?) example on how symbols now behave in ginsh after the latest modifications to GiNaC and ginsh: ghost:~/projects/ginsh$ ./ginsh ginsh - GiNaC Interactive Shell V0.3 Copyright (C) 1999 Johannes Gutenberg Universitaet Mainz, Germany This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details.
expand((a+b)^2); expand(('a'+'b')^2); a^2+b^2+2*b*a a^2+b^2+2*b*a a=2; b=-3; 2 -3 expand((a+b)^2); expand(('a'+'b')^2); 1 a^2+b^2+2*b*a x=a+b; y='a'+'b'; -1 b+a x; 'x'; y; 'y'; -1 x -1 y print(x); print('x'); print(y); print('y'); -1 (numeric): hash=2147483649 (0x80000001), flags=11 x (symbol): serial=8, hash=10 (0xa), flags=3 -1 (numeric): hash=2147483649 (0x80000001), flags=11 y (symbol): serial=13, hash=10 (0xa), flags=3 eval(x); eval('x'); eval(x,1); eval('x',1); -1 -1 -1 -1 eval(y); eval('y'); eval(y,1); eval('y',1); -1 -1 -1 a+b expand(x^2); expand('x'^2); 1 x^2 expand(y^2); expand('y'^2); 1 y^2 unassign('a'); unassign('b'); a b x; 'x'; y; 'y'; -1 x a+b y print(x); print('x'); print(y); print('y'); -1 (numeric): hash=2147483649 (0x80000001), flags=11 x (symbol): serial=8, hash=10 (0xa), flags=3 type=3add, hash=0 (0x0), flags=3, nops=2 a (symbol): serial=2, hash=376325877 (0x166e46f5), flags=11 1 (numeric): hash=2147483649 (0x80000001), flags=11 ----- b (symbol): serial=5, hash=659577159 (0x27505947), flags=11 1 (numeric): hash=2147483649 (0x80000001), flags=11 ===== y (symbol): serial=13, hash=10 (0xa), flags=3 eval(x); eval('x'); eval(x,1); eval('x',1); -1 -1 -1 -1 eval(y); eval('y'); eval(y,1); eval('y',1); a+b a+b a+b a+b expand(x^2); expand('x'^2); 1 x^2 expand(y^2); expand('y'^2); a^2+b^2+2*b*a y^2 quit
Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
Hi, I just realized that how difficult it is the HEP! If you are still not believe in it, look at the output of coeff(series(OneLoop3Pt(3,0,0,q10,q20,q21,m1,m2,m3),eps,3),eps,-1); !!! (you can call it from ginsh). This result if be simplified by simplify() of Maple gives -1/4*I*Pi(q10+q20) as expected Could we do something better than normal()?? I see that simplify() of Maple is much better! If not, with such a long output, XLOOPS just be used to show how intelligent we are the HEP physicists, and no more :-) Cheers, So+n.
Hi! On Wed, 20 Oct 1999, Do Hoang Son wrote:
coeff(series(OneLoop3Pt(3,0,0,q10,q20,q21,m1,m2,m3),eps,3),eps,-1); !!!
This result if be simplified by simplify() of Maple gives -1/4*I*Pi(q10+q20) as expected
Hm... I get 3 2 3 2 2 3 2 2 - 1/12 (3 I q10 q20 - 3 I q10 q21 - 3 I q10 q20 + 3 I q10 q21 q20 4 2 4 5 2 3 - 3 I q10 q20 + 2 q10 rho q21 + 3 I q10 q21 + 3 I q20 - 6 I q21 q20 2 4 2 / - 4 q20 rho q21 + 3 I q20 q21 ) Pi / ( / 2 2 2 2 2 (-2 q20 q10 - q21 + q10 + q20 ) (-q21 + q20 )) !? Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
Hi there, upon realizing that Christian's denominator below is (q1-q2)^2*q2^2, and that q10+q21=(q1^2+q1\cdot q2)/q10, it is actually easy to verify that his result and Do Hoang Son's agree, upon further setting rho=0 in the numerator in Christian's result. So normal should see that in this limit, after a bit massage? Herzliche Gruesse aus Harvard, Dirk Christian Bauer wrote:
Hi!
On Wed, 20 Oct 1999, Do Hoang Son wrote:
coeff(series(OneLoop3Pt(3,0,0,q10,q20,q21,m1,m2,m3),eps,3),eps,-1); !!!
This result if be simplified by simplify() of Maple gives -1/4*I*Pi(q10+q20) as expected
Hm... I get
3 2 3 2 2 3 2 2 - 1/12 (3 I q10 q20 - 3 I q10 q21 - 3 I q10 q20 + 3 I q10 q21 q20
4 2 4 5 2 3 - 3 I q10 q20 + 2 q10 rho q21 + 3 I q10 q21 + 3 I q20 - 6 I q21 q20
2 4 2 / - 4 q20 rho q21 + 3 I q20 q21 ) Pi / ( /
2 2 2 2 2 (-2 q20 q10 - q21 + q10 + q20 ) (-q21 + q20 ))
!?
Bye, Christian
-- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
Hi Christian , You are right Christian, I forgot to tell you to take rho to zero. After assigning rho:=0 you will get the same result as Dr. Kreimer mentioned. But you got it by normal() or symplify()? I used normal() and get about 3 pages in length of output while Maple gives us as short as below (befor assign rho:=0). It'll be good if normal() can do that. Have nice weekend, Son. -------- On Thu, 21 Oct 1999, Dirk Kreimer wrote:
Hi there,
upon realizing that Christian's denominator below is (q1-q2)^2*q2^2, and that q10+q21=(q1^2+q1\cdot q2)/q10, it is actually easy to verify that his result and Do Hoang Son's agree, upon further setting rho=0 in the numerator in Christian's result.
So normal should see that in this limit, after a bit massage?
Herzliche Gruesse aus Harvard,
Dirk
Christian Bauer wrote:
Hi!
On Wed, 20 Oct 1999, Do Hoang Son wrote:
coeff(series(OneLoop3Pt(3,0,0,q10,q20,q21,m1,m2,m3),eps,3),eps,-1); !!!
This result if be simplified by simplify() of Maple gives -1/4*I*Pi(q10+q20) as expected
Hm... I get
3 2 3 2 2 3 2 2 - 1/12 (3 I q10 q20 - 3 I q10 q21 - 3 I q10 q20 + 3 I q10 q21 q20
4 2 4 5 2 3 - 3 I q10 q20 + 2 q10 rho q21 + 3 I q10 q21 + 3 I q20 - 6 I q21 q20
2 4 2 / - 4 q20 rho q21 + 3 I q20 q21 ) Pi / ( /
2 2 2 2 2 (-2 q20 q10 - q21 + q10 + q20 ) (-q21 + q20 ))
!?
Bye, Christian
-- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
Hi! On Fri, 22 Oct 1999, Do Hoang Son wrote:
It'll be good if normal() can do that.
Now it can. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
Thanks Christian! It looks good now. but why does it return in the form power(), eg. power(q10,2) instead of q10^2 ? Bye,, Son. ========= On Fri, 22 Oct 1999, Christian Bauer wrote:
Hi!
On Fri, 22 Oct 1999, Do Hoang Son wrote:
It'll be good if normal() can do that.
Now it can.
Bye, Christian
-- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
Hi! On Fri, 22 Oct 1999, Do Hoang Son wrote:
but why does it return in the form power(), eg. power(q10,2) instead of q10^2 ?
/me points at Alexander :^) Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
On Fri, 22 Oct 1999, Christian Bauer wrote:
On Fri, 22 Oct 1999, Do Hoang Son wrote:
but why does it return in the form power(), eg. power(q10,2) instead of q10^2 ?
/me points at Alexander :^)
*** print_awfully_broken_power-code_by_alexander.cpp Fri Oct 22 14:50:52 1999 --- print.cpp Fri Oct 22 16:32:38 1999 *************** *** 66 **** - /* --- 65 ---- *************** *** 72,73 **** - */ - os << "power(" << basis << "," << exponent << ")"; --- 70 ---- 8-) -richy. -- Richard Kreckel <Richard.Kreckel@Uni-Mainz.DE> <http://wwwthep.physik.uni-mainz.de/~kreckel/>
On Fri, 22 Oct 1999, Richard B. Kreckel wrote:
but why does it return in the form power(), eg. power(q10,2) instead of q10^2 ?
*** print_awfully_broken_power-code_by_alexander.cpp Fri Oct 22 14:50:52 1999
I prefer to call it print_fixed_annoying_power_bug-code_by_me.cpp Finally 2^(1/2) is printed in a correct, unambigous, though unusual form. OK, the real reason why I changed this was a bug which occured when I changed expairseq.cpp with the overall_coeff stuff. Deeply inside the check program a huge expression was produced which violated ASSERTs. To investigate it further I wanted to cut and paste this expression to a test programm, but neither print, printtree, printraw nor printcsrc produced a suitable output. Therefore I patched power::print(). Change it back if you prefer, but I think in the long run this should be configurable by an option to print(). -- Alexander Frink E-Mail: Alexander.Frink@Uni-Mainz.DE Institut fuer Physik Phone: +49-6131-393391 Johannes-Gutenberg-Universitaet D-55099 Mainz, Germany
participants (5)
-
Alexander Frink
-
Christian Bauer
-
Dirk Kreimer
-
Do Hoang Son
-
Richard B. Kreckel