Normal() again

Christian Bauer cbauer at ThEP.Physik.Uni-Mainz.DE
Mon Nov 22 17:15:21 CET 1999


Hi!

On Fri, 19 Nov 1999, Do Hoang Son wrote:
> > normal(q10^2-q10^4*(q10^2-q21^2)^(-1)+q21^2*q10^2*(q10^2-q21^2)^(-1));
> power::eval(): division by zero

Fixed.

> Maybe the next bug is related to the above one:

No.

> normal(q10^2*(I*Pi^2*(q10^2-q21^2)^(-1/2)*q10^2*(-(1/2)*(q10^2-q21^2)^(-1/2)*q10^2+(1/2)*q21^2*(q10^2-q21^2)^(-1/2))+1/2*I*Pi^2*q10^2));
> q10^2*(1/2*I*Pi^2*q21^2*(q10^2-q21^2)^(-1)*q10^2-1/2*I*Pi^2*(q10^2-q21^2)^(-1)*q10^4+1/2*I*Pi^2*q10^2)
> > normal(");
> 0

This is caused by (x^(1/2))^2 being treated (during normal()) as foobar^2
and not being further evaluated until foobar gets re-inserted in the very
end. A workaround is to call expand() before normal().

Bye,
Christian

-- 
  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/




More information about the GiNaC-devel mailing list