evalf() and collect()...

Richard B. Kreckel kreckel at ThEP.Physik.Uni-Mainz.DE
Thu Mar 2 15:22:51 CET 2000


...don't commute.  But there is more:

squark:~$ ginsh
ginsh - GiNaC Interactive Shell (GiNaC V0.5.3)
  __,  _______  Copyright (C) 1999-2000 Johannes Gutenberg University Mainz,
 (__) *       | Germany.  This is free software with ABSOLUTELY NO WARRANTY.
  ._) i N a C | You are welcome to redistribute it under certain conditions;
<-------------' see the file COPYING for details.

Type ?? for a list of help topics.
> series(gamma(x),x,0,2);
-EulerGamma+Order(x^2)+(1/12*Pi^2+1/2*EulerGamma^2)*x+x^(-1)
> collect(",x);
-EulerGamma+Order(x^2)+(1/12*Pi^2+1/2*EulerGamma^2)*x+x^(-1)
> evalf(");
-0.5772156649015328606L0+(0.98905599532797255544L0)*x+Order(x^(2.0L0))+x^(-1.0L0)
> quit;
squark:~$ ginsh
ginsh - GiNaC Interactive Shell (GiNaC V0.5.3)
  __,  _______  Copyright (C) 1999-2000 Johannes Gutenberg University Mainz,
 (__) *       | Germany.  This is free software with ABSOLUTELY NO WARRANTY.
  ._) i N a C | You are welcome to redistribute it under certain conditions;
<-------------' see the file COPYING for details.

Type ?? for a list of help topics.
> series(gamma(x),x,0,2);
-EulerGamma+Order(x^2)+(1/12*Pi^2+1/2*EulerGamma^2)*x+x^(-1)
> evalf(");
-0.5772156649015328606L0+(0.98905599532797255544L0)*x+Order(x^(2.0L0))+x^(-1.0L0)
> collect(",x);
Not a 32-bit integer: -9223372028264841217
squark:~$

In any case, exponents should remain integer and even rational.

Cheers
    -rbk.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list