1,000 blocks of information are stored starting at section 1 of tape number E712 which has the title
F77 RESULTS OF EXPERIMENTS. This information is to be processed by the computer, each block of information producing one
block of results which are to be written to tape number E340, which has the title 1F211 PROCESSED RESULTS.
The processing is done by a subroutine R3, entered at the first instruction, which requires a link in B90.
In processing block n, R3 uses the results of processing block (n-1) and it requires
block n to begin at A3 and the results from (n-1) to begin at A3-1:. For processing block 1, block (A3-1:) must be filled
with floating point zeros. The results produced will overwrite the information in block A3.
Processing one block will take approximately 1/10th of a second.
Sketch a flow diagram which will use the tapes as efficiently as possible and draw up the complete program
document required, leaving a space for R3.
9.2 Example using Variable Length Tape Transfers
A magnetic tape with title number F2017 and title F123 VARIABLE LE1TGTH RECORDS/JKB/40 contains information written
in variable length strings. The first half-word of each string is a keyword to identify the information which follows.
It is necessary to replace some of these strings by amendment strings which are on a magnetic tape with number H107 and
title F123 AMENDMENTS/JKB/40. The keyword of each string on this tape corresponds to that of the string which it must replace.
There is no guarantee that the amendment string is the same length as the string which it has to replace.
All strings are less than 100 words in length and are separated by a '1' marker.
The information on each tape begins and ends with a '2' marker.
Write a complete program to carry out the amending leaving the final result on a tape with serial number H993 and
title F123 VARIABLE LENGTH RECORDS/JKB/41, and draw up the necessary job description as a separate document.
9.3 Example using Complex Extracodes
If z0 is a first approximation to one of the roots of the complex polynomial f(z),
then usually a better approximation, z1, is given by
z1 = z0 - f(z0) / f'(z0)
Write a program to find that root of the polynomial
f(z) = (z - l)(z - 2)(z - 5)
to which the iterative process leads if
z0 = 3.5 + i100
Print at each stage the value of current approximation (real and imaginary parts) and the value
of |f(z)|. Stop the process when
|f(z)| is less than 10-8.
Answer: 9.1 Example Using Fixed Length Tape Transfers
Note: The program begins in block 1: (since there
is no star directive to say otherwise) and the block
from which the results are written to tape is block
2: (=A3-2:). This means that if R3 is not to be
overwritten it must not extend into block 2:.
Answer: 9.2 Example Using Variable Length Tape Transfers
Note: B/F and C/F stand for Brought Forward and Carry Forward.