0.9.5 (<date>)
* Some internal reorganization resulting in a general speed-up.
+* The last 3 evaluated expressions in ginsh are now referred to with the
+ tokens '%', '%%' and '%%%'. The old '"', '""' and '"""' remain for
+ compatibility but may be removed in a future version of GiNaC.
0.9.4 (20 September 2001)
* Functions have better support for external scripting languages.
[[1,1],[2,-1]]
> A+2*M;
[[1,1],[2,-1]]+2*[[1,3],[-3,2]]
-> evalm(");
+> evalm(%);
[[3,7],[-4,3]]
> B = [ [0, 0, a], [b, 1, -b], [-1/a, 0, 0] ];
> evalm(B^(2^12345));
> series(tgamma(x),x==0,3);
x^(-1)-Euler+(1/12*Pi^2+1/2*Euler^2)*x+
(-1/3*zeta(3)-1/12*Pi^2*Euler-1/6*Euler^3)*x^2+Order(x^3)
-> evalf(");
+> evalf(%);
x^(-1)-0.5772156649015328606+(0.9890559953279725555)*x
-(0.90747907608088628905)*x^2+Order(x^3)
> series(tgamma(2*sin(x)-2),x==Pi/2,6);
-Euler-1/12+Order((x-1/2*Pi)^3)
@end example
-Here we have made use of the @command{ginsh}-command @code{"} to pop the
+Here we have made use of the @command{ginsh}-command @code{%} to pop the
previously evaluated element from @command{ginsh}'s internal stack.
If you ever wanted to convert units in C or C++ and found this is
(Note the absence of "x".)
> expand((sin(x)+sin(y))*(a+b));
sin(y)*a+sin(x)*b+sin(x)*a+sin(y)*b
-> find(",sin($1));
+> find(%,sin($1));
@{sin(y),sin(x)@}
@end example
AC_PROG_INSTALL
AC_LANG_CPLUSPLUS
-AM_PATH_GINAC(0.7.0, [
+AM_PATH_GINAC(0.9.0, [
LIBS="$LIBS $GINACLIB_LIBS"
CPPFLAGS="$CPPFLAGS $GINACLIB_CPPFLAGS"
], AC_MSG_ERROR([need to have GiNaC installed]))
.SS LAST PRINTED EXPRESSIONS
ginsh provides the three special symbols
.RS
-", "" and """
+%, %% and %%%
.RE
that refer to the last, second last, and third last printed expression, respectively.
These are handy if you want to use the results of previous computations in a new
[[\-x+x^2\-2,(x+1)^2],[c,d]]
> determinant(M);
\-2*d\-2*x*c\-x^2*c\-x*d+x^2*d\-c
-> collect(", x);
+> collect(%, x);
(\-d\-2*c)*x+(d\-c)*x^2\-2*d\-c
> solve quantum field theory;
parse error at quantum