]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh.1.in
- added find() (like has(), but returns list of all occurrences)
[ginac.git] / ginsh / ginsh.1.in
index 39ece405aa08c11a229ad97801d917d69a6bd158..5f780648f980317baed030827422dd7b904182d0 100644 (file)
@@ -110,8 +110,8 @@ symbol that controls the numeric precision of calculations with inexact numbers.
 Assigning an integer value to digits will change the precision to the given
 number of decimal places.
 .SS WILDCARDS
-The has(), match() and subs() functions accept wildcards as placeholders for
-expressions. These have the syntax
+The has(), find(), match() and subs() functions accept wildcards as placeholders
+for expressions. These have the syntax
 .RS
 .BI $ number
 .RE
@@ -191,22 +191,20 @@ Lists are used by the
 .B subs
 and
 .B lsolve
-functions. A list consists of an opening square bracket
+functions. A list consists of an opening curly brace
+.RB ( { ),
+a (possibly empty) comma-separated sequence of expressions, and a closing curly
+brace
+.RB ( } ).
+.SS MATRICES
+A matrix consists of an opening square bracket
 .RB ( [ ),
-a (possibly empty) comma-separated sequence of expressions, and a closing square
-bracket
+a non-empty comma-separated sequence of matrix rows, and a closing square bracket
+.RB ( ] ).
+Each matrix row consists of an opening square bracket
+.RB ( [ ),
+a non-empty comma-separated sequence of expressions, and a closing square bracket
 .RB ( ] ).
-.SS MATRICES
-A matrix consists of an opening double square bracket
-.RB ( [[ ),
-a non-empty comma-separated sequence of matrix rows, and a closing double square
-bracket
-.RB ( ]] ).
-Each matrix row consists of an opening double square bracket
-.RB ( [[ ),
-a non-empty comma-separated sequence of expressions, and a closing double square
-bracket
-.RB ( ]] ).
 If the rows of a matrix are not of the same length, the width of the matrix
 becomes that of the longest row and shorter rows are filled up at the end
 with elements of value zero.
@@ -248,6 +246,9 @@ detail here. Please refer to the GiNaC documentation.
 .BI content( expression ", " symbol )
 \- content part of a polynomial
 .br
+.BI decomp_rational( expression ", " symbol )
+\- decompose rational function into polynomial and proper rational function
+.br
 .BI degree( expression ", " object )
 \- degree of a polynomial
 .br
@@ -272,9 +273,15 @@ detail here. Please refer to the GiNaC documentation.
 .BI evalf( "expression [" ", " level] )
 \- evaluates an expression to a floating point number
 .br
+.BI evalm( expression )
+\- evaluates sums, products and integer powers of matrices
+.br
 .BI expand( expression )
 \- expands an expression
 .br
+.BI find( expression ", " expression )
+\- returns a list of all occurrences of a pattern in an expression
+.br
 .BI gcd( expression ", " expression )
 \- greatest common divisor
 .br
@@ -440,12 +447,12 @@ x
 (x+1)^(\-2)*(\-x+x^2\-2)
 > series(sin(x),x==0,6);
 1*x+(\-1/6)*x^3+1/120*x^5+Order(x^6)
-> lsolve([3*x+5*y == 7], [x, y]);
-[x==\-5/3*y+7/3,y==y]
-> lsolve([3*x+5*y == 7, \-2*x+10*y == \-5], [x, y]);
-[x==19/8,y==\-1/40]
-> M = [[ [[a, b]], [[c, d]] ]];
-[[ [[\-x+x^2\-2,(x+1)^2]], [[c,d]] ]]
+> lsolve({3*x+5*y == 7}, {x, y});
+{x==\-5/3*y+7/3,y==y}
+> lsolve({3*x+5*y == 7, \-2*x+10*y == \-5}, {x, y});
+{x==19/8,y==\-1/40}
+> M = [ [a, b], [c, d] ];
+[[\-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);