]> www.ginac.de Git - ginac.git/blobdiff - doc/tutorial/ginac.texi
- corrected a bunch of typos.
[ginac.git] / doc / tutorial / ginac.texi
index c3a1813e5b260d93d6985ff9b04de5d7b09d810e..b7ac73ad25fcf804fa632ea3eef741a7612ef067 100644 (file)
@@ -37,6 +37,7 @@ notice identical to this one.
 @titlepage
 @title GiNaC @value{VERSION}
 @subtitle An open framework for symbolic computation within the C++ programming language
+@subtitle @value{UPDATED}
 @author The GiNaC Group:
 @author Christian Bauer, Alexander Frink, Richard B. Kreckel
 
@@ -96,7 +97,7 @@ under one roof.
 
 This tutorial is intended for the novice user who is new to
 GiNaC but already has some background in C++ programming.  However,
-since a hand made documentation like this one is difficult to keep in
+since a hand-made documentation like this one is difficult to keep in
 sync with the development the actual documentation is inside the
 sources in the form of comments.  That documentation may be parsed by
 one of the many Javadoc-like documentation systems.  If you fail at
@@ -133,7 +134,7 @@ MA 02111-1307, USA.
 @c    node-name, next, previous, up
 @chapter A Tour of GiNaC
 
-This quick tour of GiNaC wants to rise your interest in the
+This quick tour of GiNaC wants to arise your interest in the
 subsequent chapters by showing off a bit.  Please excuse us if it
 leaves many open questions.
 
@@ -380,7 +381,7 @@ installation.
 @c    node-name, next, previous, up
 @section Prerequisites
 
-In order to install GiNaC on your system, some prerequistes need
+In order to install GiNaC on your system, some prerequisites need
 to be met.  First of all, you need to have a C++-compiler adhering to
 the ANSI-standard @cite{ISO/IEC 14882:1998(E)}.  We used @acronym{GCC} for
 development so if you have a different compiler you are on your own.
@@ -475,7 +476,7 @@ $ ./configure
 
 Configuration for a private static GiNaC library with several components
 sitting in custom places (site-wide @acronym{GCC} and private @acronym{CLN}),
-the compiler pursueded to be picky and full assertions switched on:
+the compiler pursuaded to be picky and full assertions switched on:
 
 @example
 $ export CXX=/usr/local/gnu/bin/c++
@@ -492,16 +493,20 @@ $ ./configure --disable-shared --prefix=$(HOME)
 
 After proper configuration you should just build the whole
 library by typing
+
 @example
 $ make
 @end example
+
 at the command prompt and go for a cup of coffee.
 
 Just to make sure GiNaC works properly you may run a simple test
 suite by typing
+
 @example
 $ make check
 @end example
+
 This will compile some sample programs, run them and compare the output
 to reference output. Each of the checks should return a message @samp{passed}
 together with the CPU time used for that particular test.  If it does
@@ -517,6 +522,7 @@ this step is unlikely to return any errors.
 @section Installing GiNaC
 
 To install GiNaC on your system, simply type
+
 @example
 $ make install
 @end example
@@ -564,7 +570,7 @@ now know where all the files went during installation.}.
 @chapter Basic Concepts
 
 This chapter will describe the different fundamental objects
-that can be handled with GiNaC.  But before doing so, it is worthwhile
+that can be handled by GiNaC.  But before doing so, it is worthwhile
 introducing you to the more commonly used class of expressions,
 representing a flexible meta-class for storing all mathematical
 objects.
@@ -724,7 +730,7 @@ classes @code{add} and @code{mul}, representing sums of terms and products,
 respectively.  We'll come back later to some more details about these
 two classes and motivate the use of pairs in sums and products here.
 
-@subsection Digression: Internal representation of products and sums
+@unnumberedsubsec Digression: Internal representation of products and sums
 
 Although it should be completely transparent for the user of
 GiNaC a short discussion of this topic helps to understand the sources
@@ -768,8 +774,8 @@ This also allows for a better handling of numeric radicals, since
 clear, why both classes @code{add} and @code{mul} are derived from the
 same abstract class: the data representation is the same, only the
 semantics differs.  In the class hierarchy, methods for polynomial
-expansion and such are reimplemented for @code{add} and @code{mul}, but
-the data structure is inherited from @code{expairseq}.
+expansion and the like are reimplemented for @code{add} and @code{mul},
+but the data structure is inherited from @code{expairseq}.
 
 
 @node Symbols, Numbers, The Class Hierarchy, Basic Concepts
@@ -792,7 +798,7 @@ but for internal routines when no output is desired it is often
 enough.  We'll come across examples of such symbols later in this
 tutorial.
 
-This implies that the stings passed to symbols at construction
+This implies that the strings passed to symbols at construction
 time may not be used for comparing two of them.  It is perfectly
 legitimate to write @code{symbol x("x"),y("x");} but it is
 likely to lead into trouble.  Here, @code{x} and
@@ -821,7 +827,8 @@ For storing numerical things, GiNaC uses Bruno Haible's library
 classes for GiNaC.  @acronym{CLN} stands for Class Library
 for Numbers or alternatively for Common Lisp Numbers.  In order to
 find out more about @acronym{CLN}'s internals the reader is
-refered to the documentation of that library.  Suffice to say that it
+refered to the documentation of that library.  @inforef{Introduction, , cln},
+for more information. Suffice to say that it
 is by itself build on top of another library, the GNU Multiple
 Precision library @acronym{GMP}, which is an extremely fast
 library for arbitrary long integers and rationals as well as arbitrary
