]> www.ginac.de Git - ginac.git/blob - cint/ginaccint.1
- Renamed flag NO_GINAC_NAMESPACE to NO_NAMESPACE_GINAC because of m4.
[ginac.git] / cint / ginaccint.1
1 .TH ginaccint 1 "January, 2000" "GiNaC"
2 .SH NAME
3 GiNaC-cint \- An interactive interface for GiNaC based on the Cint C/C++ interpreter
4 .SH SYNPOSIS
5 .B ginaccint
6 .SH DESCRIPTION
7 .B ginaccint
8 is an interactive frontend for the GiNaC symbolic computation
9 framework.  It is a tool that lets you write interactive programs in
10 C++ that directly make use of GiNaC's classes and thus a more complete
11 replacement for traditional interactive computer algebra systems than
12 \fBginsh\fP(1) is.  Programs may be composed as scripts and later compiled
13 with the native compiler and linked into the system.
14 .SH USAGE
15 .SS INPUT FORMAT
16 After startup, ginsh displays a prompt signifying that it is ready to
17 accept your input. All C++ statements are valid as input, extended by
18 GiNaC's numeric or symbolic expressions.  E.g.
19 .BR fibonacci(24)/1104; 
20 returns a GiNaC object of class
21 .BR ex,
22 , which in this case represents the numeric 42.  Symbols are declared by 
23 statements as
24 .nf 
25 GiNaC> symbol x("x"), y("y"), z;
26 .fi
27 which defines two named symbols and an anonymous one for later usage.
28 All GiNaC methods and functions are available as they would be typed
29 in C++.  It is not necessary to explicitly invoke a print command as
30 the last expression is automatically printed:
31 .nf
32 GiNaC> pow(x+y,4).expand();
33 out2 = x^4+4*x^3*y+6*x^2*y^2+4*x*y^3+y^4
34 .fi
35 Statements are generally closed by either when a closing brace 
36 .RB ( } )
37 matches the first opening brace
38 .RB ( { ) 
39 or a semicolon
40 .RB ( ; )
41 is encountered.
42
43
44 .SS FUNCTION DEFINITIONS
45 GiNaC-cint must be put into a special mode in order to define a
46 function.  This is done with the command
47 .RB .function .
48 After that any function definition in valid C++ syntax may be typed
49 in.  It becomes immediatly available for usage.
50
51 .SH EXAMPLES
52 .nf
53 GiNaC> symbol x("x"), y("y"), z("z");
54 GiNaC> ex a = pow(x,2)-x-2;
55 GiNaC> ex b = pow(x+1,2);
56 GiNaC> ex s = a/b;
57 GiNaC> s.diff(x);
58 out1   -2*(1+x)^(-3)*(-2-x+x^2)+(-1+2*x)*(1+x)^(-2)
59 GiNaC> s.normal();
60 out2   (-2+x)*(1+x)^(-1)
61 GiNaC> .function
62 next expression can be a function definition
63 GiNaC> ex EulerNumber(unsigned n)
64      > {
65      >     symbol x;
66      >     ex generator = pow(cosh(x),-1);
67      >     return generator.diff(x,n).subs(x==0);
68      > }
69 creating file /tmp/ginac26197caa
70 GiNaC> EulerNumber(42);
71 out3   -10364622733519612119397957304745185976310201
72 GiNaC> quit;
73 .fi
74
75 .SH BUGS
76 Cint accepts most of K&R and ANSI C/C++ language construct but not
77 perfect.  In fact, Cint is not aimed to be a 100% ANSI/ISO compliant
78 C/C++ language processor.  It rather is a portable script language
79 environment which is close enough to the standard C++.  See the file 
80 .BR limitati.txt
81 in your Cint distribution.  Please take the time to track down any bug
82 you encounter as far as possible and contact Masaharu Goto
83 <MXJ02154@niftyserve.or.jp> for Cint-related bugs and
84 <ginac-bugs@ginac.de> for any bugs in the GiNaC engine.
85
86 .SH AUTHOR
87 .TP
88 The GiNaC Group:
89 .br
90 Christian Bauer <Christian.Bauer@uni-mainz.de>
91 .br
92 Alexander Frink <Alexander.Frink@uni-mainz.de>
93 .br
94 Richard Kreckel <Richard.Kreckel@uni-mainz.de>
95 .SH SEE ALSO
96 GiNaC Tutorial \- An open framework for symbolic computation within the
97 C++ programming language
98 .PP
99 CLN \- A Class Library for Numbers, Bruno Haible
100 .PP
101 \fBginsh\fP(1)
102 .SH COPYRIGHT
103 .SS CINT COPYRIGHT
104 Copyright \(co of Cint and associated tools are owned by Agilent
105 Technologies Japan Company and the author.  Acknowledgement to the
106 author by e-mail is recommended at installation.  Source code, binary
107 executable or library of Cint and associated tools can be used,
108 modified and distributed free of charge for any purpose provided that
109 the copyright notice appear in all copies and that both that copyright
110 notice and this permission notice appear in documentation.
111 Registration is requested, at this moment, for commercial use.  Send
112 e-mail to the author <MXJ02154@niftyserve.or.jp>.  The registration is
113 free.
114 .SS GINAC COPYRIGHT
115 Copyright \(co 1999-2000 Johannes Gutenberg Universit\(:at Mainz, Germany
116
117 This program is free software; you can redistribute it and/or modify
118 it under the terms of the GNU General Public License as published by
119 the Free Software Foundation; either version 2 of the License, or
120 (at your option) any later version.
121
122 This program is distributed in the hope that it will be useful,
123 but WITHOUT ANY WARRANTY; without even the implied warranty of
124 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
125 GNU General Public License for more details.
126
127 You should have received a copy of the GNU General Public License
128 along with this program; if not, write to the Free Software
129 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.