]> thyrsus.com Git - mad.git/commitdiff
Befire starting Chapter IV.
authorEric S. Raymond <esr@thyrsus,com>
Fri, 9 Apr 2004 15:54:22 +0000 (15:54 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Fri, 9 Apr 2004 15:54:22 +0000 (15:54 +0000)
doc/mad-manual.xml

index b6a83f6591140aff08b466529b2bb48652d91a49..9cf04fac3563bd0389574fe88a230d6e6ef4ab09 100644 (file)
@@ -4437,11 +4437,11 @@ M<subscript>x</subscript>/N<subscript>x</subscript>, which is the
 annual premium payable for an entire life for $1 of whole life
 insurance, (2)A<subscript>x</subscript> =
 M<subscript>x</subscript>/D<subscript>x</subscript>, which is the
-single permium payable at age x for $1 of whole life insurance, and 
+single premium payable at age x for $1 of whole life insurance, and 
 (2)a<subscript>x</subscript> =
 N<subscript>x</subscript>/D<subscript>x</subscript>, which is the
 present value at age x of a whole life annuity of $1, first payment
-at age $x.</para>
+at age x.</para>
 
 <para>Printing of results is under the control of an input variable
 PRINT.  Certain relationships must hold between some independently
@@ -4483,8 +4483,12 @@ round-off, but they should differ by very little.</para>
 &commutefunc;
 </programlisting>
 
+<!-- beginpage III.46 after "M(OMEGA) = C(OMEGA)" in listing --> 
+<!-- beginpage III.47 after line labeled GAMMA in listing --> 
+
 </sect2>
 </sect1>
+<!-- beginpage III.48 -->
 <sect1><title>Symbol Manipulation and Recursive Function Examples</title>
 <sect2><title><emphasis role='note'>Example 1: Find a word in a string</emphasis></title>
 
@@ -4502,12 +4506,15 @@ character per word in W(1)...W(L).</para>
   </imageobject>
 </mediaobject>
 
+<!-- beginpage III.49 -->
+
 <!-- beginpage -->
 <programlisting>
 &wordsearch;
 </programlisting>
 
 </sect2>
+<!-- beginpage III.50 -->
 <sect2><title><emphasis role='note'>Example 2: Compute the factorial function</emphasis></title>
 <para><emphasis>Problem:</emphasis> Evaluate the recursive function,</para>
 
@@ -4529,7 +4536,7 @@ handl<emphasis>ed.</emphasis></para>
 <programlisting>
 &factfunc;
 </programlisting>
-<!-- beginpage; -->
+<!-- beginpage III.51 -->
 
 <para>In order to use this function, the calling program would have to
 specify a list for use in the SAVE and RESTORE stayements.  The
@@ -4540,6 +4547,7 @@ following is an example of a program which uses FACT.</para>
 </programlisting>
 
 </sect2>
+<!-- beginpage III.52 -->
 <sect2><title><emphasis role='note'>Example 3: Compute greatest common
 divisor</emphasis></title>
 <para><emphasis>Problem:</emphasis> To find the greatest common
@@ -4548,7 +4556,11 @@ divisor of two integers Y and Z.</para>
 <para><emphasis>Analysis:</emphasis> The greatest common divisor is
 defined recursively by three equations</para>
 
-<!-- FIXME: MATH GOES HERE -->
+<mediaobject>
+  <imageobject>
+    <imagedata fileref='equation9.png'/>
+  </imageobject>
+</mediaobject>
 
 <para>Where REM.(A,B) is the remainder of A/B.  This function expects
 the arguments to be found on the temporary storage list as the two
@@ -4558,10 +4570,11 @@ efficient than the usuall way of defining functions, but serves to
 remove many pitfalls encountered in using dummy variables with
 recursive functions.</para>
 
+<!-- beginpage III.53 -->
 <programlisting>
 &gcdfunc;
 </programlisting>
-<!-- beginpage; -->
+<!-- beginpage III.54 -->
 
 <para><emphasis>Note:</emphasis> When called upon for a value, a
 function such as GCD, must have at least one argument (in this example
@@ -4575,6 +4588,8 @@ executed only once, either in the main program or in a subprogram(but
 before any use of SAVE or RESTORE), since the SAVE and RESTORE
 statements always refer to the current list.</para>
 
+<!-- beginpage III.55 -->
+
 <para>An example of a program using GCD. is:</para>
 
 <programlisting>
@@ -4582,13 +4597,18 @@ statements always refer to the current list.</para>
 </programlisting>
 
 </sect2>
+<!-- beginpage III.56 -->
 <sect2><title><emphasis role='note'>Example 4: Evaluate Tschebychev polynomials</emphasis></title>
 <para><emphasis>Problem:</emphasis> To evaluate Tschebychev polynomials.</para>
 
 <para><emphasis>Analysis:</emphasis> The Tschebychev polynomial T(N,X)
 is defined recursively as follows:</para>
 
-<!-- FIXME: MATH GOES HERE -->
+<mediaobject>
+  <imageobject>
+    <imagedata fileref='equation10.png'/>
+  </imageobject>
+</mediaobject>
 
 <para>It is important to understand that when an expression is written
 as an argument of a function its value is computed and stored in a 
@@ -4597,6 +4617,7 @@ used as the argument of the function.  The implication of this use of
 a temporary location is that often expressions cannot be used as
 arguments of recursive functions.</para>
 
+<!-- beginpage III.57 -->
 <programlisting>
 &tschebfunc;
 </programlisting>
@@ -4611,6 +4632,8 @@ arguments of recursive functions.</para>
 </sect2>
 </sect1>
 </chapter>
+<!-- beginpage III.58 -->
+
 </book>
 <!--
 Local Variables: