X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginsh%2Fginsh.1.in;h=bc560dbcb51a62b344e55ba452aa7efadb8eed08;hp=6d69ef17582e39afecff33881231e36f47d9aea0;hb=c94cbc55628a5ccf536dfc63c5512d626ae647b6;hpb=f449313a24038429447cb02a4798beb7fcf8216e diff --git a/ginsh/ginsh.1.in b/ginsh/ginsh.1.in index 6d69ef17..bc560dbc 100644 --- a/ginsh/ginsh.1.in +++ b/ginsh/ginsh.1.in @@ -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 @@ -119,7 +119,7 @@ for example \$0, \$1 etc. .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 @@ -144,9 +144,6 @@ unary minus .B * multiplication .TP -.B % -non-commutative multiplication -.TP .B / division .TP @@ -191,22 +188,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. @@ -245,9 +240,15 @@ detail here. Please refer to the GiNaC documentation. .BI collect_distributed( expression ", " list ) \- collects coefficients of like powers (result in distributed form) .br +.BI collect_common_factors( expression ) +\- collects common factors from the terms of sums +.br .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,14 +273,20 @@ 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 ", " pattern ) +\- returns a list of all occurrences of a pattern in an expression +.br .BI gcd( expression ", " expression ) \- greatest common divisor .br -.BI has( expression ", " expression ) -\- returns "1" if the first expression contains the second (which may contain wildcards) as a subexpression, "0" otherwise +.BI has( expression ", " pattern ) +\- returns "1" if the first expression contains the pattern as a subexpression, "0" otherwise .br .BI inverse( matrix ) \- inverse of a matrix @@ -299,6 +306,9 @@ detail here. Please refer to the GiNaC documentation. .BI lsolve( equation-list ", " symbol-list ) \- solve system of linear equations .br +.BI map( expression ", " pattern ) +\- apply function to each operand; the function to be applied is specified as a pattern with the "\$0" wildcard standing for the operands +.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 @@ -311,6 +321,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 @@ -332,6 +345,9 @@ detail here. Please refer to the GiNaC documentation. .BI series( expression ", " relation-or-symbol ", " order ) \- series expansion .br +.BI sprem( expression ", " expression ", " symbol ) +\- sparse pseudo-remainder of polynomials +.br .BI sqrfree( "expression [" ", " symbol-list] ) \- square-free factorization of a polynomial .br @@ -394,6 +410,21 @@ This is useful for debugging and for learning about GiNaC internals. .PP The command .RS +.BI print_latex( expression ); +.RE +prints a LaTeX representation of the given +.IR expression . +.PP +The command +.RS +.BI print_csrc( expression ); +.RE +prints the given +.I expression +in a way that can be used in a C or C++ program. +.PP +The command +.RS .BI iprint( expression ); .RE prints the given @@ -437,15 +468,15 @@ 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); +> collect(%, x); (\-d\-2*c)*x+(d\-c)*x^2\-2*d\-c > solve quantum field theory; parse error at quantum @@ -479,7 +510,7 @@ C++ programming language .PP CLN \- A Class Library for Numbers, Bruno Haible .SH COPYRIGHT -Copyright \(co 1999-2001 Johannes Gutenberg Universit\(:at Mainz, Germany +Copyright \(co 1999-2003 Johannes Gutenberg Universit\(:at Mainz, Germany This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by