From cbauer at ThEP.Physik.Uni-Mainz.DE Fri Oct 8 16:42:05 1999 From: cbauer at ThEP.Physik.Uni-Mainz.DE (Christian Bauer) Date: Fri, 8 Oct 1999 16:42:05 +0200 (CEST) Subject: ginsh symbols example Message-ID: <Pine.LNX.3.96.991008163837.20282B-100000@ghost.physik.uni-mainz.de> 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/ From dhson at ThEP.Physik.Uni-Mainz.DE Wed Oct 20 18:14:09 1999 From: dhson at ThEP.Physik.Uni-Mainz.DE (Do Hoang Son) Date: Wed, 20 Oct 1999 18:14:09 +0200 (CEST) Subject: normal() In-Reply-To: <Pine.LNX.3.96.991008163837.20282B-100000@ghost.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991020171005.3978C-100000@higgs.physik.uni-mainz.de> 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. From cbauer at ThEP.Physik.Uni-Mainz.DE Thu Oct 21 19:47:39 1999 From: cbauer at ThEP.Physik.Uni-Mainz.DE (Christian Bauer) Date: Thu, 21 Oct 1999 19:47:39 +0200 (CEST) Subject: normal() In-Reply-To: <Pine.LNX.3.96.991020171005.3978C-100000@higgs.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991021194546.26913A-100000@ghost.physik.uni-mainz.de> 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/ From kreimer at ThEP.Physik.Uni-Mainz.DE Thu Oct 21 21:59:22 1999 From: kreimer at ThEP.Physik.Uni-Mainz.DE (Dirk Kreimer) Date: Thu, 21 Oct 1999 15:59:22 -0400 Subject: normal() References: <Pine.LNX.3.96.991021194546.26913A-100000@ghost.physik.uni-mainz.de> Message-ID: <380F709A.8F2227E9@thep.physik.uni-mainz.de> 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/ From dhson at ThEP.Physik.Uni-Mainz.DE Fri Oct 22 12:22:11 1999 From: dhson at ThEP.Physik.Uni-Mainz.DE (Do Hoang Son) Date: Fri, 22 Oct 1999 12:22:11 +0200 (CEST) Subject: normal() In-Reply-To: <380F709A.8F2227E9@thep.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991022120141.5942A-100000@ghost.physik.uni-mainz.de> 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/ > From cbauer at ThEP.Physik.Uni-Mainz.DE Fri Oct 22 14:46:38 1999 From: cbauer at ThEP.Physik.Uni-Mainz.DE (Christian Bauer) Date: Fri, 22 Oct 1999 14:46:38 +0200 (CEST) Subject: normal() In-Reply-To: <Pine.LNX.3.96.991022120141.5942A-100000@ghost.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991022144537.7864A-100000@ghost.physik.uni-mainz.de> 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/ From dhson at ThEP.Physik.Uni-Mainz.DE Fri Oct 22 15:57:10 1999 From: dhson at ThEP.Physik.Uni-Mainz.DE (Do Hoang Son) Date: Fri, 22 Oct 1999 15:57:10 +0200 (CEST) Subject: normal() In-Reply-To: <Pine.LNX.3.96.991022144537.7864A-100000@ghost.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991022153211.8311A-100000@ghost.physik.uni-mainz.de> 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/ > From cbauer at ThEP.Physik.Uni-Mainz.DE Fri Oct 22 16:16:12 1999 From: cbauer at ThEP.Physik.Uni-Mainz.DE (Christian Bauer) Date: Fri, 22 Oct 1999 16:16:12 +0200 (CEST) Subject: normal() In-Reply-To: <Pine.LNX.3.96.991022153211.8311A-100000@ghost.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991022161540.9343A-100000@higgs.physik.uni-mainz.de> 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/ From kreckel at ThEP.Physik.Uni-Mainz.DE Fri Oct 22 16:38:26 1999 From: kreckel at ThEP.Physik.Uni-Mainz.DE (Richard B. Kreckel) Date: Fri, 22 Oct 1999 16:38:26 +0200 (CEST) Subject: normal() In-Reply-To: <Pine.LNX.3.96.991022161540.9343A-100000@higgs.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991022163304.9369A-100000@higgs.physik.uni-mainz.de> 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 at Uni-Mainz.DE> <http://wwwthep.physik.uni-mainz.de/~kreckel/> From Alexander.Frink at Uni-Mainz.DE Mon Oct 25 16:04:38 1999 From: Alexander.Frink at Uni-Mainz.DE (Alexander Frink) Date: Mon, 25 Oct 1999 16:04:38 +0200 (CEST) Subject: normal() In-Reply-To: <Pine.LNX.3.96.991022163304.9369A-100000@higgs.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991025155322.9551E-100000@gluon.physik.uni-mainz.de> 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 at Uni-Mainz.DE Institut fuer Physik Phone: +49-6131-393391 Johannes-Gutenberg-Universitaet D-55099 Mainz, Germany From kreckel at ThEP.Physik.Uni-Mainz.DE Sun Oct 31 17:50:29 1999 From: kreckel at ThEP.Physik.Uni-Mainz.DE (Richard B. Kreckel) Date: Sun, 31 Oct 1999 17:50:29 +0100 (CET) Subject: Consider this... Message-ID: <Pine.LNX.3.96.991031174714.506A-100000@higgs.physik.uni-mainz.de> 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. > (1+x)*(1-I); 1-I*x+1-I > print("); type=3add, hash=1 (0x1), flags=3, nops=2 x (symbol): serial=2, hash=0 (0x0), flags=3 1-I (numeric): hash=2147483649 (0x80000001), flags=11 ----- overall_coeff 1-I (numeric): hash=2147483649 (0x80000001), flags=11 ===== From Alexander.Frink at Uni-Mainz.DE Sun Oct 31 18:00:27 1999 From: Alexander.Frink at Uni-Mainz.DE (Alexander Frink) Date: Sun, 31 Oct 1999 18:00:27 +0100 (CET) Subject: Consider this... In-Reply-To: <Pine.LNX.3.96.991031174714.506A-100000@higgs.physik.uni-mainz.de> Message-ID: <Pine.LNX.3.96.991031175734.500B-100000@higgs.physik.uni-mainz.de> On Sun, 31 Oct 1999, Richard B. Kreckel wrote: > > (1+x)*(1-I); > 1-I*x+1-I Similar to the 2^1/2 problem, numeric::print() should be checked. One might discuss if it is reasonable to automatically expand complex numbers like in 3*(x+y) -> 3*x + 3*y or restrict to real numbers only. -- Alexander Frink E-Mail: Alexander.Frink at Uni-Mainz.DE Institut fuer Physik Phone: +49-6131-393391 Johannes-Gutenberg-Universitaet D-55099 Mainz, Germany