From: Richard Kreckel Date: Thu, 18 Nov 1999 00:08:06 +0000 (+0000) Subject: - added using namespace GiNaC; after each #include; X-Git-Tag: relase_0-5-1~172 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=a4d57c3e60f330b64637eec19793bb15fd1bc400 - added using namespace GiNaC; after each #include; --- diff --git a/doc/tutorial/tutorial.sgml.in b/doc/tutorial/tutorial.sgml.in index 44fd6af3..e2acbc49 100644 --- a/doc/tutorial/tutorial.sgml.in +++ b/doc/tutorial/tutorial.sgml.in @@ -107,6 +107,7 @@ pointless) bivariate polynomial with some large coefficients: My first GiNaC program (a bivariate polynomial) #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -137,6 +138,7 @@ variable. My second GiNaC program (Hermite polynomials) #include <ginac/ginac.h> +using namespace GiNaC; ex HermitePoly(symbol x, int deg) { @@ -539,6 +541,7 @@ Consider the simple sequence of code: Simple copy-on-write semantics #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -572,6 +575,7 @@ make clear how powerful this can be. Advanced copy-on-write semantics #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -732,6 +736,7 @@ from C-float and construction from a string. Construction of numbers #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -771,8 +776,8 @@ objects of class numeric that are constructed from then on will be stored with a precision matching that number of decimal digits: Controlling the precision of floating point numbers -#include -<ginac/ginac.h> +#include <ginac/ginac.h> +using namespace GiNaC; void foo() { @@ -818,6 +823,7 @@ with some multiple of its denominator and check what comes out: Sample test on objects of type numeric #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -959,6 +965,7 @@ type add is called to hold the sum of that Construction of <literal>add</literal> and <literal>mul</literal> objects #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -1056,6 +1063,7 @@ the simple example: Methods vs. wrapper functions #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -1146,6 +1154,7 @@ in the following example: Collecting expressions in multivariate polynomials #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -1205,6 +1214,7 @@ and lcm(a,b) returns the product of Polynomal GCD/LCM #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -1243,6 +1253,7 @@ just like .expand(). Simple polynomial differentiation #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -1262,6 +1273,7 @@ int main() Differentiation with nontrivial functions #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -1283,6 +1295,7 @@ storing the order of the series. A sample program could read: Series expansion #include <ginac/ginac.h> +using namespace GiNaC; int main() { @@ -1313,9 +1326,11 @@ the fractions 1/5 and 1/239. But, as we have seen, a series in GiNaC carries an order term with it. The preprocessor-macro series_to_poly may be used to strip this off: -Series expansion using Méchain's formula +Series expansion using Méchain's formula for +<literal>Pi</literal> #include <ginac/ginac.h> +using namespace GiNaC; ex mechain_pi(int degr) {