]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh.1.in
- added numer_denom()
[ginac.git] / ginsh / ginsh.1.in
index 97c0bbbcd508cbb32dc1801e496f0b1060d68d2b..39ece405aa08c11a229ad97801d917d69a6bd158 100644 (file)
@@ -109,6 +109,13 @@ There is also the special
 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
+.RS
+.BI $ number
+.RE
+for example $0, $1 etc.
 .SS LAST PRINTED EXPRESSIONS
 ginsh provides the three special symbols
 .RS
@@ -272,7 +279,7 @@ detail here. Please refer to the GiNaC documentation.
 \- greatest common divisor
 .br
 .BI has( expression ", " expression )
-\- returns "1" if the first expression contains the second as a subexpression, "0" otherwise
+\- returns "1" if the first expression contains the second (which may contain wildcards) as a subexpression, "0" otherwise
 .br
 .BI inverse( matrix )
 \- inverse of a matrix
@@ -292,6 +299,9 @@ detail here. Please refer to the GiNaC documentation.
 .BI lsolve( equation-list ", " symbol-list )
 \- solve system of linear equations
 .br
+.BI match( expression ", " pattern )
+\- check whether expression matches a pattern; returns a list of wildcard substitutions or "FAIL" if there is no match
+.br
 .BI nops( expression )
 \- number of operands in expression
 .br
@@ -301,6 +311,9 @@ detail here. Please refer to the GiNaC documentation.
 .BI numer( expression )
 \- numerator of a rational function
 .br
+.BI numer_denom( expression )
+\- numerator and denumerator of a rational function as a list
+.br
 .BI op( expression ", " number )
 \- extract operand from expression
 .br
@@ -331,7 +344,7 @@ detail here. Please refer to the GiNaC documentation.
 .BI subs( expression ", " relation-or-list )
 .br
 .BI subs( expression ", " look-for-list ", " replace-by-list )
-\- substitute subexpressions
+\- substitute subexpressions (you may use wildcards)
 .br
 .BI tcoeff( expression ", " object )
 \- trailing coefficient of a polynomial