]> www.ginac.de Git - ginac.git/commitdiff
- Finished tutorial :-)
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 24 Nov 1999 19:30:34 +0000 (19:30 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 24 Nov 1999 19:30:34 +0000 (19:30 +0000)
doc/tutorial/Makefile.am
doc/tutorial/Makefile.in
doc/tutorial/rep_naive.fig
doc/tutorial/rep_pair.fig
doc/tutorial/rep_real.fig [new file with mode: 0644]
doc/tutorial/tutorial.sgml.in

index 32455b87f8e2d0abe55a89f88624cc5b47d008f9..4971a9b30fbfdb1358e5a60de4ecba0c40e919b9 100644 (file)
@@ -5,7 +5,7 @@
 # some regexpese to tutorial.sgml prior to parsing it, in order to allow for
 # different graphics output.  This seems to be an ugly limitation of docbook...
 
-FIG = classhierarchy.fig rep_naive.fig rep_pair.fig
+FIG = classhierarchy.fig rep_naive.fig rep_pair.fig rep_real.fig
 PNG = $(addsuffix .png, $(basename $(FIG)))
 EPS = $(addsuffix .eps, $(basename $(FIG)))
 
@@ -32,7 +32,10 @@ JADEARGS_HTML = -t sgml -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/do
 
 index.html: tutorial.sgml.in $(PNG)
        @if [ "${JADE}" ]; then \
-         sed -e 's/graext/png/g' -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \
+         sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \
+             -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \
+             -e 's/graext/png/g' \
+             -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \
          echo "Running ${JADE} ${JADEARGS_HTML} tutorial.sgml..."; \
          ${JADE} ${JADEARGS_HTML} tutorial.sgml; \
          if [ -f book1.html ]; then mv book1.html index.html; fi; \
@@ -42,7 +45,10 @@ index.html: tutorial.sgml.in $(PNG)
 
 tutorial.tex: tutorial.sgml.in $(EPS)
        @if [ "${JADE}" -a "${LATEX}" ]; then \
-         sed -e 's/graext/eps/g' -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \
+         sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \
+             -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \
+             -e 's/graext/eps/g' \
+             -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \
          echo "Running ${JADE} ${JADEARGS_TEX} tutorial.sgml..."; \
          ${JADE} ${JADEARGS_TEX} tutorial.sgml ; \
        else \
index 0e33753c635dc52b2b4b66dbae8ca7083c282076..898729353e5378c45f50acf40c60d3cba00edef8 100644 (file)
@@ -99,7 +99,7 @@ TUTORIAL_TARGETS = @TUTORIAL_TARGETS@
 VERSION = @VERSION@
 YACC = @YACC@
 
-FIG = classhierarchy.fig rep_naive.fig rep_pair.fig
+FIG = classhierarchy.fig rep_naive.fig rep_pair.fig rep_real.fig
 PNG = $(addsuffix .png, $(basename $(FIG)))
 EPS = $(addsuffix .eps, $(basename $(FIG)))
 
@@ -250,7 +250,10 @@ maintainer-clean
 
 index.html: tutorial.sgml.in $(PNG)
        @if [ "${JADE}" ]; then \
-         sed -e 's/graext/png/g' -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \
+         sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \
+             -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \
+             -e 's/graext/png/g' \
+             -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \
          echo "Running ${JADE} ${JADEARGS_HTML} tutorial.sgml..."; \
          ${JADE} ${JADEARGS_HTML} tutorial.sgml; \
          if [ -f book1.html ]; then mv book1.html index.html; fi; \
@@ -260,7 +263,10 @@ index.html: tutorial.sgml.in $(PNG)
 
 tutorial.tex: tutorial.sgml.in $(EPS)
        @if [ "${JADE}" -a "${LATEX}" ]; then \
-         sed -e 's/graext/eps/g' -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \
+         sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \
+             -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \
+             -e 's/graext/eps/g' \
+             -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \
          echo "Running ${JADE} ${JADEARGS_TEX} tutorial.sgml..."; \
          ${JADE} ${JADEARGS_TEX} tutorial.sgml ; \
        else \
index 63292a1e414e6f4512378b58f023333ee4ac89be..484fe2d037ecde9e90290828fae8fee134b63835 100644 (file)
@@ -7,98 +7,132 @@ A4
 Single
 -2
 1200 2
-6 1530 3330 1890 3690
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1725 3525 165 165 1725 3525 1890 3520
-4 1 0 99 0 0 14 0.0000 4 105 105 1725 3595 a\001
+6 1260 2700 1890 3060
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1260 2700 1890 2700 1890 2970 1260 2970 1260 2700
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1260 2970 1890 2970 1890 3060 1260 3060 1260 2970
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        1575 3060 1575 2970
+4 1 0 99 0 0 14 0.0000 4 150 555 1575 2906 power\001
 -6
-6 2520 4005 2880 4365
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2715 4200 165 165 2715 4200 2880 4195
-4 1 0 99 0 0 14 0.0000 4 150 105 2715 4270 2\001
+6 3465 3375 4095 3735
+6 3465 3375 4095 3645
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        3465 3375 4095 3375 4095 3645 3465 3645 3465 3375
+4 1 0 99 0 0 14 0.0000 4 150 315 3780 3581 mul\001
 -6
-6 2970 4005 3330 4365
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3165 4200 165 165 3165 4200 3330 4195
-4 1 0 99 0 0 14 0.0000 4 150 105 3165 4270 b\001
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        3465 3645 4095 3645 4095 3735 3465 3735 3465 3645
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        3780 3645 3780 3735
 -6
-6 3870 4005 4230 4365
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 4065 4200 165 165 4065 4200 4230 4195
-4 1 0 99 0 0 14 0.0000 4 150 240 4065 4270 -1\001
+6 1080 3330 1440 3690
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1275 3525 165 165 1275 3525 1440 3520
+4 1 0 99 0 0 14 0.0000 4 150 105 1275 3595 d\001
 -6
-6 4320 4005 4680 4365
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 4515 4200 165 165 4515 4200 4680 4195
-4 1 0 99 0 0 14 0.0000 4 105 105 4515 4270 c\001
+6 1620 3330 1980 3690
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1815 3525 165 165 1815 3525 1980 3520
+4 1 0 99 0 0 14 0.0000 4 150 105 1815 3595 3\001
 -6
-6 2610 2700 3240 3060
-6 2610 2700 3240 2970
+6 2385 3375 3015 3735
+6 2385 3375 3015 3645
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 2700 3240 2700 3240 2970 2610 2970 2610 2700
-4 1 0 99 0 0 14 0.0000 4 150 315 2925 2906 add\001
+        2385 3375 3015 3375 3015 3645 2385 3645 2385 3375
+4 1 0 99 0 0 14 0.0000 4 150 315 2700 3581 mul\001
 -6
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 2970 3240 2970 3240 3060 2610 3060 2610 2970
-2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 2970 2820 2970 2820 3060 2610 3060 2610 2970
-2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        3030 2970 3240 2970 3240 3060 3030 3060 3030 2970
+        2385 3645 3015 3645 3015 3735 2385 3735 2385 3645
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        2700 3645 2700 3735
 -6
-6 2610 3375 3240 3735
-6 2610 3375 3240 3645
-2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 3375 3240 3375 3240 3645 2610 3645 2610 3375
-4 1 0 99 0 0 14 0.0000 4 150 315 2925 3581 mul\001
+6 225 2655 585 3015
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 390 2850 165 165 390 2850 555 2845
+4 1 0 99 0 0 14 0.0000 4 150 105 390 2920 2\001
 -6
-2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 3645 3240 3645 3240 3735 2610 3735 2610 3645
-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
-        2925 3645 2925 3735
+6 4680 3330 5040 3690
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 4845 3525 165 165 4845 3525 5010 3520
+4 1 0 99 0 0 14 0.0000 4 150 240 4845 3595 -3\001
+-6
+6 2205 4005 2565 4365
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2400 4200 165 165 2400 4200 2565 4195
+4 1 0 99 0 0 14 0.0000 4 150 105 2400 4270 4\001
+-6
+6 2745 4005 3105 4365
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2940 4200 165 165 2940 4200 3105 4195
+4 1 0 99 0 0 14 0.0000 4 105 105 2940 4270 a\001
+-6
+6 3285 4005 3645 4365
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3480 4200 165 165 3480 4200 3645 4195
+4 1 0 99 0 0 14 0.0000 4 150 105 3480 4270 5\001
 -6
-6 3960 3375 4590 3735
-6 3960 3375 4590 3645
+6 3825 4005 4185 4365
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 4020 4200 165 165 4020 4200 4185 4195
+4 1 0 99 0 0 14 0.0000 4 150 105 4020 4270 b\001
+-6
+6 3330 2700 3960 2970
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        3960 3375 4590 3375 4590 3645 3960 3645 3960 3375
-4 1 0 99 0 0 14 0.0000 4 150 315 4275 3581 mul\001
+        3330 2700 3960 2700 3960 2970 3330 2970 3330 2700
+4 1 0 99 0 0 14 0.0000 4 150 315 3645 2906 add\001
 -6
+6 3330 2970 3960 3060
+6 3330 2970 3960 3060
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        3960 3645 4590 3645 4590 3735 3960 3735 3960 3645
-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
-        4275 3645 4275 3735
+        3330 2970 3960 2970 3960 3060 3330 3060 3330 2970
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        3330 2970 3540 2970 3540 3060 3330 3060 3330 2970
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        3750 2970 3960 2970 3960 3060 3750 3060 3750 2970
 -6
-6 1260 2025 1890 2385
+-6
+6 1620 2295 2250 2385
+6 1620 2295 2250 2385
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        1260 2025 1890 2025 1890 2295 1260 2295 1260 2025
+        1620 2295 2250 2295 2250 2385 1620 2385 1620 2295
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        1260 2295 1890 2295 1890 2385 1260 2385 1260 2295
-2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
-        1575 2385 1575 2295
-4 1 0 99 0 0 14 0.0000 4 150 315 1575 2231 mul\001
+        1620 2295 1830 2295 1830 2385 1620 2385 1620 2295
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        2040 2295 2250 2295 2250 2385 2040 2385 2040 2295
 -6
-6 225 2685 555 3015
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 390 2850 165 165 390 2850 555 2845
-4 1 0 99 0 0 14 0.0000 4 150 105 390 2920 d\001
 -6
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        2700 3060 1845 3375
+        3420 3060 2790 3375
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        2925 3060 2925 3375
+        3645 3060 3780 3375
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        3150 3060 4005 3375
+        2160 2385 3375 2700
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        1799 2387 2654 2702
+        1710 2385 495 2700
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        1350 2385 495 2700
+        1935 2385 1575 2700
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        2790 3735 2745 4005
+        1710 3060 1800 3375
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        3075 3733 3120 4003
+        1446 3058 1350 3375
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        4133 3734 4088 4004
+        2835 3735 2925 4050
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        4387 3732 4432 4002
+        2571 3733 2475 4050
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        3915 3735 4005 4050
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        3651 3733 3555 4050
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        3870 3060 4770 3375
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1620 2025 2250 2025 2250 2295 1620 2295 1620 2025
+2 2 0 1 0 7 101 0 20 0.000 0 0 -1 0 0 5
+        1620 2295 2250 2295 2250 2385 1620 2385 1620 2295
+4 1 0 99 0 0 14 0.0000 4 150 315 1935 2231 mul\001
index 7160eeff19800a04c0953b570ebfe1acc277e601..0baa8ccb75179514e5b22ed2f5a430995bb9c8f3 100644 (file)
@@ -7,92 +7,145 @@ A4
 Single
 -2
 1200 2
-6 1260 135 1890 585
+6 1260 495 1890 585
+2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
+        1260 495 1470 495 1470 585 1260 585 1260 495
+2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
+        1680 495 1890 495 1890 585 1680 585 1680 495
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        1260 135 1890 135 1890 405 1260 405 1260 135
+        1260 495 1890 495 1890 585 1260 585 1260 495
+-6
+6 1260 405 1890 495
+2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
+        1260 405 1470 405 1470 495 1260 495 1260 405
+2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
+        1680 405 1890 405 1890 495 1680 495 1680 405
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
         1260 405 1890 405 1890 495 1260 495 1260 405
-2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        1260 495 1890 495 1890 585 1260 585 1260 495
-2 1 0 1 0 7 99 0 -1 0.000 0 0 -1 0 0 2
-        1575 585 1575 405
-4 1 0 99 0 0 14 0.0000 4 150 315 1575 341 mul\001
 -6
-6 2610 900 3240 1170
+6 90 900 630 1755
+6 180 900 540 1260
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 345 1095 165 165 345 1095 510 1090
+4 1 0 99 0 0 14 0.0000 4 150 105 345 1165 1\001
+-6
+6 180 1350 540 1710
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 345 1545 165 165 345 1545 510 1540
+4 1 0 99 0 0 14 0.0000 4 150 105 345 1615 2\001
+-6
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        90 1305 630 1305
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        90 900 630 900 630 1755 90 1755 90 900
+-6
+6 3060 900 3420 1260
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3225 1095 165 165 3225 1095 3390 1090
+4 1 0 99 0 0 14 0.0000 4 150 105 3225 1165 1\001
+-6
+6 2925 1350 3555 1800
+6 2925 1350 3555 1620
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 900 3240 900 3240 1170 2610 1170 2610 900
-4 1 0 99 0 0 14 0.0000 4 150 315 2925 1106 add\001
+        2925 1350 3555 1350 3555 1620 2925 1620 2925 1350
+4 1 0 99 0 0 14 0.0000 4 150 315 3240 1556 add\001
 -6
-6 2610 1260 3240 1350
+6 2925 1620 3555 1710
 2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
-        2610 1260 2820 1260 2820 1350 2610 1350 2610 1260
+        2925 1620 3135 1620 3135 1710 2925 1710 2925 1620
 2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
-        3030 1260 3240 1260 3240 1350 3030 1350 3030 1260
+        3345 1620 3555 1620 3555 1710 3345 1710 3345 1620
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 1260 3240 1260 3240 1350 2610 1350 2610 1260
+        2925 1620 3555 1620 3555 1710 2925 1710 2925 1620
 -6
-6 2610 1170 3240 1260
+6 2925 1710 3555 1800
 2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
-        2610 1170 2820 1170 2820 1260 2610 1260 2610 1170
+        2925 1710 3135 1710 3135 1800 2925 1800 2925 1710
 2 2 0 1 0 7 99 0 20 0.000 0 0 -1 0 0 5
-        3030 1170 3240 1170 3240 1260 3030 1260 3030 1170
+        3345 1710 3555 1710 3555 1800 3345 1800 3345 1710
 2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
-        2610 1170 3240 1170 3240 1260 2610 1260 2610 1170
+        2925 1710 3555 1710 3555 1800 2925 1800 2925 1710
 -6
-6 225 900 585 1710
-6 225 930 555 1260
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 390 1095 165 165 390 1095 555 1090
-4 1 0 99 0 0 14 0.0000 4 150 105 390 1165 d\001
 -6
-6 225 1350 585 1710
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 390 1545 165 165 390 1545 555 1540
-4 1 0 99 0 0 14 0.0000 4 150 105 390 1615 1\001
+6 2970 2025 3510 2880
+6 3060 2475 3420 2835
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3225 2670 165 165 3225 2670 3390 2665
+4 1 0 99 0 0 14 0.0000 4 150 105 3225 2740 b\001
 -6
+6 3060 2025 3420 2385
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3225 2220 165 165 3225 2220 3390 2215
+4 1 0 99 0 0 14 0.0000 4 150 105 3225 2290 5\001
 -6
-6 1575 2115 1935 2475
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1740 2310 165 165 1740 2310 1905 2305
-4 1 0 99 0 0 14 0.0000 4 150 105 1740 2380 1\001
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        2970 2430 3510 2430
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        2970 2025 3510 2025 3510 2880 2970 2880 2970 2025
 -6
-6 1575 1665 1935 2025
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1740 1860 165 165 1740 1860 1905 1855
-4 1 0 99 0 0 14 0.0000 4 105 105 1740 1930 a\001
+6 2205 2025 2745 2880
+6 2295 2475 2655 2835
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2460 2670 165 165 2460 2670 2625 2665
+4 1 0 99 0 0 14 0.0000 4 105 105 2460 2740 a\001
 -6
-6 2745 1665 3105 2025
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2910 1860 165 165 2910 1860 3075 1855
-4 1 0 99 0 0 14 0.0000 4 150 105 2910 1930 b\001
+6 2295 2025 2655 2385
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2460 2220 165 165 2460 2220 2625 2215
+4 1 0 99 0 0 14 0.0000 4 150 105 2460 2290 4\001
 -6
-6 2745 2115 3105 2475
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2910 2310 165 165 2910 2310 3075 2305
-4 1 0 99 0 0 14 0.0000 4 150 105 2910 2380 2\001
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        2205 2430 2745 2430
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        2205 2025 2745 2025 2745 2880 2205 2880 2205 2025
 -6
-6 3960 1665 4320 2025
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 4125 1860 165 165 4125 1860 4290 1855
-4 1 0 99 0 0 14 0.0000 4 105 105 4125 1930 c\001
+6 3735 2025 4275 2880
+6 3825 2475 4185 2835
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3990 2670 165 165 3990 2670 4155 2665
+4 1 0 99 0 0 14 0.0000 4 150 240 3990 2740 -3\001
 -6
-6 3960 2115 4320 2475
-1 3 0 1 0 7 100 0 20 0.000 1 0.0000 4125 2310 165 165 4125 2310 4290 2305
-4 1 0 99 0 0 14 0.0000 4 150 240 4125 2380 -1\001
+6 3825 2025 4185 2385
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3990 2220 165 165 3990 2220 4155 2215
+4 1 0 99 0 0 14 0.0000 4 150 105 3990 2290 1\001
+-6
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        3735 2430 4275 2430
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        3735 2025 4275 2025 4275 2880 3735 2880 3735 2025
+-6
+6 1305 900 1845 1755
+6 1395 1350 1755 1710
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1560 1545 165 165 1560 1545 1725 1540
+4 1 0 99 0 0 14 0.0000 4 150 105 1560 1615 d\001
+-6
+6 1395 900 1755 1260
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1560 1095 165 165 1560 1095 1725 1090
+4 1 0 99 0 0 14 0.0000 4 150 105 1560 1165 3\001
+-6
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        1305 1305 1845 1305
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        1305 900 1845 900 1845 1755 1305 1755 1305 900
 -6
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
         1351 587 496 902
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        1803 577 2658 892
+        1803 577 2880 900
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1260 135 1890 135 1890 405 1260 405 1260 135
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1260 405 1890 405 1890 495 1260 495 1260 405
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1260 495 1890 495 1890 585 1260 585 1260 495
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        2697 1342 1842 1657
+        1578 591 1575 900
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        3148 1347 4003 1662
+        3015 1800 2520 2025
 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
        0 0 1.00 60.00 120.00
-        2925 1350 2925 1665
-2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
-        180 900 585 900 585 1755 180 1755 180 900
-2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
-        1530 1665 1935 1665 1935 2520 1530 2520 1530 1665
-2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
-        2700 1665 3105 1665 3105 2520 2700 2520 2700 1665
+        3465 1800 3960 2025
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        3240 1800 3240 2025
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        2835 1305 3645 1305
 2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
-        3915 1665 4320 1665 4320 2520 3915 2520 3915 1665
+        2835 900 3645 900 3645 1845 2835 1845 2835 900
+4 1 0 99 0 0 14 0.0000 4 150 315 1575 341 mul\001
diff --git a/doc/tutorial/rep_real.fig b/doc/tutorial/rep_real.fig
new file mode 100644 (file)
index 0000000..960b177
--- /dev/null
@@ -0,0 +1,113 @@
+#FIG 3.2
+Landscape
+Center
+Metric
+A4      
+100.00
+Single
+-2
+1200 2
+6 225 900 765 1755
+6 315 1350 675 1710
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 480 1545 165 165 480 1545 645 1540
+4 1 0 99 0 0 14 0.0000 4 150 105 480 1615 d\001
+-6
+6 315 900 675 1260
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 480 1095 165 165 480 1095 645 1090
+4 1 0 99 0 0 14 0.0000 4 150 105 480 1165 3\001
+-6
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        225 1305 765 1305
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        225 900 765 900 765 1755 225 1755 225 900
+-6
+6 1575 900 1935 1260
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1740 1095 165 165 1740 1095 1905 1090
+4 1 0 99 0 0 14 0.0000 4 150 105 1740 1165 1\001
+-6
+6 1485 2025 2025 2880
+6 1575 2475 1935 2835
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1740 2670 165 165 1740 2670 1905 2665
+4 1 0 99 0 0 14 0.0000 4 150 105 1740 2740 b\001
+-6
+6 1575 2025 1935 2385
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 1740 2220 165 165 1740 2220 1905 2215
+4 1 0 99 0 0 14 0.0000 4 150 105 1740 2290 5\001
+-6
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        1485 2430 2025 2430
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        1485 2025 2025 2025 2025 2880 1485 2880 1485 2025
+-6
+6 1440 1620 2070 1800
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1440 1620 2070 1620 2070 1800 1440 1800 1440 1620
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        1440 1710 1890 1710
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        1890 1800 1890 1620
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        1665 1800 1665 1620
+-6
+6 720 2025 1260 2880
+6 810 2475 1170 2835
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 975 2670 165 165 975 2670 1140 2665
+4 1 0 99 0 0 14 0.0000 4 105 105 975 2740 a\001
+-6
+6 810 2025 1170 2385
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 975 2220 165 165 975 2220 1140 2215
+4 1 0 99 0 0 14 0.0000 4 150 105 975 2290 4\001
+-6
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        720 2430 1260 2430
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        720 2025 1260 2025 1260 2880 720 2880 720 2025
+-6
+6 2385 1980 2745 2340
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2550 2175 165 165 2550 2175 2715 2170
+4 1 0 99 0 0 14 0.0000 4 150 240 2550 2245 -3\001
+-6
+6 2880 855 3240 1215
+1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3045 1050 165 165 3045 1050 3210 1045
+4 1 0 99 0 0 14 0.0000 4 150 105 3045 1120 2\001
+-6
+6 1440 135 2070 585
+6 1440 405 2070 585
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1440 405 2070 405 2070 585 1440 585 1440 405
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        1440 495 1890 495
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        1890 585 1890 405
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
+        1665 585 1665 405
+-6
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1440 135 2070 135 2070 405 1440 405 1440 135
+4 1 0 99 0 0 14 0.0000 4 150 315 1755 341 mul\001
+-6
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        1530 585 496 902
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        1980 585 2925 900
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        1755 585 1755 900
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        1530 1800 1035 2025
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        1980 1800 2475 2025
+2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
+       0 0 1.00 60.00 120.00
+        1755 1800 1755 2025
+2 1 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 2
+        1350 1305 2160 1305
+2 2 2 1 0 7 100 0 -1 3.000 0 0 -1 0 0 5
+        1350 900 2160 900 2160 1845 1350 1845 1350 900
+2 2 0 1 0 7 100 0 20 0.000 0 0 -1 0 0 5
+        1440 1350 2070 1350 2070 1620 1440 1620 1440 1350
+4 1 0 99 0 0 14 0.0000 4 150 315 1755 1556 add\001
index a8ac0ae204511b288ff2dd98801ec161e18a4a90..4d45735c53b0df98d8c07a98b0b092ac1edef397 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE Book PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
 
 <book>
-<title>GiNaC Tutorial</title>
+<title>GiNaC Tutorial MAJOR_VERSION.MINOR_VERSION</title>
 <bookinfo>
 <subtitle>An open framework for symbolic computation within the C++ programming language</subtitle>
 <bookbiblio>
@@ -655,35 +655,54 @@ two classes and motivate the use of pairs in sums and products here.</para>
 <sect2><title>Digression: Internal representation of products and sums</title>
 
 <para>Although it should be completely transparent for the user of
-GiNaC a short discussion of this topic helps understanding the sources
-and also explains performance to a large degree.  Consider the
-symbolic expression <literal>(a+2*b-c)*d</literal>, which could
-naively be represented by a tree of linear containers for addition and
-multiplication together with atomic leaves of symbols and integer
-numbers in this fashion:
+GiNaC a short discussion of this topic helps to understand the sources
+and also explain performance to a large degree.  Consider the symbolic
+expression
+<emphasis>2*d<superscript>3</superscript>*(4*a+5*b-3)</emphasis>,
+which could naively be represented by a tree of linear containers for
+addition and multiplication, one container for exponentiation with
+base and exponent and some atomic leaves of symbols and numbers in
+this fashion:
 <figure id="repres-naive-id" float="1">
-<title>Naive internal representation of <emphasis>d(a+2*b-c)</emphasis></title>
+<title>Naive internal representation-tree for <emphasis>2*d<superscript>3</superscript>*(4*a+5*b-3)</emphasis></title>
   <graphic align="center" fileref="rep_naive.graext" format="GRAEXT"></graphic>
 </figure>
 However, doing so results in a rather deeply nested tree which will
-quickly become rather slow to manipulate.  If we represent the sum
+quickly become inefficient to manipulate.  If we represent the sum
 instead as a sequence of terms, each having a purely numeric
-coefficient, the tree becomes much more flat.
+multiplicative coefficient and the multiplication as a sequence of
+terms, each having a numeric exponent, the tree becomes much more
+flat.
 <figure id="repres-pair-id" float="1">
-<title>Better internal representation of <emphasis>d(a+2*b-c)</emphasis></title>
+<title>Pair-wise internal representation-tree for <emphasis>2*d<superscript>3</superscript>*(4*a+5*b-3)</emphasis></title>
   <graphic align="center" fileref="rep_pair.graext" format="GRAEXT"></graphic>
 </figure>
-The number <literal>1</literal> under the symbol <literal>d</literal>
-is a hint that multiplication objects can be treated similarly where
-the coeffiecients are interpreted as <emphasis>exponents</emphasis>
+The number <literal>3</literal> above the symbol <literal>d</literal>
+shows that <literal>mul</literal> objects are treated similarly where
+the coefficients are interpreted as <emphasis>exponents</emphasis>
 now.  Addition of sums of terms or multiplication of products with
-numerical exponents can be made very efficient with a
-pair-representation.  Internally, this handling is done by most CAS in
+numerical exponents can be coded to be very efficient with such a
+pair-representation.  Internally, this handling is done by many CAS in
 this way.  It typically speeds up manipulations by an order of
-magnitude.  Now it should be clear, why both classes
-<literal>add</literal> and <literal>mul</literal> are derived from the
-same abstract class: the representation is the same, only the
-interpretation differs.  </para>
+magnitude.  The overall multiplicative factor <literal>2</literal> and
+the additive term <literal>-3</literal> look somewhat cumbersome in
+this representation, however, since they are still carrying a trivial
+exponent and multiplicative factor <literal>1</literal> respectively.
+Within GiNaC, this is avoided by adding a field that carries overall
+numeric coefficient.
+<figure id="repres-real-id" float="1">
+<title>Realistic picture of GiNaC's representation-tree for <emphasis>2*d<superscript>3</superscript>*(4*a+5*b-3)</emphasis></title>
+  <graphic align="center" fileref="rep_real.graext" format="GRAEXT"></graphic>
+</figure>
+This also allows for a better handling of numeric radicals, since
+<literal>sqrt(2)</literal> can now be carried along calculations.  Now
+it should be clear, why both classes <literal>add</literal> and
+<literal>mul</literal> 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 <literal>add</literal> and <literal>mul</literal>,
+but the data structure is inherited from
+<literal>expairseq</literal>.</para>
 
 </sect1>
 
@@ -703,7 +722,20 @@ default constructor (i.e. without string-argument) the system will
 deal out a unique name.  That name may not be suitable for printing
 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.  </para>
+tutorial.</para>
+
+<para>This implies that the stings passed to symbols at construction
+time may not be used for comparing two of them.  It is perfectly
+legitimate to write <literal>symbol x("x"),y("x");</literal> but it is
+likely to lead into trouble.  Here, <literal>x</literal> and
+<literal>y</literal> are different symbols and statements like
+<literal>x-y</literal> will not be simplified to zero although the
+output <literal>x-x</literal> looks funny.  Such output may also occur
+when there are two different symbols in two scopes, for instance when
+you call a function that declares a symbol with a name already
+existent in a symbol in the calling function.  Again, comparing them
+(using <literal>operator==</literal> for instance) will always reveal
+their difference.  Watch out, please.</para>
 
 <para>Although symbols can be assigned expressions for internal
 reasons, you should not do it (and we are not going to tell you how it
@@ -825,6 +857,11 @@ in 60 digits:
 </screen>
 </para>
 
+<para>It should be clear that objects of class
+<literal>numeric</literal> should be used for constructing numbers or
+for doing arithmetic with them.  The objects one deals with most of
+the time are the polymorphic expressions <literal>ex</literal>.</para>
+
 <sect2><title>Tests on numbers</title>
 
 <para>Once you have declared some numbers, assigned them to
@@ -841,12 +878,16 @@ with some multiple of its denominator and check what comes out:
 #include &lt;ginac/ginac.h&gt;
 using namespace GiNaC;
 
+// some very important constants:
+const numeric twentyone(21);
+const numeric ten(10);
+const numeric fife(5);
+
 int main()
 {
-    numeric twentyone(21);
-    numeric ten(10);
-    numeric answer(21,5);
+    numeric answer = twentyone;
 
+    answer /= five;
     cout &lt;&lt; answer.is_integer() &lt;&lt; endl;  // false, it's 21/5
     answer *= ten;
     cout &lt;&lt; answer.is_integer() &lt;&lt; endl;  // true, it's 42 now!
@@ -856,17 +897,18 @@ int main()
 </example>
 
 Note that the variable <literal>answer</literal> is constructed here
-as an integer but in an intermediate step it holds a rational number
-represented as integer numerator and integer denominator.  When
-multiplied by 10, the denominator becomes unity and the result is
-automatically converted to a pure integer again.  Internally, the
-underlying <literal>CLN</literal> is responsible for this behaviour
-and we refer the reader to <literal>CLN</literal>'s documentation.
-Suffice to say that the same behaviour applies to complex numbers as
-well as return values of certain functions.  Complex numbers are
-automatically converted to real numbers if the imaginary part becomes
-zero.  The full set of tests that can be applied is listed in the
-following table.
+as an integer by <literal>numeric</literal>'s copy constructor but in
+an intermediate step it holds a rational number represented as integer
+numerator and integer denominator.  When multiplied by 10, the
+denominator becomes unity and the result is automatically converted to
+a pure integer again.  Internally, the underlying
+<literal>CLN</literal> is responsible for this behaviour and we refer
+the reader to <literal>CLN</literal>'s documentation.  Suffice to say
+that the same behaviour applies to complex numbers as well as return
+values of certain functions.  Complex numbers are automatically
+converted to real numbers if the imaginary part becomes zero.  The
+full set of tests that can be applied is listed in the following
+table.
 
 <informaltable colsep="0" frame="topbot" pgwide="1">
 <tgroup cols="2">
@@ -1060,9 +1102,39 @@ explicitly, results in the same canonical form.</para>
 
 <sect1><title>Built-in Functions</title>
 
-<para>This section is not here yet</para>
-
+<para>There are quite a number of useful functions built into GiNaC.
+They are all objects of class <literal>function</literal>.  They
+accept one or more expressions as arguments and return one expression.
+If the arguments are not numerical, the evaluation of the functions
+may be halted, as it does in the next example:
+<example><title>Evaluation of built-in functions</title>
+<programlisting>
+#include &lt;ginac/ginac.h&gt;
+using namespace GiNaC;
 
+int main()
+{
+    symbol x("x"), y("y");
+    
+    ex foo = x+y/2;
+    cout &lt;&lt; "gamma(" &lt;&lt; foo &lt;&lt; ") -> " &lt;&lt; gamma(foo) &lt;&lt; endl;
+    ex bar = foo.subs(y==1);
+    cout &lt;&lt; "gamma(" &lt;&lt; bar &lt;&lt; ") -> " &lt;&lt; gamma(bar) &lt;&lt; endl;
+    ex foobar= bar.subs(x==7);
+    cout &lt;&lt; "gamma(" &lt;&lt; foobar &lt;&lt; ") -> " &lt;&lt; gamma(foobar) &lt;&lt; endl;
+    // ...
+}
+</programlisting>
+<para>This program will type out two times a function and then an
+expression that may be really useful:
+<screen>
+gamma(x+(1/2)*y) -> gamma(x+(1/2)*y)
+gamma(x+1/2) -> gamma(x+1/2)
+gamma(15/2) -> (135135/128)*Pi^(1/2)
+</screen></para>
+</example>
+Most of these functions can be differentiated, series expanded so on.
+Read the next chapter in order to learn more about this..</para>
 
 </sect1>
 
@@ -1453,8 +1525,8 @@ int main()
 <para>By reading so far you should have gotten a fairly good
 understanding of GiNaC's design-patterns.  From here on you should
 start reading the sources.  All we can do now is issue some
-recommendations how to tackle the many open ends the system still
-has in order to fulfill everybody's dreams.</para>
+recommendations how to tackle GiNaC's many loose ends in order to
+fulfill everybody's dreams.</para>
 
 <sect1><title>What doesn't belong into GiNaC</title>