in to help in finding trouble spots during the development of the
program (not as necessary here as in longer problems, but a good
idea!).</para>
-<!-- beginpage -->
+<!-- beginpage III.2 -->
<para><emphasis>Flow Diagram:</emphasis></para>
<imagedata fileref='fig07.png'/>
</imageobject>
</mediaobject>
-<!-- beginpage -->
+<!-- beginpage III.3 -->
<para><emphasis>The Program:</emphasis></para>
<programlisting>
&quadratic;
-<!-- beginpage -->
+<!-- beginpage III.4 -->
*DATA
4. -8. 4.
0 5. 10.
<para>The problem is to write a program to generate the entire "truth
table" for the given expression T.</para>
-<!-- beginpage -->
+<!-- beginpage III.5 -->
<para><emphasis>Flow Diagram:</emphasis></para>
<imagedata fileref='fig08.png'/>
</imageobject>
</mediaobject>
-<!-- beginpage -->
+<!-- beginpage III.6 -->
<para><emphasis>The Program:</emphasis></para>
instead of the BOOLEAN declaration.</para>
</sect2>
-<!-- beginpage -->
+<!-- beginpage III.7 -->
<sect2><title>Example 3<emphasis role='note'>: Simpson's Rule approximation of a definite integral</emphasis></title>
<para><emphasis>Problem:</emphasis> To approximate
<imagedata fileref='fig09.png'/>
</imageobject>
</mediaobject>
-<!-- beginpage -->
+<!-- beginpage III.8 -->
<para><emphasis>The Program:</emphasis></para>
<para>If, for some reason, the integral of sin 3x - cos(rx + 1) were
needed if 0 ≤ x ≤ 3, and the integral of sin 3x - cos(rx)
otherwise, the program might then be as follows:</para>
-<!-- beginpage -->
+<!-- beginpage III.9 -->
<para><emphasis>The Program:</emphasis></para>
-<!-- beginpage after H = (B-A)/N -->
+<!-- beginpage III.10 after H = (B-A)/N -->
<programlisting>
&simpsmain;
</programlisting>
FUNCTION NAME S
</programlisting>
</sect2>
-<!-- beginpage -->
+<!-- beginpage III.11 -->
<sect2><title>Example 4<emphasis role='note'>: Find roots of a function by half-interval approximation</emphasis></title>
-<!-- FIXME: TEXT FOR PAGE III. 11 GOES HERE -->
-
-<!-- beginpage -->
+<para><emphasis>Problem:</emphasis> To find a real solution (if it
+exists) of the equation f(x) = 0 (where f is a continuous function)
+obn an arbitrary interval [a, b], provided the roots (if there are
+more than one) are at least ε apart.</para>
+
+<para><emphasis>Analysis:</emphasis> We specify a, b, and ε as
+parameters. The method used will be "half-interval convergence," in
+which the function is evaluated at x -a, and then the interval is
+scanned for a change of sign<footnote><para>A change of sign is
+detected when the numbers involved have a negative
+product.</para></footnote> in the value of f(x). If no change odf sign
+is found, the scanning is repeated with a step size for searching half
+of the previous size. If the step size becomes smaller than ε,
+and no change of sign is found, the process is terminated, and comment
+is printed: "NO SOLUTION".</para>
+
+<!-- the original formula used a horizontal division bar and no parens -->
+<para>If a change of sign is found between x<subscript>L</subscript>
+and x<subscript>R</subscript>, the value of f is computeed at
+x<subscript>M</subscript> = (x<subscript>L</subscript> +
+x<subscript>R</subscript>)/2, i.e. the midpoint of the interval of
+uncertainty [x<subscript>L</subscript>, x<subscript>R</subscript>]. We
+then determine which one of the intervals [x<subscript>L</subscript>,
+x<subscript>M</subscript>]. [x<subscript>M</subscript>,
+x<subscript>R</subscript>] now contains a change in sign. We then
+compute the value of f at the midpoint of that smaller interval, etc.,
+until the interval being considered finally has length less that
+ε, at which time either end may be taken as the solution with an
+error less than ε.</para>
+
+<para>The method used here to handle the x<subscript>M</subscript>
+cpomputation is perhaps not the most obvious one. It consists of
+a simple loop in which the value of x is adjusted by h′ = -h/2, then
+h′′ - h′/2 = h/4, etc., until h is small enough. The
+adjustment of x is either to the left or to the right, depending on
+the occurrence or non-occurrence, respectively, of a change of sign
+between f(a) and f(x).</para>
+
+<para>It should be understood that this method may not find a root
+which is one of a pair of roots which either coincide or are less that
+ε apart.</para>
+
+<!-- beginpage III.12 -->
<para><emphasis>Flow diagram:</emphasis></para>
<mediaobject>
<imagedata fileref='fig10.png'/>
</imageobject>
</mediaobject>
-<!-- beginpage -->
+<!-- beginpage III.13 -->
<para><emphasis>Program:</emphasis> It is assumed here that f
(referred to as F. in the program) will be defined as an internal
typically a single card that could be slipped anywhere into the
program deck.</para></note>
-<!-- pagebreak after the VECTOR VALUES ABEPS line -->
+<!-- beginpage III.14 after the VECTOR VALUES ABEPS line -->
<programlisting>
&findroot;
*DATA
1. 2. .01
</programlisting>
</sect2>
-<!-- pagebreak -->
+<!-- beginpage III.15 -->
<sect2><title>Example 5<emphasis role='note'>: Compute the transpose of a matrix</emphasis></title>
<para><emphasis>Problem:</emphasis> Find the transpose A' of an n×n
function would be <emphasis>called</emphasis> with a statement of the
form EXECUTE TRANS.(A, N).</para>
</sect2>
-<!-- pagebreak -->
+<!-- beginpage III.16 -->
<sect2><title>Example 6<emphasis role='note'>: Matrix multiplication</emphasis></title>
<para><emphasis>Problem:</emphasis> Multiply the matrix A =
</imageobject>
</mediaobject>
-<!-- pagebreak; -->
+<!-- beginpage III.17 -->
<note><para>The Retrocomputing Museum implementation cannot yet
compile this example. The problem is the EQUIVALENCE declaration;
<programlisting>
&matrixmult;
-<!-- pagebreak; -->
+<!-- beginpage III.18 -->
* DATA
2 3 3
1. 2. 3. 4. 5. 6.
13. 14. 15.
</programlisting>
</sect2>
-<!-- pagebreak; -->
+<!-- beginpage III.19 -->
<sect2><title>Example 7<emphasis role='note'>: Solve simultaneous linear equations</emphasis></title>
<!-- FIXME: TEXT FOR PAGES III.19-20 GOES HERE -->
-<!-- beginpage -->
+<!-- beginpage III.21 -->
<para><emphasis>Flow diagram:</emphasis></para>
<mediaobject>
</imageobject>
</mediaobject>
-<!-- beginpage -->
+<!-- beginpage III.22 -->
<para><emphasis>The Program:</emphasis></para>
<programlisting>
&jordan;
-<!-- pagebreak; -->
+<!-- beginpage III.23 hust before VECTOR VALUES RESULT -->
* DATA
3
1. 1. 1. 6. -1. 0
</sect2>
</sect1>
-<!-- beginpage -->
+<!-- beginpage III.24 -->
<sect1><title>Business Data Processing Examples</title>
<sect2><title>Example 1<emphasis role='note'>: Payroll Processing</emphasis></title>
<!-- FIXME: TEST FOR PAGES III.24-25 GOES HERE -->
-<!-- beginpage -->
+<!-- beginpage III.26 -->
+<!-- this heading was not present in the original -->
<para><emphasis>Flow diagram:</emphasis></para>
<mediaobject>
</imageobject>
</mediaobject>
-<!-- beginpage -->
+<!-- beginpage III.27 -->
<para><emphasis>The Program:</emphasis></para>
<programlisting>
&payroll;
-<!-- pagebreak; -->
* DATA
GEORGE WASHINGTON 12345678 100. 4800.
JOHN ADAMS 12345679 200. 4900.
JOHN QUINCY ADAMS 12345682 100. 300.
</programlisting>
-<!-- beginpage -->
+<!-- beginpage III.28 -->
<para><emphasis>Alternate Program:</emphasis></para>
<programlisting>
&altpayroll;
-<!-- pagebreak; -->
* DATA
GEORGE WASHINGTON 12345678 100. 4800.
JOHN ADAMS 12345679 200. 4900.
</programlisting>
</sect2>
+<!-- beginpage III.29 -->
+
+<!-- FIXME: TEXT FOR PAGES III.29 GOES HERE -->
+
+<!-- beginpage III.30 -->
<sect2><title>Example 2<emphasis role='note'>: Payroll Tape Processing</emphasis></title>
<!-- FIXME: TEXT FOR PAGES III.30-32 GOES HERE -->
-<!-- beginpage -->
+<!-- beginpage III.33 -->
+<!-- This heading was not present in the original -->
<para><emphasis>Flow diagram:</emphasis></para>
+<!-- this figure spanned pages III.33 and III.34 in the original -->
<mediaobject>
<imageobject>
<imagedata fileref='fig15.png'/>
</imageobject>
</mediaobject>
-<!-- beginpage -->
-
+<!-- beginpage III.35 -->
+<!-- This heading was not present in the original -->
<para><emphasis>The Program:</emphasis></para>
+<!-- this listing spans pages III.35, III.36, and III.36A -->
<programlisting>
&payrolltape;
</programlisting>
</sect2>
+<!-- beginpage III.37 -->
<sect2><title>Example 3<emphasis role='note'>: Mortgage Payment Processing</emphasis></title>
-<!-- FIXME: TEXT FOR PAGES III.37 GOES HERE -->
+<!-- FIXME: TEXT FOR PAGE III.37 GOES HERE -->
-<!-- beginpage -->
+<!-- beginpage III.38 -->
<para><emphasis>Flow diagram:</emphasis></para>
<mediaobject>
</imageobject>
</mediaobject>
+<!-- beginpage III.39 -->
+
<mediaobject>
<imageobject>
<imagedata fileref='fig17.png'/>
</imageobject>
</mediaobject>
-<!-- beginpage -->
-
+<!-- beginpage III.40 -->
+<!-- This heading was not present in the original -->
<para><emphasis>The Program:</emphasis></para>
<programlisting>
</programlisting>
</sect2>
+<!-- beginpage III.42 -->
<sect2><title>Example 4<emphasis role='note'>: Actuarial computation</emphasis></title>
<!-- FIXME: TEXT FOR PAGES III.42-43 GOES HERE -->
-<!-- beginpage -->
+<!-- beginpage III.44 -->
<para><emphasis>Flow diagram:</emphasis></para>
<mediaobject>
</imageobject>
</mediaobject>
-<!-- beginpage -->
+<!-- beginpage III.45 -->
<para><emphasis>The Program:</emphasis></para>
</imageobject>
</mediaobject>
-<!-- pagebreak -->
+<!-- beginpage -->
<programlisting>
&wordsearch;
</programlisting>
<programlisting>
&factfunc;
</programlisting>
-<!-- pagebreak; -->
+<!-- beginpage; -->
<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
<programlisting>
&gcdfunc;
</programlisting>
-<!-- pagebreak; -->
+<!-- beginpage; -->
<para><emphasis>Note:</emphasis> When called upon for a value, a
function such as GCD, must have at least one argument (in this example
<programlisting>
&tschebfunc;
</programlisting>
-<!-- pagebreak; -->
+<!-- beginpage; -->
<para>A program which uses TSCHEB. is:</para>