@@ -946,7 +953,7 @@ using namespace GiNaC;
 // some very important constants:
 const numeric twentyone(21);
 const numeric ten(10);
-const numeric fife(5);
+const numeric five(5);
 
 int main()
 @{
@@ -1005,7 +1012,7 @@ table.
 @c    node-name, next, previous, up
 @section Constants
 
-Constants behave pretty much like symbols except that that they return
+Constants behave pretty much like symbols except that they return
 some specific number when the method @code{.evalf()} is called.
 
 The predefined known constants are:
@@ -1057,7 +1064,7 @@ construction is necessary since we cannot safely overload the constructor
 @code{^} in C++ to construct a @code{power} object.  If we did, it would
 have several counterintuitive effects:
 
-@itemize
+@itemize @bullet
 @item
 Due to C's operator precedence, @code{2*x^2} would be parsed as @code{(2*x)^2}.
 @item
@@ -1128,7 +1135,7 @@ int main()
     cout << "gamma(" << foo << ") -> " << gamma(foo) << endl;
     ex bar = foo.subs(y==1);
     cout << "gamma(" << bar << ") -> " << gamma(bar) << endl;
-    ex foobar= bar.subs(x==7);
+    ex foobar = bar.subs(x==7);
     cout << "gamma(" << foobar << ") -> " << gamma(foobar) << endl;
     // ...
 @}
@@ -1143,8 +1150,8 @@ gamma(x+1/2) -> gamma(x+1/2)
 gamma(15/2) -> (135135/128)*Pi^(1/2)
 @end example
 
-Most of these functions can be differentiated, series expanded so on.
-Read the next chapter in order to learn more about this..
+Most of these functions can be differentiated, series expanded and so
+on.  Read the next chapter in order to learn more about this..
 
 
 @node Important Algorithms, Polynomial Expansion, Built-in functions, Top
@@ -1302,7 +1309,7 @@ The functions for polynomial greatest common divisor and least common
 multiple have the synopsis:
 
 @example
-#include <GiNaC/normal.h>
+#include <ginac/normal.h>
 ex gcd(const ex & a, const ex & b);
 ex lcm(const ex & a, const ex & b);
 @end example
@@ -1336,16 +1343,16 @@ int main()
 @subsection The @code{normal} method
 
 While in common symbolic code @code{gcd()} and @code{lcm()} are not too
-heavily used, simplification occurs frequently.  Therefore @code{.normal()},
-which provides some basic form of simplification, has become a method of
-class @code{ex}, just like @code{.expand()}.
-It converts a rational function into an equivalent rational function
-where numererator and denominator are coprime.  This means, it finds
-the GCD of numerator and denominator and cancels it.  If it encounters
-some object which does not belong to the domain of rationals (a
-function for instance), that object is replaced by a temporary symbol.
-This means that both expressions @code{t1} and
-@code{t2} are indeed simplified in this little program:
+heavily used, simplification is called for frequently.  Therefore
+@code{.normal()}, which provides some basic form of simplification, has
+become a method of class @code{ex}, just like @code{.expand()}.  It
+converts a rational function into an equivalent rational function where
+numerator and denominator are coprime.  This means, it finds the GCD of
+numerator and denominator and cancels it.  If it encounters some object
+which does not belong to the domain of rationals (a function for
+instance), that object is replaced by a temporary symbol.  This means
+that both expressions @code{t1} and @code{t2} are indeed simplified in
+this little program:
 
 @subheading Cancellation of polynomial GCD (with obstacles)
 @example
@@ -1438,11 +1445,11 @@ When you run it, it produces the sequence @code{1}, @code{-1}, @code{5},
 @c    node-name, next, previous, up
 @section Series Expansion
 
-Expressions know how to expand themselves as a Taylor series or
-(more generally) a Laurent series.  As in most conventional Computer
-Algebra Systems no distinction is made between those two.  There is a
-class of its own for storing such series as well as a class for
-storing the order of the series.  A sample program could read:
+Expressions know how to expand themselves as a Taylor series or (more
+generally) a Laurent series.  Similar to most conventional Computer
+Algebra Systems, no distinction is made between those two.  There is a
+class of its own for storing such series as well as a class for storing
+the order of the series.  A sample program could read:
 
 @subheading Series expansion
 @example
@@ -1469,7 +1476,7 @@ int main()
 
 As an instructive application, let us calculate the numerical
 value of Archimedes' constant (for which there already exists the
-built-in constant @code{Pi}) using M@'echain's
+exbuilt-in constant @code{Pi}) using M@'echain's
 mysterious formula @code{Pi==16*atan(1/5)-4*atan(1/239)}.
 We may expand the arcus tangent around @code{0} and insert
 the fractions @code{1/5} and @code{1/239}.
@@ -1661,7 +1668,7 @@ advantages and disadvantages over these systems.
 GiNaC has several advantages over traditional Computer
 Algebra Systems, like 
 
-@itemize
+@itemize @bullet
 
 @item
 familiar language: all common CAS implement their own
@@ -1726,9 +1733,9 @@ GiNaC is comparable in speed with other CAS.
 
 @heading Disadvantages
 
-Of course it also has some disadvantages
+Of course it also has some disadvantages:
 
-@itemize
+@itemize @bullet
 
 @item
 not interactive: GiNaC programs have to be written in