Simpson_Time Series_Computations_in_FORTRAN_and_FAP_1966 Simpson Time Series Computations In FORTRAN And FAP 1966

Simpson_Time-Series_Computations_in_FORTRAN_and_FAP_1966 Simpson_Time-Series_Computations_in_FORTRAN_and_FAP_1966

User Manual: Simpson_Time-Series_Computations_in_FORTRAN_and_FAP_1966

Open the PDF directly: View PDF PDF.
Page Count: 1118

DownloadSimpson_Time-Series_Computations_in_FORTRAN_and_FAP_1966 Simpson Time-Series Computations In FORTRAN And FAP 1966
Open PDF In BrowserView PDF
·~ 1}ime-S,erie!5 :;cornp:u t·;a 't-iO:n s
l

I

K

'

. i'n ·'F ORTRAN and
•:'.~

,:

'"

PAP .
I~

SIMPSON

::
'\'

..
Ii:..

~

.

Time-Series Computations
in FORTRAN and FAP

VOLUME I - A PROGRAM LIBRARY

Time-Series Computations
in FORTRAN and FAP

VOL U M EI -

A

PROGRAM LIB R A R V

STEPHEN MILTON SIMPSON, JR.
Massachusetts Institute of Technology

ADDISON-WESLEY· READING, MASSACHUSETTS

Copyright © 1966
ADDISON-WESLEY PUBLISHING COMPANY, INC.
Printed in the United States of America
All rights reserved. This book, or parts thereof,
may not be reproduced in any form without written
permission of the publisher.
Library of Congress Catalog Card No. 66-14667

ADDISON-WESLEY PUBLISHING COMPANY, INC.
Reading, Massachusetts· Palo Alto· London
New York· Dallas· Atlanta· Barrington, Illinois
ADDISON-WESLEY (CANADA) LIMITED
Don Mills, Ontario

To my mother, to my father,
and to Jackie.

Preface

In the fall of 1952 I joined, as a graduate student, a Massachusetts Institute of Technology project called the Geophysical Analysis Group, and so began a twelve-year
effort in the application of digital computers to time-series problems. This project,
the G.A.G., was organized by Professors G.P. Wadsworth and P.M. Hurley of
M.l. T. and by Dr. Daniel Silverman of the Stanolind Oil and Gas Company. It
assumed the task of attempting the realization of Norbert Wiener's time-series concepts on the Whirlwind I (WWI) Computer in the echo-sounding problems of seismic
exploration for oil.
At the same time I developed a close friendship with my fellow student Enders
A. Robinson, on whom the directorship of G.A.G. soon devolved. Robinson's efforts
centered in the elucidation of theory and its translation to discrete notation, and my
own work tended toward machine realization of theory, but we each made sufficient
excursions into the other's domain to form a profitable research partnership. This
pattern has persisted over the years.
The Geophysical Analysis Group is relevant for the reason that many of the programming concepts presented herein were seeded in the 16-bit registers of WWI for
the seismic exploration problem. Digital prediction, both single and multiple, special
digital filtering, spectral and correlation analysis, traveling spectral analysis, automatic processing systems for multirace seismograms, and many other operational
concepts were developed and experimented with on WWI to an unprecedented degree.
Besides myself and Robinson those involved with computation included Mark Smith,
Howard Briscoe, William Walsh, Robert Bowman, Freeman Gilbert, Sven Treitel,
Donald Grine, Kazi Haq, Donald Fink, Robert Wylie, Manuel Lopez-Linares, Richard
Tooley, and Robert Sax. The ideas carried into industry and pursued there by students associated with G.A.G. have now ripened to the point of causing what amounts
to a technological revolution in seismic interpretation.
In 1954 Robinson left, eventually to become Associate Professor of Mathematics
at the University of Wisconsin, and I assumed directorship of G.A.G. until its termination in 1957, but frequent visits with each other kept alive our mutual interests.
With G.A.G. 's termination and the subsequent retirement of WWI, I was forced
to the realization that my programming output might just as well have been expressed
in vanishing ink-an experience which rankled long and which underlies our determination to develop stable programming and communicating techniques.
I took a year's leave of absence from my Assistant Professorship in the Department of Geology and Geophysics at M.l. T. and spent it in military applications of
special-design general purpose computers with RCA. This work tended to keep me
from recognizing the latent power of the then infant language of FORTRAN.

vii

On returning to M.l. T. I kept my hand in programming on the IBM 704, but it
was not until 1960, when I was asked by the Advanced Research Projects Agency to
set up a project like G.A.G. but focused on the underground detection problem of
VELA UNIFORM, that I became seriously involved with the new computers. I was
fortunate in being able to attract Robinson to the project, as well as many gifted graduate students.
By this time FORTRAN had become well established, and, after some hesitancy,
we began to use it, gradually evolving a sense of proportion in the mixture of
FOR TRAN and F AP programming. I find in this mixture that the whole is greater
than the sum of its parts. For not only can we have the essential power of the individual languages, but they can supplement each other's weaknesses, as, for instance,
they do when we use subroutine sandwiches of alternating language or use F AP programs to bolster FOR TRAN' s capabilities.
Once again this leaves me committed, albeit partially, to a machine language.
But the situation is not as bad as it was ten years ago. In the first place, the ubiquity
of the IBM 700 series machines suggests a national and international investment in
specific hardware and software of considerable inertia. The time constant of change
has lengthened to a point where we should be able to keep up with it without periodic
wholesale abandonment of past results. Secondly, our program design, testing, and
documentation techniques have matured to the point where machine language translation is not nearly as formidable a prospect as previously.
These conSiderations, the rapid advances which have been made in time-series
computations, the growing requests we have had for the programs, and the general
expanding interest in time series and in programming, have all encouraged me to
pause and to pull together the myriad threads of our work into a single document representing, in first approximation, where time-series computations stand with respect
to today's machines. Such has been my goal. However, this goal has proved too
ambitious for a single volume, and we content ourselves in Volume I with a presentation of our subroutine library per se. Volume II will be devoted to the development
of pertinent time-series theory from the computational viewpoint, to the consideration of computational applications in a realistic setting, and to discussion of programming technique.
Taken together, the first and second volumes of Time-Series Computations in
FORTRAN and FAP may be considered an introduction to a new topic, namely, the
realization of modern time-series theory on digital computers. Their principal
intended audience is students of time series or communications engineering who wish
to acquire advanced techniques of handling empirical time series with pr:.:;sent-day
computational equipment, especially on the IBM 709, 7090, or 7094. By "advanced"
I refer both to the conceptual level of the techniques and to the professionalism of
their realization.
But I would hope that this work, Volume I especially, should also prove of value
to the general programming community. The majority of our programs are not
specialized to the time-series area. What we have done is to fill the gap between
basic FORTRAN statements and time-series operations with a complex of generalpurpose black boxes that could be used to assist in the development of other areas of
application. But even aside from functional utility, we hope that all computing groups
faced with the problems of program exchange and communication will be interested in
our experiments in communication formalisms.
The subroutine library constitutes the bulk of Volume I. It represents the distillation of years of effort of my co-workers and myself. Cost studies of programming systems of this size (about 40,000 registers) might predict a developmental
price tag of about a quarter million dollars for this set. Consequently we have felt
justified in devoting considerable time and effort to the development of techniques for
communicating our results in the context of applied problems.

viii

At the lowest level of communication, that is, the individual subroutine, we
have tried to maintain high standards both of programming and of documentation.
Toward the latter end, we have adhered to a program-writing format which might be
called the self-documenting symbolic deck. In this format, the program card deck
contains a program abstract and a detailed input-output specification, as well as illustrative and critical examples. The card deck is totally definitive of its own behavior.
The format was originally designed for input to an automatic debugging compiler
which would read the examples, set up appropriate test programs, execute the test
programs, and report back results. In the press of other business the compiler never
proceeded beyond a rudimentary stage, but the format has remained and proved itself
valuable in our own internal communications.
Furthermore, the format has proved itself many times over as a diSCiplining
device for keeping programmers honest. It is a characteristic of the trade that programmers modify and remodify their decks. The juxtaposition of the documentation
and the program proper in deck listings emphasizes documentation errors that result
from such modifications, and the weeding out of these errors becomes a natural and
integral part of the debugging process. Moreover, to a programmer, there is a great
psychological difference between having to change a few comment cards and tracking
down a secretary to make the same changes on a mimeograph master in order to run
off an updated memorandum.
The self-documenting program deck is a black box with input-output terminals
fully described. It is necessarily bulky, the description being generally several times
the length of the program proper. For routine reference we turn to compressed summaries, the "program digests," which, by judicious choice of terminology, enable one
familiar with the programs to refresh his memory of calling-sequence details needed
while programming, with an absolute minimum of page turning. For general scanning
of and access to the programs, we have sorted them by various functional and nonfunctional attributes. The other types of documentation in Volume I relate to subroutine library structure and are of more specialized interest to the system
programmer.
But the study of n black boxes, each of which performs an isolated task in timeseries analysis, does not give one a sense of the coherency of the subject, or of the
methods of interconnecting the boxes in broad experimental applications. For such
purposes we have designed the experimental programs to be presented in Volume II.
Each of these programs represents a series of experimental studies in an interconnected area of time-series analysis, with some carry-over from one program to
the next. They permit the reader to see essentially all of our subroutines used in
an applied framework.
The applications chosen for illustration in Volume II range from elementary
ones to problems the average student or research worker is unlikely to have
encountered (especially multi-input processes). Since our theoretical development of
time series is of rather limited scope, we have included appendixes on some of the
less well-known topics covered in the experiments.
The experiments of Volume II are designed to be readable without knowledge of
the basic machine language, F AP, and to require a minimum of experience with
FORTRAN. The study of Volume II, especially in conjunction with practice on a computerwhich can accept the subprograms of Volume I, is probably the easiest way of
acquiring familiarity with the techniques we have to offer.
It is an unfortunate fact that artificial but general languages like FORTRAN are,
in themselves, incapable of expressing many of the' critical time-series operations in
truly efficient form. This situation may change, but probably not in the near future.
To a large extent our subroutine library may be viewed as an interdependent collection
of FORTRAN and FAP programs where the FORTRAN programs steer the FAP programs to the desired task. The higher-level FORTRAN programs will easily compile

ix

on machines outside the IBM 700 series family, but their required subordinates, the
F AP workhorse programs, will not in general carryover without hand-coded
translation.
For this reason, Volume II will present expositions of the more important logical processes used in the F AP subprograms to attain high-speed behavior, particularly
in connection with correlation and spectral analysis. A knowledge of FAP is desirable
but is not essential, since we lean considerably on ordinary flow charts for detailed
relationships.
Other limitations of a formal nature inherent in FORTRAN II have led us to some
programming effort in the twilight region between FORTRAN and FAP, that is, to the
writing of FAP programs which utilize "forbidden"knowledgeof the FORTRAN system
in order to remove these limitations, and which we therefore label" system-expansion
programs." Volume II includes a discussion of the techniques and problems involved
in such programming and should prove of interest to serious students of programming.
In short, then, we have limited the first volume to the presentation of the subroutine library with subsidiary documentation designed for the working programmer,
and we have reserved time-series and programming concepts for Volume II.
The "we" I use frequently above is not editorial, but includes my many coworkers, mostly graduate students, who have contributed to the subprogram collection.
and with whom it has been my pleasure to work. In this congenial and loosely structured group, considerations of programming technique and style were developed to
refined levels. Although the authorship of the programs is given individually, I would
like to emphasize the importance of the contributions of James Galbraith, Jon Claerbout,
and most particularly Ralph Wiggins. Other students directly associated were William
Ross, Cheh Pan, Carl Wunsch, and Roy Greenfield.
As for what theory we include in Volume II, much of it is pure review, but some
of it has previously appeared only in project report form. I consider Robinson's
solution, in the fall of 1962, of the multi-input iteration problem to be a Significant
achievement. Wiggins pursued and expanded the analysis from this base through the
program-development stage, and in so doing was the first to demonstrate the computational feasibility of multi-input least squares.
But the work presented here has also depended on many others. The tireless
and dedicated writing of test routines by Joseph Procito has been invaluable in the
establishment of program reliability. In broader areas of service programming,
analysis, data handling, desk calculating, etc., we also relied on Mrs. Irene Hawkins,
Karl Gentili, my wife Jacqueline, Ervinia Irbin, Mrs. Susan Kannenberg, Allan
Kessler, and Lloyd Kannenberg. Most of the card preparation and manuscript chores
fell to Mrs. Elizabeth Studer, to my wife, and to Mrs. Wendy Tibbets, with assistance from Mrs. Elene Hershberg, Dauna Trop, Mrs. Myrna Kasser, Regina Lahteine,
Mrs. Hazel White, and Mrs. Barbara Cullum.
The punched-card work involved in these two volumes is too elegant to be passed
over without further comment. The conventions and forms that we now use regularly
(not all of which appear in these volumes; for instance, the mathematics of Volume II
was card-coded in the source manuscript) I consider to be significant experiments in
a field - call it "punched-card typography" - of growing importance in printing. In
large part these conventions are due to my wife, who has become our arbiter of formats
and to whose sense of style and standards of excellence we are much indebted.
Over the years we have been favored with the most friendly cooperation of the
machine operators and supervisors, starting in the early Whirlwind days with Robert
A.J. Gildea (to whom I also owe many enjoyable hours of chess while waiting for the
machine to come back) and Michael Solomita, and continuing with Anthony Sacco at
the M.I.T. Computation Center and at the Cooperative Computing Laboratory at M.I.T .•
John Harmon and our long-term friend Michael Saxton of IBM, and more recently with
Thomas Burhoe, Mason Fleming, and William Jarvis of IBM.

x

We owe much to the sponsors of both the G.A.G. project and the VELA UNIFORM
project for the computing facilities these projects have afforded us in the development
of time-series and computing concepts, and to Lincoln Laboratory, the M.I. T. Computation Center, and Geoscience Incorporated for the use of programs developed
under their auspices.
Concerning editorial aSSistance, I am indebted to Robinson for critical review
of the mathematical aspects of the manuscript and to Wiggins for his joint labors with
my wife and myself in the editing of the programs.
It is indeed a pleasure for me to acknowledge the many contributions and
accommodations from this small army of co-workers and associates.
Brookline, Massachusetts
November, 1965

S.M.S.,Jr.

xi

Contents

1.

1

Introduction

..

General Aspects of the Program Set
Terminology Backgrounds
Usages in the Present Volume
Programming Philosophy
Design for Speed
References

2.

Illustrative Usage of Programs

21

a.

3.

Program Categorizations

39

~

4.

Annotated Calling Sequences

61

Ell

5.

Program Digests

77

~

6.

Program Statistics

133

7.

A One-Pass Subroutine Library

159

8.

Cross-Reference Table for the One-Pass Library

166

r.

9.

Subroutine Rosters for the One-Pass Library

186

DI

Complete Program Listings

213

~

10.

xiii

..
DIll

1
Introduction

The heart of this book is the presentation, in Section 10, of 267 programs which are
rather widely applicable even though their development was motivated by problems in
the field of time-series analysis. The reader may turn to anyone of these programs
and study it with understanding without a need for the material in the preceding sections, these sections being concerned with introductory and access information, and
with tabulation of data abstracted from the programs. In particular, the present
section is concerned with an overview of the programs as a set, and with general considerations of language, terminology, and programming philosophy.
The use of this book and of the programs presupposes some familiarity with the
artificial computing language FORTRAN and, but to a lesser and nonessential extent
with the machine language FAP. A reader with only FORTRAN background should be
able to read through all of the textual material of the introductory sections in one sitting and lose very little from our occasional references to machine-language details.
Thereafter he should have no trouble in locating programs of interest by means of the
categorized lists of Section 3, or in utilizing, with the aid of Sections 4 and 5, the programs he has become familiar with. However, in his reading of the programs in
Section 10, a person of this background will generally be limited to the FORTRAN
programs, although if he has sufficient curiosity he will find that many of the machinelanguage programs are quite easy to follow with the aid of a machine manual (95 of
these programs involve less than 50 machine-language instructions and constants, 31
less than 25).
Many of the tabulations to follow contain data on program storage lengths and
binary card counts; these data are somewhat dependent on the particular system used
to translate the symbolic decks into machine language. The statistics given pertain to
FORTRAN II, Verson 2, IBM Modifications 1 through 27, further modified to accept
the G format. *

*In reference to the monitor system, one might note that we have found it useful to
modify the BSS loader to extend its limit on the maximum number of missing subroutines from 50 to 200. (This is accomplished by reassembling records 7, 8, and 9 of
the FORTRAN Monitor System after appropriately redefining the symbol NMMSP.)
Without this change large main programs referring to many library subroutines occasionally have their executions blocked. An alternative, if ad hoc, solution to this
problem is to reduce the missing subroutines count by adding a number of the required
routines to the input deck when the problem arises, rather than by obtaining them from
the library.

1

III

Time-Series Computations in FORTRAN and FAP
GENERAL ASPECTS OF THE PROGRAM SET
To begin our general view of the program set we will comment briefly on the variety
of functions performed. Examination of the categories of Section 3 will show a wide
diversity in the computational topics embodied, these topics ranging from spectral
analysis and discrete filtering (convolution) to matrix manipulation, to polynomial
operations, to machine graphing, to technical matters of program administration, and
to a number of other topics. Conversely there are some programs which essentially
or actually duplicate the functions of others. There are several reasons for such
redundancy. Sometimes the reason is to provide both FORTRAN and FAP versions,
and sometimes it is to illustrate alternative programming techniques, but more often
the reason is historical accident. The redundancies are preserved in our use because
of references made in main programs not shown, and occasionally because of differences in taste, but other groups might find it profitable to trim down the collection.
The tables of Sections 8 and 9 are useful for checking the consequences of contemplated
program deletions.
Similarly, one will find considerable diversity both in program size, as measured by storage requirements* which vary from 1 register to 1499 registers with an
average of 152, and in complexity, as measured by calling-sequence lengths, which
vary from 0 to 22 with an average length of 4.5; by number of entry points, which
varies from 1 to 18 around a mean of 1.5; and by the required number of pages of
descriptive documentation, which ranges from 0.5 to 16 with an average of 1.4.
Necessarily we must also admit to some diversity in the technical quality (not in
accuracy or utility) of the programs. In general, the quality will have a positive correlation with the date of the writing. Such quality problems as may exist are most
often due to awkwardness of design or of expression, resulting in programs larger
than necessary. However, the critical program loops are usually very efficient despite
these factors.
Of the 267 programs, 90 are written in FORTRAN language, which is acceptable
to most computers, and 177 are written in the FAP (FORTRAN Assembly Program)
language, which is applicable only to the IBM 709,7090, and 7094 computers.** The
average length of the FAP programs (85 registers) is distinctly smaller than that of
the FORTRAN programs (283 registers). All of the programs are subroutines in the
general FORTRAN sense of the word. The FAP subroutines conform to the subroutine
linkage requirements of FORTRAN II and consequently can be used by FORTRAN programmers who are unfamiliar with the F AP language.
It must not be assumed, however, that the 90 FORTRAN programs can be used
immediately on computers other than the 709 series machines, or that they may be
operated under FORTRAN IV. For the program library is strongly interconnected,
and although each program is usable by the programmer as an apparently independent
entity, many of them internally require the services of up to 16 other programs from
the library. It turns out that only 23t of the FORTRAN programs either need no other
programs from the library, or, if they do, need only programs which are themselves
FORTRAN. Thus the library in present form is by and large specialized to operations
under the FORTRAN II Monitor System of the IBM 709, 7090, or 7094.
The program changes needed to permit operation under FOR TRAN IV on the
IBM 709 series machines are minor compared to those necessitated by a change of
computers, but are still more extensive than a specialist in such matters might guess
from what has been said so far. The standard changes with regard to transfer of
*The numbers here are exclusive of lower-order programs that might be required.
Including these, the range is 1 to 5106.
**Thirteen of the programs will work only on one or two of these three machines.
t Some of these 23 programs require the use of FORTRAN system routines.

2

Introduction
control, to the direction of storage of subscripted arrays, and to the binary point of
fixed-point numbers must be made for all F AP programs needed. But about 30 of the
F AP programs depend on more than routine knowledge of FOR TRAN II (some scan the
calling program ahead of or behind the calling sequence, some have variable-length
calling sequences, some refer to non-FORTRAN-callable system routines, and some
utilize data left behind by the monitor). These programs require additional and more
involved changes. Offsetting this complication, however, is the fact that a number of
these unorthodox programs have the function of expanding the capabilities of FORTRAN II in ways now included as built-in features of FORTRAN IV, and consequently this number can be dropped entirely, providing suitable changes are made in
programs referring to them. On the other hand, there will be cases where the possibility exists of choice between FORTRAN II and FORTRAN IV, and here one should
balance the advantages of FORTRAN IV over FORTRAN II as bolstered by our systemexpansion programs against the required changes in the particular programs needed.
In this volume, little direct help is provided for the problem of translation of
the FAP programs for use on other machines. As a practical matter, however, it
should be pointed out that many, perhaps most, of the F AP programs are of such
elementary nature that their functional description and examples as given in Section 10
are all that coders for other machines will want. (They are more likely to consider
many of the programs to be beneath their dignity.) The more involved FAP programs
may require the services of an experienced translator. The second volume of this
work will give numerical analysis discussions and flow charts of value in these cases.
The programs of Section 10 are alphabetically ordered by program name where
the name of a program is, under ordinary Circumstances, taken to be identical to the
name of the entry point. For F AP programs with multiple entries the program name
is taken from the first entry card in the deck. However, the alphabetized page headings of Section 10 do include all principal and secondary entries, in the latter case
merely giving a reference to the associated prinCipal entry. If the program will
operate only on the 709, we append (709) to the name; if it will not work on the 709,
(7090) is appended; and if it works only on the 7094, (7094) is appended. (None of the
programs work only on the the 7090.) There are some programs of identical entry name
(they always perform identical or practically identicalfunctions), and these are distinguished by appending the serialization -II or -III.
TERMINOLOGY BACKGROUNDS
In the foregoing review we have been using a number of undefined terms, such as
"program," "subroutine," "compiler," and "entry point," on the assumption that the
reader is more or less familiar with them, at least in FORTRAN usage. We now
would like to clarify usage for some of these terms. Unfortunately the attempt to
capture their general meaning with precision leads one into more extensive discussions
of topics concerning computer hardware and input-output devices than we wish to
engage in, and we shall be satisfied with some of the salient definitional features of
the broadest of these terms, namely "computer program."
As a trial definition, let us take the term computer program to mean in general,
"the representation of a plan of activities which could be carried out by a computer,
where the activities possess a logical completeness and integrity with respect to some
motivating function." The program user is interested, in the first instance, in the
nature of the motivating function and in those aspects of the plan which enable him to
understand the program assumptions, or inputs, and the program results, or outputs.
The technical substance of the term, however, is contained more in the natures of the
"representation" and of the "plan," and in the interpretation of the phrase "could be
carried out by a computer" than it is in the utilitarian aspect of the program.

3

Time-Series Computations in FORTRAN and FAP
The problems of meaning here, which are just beginning to be of concern in
questions of law, are severe now and are likely to become worse with time. For the
massive efforts going on in compiler development are continually expanding and diffusing the boundaries of meaning. To give an example, what is now commonly called a
"FORTRAN program" could hardly have qualified as a computer program had it appeared back in 1950 (it would have been referred to probably as a form of algorithm),
not because of the absence of a suitable computer but because there was no compiler
at that time to give operational meaning to a FORTRAN program. At the present time
it is easy to conceive of a compiler which will accept, say, building blueprints and
generate programs to produce complete purchasing lists, construction schedules, etc.
Is a blueprint then to be considered a computer program? Let us set this question
aside for a moment.
What is happening is that compilers and input-output devices are being taught how
to read and respond not only to specification languages, that is, representations of
plans of activities especially invented for computers, but also to many such languages
established prior to the development of modern computers. This educational process
drives the perimeter of meaning for the term "computer program" outward so as to
overlap accepted usage in older disciplines in which people are now seeking to tap the
potential of the big machines.
These remarks point up a logical complication in our trial definition of the term
"computer program," namely that this definition is clearly dependent on the meaning
of the as yet undefined term "compiler," for a compiler, which may be classified
briefly as a program-to-program translator, is itself a computer program. The definitional circle involved here can be broken by resorting to a recursive form of definition
which uses the concept of a "machine-language program" to provide a semantic link
to hardware.
Strictly speaking, we can define a machine-language program to be a representation of a plan of activities for a given computer, which is fully detailed in that it
explicitly and individually specifies the desired initial physical state of every memory
element in the computer which will participate in the activities. Thus for a binary
computer the maChine-language program might be a punched paper tape, where each
potential punch pOSition on the tape is equated by correspondence assumptions with an
individual binary memory element. (Note, however, that an octal shorthand of the
binary expressions on tape would not be a machine-language program in the strict
sense, since such specification, while explicit, is not individual.) A loader (whose
generalizations are" assemblers" or "compilers") is then a device or procedure aware
of the correspondence assumptions and capable of forcing the physical states of the
memory elements in question to correspond to the specifications of any given machinelanguage program.
The present usage of the term computer program is, then, more closely approximated by a "representation of a plan of computational activities which is either a
machine-language program or else can be translated into a machine-language program
by a computer responding to another machine-language program or by a succession of
such translations." Thus one or more computers may be involved in the translation,
and none of these is necessarily the same as the computer on which the original program is eventually executed. The translation programs are called assemblers or
compilers.
It is useful to widen the meaning of "machine-language program" to include all
programs written in a machine-dependent language under which the programmer has
unrestricted and easy access to every capability of the machine. The term absolute
machine-language program can be used to refer to the stricter usage when necessary.
The more general machine language is essentially a symbolic shorthand notation for
the absolute machine language. An assembler is then a translation program for
machine-language programs in the wide sense.

4

Introduction
Our redefinition of computer programs evidently supports the affirmative position
on the question raised earlier concerning blueprints, that is, Should blueprints be conSidered as computer programs once the compilers can handle them? Nevertheless a
strong negative position can be developed. It stems from a critical analysis of what
constitutes a "plan of activities for a computer."
The basic activity of a computer is computation, or calculation on numbers. The
numbers calculated on are usually physically disjointed from the commands of calculation and are gathered in an area labeled data, while the commands are gathered in an
area generally accepted as program. (Note that the FOR TRAN language is designed in a
way which formalizes this division and heightens the impression of absolute distinction
between program and data.) Moreover, the numbers are frequently prepared on, say,
a card deck and read into the data area by program commands prior to calculation.
Such a card deck is not considered a program in any sense of the word.
But if the basic activity of a computer is calculation on numbers, the essential
defining activity which distinguishes a computer from an overgrown desk calculator
is calculation on the program itself. The proper understanding of this feature, abortively introduced by the precocious Babbage over a century ago, is often the most confUSing obstacle a programmer must master in the study of his first machine. The
confusion is due to the possibility, in fact the necessity, of the occurrences of ambiguity between program and data. * It is the transposition of this ambiguity to the
level of compilers which makes our hypothetical question of blueprint classification
truly a moot one.
Thus the card decks which are processed by programs may contain information
other than numbers for calculation. In particular they may contain numbers and symbols which indicate to the program the user's desired specializations, selections, or
sequencing among alternative computational capabilities built into the program. Such
decks are no longer thought of as data decks but rather as control decks. The plan of
activities begins to migrate from the program proper to the cards. In the limit the
cards themselves can become a new program in their own right, and the processing
program becomes a compiler.
When can one say that this limit has been reached? A useful measure to apply
is the range of controls one can exercise with the card deck. If this range covers all
or most of the actual machine capabilities,** as it does in FORTRAN, then the control
deck may clearly be classed as a computer program. As this range narrows, the plan
of activities must be said to reside more and more in the program which processes
the cards.
A blueprint must be considered to be analogous to the control cards of the
foregoing discussion. Clearly the range of controls possible is highly restrictive;
there would probably be no way, except perhaps a highly artificial one, to request, for
example, the sum of one hundred numbers. The true plan of activities for the computer
is a combination of the blueprint and the compiler. In the light of the present discussion, the blueprint may be viewed as control information for this plan, or even as a
plan of activities for the compiler, but not in itself as a true computer program.
*For an illustration in the present program set see subroutine PROCOR. PROCOR
produces a computer program in response to an arbitrary array of numbers and may
therefore be thought of as a specialized assembler whose input "program" is the
number array.
**We are speaking through this discussion of "general purpose" digital computers,
which we leave as an undefined concept. At present most of the major computers are
suffiCiently similar in respect to capability that each one can simulate the behavior of
any of the others, as well as that of the prototype "Turing machine. "

5

Time-Series Computations in FORTRAN

and~

FAP

USAGES IN THE PRESENT VOLUME
For present purposes a "computer program" is a card deck (or any of its translations
or transmissions produced by compilation, assembly, listing, card-to-tape loading,
etc.) prepared according to the rules of FORTRAN II programming or of FAP programming for the 709, 7090, or 7094. Since these fully documented rules prescribe
well-defined program entities, ticklish questions of shades of meaning do not arise.
Nevertheless it is of some value to review here some highlights of subroutine notation,
since all of our programs are of this type, as well as to discuss a few notational conventions of our own.
The expression computer routine is usually used to describe a program whose
functional motivation, while possibly complete in itself, is somehow subsidiary to the
principal computational thought under consideration. The "routine" mayor may not be
merely a segment embedded in a larger program. In any event, compiling and assembly systems provide formal rules by which principal and subsidiary computational
thoughts may be linked with respect to program flow and information exchange, and
routines written under these rules are known generically as subroutines. But there
are exceptions and inconsistencies in usage. Thus in FORTRAN manuals the word
"subprogram" tends to vie with" subroutine" for the generic title, since we see references both to "subprogram-type subroutines" and to "subroutine-type subprograms."
This terminology problem, though not of great practical concern, is necessarily
present in this volume since all the programs here are written so as to be FORTRANcompatible. The ambiguity is relieved somewhat by adopting the following poSitions.
(1) "Subroutine" can refer either to the general class of subsidiary computations linked
by formal rules to a larger computational scheme, or it may refer to a particular
form of such linkage, the reference being apparent from context.
(2) When" subroutine" refers to a particular form, then it must refer to the functionally most general such form within the given class of forms.
Thus the specific form known in FORTRAN as the subroutine or (subroutinetype) subprogram may be considered most general in that its inputs and outputs are
unrestricted in form, whereas the other subprogram types, known as functions, are
restricted to having scalar-valued outputs and in some case inputs. *
From the practical point of view, however, our problem is merely to review
the rules which distinguish among the three kinds of FORTRAN-style subroutines that
appear in this book. The first of these is the ordinary subroutine subprogram, which
is defined by the appearance at the beginning of the FORTRAN deck of a statement of
the illustrative form**
SUBROUTINE SUB(A,B, ... ,D)
where SUB refers to one to six alphanumeric characters starting alphabetically, but
terminating with F only if less than four characters are involved, and where A,B, ... ,D
*Unfortunately even here we would have to yield to the technical argument that a
FORTRAN function may have general outputs in addition to its scalar output (the function value), on which basis the FORTRAN function could be claimed as the most
general subroutine type, although the deSign intent and description seem to center on
the scalar output.
**One or more RETURN statements are usually included but are not mandatory. Similarly, in our FOR TRAN Monitor System (FMS), the subroutine need not refer to all or
even any of the names of its arguments.

6

Introduction
is a list of nonsubscripted names, all different from SUB, which are the arguments of
the subroutine (the list may be void. in which case the parentheses are suppressed),
the names being those of variables or of other subroutine subprograms or FORTRAN
functions.
This type of subroutine is referred to from another FORTRAN program by a
statement such as
CALL SUB(E,F, ... ,H)
where E,F, ... ,H is a list of arguments each of which (1) would form a legal righthand side to a non-Boolean arithmetic statement, or (2) would form a legal alphanumeric field in a format, or (3) is a name appearing on an F card in the calling
program.
The arguments E,F, ...• H should match A,B, ... ,D in mode (e.g., fixed point
or floating point) and number. Moreover there must be understanding between the
calling program and the subroutine concerning each argument which is a subscripted
array. This is most easily achieved by making corresponding DIMENSION statements
(identical except possibly for the variable name) in the two programs. But the
DIMENSION statements do not necessarily have to agree, even with respect to number
of subscripts (the same holds for variables equated by EQUIVALENCE statements).
What is necessary is that the two programs reach an agreement based on the following
rules governing the absolute machine location of a subscripted quantity:
LOC(A(I»

=

LOC(A(I» - (I-I)

LOC(B(I,J»

=

LOC(B(I,I» - (I-I) - (J-I)*IDIMEN

LOC(C(I,J,K»

=

LOC(C(I,I,I» - (I-I) - (J-I)* IDIMEN
- (K-I)*JDIMEN*IDIMEN

where LOCO symbolizes "absolute machine address of," and where we are assuming
a DIMENSION statement of the form
DIMENSION A(IDIMEN),B(IDIMEN,JDIMEN), C(IDIMEN,JDIMEN,KDIMEN)
Note that the first equation above does not involve a dimension. Consequently
it is frequently useful to have the subroutine first dimension all of its arrays as singly
subscripted quantities (with dummy values of the dimension) and then access the
elements using the above relations plus values of the dimensions given to it in the
calling sequence. For example, if the calling program has
DIMENSION C(IO,20,3)

= 10
JD = 20
ID

CALL SUB(C,ID,JD, ... )
and the subroutine has
SUBROUTINE SUB (A,IDIMEN,JDIMEN, ... )
DIMENSION A(I)

7

Time-Series Computations in FORTRAN andFAP
then the subroutine can acquire, for example, C(5,15,2) by the statements
L

= 5 + 14*IDIMEN + JDIMEN*IDIMEN

X = A(L)
By using this type of scheme (not required in FORTRAN IV), it becomes unnecessary to recompile the subroutine for each calling program having different DIMENSION statements. We use it very frequently in the programs of Section 10.
The translation to F AP of the statement
CALL SUB(E,F, ... ,H)
is symbolically
TSX

$SUB,4

TSX

E,O

TSX

F,O

TSX

H,O

where $SUB is a reference to the transfer list discussed below, and where E,F, ... ,H
now stand for machine locations containing the corresponding arguments. For each
argument which is an array in the calling program but which appears in the CALL
statement with no subscripts, the location is assigned as though it had appeared with
all of its subscripts set to value one.
The FOR TRAN function (of which there are only two in the present set) is defined
by the appearance at the beginning of the FORTRAN deck of something like
FUNCTION FNCTN(A,B, ... ,D)
and must include a RETURN statement preceded by an arithmetic statement of the form
FNCTN
where FNCTN obeys the sarne naming rules as SUB above, and where A,B, ... ,D is
similar to the same expression in the subroutine-subprogram case but must not be a
void list.
The FORTRAN function is referred to from another program by an arithmetic
statement such as
X

= ... FNCTN(E,F •... ,D)

...

where the right-hand side of the equality is any legal FORTRAN expression which
treats FNCTN( ... ) as a single number. The mode of this number is assumed determined by the function name according to FORTRAN naming conventions for variables
E,F, ... ,H and A,B, ... ,D must match each other in the same manner as discussed
above. The translation to F AP is the same as that of a subroutine subprogram, with
$FNCTN,4 replacing $SUB,4, except that the statements immediately following the
TSX H,O will assume the value of the function, Le., the single number generated by
the function, to be in the accumulator.

8

Introduction
The third type of subroutine is the closed (or library) function, of which there
are many examples in Section 10. This type must be hand coded with a structure
such as
ENTRY FNCTN
FNCTN

STO

A

CLA

VALUE

TRA

1,4

The reference to the closed function from a FORTRAN program is the same as a
reference to a FORTRAN function, except for the following differences: F* is appended
to the name, the function value is considered fixed-point if and only if the name of the
function begins with X, and the arguments in the string E,F, ... ,H may not be alphanumeric fields or names of subroutines. The information linkage is quite different
and less uniform, however. The four statements in the table below, with their effective
translations, illustrate the information linkage adequately.
X

=

=

FNCTNF(A)

X

FNCTNF(A,B)

CLA
TSX
STO

A
$FNCTN,4
X

LDQ
CLA
TSX
STO

B
A
$FNCTN,4
X

X =
CLA
STO
LDQ
CLA
TSX
STO

FNCTNF~A,B,C)

C
(DECIMAL)
32765
B
A
$FNCTN,4
X

X =
CLA
STO
CLA
STO
CLA
STO
LDQ
CLA
TSX
STO

FNCTNF (A,B,C ,D,E)
E
(DECIMAL)
32763
D
(DECIMAL)
32764
C
(DECIMAL)
32765
B
A
$FNCTN,4
X

In addition to closed functions, it is of course also possible to hand-code subroutines and FORTRAN functions. The formal structure is similar to that for the closed
function. Two examples are
ENTRY

SUB

ENTRY FNCTN
FNCTN

SUB
TRA

CLA
TRA

N +1,4

VALUE
N+1,4

*In the tabulations of this volume the terminal F is not considered to be part of the
proper name of the function.

9

Time-Series Computations in FORTRAN and FAP

\

where N is the argument count of the pertinent statement in the calling program, and
where the hand coding is done subject to the argument transmission conventions
illustrated earlier.
In the listings of Section 10 the expressions FORTRAN subroutine and ~
subroutine under the "language" heading always refer to the subroutine subprogram,
and the expression FAP function to closed functions. The two FORTRAN functions
are so labeled.
Hand coding of subroutines, unlike FORTRAN coding, permits the bunching of
many subroutines in one program deck (which is often useful if the subroutines perform
similar operations). Thus
ENTRY
ENTRY
ENTRY
ENTRY

SUB1
SUB2
FNCTN1
FNCTN2

TRA
STO
STQ

A
B

CLA
TRA

1,4

CLA
TRA

VALUE2
6,4

SUB1
SUB2

FNCTN1

5,4

VALUE1

FNCTN2

might be a "single"program representing two subroutine subprograms, each of which
has four arguments, one closed function of two arguments, and one FOR TRAN function
of five arguments, all four subroutines needing access to the same table of numbers.
This type of multiple-entry coding in F AP, appearing frequently in the library
of Section 10, clouds the meaning of the term "program." From the standpoint of the
calling program, each entry of a multiple-entry program is used as an independent
subroutine; the calling program has no way of knowing that they are dependent. If a
reference is made to just one of them, the loading program must nevertheless bring
the entire bunch into the memory as a unit, since the physical deck cannot be divided.
For example, the standard FOR TRAN functions COS and SIN are separate entries to
a single program and are always together in the machine if one of them is.
We might speak of logical programs and physical programs to clarify intention
when necessary. For program-writing purposes, however, there is never any necessity to refer to other than logical programs. In any case, it has become customary in
many circumstances to bypass the question by simply referring to entries or entry
points. This terminology relates to the fundamental topic concerning "program" in the
conception of the control hardware, namely, where to send control for the next job,
and is neutral with respect to higher-level distinctions made by compilers. (Note that
in the printed output of the compilation of a FORTRAN program one finds a list of

10

Introduction
required logical programs accurately entitled" entry points to subroutines not output
from the library.' ')
For purposes of dealing with program decks and of general documentation, on the
other hand, one must refer to a multiple-entried program as a unit. The manner of
doing this is a matter of local convention. We have chosen to equate the name of each
physical program with the name on its first entry card and to speak of that name as
the prinCipal entry, other entries being termed secondary entries.
When FORTRAN or FAP is processing a program, it forms a complete nonredundant list of all of the entry names referred to by the program. This list, which
appears in BCD form in the first registers of the absolute relocatable binary deck
produced by the translation, is called a transfer list or, as it is called more often in
this book, a transfer vector. Each reference to a subroutine in the program body,
that is, each TSX $SUB,4, becomes TSX A,4 where A is the register in the transfer
list containing the name SUB. At execution time, the monitor system replaces the
list of entry names with a corresponding list of Trap Transfer instructions whose
address fields are the absolute machine locations assigned to the corresponding entries
by the storage allocation logic for the particular execution. This scheme of routing
all references to other entries through a single transfer vector helps minimize the
relocation task of the loader.
Transfer vectors often contain entries whose names are illegal subroutine names
(containing special characters) from the standpoint of usage by FORTRAN programs.
These routines, requested by the compiler as needed to implement associated FORTRAN statements, are called non-FORTRAN-callable routines. They can be directly
referred to, however, from FAP programs, and the reader will find a number of
such references in our program set.
The program descriptions in Section 10 also use a more specialized notation;
features of it are described in the following paragraphs.
A FORTRAN INTEGER, or FORTRAN-II INTEGER, or INTEGER is a fixed-point
quantity with binary point assumed between bits 17 and 18, with bits 18 through 35 all
zero, where the 36 bits are labeled S,1,2, ... ,35.
A MACHINE-LANGUAGE INTEGER, abbreviated as MLI, has its binary point
to the right of bit 35.
A triple-dot notation is often used to suppress symbolic subscripts in expressing
lists of numbers. Thus
X(l . . . 3) stands for
and
Y(l • . . 3,1 . • . 2

(X (I) , I

J
stands for

or

1,3)

«Y(I,J),I

= 1,3), J = 1,2)

Y(l ,2,3,,1,2)
The term VECTOR is used very commonly to refer to any singly subscripted
FORTRAN variable, and its length is the highest subscript value of pertinence. A
doubly subscripted variable is referred to as a MATRIX or 2-DIMENSIONAL ARRAY,
and a triply subscripted variable as either a 3-DIMENSIONAL ARRAY or a MATRIX
VECTOR, this last term implying that the first two subscripts define a two-dimensional
array which, in the context of the computation, obeys laws of matrix algebra.
The abbreviations LSTHN, LSTHN = , GRTHN, and GRTHN = stand for the symbols < , ~ , >, and ~ respectively.
Mathematical expreSSions appearing under ABSTRACT may deviate from
FORTRAN conventions of naming and indexing. The emphasis here has been to produce expressions which are visually close to those of ordinary mathematics.

11

Time-Series Computations in FORTRAN and FAP
The numerical examples given involve some notation which should be fairly
obvious. Fixed-point number lists should always be assumed to be FORTRAN-II
integers unless preceded by OCT for octal or MLI for machine language integer. On
the other hand, the representation of Hollerith data is not too satisfactory or consistent as given here. In most cases we use either
X(l . . . )

= 6H(something)

X(l . . . )

= 6Hsomething

or

to imply that the" something" is a string of Hollerith characters stored six to a register, that is, FORMAT(A6). However, in some cases the "something" may be split
into groups of six characters separated by commas to conform to the representation
of ordinary numerical lists. In deciding which is meant, the reader will have to use his
judgment from the context.
There are some further notational discussions, which can be found in the introductions to Sections 4 and 10, and there is a pronunciation guide to the entry-point
acronyms in Section 6.
PROGRAMMING PHILOSOPHY
The program set of Section 10 grew over a considerable period of time in a programming environment which possessed continuity of personnel and computers, coherency
of computational purpose, total rapport between analysis and programming, relative
freedom from a crisis atmosphere, and adequate financial support - an uncommon
and fortuitous environment indeed, and one in which programming philosophy could be
developed and realized. To a large extent the programs themselves are an adequate
expression of such developments. This is particularly true of documentation and
testing procedures, which are discussed in Section 10 as well as in the Preface, but
more general design considerations may not be as self-evident.
Our most general explicit design tendencies have been to avoid writing "main"
programs except when absolutely necessary, and, when it does become necessary, to
pare down the functions of the main program so that it incorporates only the specializing and input-output aspects of the applied problem at hand. Thus each applied
problem is subjected to analysis to determine (a) what aspects of it are expressible
in terms of the existing program set, and (b) what remaining aspects might be of
future value if expressed as subroutines to be added to the general collection. Everything else becomes a function of the main program, except that occasionally subroutines might be used here for certain purely technical reasons (for instance, to break
down large programs into smaller blocks for reduction of compilation time during
debugging.
Sometimes there are aspects of the main program's functions which for other
technical reasons seem naturally to require subroutine usage (e.g., conputational
patterns needed at numerous positions in the program). Such aspects are usually
handled by methods internal to the main program, Le., by arithmetic statement functions or by effective" internal subroutines" utilizing ASSIGNED or COMPUTED GO TO
statements for linkage (we don't write main programs in F AP). This is done to help
limit the indiscriminate growth of true subroutines and the attendant naming and
documentation problems.
Computational aspects which are considered to be of future value are usually
discussed by the responsible programmer with others in developing the detailed subroutine specifications. The basic choice of subroutine type has been almost invariably

12

Introduction
made between closed functions and subroutine subprograms. * Beyond this our programming group adheres to general conventions in calling-sequence design and
terminology. These are detailed in Section 4. Input-output functions are not generally
permitted to a subroutine unless they are its primary responsibility, in which case the
external units involved are specified as arguments in the calling sequence, rather than
assumed. Computational subroutines usually begin with an interlude for checking the
legality of input-type arguments, and they refuse to perform badly requested computations, returning instead a diagnostic error flag as the only output. As a minimum
we try to make the routines shock-proof with respect to the possibility of loss of control (loops, stops, unpredictable transfers). Special care is taken to ensure that the
subroutine behaves reasonably when faced with conceptually legal but unusual, or
limiting, or degenerate configurations of input arguments, so as not to create booby
traps in applications broader than the specific one creating the need for the subroutine.
Also, we try to see that such configurations appear in the testing programs.
But there are deeper problems of subroutine design which touch on questions not
peculiar to the field of programming. By what process does one examine a complex of
activities and abstract or invent useful subgroupings? With respect to the present
program set we can pretty well sidestep the difficult part of this question, since the
subgroupings are broadly based on corresponding and previously established ones of
mathematical analysis. In particular, a program system meaningful with respect to a
field of analysis would naturally tend to become a mapping of the operational structure
of that field, and Volume II will expand on this topic for time-series analysis. The
more difficult question still remains, however: What discriminates good program
invention from bad within whatever freedom of decision prevails? Our only suggestion
here is to recall the commonplace that good invention arises from the dissatisfaction
of creative individuals familiar with both the cause of their irritation and the tools of
the trade. The question itself is of clear importance in, say, the task of designing
program-generating programs, but there is no need to pursue it in the present volume.
DESIGN FOR SPEED
We shall conclude this introductory section with a short discussion of one last consideration, namely that of computer time required. It has affected our programming
strongly, since we have been dealing with many long empirical time-series and numerical filters. It has strongly biased our programming toward FAP over FORTRAN,
and, in general, has decided the issues of tradeoff between speed and space in favor of
the faster, if longer, programs.
In Section 3 there is a program category labeled FAST which contains a large
number of entries. Study of the programs in this category will furnish details of the
various programming techniques we have used to obtain speed. Volume II will provide
further discussions of some of these techniques, but for the present we will only abstract some data relative to the 7094 on program speeds, in the three most important
areas where our techniques have been significantly superior to elementary approaches:
correlation or convolution, Fourier transformation, and solution of Toeplitz matrix
equations.
*In retrospect, our tendency to avoid writing FORTRAN functions, based on no better
reason than the fact that one can occasionally confuse them with subscripted variables,
appears somewhat unfortunate, since we thereby denied ourselves a certain degree of
flexibility. (Note, for example, that one may call a FORTRAN function as an ordinary
subroutine subprogram in addition to using it as a numerical entity in an arithmetic
statement.

13

Time-Series Computations in FORTRAN and FAP
Our key high-speed correlation or convolution program is PROCOR, whose
writeup gives a reasonable idea of the techniques employed. Since PROCOR involves
basically fixed-point arithmetic, a number of higher-level routines based on PROCOR
have been written for ordinary correlation and convolution floating-point applications.
They are QACORR, QXCORR, QXCOR1, and QCNVLV. Timing data for the autocorrelation program QACORR are adequate for illustration here. This program achieves
nothing more complicated than does the following FORTRAN subroutine.

10
20

SUBROUTINE FORAC(X, LX, MXLAG, ACOR)
DIMENSION X(2), ACOR(2)
JMAX
= MXLAG + 1
DO 20
J = 1,JMAX
SUM
= 0.0
NMAX
= LX - J+1
DO 10
1= 1,NMAX
K
= J+1
SUM
SUM + X(I)*X(K-1)
ACOR(J)
SUM
RETURN
END

Fig. 1 gives timing information on QACORR andon the above program for data lengths
varying from about 20 to 10,000, showing that QACORR is inferior for very short
data but possesses a speed advantage factor of ten or greater for the longer series
(this factor jumps to around 17 for the 709 or 7090). Similar savings will be realized
in cross correlation and convolution by the other programs using PROCOR.
The high-speed harmonic transform programs are based primarily on subroutine
COSP. They are ASPECT, COSIS1, QFURRY, QIFURY, and XSPECT. (Subroutine
F ACTOR also uses COSP in finding minimum-phase transients from energy-density
spectra.) The speed of COSP comes from careful looping logic on stored sinusoids.
Speeds of ASPECT, which finds cosine transforms of symmetrical data (usually autocorrelations in our applications) and which uses folding and splitting logic in addition
to using COSP, can be 10 to 100 times faster than those of elementary programs.
Speed-run results for ASPECT are shown in Fig. 2 for various data lengths and frequency increments. The upswing of the curves in the lower portion of the figure results
from the gradually dominating influence of the folding and splitting logic for lop.g data.
Toeplitz matrices arise in many time-series problems, particularly in the determination of least-squares filters. These matrices are positive definite Hermitian with
elements constant along any diagonal, so that if the matrix is n by n, there are only n
independent elements rather than n 2 • Recursion techniques exist for the solution of
simultaneous equations involving these matrices, which require computational times
proportional to n2 rather than n3 • * Subroutine WLLSFP or the coordinated pair
RLSPR and RLSSR handles normal Toeplitzmatrixequationproblems. RLSPR2, FIRE2,
MIPLS, MIFLS, and MISS are for use in multidimensional or multi-input problems
when, for example, the matrix elements themselves become matrices. It is instructive
to make a comparison between the computation times of ordinary simultaneous-equation
programs not involving the special Toeplitz assumption and those of recursive programs. Such a comparison is made in Fig. 3, showing empirical times of WLLSFP and
of the general utility subroutine SIMEQ. Analogous curves for the 7090 will show very
similar relative behavior.
*An early reference is Levinson's Appendix to Interpolation, Extrapolation, and Predq.iction of Stationary Time Series, by N. Wiener, John Wiley & Sons.

14

100.0

DASHED CURVES
AUTOCORRELATION
(HIGHEST

10.0

t

ELEMENTARY
FORTRAN
PROGRAM

v
en

~

IJ.J
::I:

r-

z 1.0
o
CJ)

o

z

o

U

IJ.J

CJ)

.10

TER MXACC OF
QACORR SPECIFIES THAT THE
DATA MAY BE ROUNDED DURING
THE COMPUTATION TO INTEGERS
IN THE RANGE -MXACC TO +MXACC

.01
10

25

50

100

250

500

1000

2500

5000 10000

DATA LENGTH LX --+
FIGURE 1. EMPIRICAL TIME CURVES FOR SUBROUTINE QAC(2!RR AND FOR AN
ELEMENTARY FORTRAN PROGRAM IN COMPUTING AUTOCORRELATION FUNCtiONS.

100.0

amllllflllllmIlIlBmIlEllmem__
MFREQ

+1

MXLAG

IS THE
BER OF FREQUENCIES, EVENLY SPACED FROM
ZERO TO 7r, AT WHICH THE TRANSFORM IS COMPUTED.
IS THE HIGHEST LAG OR HALF-LENGTH OF THE AUTOCORRELATION.

i

v

m

or-w
J:

IZ 1.0

o

Cf)

o

z
u
w

o

Cf)

.10

.01

10

25

50

100

250

500

1000

2500

5000 10000

MXLAG~

FIGURE 2. EMPIRICAL TIME CURVES FOR SUBROUTINE ASPECT IN COMPUTING
COSINE TRANSFORMS OF AUTOCORRELATIONS OVER THE FULL
FREQUENCY RANGE.

10.0

t

v
en
0

I'lLI

:r:

IZ

0

1.0

en

0

z

0

U
lLI

en

.10

.01
1

100

10

1000

N-+
FIGURE 3.

EMPIRICAL TIME CURVES FOR SUBROUTINES WLLSFP AND SIMEQ
IN SOLVING THE MATRIX EQUATION AX = B FOR THE VECTOR X,
WHERE A IS SQUARE T~EPLlTt: OF DIMENSION N BY N.

Time-Series Computations in FORTRAN and FAP
REFERENCES
As mentioned earlier, the motivation behind the development of this program set was
time-series applications. From 1952 to 1957 these applications concerned seismic
exploration for oil and were pursued by the M.I. T. Geophysical Analysis Group of the
M.I. T. Department of Geology and Geophysics. From 1960 to 1965 the work was continued by an M.l. T. VELA UNIFORM group of the same department on the problem of
underground nuclear detection. The research reports of these two groups contain
background material for the present volume and are available for reference.
The M.l.T. Geophysical Analysis Group Reports are on file at the M.l.T. Library,
and also at VESIAC, the VELA Seismic Information Analysis Center at the Institute of
Science and Technology of the University of Michigan. They are:
Robinson, E.A., and G.P. Wadsworth, A prospectus on the applications of linear
operators to seismology, M.I. T. Geophysical Analysis Group Report 1, Cambridge, Mass., and VESIAC 1108, 1952, 61 pp.
Robinson, E.A., and G.P. Wadsworth, Results of an autocorrelation and crosscorrelation analysis of seismic records, M.l. T., Geophysical Analysis Group
Report 2, Cambridge, Mass., 1952, 40 pp.
Robinson, E.A., S.M. Simpson, Jr .. M.K. Smith, and W.P. Walsh, Case study of
Henderson County seismic record, M.l. T. Geophysical Analysis Group Report 3,
Cambridge, Mass., and VESIAC 1100, 1953, 48 pp.
Robinson, E.A., S.M. Simpson, Jr., and M.K. Smith, Linear operator study of a Texas
Company seismic profile, M.I. T.
Geophysical
Analysis Group Report 4,
Cambridge, Mass., and VESIAC 1101, 1953, 181 pp.
Robinson, E.A., M.K. Smith, and S.M. Simpson, Jr., On the theory and practice of
linear operators in seismic analysis, M.l. T. Geophysical Analysis Group Report 5,
Cambridge, Mass., and VESIAC 1102, 1953, 95 pp.
Robinson, E.A., M.K. Smith, S.M. Simpson, Jr., D.E. Bowker, R Bowman, H.W.
Briscoe, J.F. Gilbert, S. Treitel, M.S. Turyn, and W.P. Walsh, Further research
on linear operators in seismic analysis, M.l. T. Geophysical Analysis Group
Report 6, Cambridge, Mass., and VESIAC 1103, 1954, 203 pp.
Robinson, E.A., Predictive decomposition of time series with applications to seismic exploration, Ph.D. Thesis, M.l.T., and M.l.T. Geophysical Analysis Group
Report 7, Cambridge, Mass., and VESIAC 1104, 1954, 265 pp.
Simpson, S.M., Jr., A multiple trace criterion for linear operator selection, M.l. T.
Geophysical Analysis Group Report 8, Cambridge, Mass., 1954, 30 pp.
Simpson, S.M., Jr., R Bowman, D.R Fink, J.F. Gilbert, D.R Grine, M. LopezLinares, RD. Tooley, S. Treitel, and R W. Wylie, Linear operators and seismic
noise, M.l. T. Geophysical Analysis Group Report 9, Cambridge, Mass.,
1955, 281 pp.
Simpson, S.M., Jr., R Bowman, D.R Fink, D.R Grine, M. Lopez-Linares, H. Posen,
R. D. Tooley, S. Treitel, and R. W. Wylie, Properties, origin, and treatment
of certain types of seismic noise, M. 1. T. Geophysical Analysis Group Report
la, Cambridge, Mass., 1956, 211 pp.
18

Introduction
Simpson, S.M., Jr., J.F. Gilbert, D.R Grine, RL. Sax,S. Treitel,andRW. Wylie.
The interrelation of the deterministic and probabilistic approaches to seismic problems, M.I. T. Geophysical Analysis Group Report 11, Cambridge,
Mass., 1957. 136 pp.
The VELA UNIFORM reports [of Contract No. AF19-(604)-7378] are on file at
the M.l. T. Library (where they are filed by their AFCRL numbers) and at VESIAC.
They are also distributed by government organizations. Requests from government
agencies and from Department of Defense contractors are handled by the Defense
Documentation Center, Cameron Station. Alexandria. Virginia 22314. Others can
apply to
Clearinghouse for Federal Scientific and
Technical Information (CFSTI)
Sills Building
5285 Port Royal Road
Springfield. Virginia 22151.
These reports (all unclassified) are:
Simpson, S.M .• Jr., J. Claerbout. and J.N. Galbraith, Jr., Initial studies on underground nuclear detection with seismic data prepared by a novel digitization
system, Report No. 1 of AF19(604) - 7378. M.l. T., Cambridge, Mass., and
AFCRL 61- 863,1961. 450 pp.
Robinson, E.A., S.M. Simpson, Jr., J. Claerbout, J.N. Galbraith, Jr .• J. Clark,
and W. Ross, Time series techniques applied to underground nuclear detection
and further digitized seismic data, Report No. 2 of AF19(604) -7378.M.I. T.
Cambridge, Mass., and AFCRL 62-262. December, 1961, 500 pp.
Robinson, E.A., S.M. Simpson, Jr., J. Claerbout, J.N. Galbraith, Jr .• RA. Wiggins,
C. Pan, and J. Clark, Continued numerical studies on underground nuclear
detection and further digitized seismic data, Report No.3 of AF19(604) -7378,
M.l. T., Cambridge, Mass .• and AFCRL 62-879, June, 1962, 363 pp.
Simpson. S.M., Jr., Magnetic tape copies of M.l. T. Geophysics Program Set I.
Report No. 4 of AF19(604) - 7378, M.l. T .• Cambridge, Mass .• and AFCRL 63282, December, 1962, 47 pp.
Claerbout, J. F., Digital filters and applications to seismic detection and discrimination, M.S. TheSis. M.l. T., and Report No. 5 of AF19(604) -7378, M.I. T.,
Cambridge, Mass., and AFCRL 63-604, February, 1963, 89 pp.
Galbraith, J.N., Jr., Computer studies of microseism statistics with applications to
prediction and detection, ph.D. TheSiS, M.l. T., and Report No.6 of AF19(604)7378, M.l.T., Cambridge, Mass •• and AFCRL 63-673, May. 1963,283 pp.
Simpson, S.M., Jr., E.A. Robinson, RA. Wiggins, andC.l. Wunsch, Studies in optimum
filtering of single and multiple stochastic processes, Rep0l't No.7 of AF19(604)
7378, M.l.T., Cambridge, Mass., and AFCRL 64-241, June, 1963,140 pp.
Robinson, E.A., Seismic arrays for the detection of nuclear explOSions, Report No.8
of AF19(604) -7378, M.l. T., Cambridge, Mass., and AFCRL 64- 855, June.
1964, 107 pp.

19

Time-Series Computations in FORTRAN and FAP
Wiggins, RA., On factoring the correlations of discrete multivariable stochastic
processes, Ph. D. Thesis, M.l. T., and Report No.9 of AF19(604) -7378, M.I. T.,
Cambridge, Mass., and AFCRL 65-207, February, 1965, 196 pp.
Simpson, S.M., Jr., Magnetic tape copies of M.l. T. Geophysics Program Set II, Report
No. 10 of AF19(604) -7378, M.l. T., Cambridge, Mass., andAFCRL 65-306, March,
1965, 79 pp.
Simpson, S.M., Jr., R.W. Wiggins, and C. Pan, Sampling events from U.S.C. & G.S.
Earthquake Cards, Report No. 11 (Final Report) of AF19(604) -7378, M.l. T.,
Cambridge, Mass., and AFCRL 65 - 463, June, 1965, 70 pp.

20

2
Illustrative
Usage of Programs

Examples of the use of the program as an isolated entity appear with each program
listed in Section 10. Such examples are valuable, but often do not project a sense of
the use of the program in an applied setting. Volume II of the present writing will give
numerous illustrations of such usage in the time-series setting for which the program
collection was developed. It is in keeping with the tenor of the present volume to
present' examples of usage in an applied but utilitarian setting. Such a setting is meaningful, because a good many of the programs of the collection fall under a utility classification in no way specialized to the field of time series.
The illustrations in the first set given are quite simple to scan and digest. A
large number of the utility programs have truly elementary functions which are easily
expressed by a few basic FORTRAN statements, the raison d' ~tre of such programs
being convenience, or speed, or both. The illustration for these programs is a
sequence of isolated program usages paired with equivalent, basic FORTRAN sequences.
In this fashion a large number of programs can be covered in a few pages. The selections here include ,all of the minor utility programs which have simple FORTRAN
translations. The reader should be cautioned that the basic FORTRAN equivalents
may not be exact in all variations of the sample usage, especially in cases of zero or
negative-length vectors, or in cases where arguments in calling sequences are equated
by FORTRAN equivalence statements not shown here.
The illustrations in the second set given in this section are simply listings of
some of the testing programs we have used to verify the input-output behavior asserted
in the program writeups of Section 10. In these test programs we have leaned heavily
on the use of utility programs previously verified. The test programs must be studied
with close reference to the program writeups of Section 10, since the test decks have
no independent documentation. An examination of these listings will also bring out the
general style we have evolved for writing test programs: this style may be of interest
to persons with similar problems.
The third and last set of illustrations consists of three main programs which
produced the timing data for Figs. 1, 2, and 3 of Section 1.
21

III

1-------------------------------------[---------------------------------------1
[

I

I

PROGRAM USAGE

I

I

I

EQUIVALENT BASIC FORTRAN

I

I
I

1-------------------------------------1---------------------------------------1
I CALL ABSVAL(X,11,12,V,IANS)
I
DO 10 1=11,12
I
I
I
J=I-Il+1
I
I 10 V(J)=ABSF(XlI))
I
I (SAME PROGRAM FOR FIXED POINT)
1-------------------------------------1---------------------------------------1
I CALL ADDKlC,X1,X2, ••• ,XN)
I
X1=X1+C
I
I
I
X2=X2+C
[

I

I

lETC)

I

(XADDK FOR FIXED POINT)
I
XN=XN+C
I
1-------------------------------------1---------------------------------------1
I CALL ADDKSlC1,X1,V1, C2,X2,V2,
1
V1=X1+C1
I
I 1
••• , CN,XN,VN)
I
V2-X2+C2
I
I
I
I ETC)
I
I (XADDKS FOR FIXED POINT)
I
VN=XN+CN
I
I

1-------------------------------------1----------------------------------~----I

I
SUM=O.O
I
I
DO 10 l=l,LX
I
I
I 10 SUM=SUM+XlI)
I
I (XAVRGE OR XAVRGR FOR FIXED POINTI I
XAVG=SUMfFLOATFllXI
I
1-------------------------------------1---------------------------------------1
I CALL BOOSTlX,LX,C,VI
I
DO 10 1-1,LX
1
I lXBOOST FOR FIXED POINT)
I 10 VlI)-Xlll+C
I
1-------------------------------------1----------------__________________ 4 _ _ _ _ 1
I CALL CARIGElITAPE,NSPACE)
1
IF (NSPACE) 40,60,10
1
I
1 10 DO 20
l=l,NSPACE
I
I
I 20 WRITE OUTPUT TAPE ITAPE, 30
1
I
I 30 FORMAT( 1H I
1
I
I
GO TO 60
[
1
I 40 WRITE OUTPUT TAPE ITAPE,50
I
I
I 50 FORMAT IlHlJ
I
I
I 60 CONTINUE
I
1-------------------------------------1---------------------------------·-----1
I CALL CHOOSE(ZIFRST, X,X1,X2, ••• , I
IF lZIFRST) 20,10,20
1
I 1
Z,Zl,l2)
I 10 X=X1
I
I
I
I ETC)
I
I

1

CALL AVRAGElX,LX,XAVGJ

I

1
I

1=11

GO TO 30
I 20 X-X2

I

I[I

I

lETC)

I
1=12
I 30 CONTINUE

I

I
I
I

1I
I

1-------------------------------------1---------------------------------------1
I
CALL CHSIGNlX,LX,V)
I
DO 10 l=l,LX
I
I (SAME PROGRAM FOR FIXED POINT)
I 10 VII)a-XCI'
I
1-------------------------------------1---------------------------------------[
I IF (CHUSETF(X,X1,X2,ZIFX1)1
I
IF CZIFX1) 20,10,20
I
I 1
40,50,60
I 10 X=X1
I
I
I
GO TO 30
I
.I
I
I 20 X=X2
I (SAME PROGRAM FOR FIXED POINT)
I 30 IF lZIFX1)
40,50,60
I

1-------------------------------------1---------------------------------------1
I
X=DELTAFlV)
I
IF (Va 20,10,20
I
I
I
1
I

(ARGUMENT MODE I~MATERIAL)
(XOELTA FOR FIXED POINT)

I 10 X=1.0
I
GO TO 30
I 20 x=o.o
I 30 CONTINUE

I
-I
I
I

1-------------------------------------1---------------------------------------1

1-------------------------------------1---------------------------------------1
I
I
I
1
PROGRAM USAGE
I
EQUIVALENT BASIC FORTRAN
1
I
I
I
1-------------------------------------1---------------------------------------1
I CALL DIVIDEIX,LX,D,Y)
I
DO 10 1=1,LX
I
I
IXDVIDE OR XDVIDR FOR FIXED POINT. I 10 YIII=XIII/D
I
1-------------------------------------1---------------------------------------1
1 CALL DIVKIC,X1, ••• ,XNI
I
X1=XI/C
1
I
I
( ETC I
I
I IXDIVK OR XDVRK FOR FIXED POINT)
I
XN=XN/C
I
1-------------------------------------1---------------------------------~-----I

I

CALL DIVKSIC1.X1,Y1 ••••• CN,XN,YNI

1

I

I

I

IXDIVKS OR XDVRKS FOR FIXEO POINT) I

Y1=X1/C1

I

I ETC I

I

YN=XN/CN

I

1-------------------------------------1---------------------------------------1
1 CALL DPRESSIX,LX.C.YI
1 DO 10 1=1,LX
1

I IXDPRESS FOR FIXED POINT)
I 10 Ylll=XIII-C
I
1-------------------------------------1---------------------------------------1
I CALL DUBLLIX,LXI
I
DO 10 l=l,LX
I
I IDUBLX FOR FIXED POINT)
1 10 X(II=2.0.X(11
1
1-------------------------------------1---------------------------------------1
I CALL EXCHVSILXY.X,YI
I
00 10
I=I,LXY
I
I
I
TEMP=X' II
I
XII)=Y(I)
I (SAME PROGRAM FOR FIXED POINT)
I 10 Y(II=TEMP
I
1-------------------------------------1---------------------------------------1
1 CALL FDOT(LXY,X,Y,DOTI
I
DOT=O.O
I
I
I
00 10
1=I,LXY
1
1
1 10 OOT=DOT+X(I).Y(II
I
1-------------------------------------1---------------------------------------1
I CALL FDOTRILXY,X,Y,DOTRI
I
DOTR=O.O
{
I
I
DO 10 I=1,LXY
1
I
I
J=LXY+1-1
I
I
I 10 DOTR=OOTR+XII).YIJ)
I

I

1

1

1-------------------------------------1---------------------------------~-----I

1 CALL FIXVIX,LX,IX)
1
DO 10 1=I,LX
I
I
I 10 IXI (l=XFIXF(X(ltI
1
1-------------------------------------1---------------------------------------1
I CALL FIXVRIX,LX,IXI
1
DO 10 I=1,LX
1
I
I 10 IXI()=XFIXF(XIII+.51
I

1-------------------------------------1----------------------------------------1
CALL FMTOUTIITAPE,10H8H MESSAGE)
I
WRITE OUTPUT TAPE ITAPE,10
I

I

1
I 10 FORMAT( 8H MESSAGE)
I
1-------------------------------------1---------------------------------------1
1 Y=GETXIX.IA ••••• IX,IY.IZI
I
I=IYIIZI
I
I
I
I=IX(I)
1
I
I
I

IIGETX FOR FIXED POINTI

I
I
I

l=lAII)
Y=XIII

(ETC I

I

IF 1I-ICRTCl)

I
I

I

1-------------------------------------1---------------------------------------1
I IF IINOEXFII.ICRTCL)) 10,20,30
I
1=1+1
1
I

10,20,30

I

1-------------------------------------1---------------------------------------1
I CALL HALVLIX.LX)
I
00 10
1=1,LX
I
I (HALVX FOR FIXED POINT)
I 10 XIII=XII)/2.0
I
1-------------------------------------1---------------------------------------1

I -------------------------------------1----------------------------------.----·1
I
I
I

I

PROGRAM USAGE

I

·1

EQUIVALENT BASIC FORTRAN

I

I
I

1-------------------------------------1---------------------------------------1
I
CALL INTSUMIX,lX,VI
I
VIII-Xlll
I
I
I
IF ILX-ll 30,30,10
I
I
1 10 DO 20 1=2,LX
1
I
1 20 VIII=Y(I-ll+XIII
1
I
IXNTSUM FOR FIXED POINTI
1 30 CONTINUE
I
I-----~-------------------------------I------------------~---------------~----I
I
CAlL·IXCARGIX,IXI
I
COMMON C
I

",
1
IX=XlOCF(CI-XLOCF(XI+l
1
I
1-------------------------------------1---------------------------------------1
I CAll LOCIX(II,ILOC)
I
IlOC=XlOCF(XI-I+1
I
1-------------------------------------1---------------------------------.....
CALL MOVEILX,X,Yt
1
IF IXLOCFIXI-X10CFIYlt 10,50,30
I
I
I 10 DO 20 1=1,LX
I
1
I
I 20 VIII-XCII
I
I
GO TO 50
1
I
I 30 DO 40 1=1,lX
1
I
I
J=LX+I-1
I
I
I
I 40 YIJI=XIJI
I
I
I 50 CONTINUE

----.1

1

1-------------------------------------1---------------------------------..
-----·1I
I CALL MUlKIC,X1, ••• ,XNI
...
I
X1=X1-C
I
I

I
IXMUlK FOR FIXED POINTI

I

I ETC I
XN=XN-C

I

I

1-------------------------------------1---------------------------------------1
I CALL MULKSIC1,Xl,Y1, ••• ,CN,XN,VNI 1
Yl=C1-X1
I
(ETC I
I
I
I
I
VN=CN-XN
I
I IXMULKS FOR FIXED POINTI
1-------------------------------------1---------------------------------·-----1
I CALL MULPlVIX,lX,C,VI
I
DO 10 1:1,lX
1
I IXMLPLY FOR FIXED POINT)
I 10 YC 1 I=C-XI lJ
I

1-------------------------------------1---------------------------------------1
1 A=NTHAFIJ,A1, ••• ,ANt
I
TEMPC11 A1
I
a

1

I

I
I

1
1

IXNTHA FOR FIXED POINTI

I ETC I
TEMPINI=AN
A=TEMPIJI

I
I
1

1-------------------------------------1---------------------------------------1
I CALL PLURNS(A1, ••• ,AN, ••• ,
I
CAll SUBIA1t ••• ,ANI
1
1 1

l1, ••• ,lNI
I
IETCI
I
I
CALL SUBCn, ••• ,lNI
1
I CAll SUBCNI
1-------------------------------------1---------------------------------------1
I CAll REFlECIX,LX,C,YI
1
DO 10 l-l,lX
I
I 10 YC II=C-XC II
I
I IXRFLEC FOR FIXED POINT)

1-------------------------------------1----------------------------------·----1
I CALL REVER(X,lX,Vt
I
IF IXLOCFCXI-XlOCFIYII 10,20,10
I
I
I 10 N=lX
I
GO TO 30
I
I
I 20 N-ILX+lJ/2
1
I
I 30 00 40
I,.. 1 , N
I
I
I
J=LX+1-1
I
TEMP=XIJI
1
I
I
I
I
Y(JI=X(l1
[
I 40 Y(II=TEMP
1
I (SAME PROGRAM FOR FIXED POINTI
1-------------------------------------1---------------------------------------1
I

I

1-------------------------------------1---------------------------------------1
1
I
I
1

PROGRAM USAGE

I

I

EQUIVALENT BASIC FORTRAN

I

f

I

1-------------------------------------1----------------------------------~----I
CAll REVERS(lX,X)
I
N=(lX+1t/2
1

1
I

I
DO 10 l"l,N
I
I
I
J"lX+1-I
1
I
I
TEMP=X(J)
I
1
I
X(Jt=X(U
I
I (SAME PROGRAM FOR FIXED POINT)
I 10 XCI)-TEMP
f
1-------------------------------------1---------------------------------·-----1
I Y=RNDF(X)
I
Y=FlOATFCXFIXFCX+.5))
I
1-------------------------------------1---------------------------------.-----1
1 Y=RNDDNF(Xt
I
Y-FlOATF(XFIXF(X)t
I

11-------------------------------------1---------------------------------~-----I
Y=RNDUPF(XI
1
IF CX) 20,10,10
I

I

I 10 Y=FlOATFlXFIXFCX+.99999999,t
I
I
GO TO 30
I
I 20 Y=FlOATF (XF I XF (X-. 99999999 J I I
I 30 CONTINUE
I

1

I
1

1-------------------------------------1----------------------------------~----I

CAll RNDVCX,lX,Y)
I
DO 10 1-1,lX
I
I
I 10 YU J-FlOUF(XFlXF(XU )+.5))
I
1-------------------------------------1---------------------------------------1
I CAll RNDVDN(X,lX,Y)
I
DO 10 l=l,lX
I
I
I 10 Y(I '=FlOATF (XF IXF (XU tJ
I
I

1-------------------------------------1-------------------------------------~-I

DO 30 l=l,lX
1
IF (xU JJ 20,10,10
I
I
I 10 Y(IJ=FlOATF(XFIXF(XIIJ+.99999999Jt I
I
I
GO TO 30
I
1
I 20 YCI J=FlOATF(XFIXF(X(U-.99999999)) 1
I
I 30 CONTINUE
I
1-------------------------------------1---------------------------------------1
I Y=SAMEFClXJ
I
EQUIVALENCE (Y,IY)
I
I
IY-IX
I
I (XSAME FOR FIxeD POINT)
1-------------------------------------1---------------------------------------1
I IF (SETAPTF(X,XNEW,FVAlUEJJ
I
X=XNEW
I
I 1
10.20,30
I
IF (FVAlUE) 10.20,30
I
I

CAll RNDVUP(X,lX,Y)

I

I
I

I------------------------------------~I---------------------------------------1

I IF (SETESTF(X,XNEW,XCRTClIJ
I 1
10.20,30

I
I

X=XNEW
IF (XNEW-XCRTClI

I

I

X2=C

I

I

10,20,30

I
I

1-------------------------------------1---------------------------------------1
I CAll SETK(C.X1,X2, ••• ,XNI
I
X1=C
I
1

(ETC I

I
I

(SAME PROGRAM FOR F lXED PO INTI

I

XN-C

I

CAll SETKP(C1,A,B,P,
C2,D,E,F,G,P,
C3,H)

I
1
I
I
1
I

B=C1
D=C2
E=C2
F=C2
GaC2
H=C3

I
I
I
I
I
I

1-------------------------------------1---------------------------------------1
I B
P-777777712345
I
A=C1
I
I
I
I
I
I
I

1
2

(SAME PROGRAM FOR FIXED POINT
OR MIXED MODES)

1-------------------------------------1---------------------------------..----·1

--------------------------------------~-------------------------------··----1
I
I

I

I

PROGRAM USAGE

I

I

EQUIVALENT BASIC FORTRAN

I

I
1

1-------------------------------------1---------------------------------------1
I CALL SETKS(C1,A,C2,B, ••• ,CN,Z)
1
A-C1
I
I
I
B=C2
I
I (SAME PROGRAM FOR F UED PO INT
1
CETC)
I
I
OR MIXED MODES)
I
Z=CN
I
1-------------------------------------1---------------------------------------1
I CALL SETKV(C,LX,X)
I
DO 10 1-1,LX
I
I 10 X(I)-C
I
I (SAME PROGRAM FOR FIXED POINT)
1-------------------------------------1---------------------------------------1
I CALL SETKVS(C1,LX1,X1. ••••
I
DO 10 1:1,LX1
1
I 1
CN,LXN,XN)
I 10 Xlll)-C1
1
I
1
(ETC)
1
I (SAME PROGRAM FOR FIXED POINT
I
DO 90 1=1.LXN
I
I
OR MIXEO MODES)
1 90 XN(I)=CN
I
1-------------------------------------1---------------------------------·~----I

I

I

CALL SETLINI8,o,LX,X)
(XSTLIN FOR FIXED POINTt

DO 10 la1,LX
I 10 XII'=8+D-FLOATF(I-1t

I

I
I

1-------------------------------------1---------------------------------~·----I

CALL SETlNSIB1,01.LX1,Xl, ••• ,
I
DO 10 1=1.LX1
I
8N.oN,LXN.XN)
I 10 X1II)=B1+o1-FLOATFll-1)
I
I 1
I ETC t
I
I
I
I ISAME PROGRAM FOR FIXED POINT
I
DO 90 l=l.LXN
I
OR MIXEO MODES)
I 90 XN(IJ-BN+oN-FLOATF(I-1)
I
I
1-------------------------------------1---------------------------------------1
I 8
P=777777712345
I
X(l)-Cl
I
I
CALL SETVCPIX.C1, ••• ,CL.P,
I
IETC)
1
I
1
Y,ol, ••• ,DM,P,
I
X(LJ=CL
I
2
••• ,
I
YIlI-D1
I
I
Z,G1, ••• ,GN)
1
IETC'
I
I
3
I
I
YIM)=DM
1
I
I
I ETC I
I
I
I
l ( U=G1
I
I
(ETCt
I
I (SAME PROGRAM FOR FIXED POINT
OR MIXED MODES)
1
ZIN)=GN
I
I
1-------------------------------------1---------------------------------------·1
I CALL SETVECIX,Cl, ••• ,CN)
I
X(1)aCl
I
I
I
I ETCl
I
I (SAME PROGRAM FOR FIXED POINT)
I
X(NI=CN
I
1-------------------------------------1---------------------------------------1
I CALL SIFT(X,M,LY,YI
I
DO 10 l=l,LY
I
I
I
J,. 1 + (1-1) -M
I
I (SAME PROGRAM FOR FIXED POINT)
I 10 YII).XIJ)
I
I

II -------------------------------------1---------------------------------..
------1I
CALL SQRoEVIX,C,LX,SSQI
I
SSQ-O.O

DO 10 l=i,LX
1
I
I
I (XSQoEV FOR FIXED POINT)
I 10 SSQ-SSQ+IXIIJ-CJ-IX(II-CI
I
1-------------------------------------1---------------------------------------1
I CALL SQRoFRIX,Y,LXY,SSQ)
I
SSQ=O.O
I
I
I
DO 10 l=l,LXY
I
I 10 SSQ=SSQ+IXII)-YCl))--2
I
I IXSQDFR FOR FIXED POINT)
1-------------------------------------1---------------------------------------1
I CALL SQROOTIX,LX~YI
I
DO 10 1:1,LX
1
I (XSQRUT FOR FiXED POINT)
I 10 YII)=SQRTF(XII)'
I
1-------------------------------------1---------------------------------------1

1-------------------------------------1---------------------------------~.----I

I

I

I

PROGRAM USAGE

I

I

I

EQUIVALENT BASIC FORTRAN

I

I
I

1-------------------------------------1---------------------------------~-----I

I

CALL SQRSUMU,LX,SSQI

I

I

IXSQSUM FOR FIXED POINTI

I

I

I

SSQ=O.O
00 10 l=ltLX
I 10 SSQ=SSQ+XI[)-XIII

I

I

1-------------------------------------1---------------------------------~.----I

I
I

CALL SQUAREIX,LX,YI
IXSQUAR FOR FIXED POINTI

I
00 10 1=I,LX
I 10 Yllt=X(It-X(I)

I
I

1-------------------------------------1---------------------------------------1
I Y=STEPCFUI
I
Y=.5+SIGNFI.5,XI
I
I (ARGUMENT MODE IMMATERIAL I
I
I
1 IXSTEPC FOR FIXED POINT OUTPUTI I
I

1-------------------------------------1---------------------------------.-----1
I
Y=STEPLFIXI
I
IF IXI 20,10,10
I
I
I 10 Y=I.0
I
1
I
GO TO 30
I
I IARGUMENT MODE IMMATERIALI
I 20 Y=O.O
I
I IXSTEPL FOR FIXED POINT OUTPUTI
I 30 CONTINUE
I
[-------------------------------------1---------------------------------------1
I Y=XSTEPRFIX'
I
IF (XI 20,20,10
I
I
I
I 10 Y=I.0
[
I
GO TO 30
I
I 20 Y=O.O
I
I (ARGUMENT MODE IMMATERIALI
I 30 CONTINUE
I
I IXSTEPR FOR FIXED POINT OUTPUT'
1-------------------------------------1---------------------------------------1
I
CALL STz(LX,XI
I
00 10 1=I,LX
I
I 10 XCII-O.O
I
I ISAME PROGRAM FOR FIXED POINTI
1-------------------------------------1----------------.. ----------------------1
I CALL STISILXI,XI, •••• LXN.XNI
I
00 10 l:l,LXl
I
I
I
I 10 XlIII=O.O
I
I
I ETC)
I
I
00 90 1=I.LXN
I
I (SAME PROGRAM FOR FIXED POINT
I
OR MIXED MODES)
I 90 XNIl)=O.O
I
1-------------------------------------1---------------------------------------1
I CALL SUBK(C,Xl, •••• XN)
I
Xl=Xl-C
I
I
I
(ETC)
I
I (XSUBK FOR FIXED POINT)
I
XN=XN-C
I
1-------------------------------------1---------------------------------------1
I CALL SUBKS(Cl,Xl.Yl •••• ,CN.XN.YNI I
Yl=XI-Cl·
I
I

I

I ETC)

I

I IXSUBKS FOR FIXED POINT)
1
VN=XN-CN
[
1-------------------------------------1---------------------------------------[
I CALL SUM(X.LX,SUM)
.
I
SUM=O.O
.
I
1
I
DO 10 1=I.LX
I
I (XSUM FOR FIXED POINT)
1 10 SUM=SUM+XII)
I
I----------------------~--------------I---------------------------------------1

I
1

CAll SUMDEV(X.B,lX,SUMD)

I

SUMD=O.O

I
DO 10 1= 1. l X
I 10 SUMD=SUMD+X(I)-B

I
I

I IXSMOEV FOR FIXED POINT)
I
1-------------------------------------1---------------------------------------1
1 CAll SUMDFR(X.Y,LXY.SUMD)
1
SUMD=O.O
1
00 10 l=l.LXV
I
1
I
I IXSMDFR FOR FIXED POINT)
I 10 SUMO=SUMO+XII)-YIII
I
1-------------------------------------1---------------___________________ 4 _ _ _ _ 1

1-------------------------------------1---------------------------------.-----1
1
1 1
I

PROGRAM USAGE

I

1

EQUIVALENT BASIC FORTRAN

I

I

I

1-------------------------------------1---------------------------------·~----I

I
I
I
I
I

IF ISWITCHFIISENSEII

10.10,20

I
IF (ISENSE)
I 30 IF (ISENSE-61
I 40 GO TO 11,2.3,4,5,6),
I 1 IF (SENSE SWITCH I'
I 2 IF ISENSE SWITCH 21

I

I

I

I

I
I
I

I
00 10 1=I,lXY
I 10 OOT=DOT+X(I)*YIII
1
OOT=OOT/OIV

10,10,30
40,40.10
ISENSE
20,10
20.10

I
I
I
I
I

I ETC)

6 IF ISENSE SWITCH 6)

I

20.10

1-------------------------------------1---------------------------------.-----1
I CAll VOOTVIX,Y,lXY,DIV,DOT)
I
OOT=O.O
I
I
I
I

1-------------------------------------1----------------------------------~----I

I
I

CAll VOVBYVIX,Y,lXY,Z)
1
DO 10 1=I,lXY
I
IXVORBV OR XVOVBV FOR FIXED POINT) I 10 Z(I)=XIII/V(I)
I
I -------------------------------------1---------------------------------------'1
I CAll VECOUTIITAPE,8H6H10F1.1,
I
WRITE OUTPUT TAPE ITAPE.I0,
I
I 1
X,ll,121
I
1
(XII),1=11,121
I
I
I 10 FORMA TllOF1. 11
I

II -------------------------------------I
---------------------------------..
-----'1I
IF IVINOEXFII,IC,IJ11 10,20,30
I
I=I+IJ

I
I
IF II-ICI 1 0 , 2 0 , 3 0 1
1-------------------------------------1---------------------------------------1
I CAll VMNUSVIX,Y,lXY,ZI
I
00 10
I=l,lXY
I
I IXVMNSV FOR FIXED POINT)
I 10 ZII)=X(I)-YtI)
I
1-------------------------------------1---------------------------------------1
I CAll VPlUSVIX,Y,LXY,ZI
I
DO 10 1=I,lXY
I
I (XVPlSV FOR FIXED POINTI
I 10 ZIII=XIII+Y(II
I

1-------------------------------------1---------------------------------------1
I CAll VTIMSVIX,Y,lXV,ZI
I
00 10 l=l,lXY
I
I

(XVTMSV FOR FIXED POINTI

I 10 ZIII=X(II*Ytll

I

1-------------------------------------1---------------------------------~-----I

I
I

X=WHICHFIX1,X2,YI

I
I

(XWHICH FOR FIXEO POINT)

I
IF IVI 20,10.20
I 10 X=X1
I
GO TO 30
I 20 X=X2
I 30 CONTINUE

(SAME PROGRAM FOR FIXED POINT
ARGUMENTS)

I 40 IF IXI
20,50,20
I 50 IF (SIGNF(l.,X)-SIGNF(l.,Y)1
I
1
10,20,30

I
I
I

I

I
I

I

I
I

1-------------------------------------1---------------------------------------1
I IF (XACTEQFIX,YI) 10,20,30
I
IF IX-YI 10,40,30
I
I
I

I

1-------------------------------------1----------------------------------~----I

I IF IXlIMITFIX,XA,XBI) 10,20,30
I
IF IX-MAX1FIXA,XBII
40,20,30
I
I (SAME PROGRAM FOR FIXED POINT
I 40 IF (X-MIN1FIXA,XBII
10,20~20
I
I
ARGUMENTS I
I
I
I--------------------------------~----I-_------------------------------- ~----I
I CAll XlOCV(lOCV,X1, ••• ,XNI
I
lOCV(11=XlOCFIX11
I

..

1
1

I

I

1 ETC I

lOCVINI=XlOCFIXN)

I

1

1-------------------------------------1---------------------------------------1
I IF (XQQZEFII)I ---,10,20
I
IF (1-2-11/211 20,10,20
I
1-------------------------------------1---------------------------------··----1

SAMPLE TESTING PROGRAMS

*
*
*
*

TEST BlKSUM
XEQ
lIST8
lABel
CTlKSUM
DIMENSION X(91, SI4,4,41, lS(4,41, SPACEIIOI
ITEST=O
7
ITEST=ITEST+I
CAll VRSOUT(Z,3,14H9H EXAMPLE ,II,ITEST,ITEST)
CAll SETVEC(X,2.,4.,6.,8.1
CAll SETKVS(-9.,64,S, -9,16,lS, Z.O,I,DVSRt
GO TO (1,2,31,ITEST
1
DO 10 lX=I,4
DO 10 l=l,lX
10
CAll BlKSUM(X,lX,l,DVSR,S(I,l,lXI,lSll,lXII
CAll VSOUT(2,3,S(I,I,11,6HSI4I41,5H4f1.1,I,16,
1 S(I,I,Z),6HSI4I4Z,5H4f7.1,1,16, S(I,I,3),6HSI4I43,
Z 5H4F1.1,I,l6, S(l,l,41,6HS14144,5H4F7.1,1,16,
3 lS(I,II,6HlSI4I4,3H4I7,1,161
GO TO 7
CAll BlKSUM(X,4,Z,DVSR,X,lS)
2
CAll VSOUT(Z,3,X,IHX,5H4F1.l,l,4, lS,ZHlS,2HI7,1,11
GO TO 7
3
CAll BlKSUM(X,-1,2,1.0,S,lS)
CAll BlKSUMIX, 3,O,l.O,S,lS)
CAll BlKSUM(X, 3,4,l.0,S,lS.
CAll 8lKSUMIX, 3,2,O.O,S,lSI
CAll VRSOUT(Z,3,18H8H S,lS = ,F1.I,I1,SPACE,S,lSI
CAll EXIT
END

*
*
*
*

TEST CMPRA
XEQ
lIST8
lABEL
CTCMPRA
GO TO 999
10
CONTINUE
Z = CMPRAF(X,Y)
IZ=XCMPRAFIX,Y)
FZ=CMPRFlF(X,Y)
WRITE OUTPUT TAPE 2,20,J,X,Y,Z,X,Y,IZ,X,Y,FZ
20
FORMAT(IHOI2,23H. ACOMP TEST - ACOMPF( OIS,IH, 01S,4H) = GIS.81
II8X8HXACOMPF(GIS.8,IH,GIS.8,4H) = GI5.8/18X8HFlCOMPFIG15.8,IH,
2GlS.8,4H) = GI5.B)
999 J=J+l
GO TO II,2,3,4,S,6,9999),J
(CONTINUED NEXT PAGE)

SAMPLE TESTING PROGRAMS

1

CALL SETKS
GO TO 10
2
CALL SETKS
GO TO 10
3
CALL SETKS
GO TO 10
4
CALL SETKS
GO TO 10
5
CALL SETKS
GO TO 10
6
CALL SETKS
GO TO 10
9999 CALL EXIT
END

•
•
•

TEST CRSVM
XEQ
L1ST8

•

LABEL

(l,X,l,Va
( 1,X,-1,n
(1.Z345678,X,1.Z345679,Va
(6HABCDE1,X,6HABCDEZ,Va
(O,X,-O,n
(-50.,X,-51.,V)

CTCRSVM
DIMENSION AA(lOOO),BB(1000),CC(lOOO),SPACE(lOOOI
COMMON AA,BB,CC,SPACE
10
J·J+1
CALL VRSOUT (Z,-1,ZOHIXIZ,lZH. CRSVM TEST,J,J)
CALL RDATA (4,Z,IANS,SPACE,4HNRAC,NRAC,5HNCARB,NCARB,4HNCBC,NCBC,
1 3HLAA,LAA,2HAA,AA,3HLBB,LBB,ZHBB,BB,6HZFNBTR,ZFNBTR,6HIFSTLG,
2 tFSTLG,3HLCC,LCC)
CALL CSOUT (Z,1,NRAC,4HNRAC,NCARB,5HNCARB,NCBC,4HNCBC,LAA,3HLAA,
1 LBB,3HLBB,ZFNBTR,6HZFNBTR,IFSTLG,6HIFSTLG,LCC,3HLCC)
CALL HOUT (Z,1,AA,ZHAA,NRAC,NCAR8,LAA'
CALL MOUT (Z,1,8B,2H8B,NCARB,NC8C,LBB)
CALL CRSVM (NRAC,NCARB,NCBC,LAA,AA,L8B,BB,ZFNBTR,IFSTLG,LCC,CC)
CALL ~OUT (Z,3,CC,ZHCC,NRAC,NC8C,LCCa
GO TO 10
END
•
DATA
NRAC=l NCAR8=Z NC8C s 3 lAA-4 AA=1.,Z.,3.,-Z.,5.,-4.,1.,-1.
LBB=Z BB~3.,2.,4.,3.,1.,-1.,-Z.,-3.,-Z.,Z.,4.,-5. ZFNBTR=O.
IFSTLG=-Z LCC=7 REtURN
ZFNBTR=1. RETUR~

SAMPLE TESTING PROGRAMS

•
•
•

TEST GETX
xeQ
lIST8

•

LABel

CTGETX

DIMENSION X(5),IXI5),1117),IZI3),C(10)
CAll SETlIN 11.,l.,5,XI
CAll SETVEC IIX,1,Z,3,4.5)
11=4
CAll YRSOUT IZ,Z,35HI3,Z6H. GETX,XGETX INPUTS - 11 ,. 13,C.l,ll)
CAll YOUT
IZ,l,X,lHX, 6H10F6.1,1,5)
CAll YOUT
IZ,1,IX,ZHIX.4H1016.1,5)
Xl .. GETX IX,lll
1X1= IGETXl IX, III
CAll YRSOUT IZ,Z,35H4XI4HOUTPUTS - X ,. F6.Z,4X4HIX ,. 16,C,X1,IX1)
CAll SETvec (ll,4,1,1,3,5,Z,1)
CAll SETVEC (IZ,l,7,5)
13=3
CAll YRSOUT (Z,Z,Z8HI3,ZZH. GETX,XGETX INPUTS - ,Z,Z)
CAll YSOUT IZ,l,X,lHX,6H1DF6.Z,I,5,IX,ZHIX,4H1DI6,1,5,11,2HII,
1 4H1016,1,7,IZ,ZHIZ,4H1016,1.3,13,ZHI3,4H1016,1,lt
X1=GETX (X,II,IZ.13)
IX1=IGETXlIX,11,IZ,13)
CAll YRSOUT IZ,Z,35H4X14HOUTPUTS - X = F6.2,4X4HIX = 16,C,X1,IX1)
CAll EXIT
END

•
TEST INTHOl
•
XEQ
•
lIST8
•
lABEL
CTNTHOl
DIMENSION HOl(50t, FMT(50t, DATAI50t
nEST,. 0
7
ITEST .. ITEST+1
CAll SETKSl1,NHOl, 6H-53.31,HOl, 6H(F6.Z),FMT, l,NDATAD)
CAll YRSOUT(Z,3,14H9H EXAMPLE ,11,ITEST,ITEST)
GO TO (1,Z,31,ITEST
1
CAll INTHOl(NHOl,HOl,FMT,NDATAD,NDATAA,DATA)
CAll YSOUT(2,3,NDATAA,6HNDATAA,2HI7,1,1,
DATA,4HDATA,4HF9.Z,l,lt
1
GO TO 7
NDATAD '" 6
2
GO TO 1
3
CAll SETKS(2,NHOl, 3HXYZ,HOl, 6H 5 -9,HOLC2t, 3,NDATADt
CAll INTHOlINHOl,HOl,6HA6,213,NDATAD,NDATAA,OATA)
CAll YSOUT(Z,3,NDATAA,6HNDATAA.2HI1,l,t~
1
DATA,4HDATA,9H1X,A3,ZI1,1,3)
CAll EXIT
END

SAMPLE TESTING PROGRAMS

*
*
*

TEST LIMITS
XEQ
LISTS
*
LA8EL
CTIMITS
DIMENSION S(3)
CALL LIMITSl1,IANS. -0,-0,1. -0,+0.1. +0.-0,1, +0,+0,1,
1 -0,-1,-0, -0,-1,+0, +0,-1,-0, +0,-1,+0. +0.+0,+0, +0,+0,-0,
2 +0,-0,+0, +0,-0,-0, -0,+0,+0, -0,+0,-0, -0,-0,+0. -0,-0,-0)
CALL VRSOUTl2, 3, 26H20H EXAMPLE 1. IANS. ,14, S, IANS)
CALL LIMITSl 1,IANS1, 1.0.2.0,3.0'
CALL LIMITSl21,IANS2, 3,1,4, 3.,1.,4., -3.,-4.,-1., 1,1,4, 1.2,3~
1
4,1,4)
CALL LIMITSl31,IANS3, 0.,0.,0., 1,1,1, ~1,-1,-1. 3.1,2, 0,1,2)
CALL VRSOUTl2, 3, 32H25H EXAMPLE 2. IANS1 ••• 3. ,314, S,
1
IANS1, IANS2, IANS3)
CALL LIMITSl 1,IANS1, 1.0,3.0,2.01
CALL LIMITSl21.IANS2, 3,4,1, 3.,4.,1., -3.,-1.,-4., 1,4,1, 1,3,2~
1
4,4,1)
CALL LIMITSl31,IANS3, 0.,0.,0., 1,1,1, -1,-1,-1, 3,2,1, 0,2,1)
CALL VRSOUTl2, 3, 32H25H EXAMPLE 3. IANS1 ••• 3 = ,314, S,
1
IANS1, IANS2, IANS3)
CALL EXIT
END

*

TEST SHUFFL
NEEDS LOGICAL 9
XEQ
LIST8
*
LABEL
CTHUFFL
DIMENSION IRDl100',ISPACElI0),IXSHFll10),IXSHF2l10)
ITP=9
CALL SETVEClIRD,1,0,0,9.7,3,2,5,3,3,7,6,5,2,O,l,3.5,8,6,3,4,6,7,3,
1
5,4,8.7,6,8,0,9,5,9,0,9,1,1,7,3,9,2,9,2,7,4,9,4,5,
2
3,7,5,4,2,0,4,8,0,5,6,4,8,9,4,1,4,2,9,6,2,4,8,0,5,
3
2,4,0,3,1,2,0,6,3,6,1,0,4,0,2,0,0,8,2.2,9,1.6,6,5)
REWIND ITP
WRITE OUTPUT TAPE ITP, 10, lIROlI),1-1,1001
10
FORMATl5011, 29X, IH )
REWIND ITP
CALL SHUFFLIITP,1,ISPACE,IXSHF1)
CALL SHUFFLlITP,10,ISPACE,IXSHF2)
CALL VSOUTI2,5,IXSHF1,6HIXSHF1,8H20X,1014,l,7,
1
IXSHF2,6HIXSHF2,8H20X,10I4,1,10)
REWIND ITP
CALL EXIT
END
•
•

SAMPLE TESTING PROGRAMS

•
TEST SIFT
•
XEQ
•
LISTS
lABEL
•
CTSIFT
DIMENSION X(501, XSl(50), XS2(50), XS3(SO), XS4(50), XS5(50),
1
XS6(50), FMT(2)
CAll SETlIN(l.,l.,lO,X)
CAll SETK(-9.,XS5,XS6)
CAll PlURNS(X,O,3,XSl, X,1,3,XS2, X,3,3,XS3, X,3,1,XS4,
1
X,-1,3,XS5, X,1,0,XS6, X,5,2,X)
CAll SIFT(4)
CAll FMTOUTeZ, 20HIIIII,11H EXAMPLE 1.)
CAll SETVEC(FMT,6HflOX,1,6HOF5.1)
CALL VSOUT(2,3, XSl,3HXSl,FMT,1,3, XS2,3HXS2,FMT,1,3,
1 XS3,3HXS3,FMT,1,3, XS4,3HXS4,FMT,1,1, XS5,3HXS5,FMT,I,1,
2 XS6,3HXS6,FMT,1,1, X,lHX,FMT,l,lOI
CALL EXIT
END

•
TEST SIZEUP, SIZUPl
XEQ
•
•
LISTS
•
LABel
CTlZEUP
DIMENSION XClO), INDEXlllO), INDEX2flO)
ITEST = 0
1
ITEST • ITEST+l
LX = 5
CALL SETVECeX, 3.,-10.,-1.,2.,0.)
GO TO (1,2,3),ITEST
1
CALL SIZEUP(X,LX,INOEX1)
CALL SIZUPL(X,LX,INOEXZI
CALL VRSOUT(Z,3,14HQH EXAMPLE ,I1,ITEST,ITEST)
CALL VSQUT(2,3, INOEXl,6HINDEXl,3H5IS,I,S,
1
INDEX2,6HINDEX2,3H515,1,51
GO TO 1
2
CALL SETVECIX ,1HX,lHA,lHC,lHN,lHA)
GO TO 1
3
CALL EXIT
END

SAMPLE TESTING PROGRAMS

*

TEST TIMA2B
XEQ
*
lIST8
*
lABEL
CTTMA2B
COMMON X,SPACE
DIMENSION X(100ll,SPACE(3001
B
XLXA=053400000000
CALL SETKV (XlXA,lOOI,XI
lOCB=XlOCFlXI
CAll ClKON
10
J=J+l
CAll VRSOUT (2,l,llHIXI2,13H. TIMAlB TEST,J,JI
CAll ROATA (4,O,IANS,SPACE,4HNREG,NREG,6HINDUMP,INDUMP,6HMINACC,
1 MINACC)
CAll ClOCKl(l,TIMEI
CAll TIMAlB (lOCB-NREG,lOCB,MINACC,SECSI
CAll ClOCKl(l,TIMEI
CAll CSOUT (Z,1,NREG,4HNREG,MINACC,6HMINACC,SECS,4HSECS,TIME,
1 4HTIME I
GO TO 10
END
*
DATA
NREG=lOOO MINACC=lOO INDUMP=l. RETURN
NREG=lOO INDUMP=O RETURN
NREG=lO RETURN
NREG=2 RETURN
NREG=1 MINACC=lOO RETURN

*

SAMPLE TIMING PROGRAMS

*
TIME TEST QACORR AND FORAC
•
XEQ
•
LIST8
*
LABEL
CTIMQAC
DIMENSION X150001, SPACE(12000), ACORI50001
COMMON
SPACE, X. ACOR
C
C OUTERMOST LOOP DECIDES WHETHER FULL AUTOCORRELATION OR
CIllO AUTOCORRELATION IS TO BE COMPUTED. THE NEXT LEVEL LOOP
C SELECTS ONE OF 5 ACCURACY CONSTANTS FOR QACORR.
C
DO 100 IXFR=1.2
FRCTN = NTHAFIIXFR, .10, 1.01
DO 100 IXA=l,5
MXACC = XNTHAFIIXA, 25,50,100.250,5001
C
C THE INNERMOST LOOP SELECTS ONE OF 7 DATA LENGTHS, ACQUIRES THE DATA,
C TIMES THE CORRELATION PRODUCED BY QACORR AND THEN BY FORAC,
C EXCEPT THAT OPERATION OF FORAC IS BYPASSED FOR DATA LENGTHS
C EXCEEDING 1000, AND FOR ACCURACY INDICES OTHER THAN 1 •
C
DO 100 IXL=1,7
LX
= XNTHAFIIXL, 25,50,100.250,500,1000,5000)
MXLAG = XFIXFIFRCTN*FLOATFILX)) - 1
CALL GIVEX ILX, Xl
CALL TIMSUBI50, SECSQAI
CALL QACORRIX, LX, MXACC, MXLAG, SPACE, ACOR, IANSI
CALL VRSOUT(2, 2,
1
49H34H LX, MXACC, MXLAG, IANS, SECSQA = , 416, F12.4,
2
SPACE, LX, MXACC, MXLAG, IANS, SECSQA)
IF (IXA-ll
100,10,100
10
IF (LX-I0001
80,8C,100
80
CALL GIVEX (LX, X)
CALL TIMSUB(50, SECSFAJ
CALL FORAC (X, LX, MXLAG, ACORI
CALL VRSOUTI2, 2, 36H21H LX, MXLAG, SECSFA
,215, F12.4,
1
SPACE, LX, MXLAG, SECSFAI
100 CONTINUE
CALL EXIT
END

SAMPLE TIMING PROGRAMS

-

*
CFORAC

FORAC,
LISTS
LABEL

FORTRAN AUTOCORRELATION FOR COMPARISON WITH QACORR

SUBROUTINE FORAClX, LX, MXLAG, ACOR)
C

C TOKEN DIMENSIONS

C

DIMENSION X(2), ACOR(Z)
JMAX
= MXLAG + 1
00 20
J=l,JMAX
SUM
.. 0.0
NMAX
= LX - J + 1
00 10
l=l,NMAX

K

10
20

-

*
*

CGIVEX

.. J

+

I

SUM
.. SUM + X(I)-XIK-1)
ACORIJt .. SUM
RETURN
END

GIVEX,
LISTS
LABEL

PROVIDES A DATA VECTOR FOR QACORR TIME TESTS

SUBROUTINE GIVEXILX, xt
C

C TOKEN DIMENSIONS
C

DIMENSION

X(2)

C

C THE DATA VECTOR PROVIDED IS A MORE OR LESS WHITE LIGHT SERIES
C WITH VALUES IN THE RANGE -1.0 TO +1.0
C

10

00 10 l=l,LX
XII)" COSFl100.-FLOATFlllt
RETURN
END

SAMPLE TIMING PROGRAMS

•
TIME TEST ASPECT
•
XEQ
•
LISTS
LABEL
•
CTIMASP
DIMENSION ACOR(5001t, SPECT(1001', SPACE(2010), COSTAS(10011
COMMON
ACOR, SPECT, SPACE, COSTAB
C
C INITIALIZE SY SETTING UP THE AUTOCORRELATION OF A SAW-TOOTH.
C
CALL SETLIN(500l., -I., 5001, ACOR)
CALL SQUARECACOR, 5001, ACORI
C
C OUTER LOOP SELECTS ONE OF SIX FREQUENCY INCREMENT CONSTANTS,
C AND ESTABLISHES THE CORRESPONDING COSINE TASLE.
C
00 100 IXMFRQ=l,6
MFREQ = XNTHAF(IXMFRQ, 25,50,100,250,500,10001
CALL COSTBL(MFREQ, COSTABI
C
C INNER LOOP SELECTS ONE OF S CORRELATION LENGTHS AND PROCEEDS WITH
C THE TIMING. BUT HAS A BYPASS FOR CASES IN WHICH THE NO. OF
C FREQUENCIES EXCEEOS THE CORRELATION LENGTH.
C
00 100 IXMXLG=l,8
MXlAG = XNTHAF(IXMXLG, 25,50,100.250,500,1000.2500,50001
IF (MXlAG-HFREQ)
100.10.10
10
CAll TIMSUB(50. SECSAS)
CAll ASPECT(ACOR. MXlAG, COSTAS. MFREQ, 0, MFREQ,
1
1.0, SPECT. SPACE, DUMMY. ERRI
CALL VRSOUT(Z. 2,
1
45H29H MXLAG, MFREQ. ERR. SECSAS = , 216, 2F12.4,
2
SPACE. MXLAG. MFREQ. ERR, SECSASI
100 CONTINUE
CAll EXIT
END

SAMPLE TIMING PROGRAMS

•

TIME TEST WLLSFP AND SIMEQ
XEQ
*
LIST8
*
LABEL
CTIMWAS
DIMENSION X(50Zl, R(50Zl, G(500l, A(501l, C(1010), SPACE(100Z),
AA(10000), BB(lOl), EII01)
1
COMMON
AA, SPACE, C

*

C

C
C
C
C

INITIALIZE BY SETTING UP THE NORMALIZED AUTOCORRELATION OF A SAWTOOTH
IN R(I ••• 501), AND A LINEAR RIGHT HAND SIDE IN G(1 ••• 500).
(THE NORMALIZATION IS NECESSARY TO PREVENT OVERFLOW IN SIMEQ.)
THE VARIABLE NAMES ARE CHOSEN AS DEFINED 8Y WLLSFP.

C

CALL
CALL
CALL
LR '"
CALL
CALL

SETLIN(O.O, l.C, 501, X)
WAC
(50l, X, 50l, R)
DIVIOE(R, 501, R, R'
500
SETLINll.O, l.O, 500, G)
DIVIDE(G, 500, G(500), G)

C

C LOOP SELECTS ONE OF 8 MATRIX SIZES, LA, RANGING FROM 3 TO 500.
C TIMES WLlSFP FOR THIS SIZE, AND THEN, PROVIDED LA DOESN'T
C EXCEED 100, TIMES SIMEQ.
C

00 100 IXLA=1,8
LA
XNTHAF(IXLA, 3,5,10,Z5,50,100,Z50,500)
CALL TIMSU8(50, SECSWL)
CALL WLLSFP(LR, R, G, LA, A, C'
CALL VRSOUTIZ, Z, Z8H14H LA, SECSWL '" , 15, FIZ.4,
I
SPACE, LA, SECSWL)
IF (LA-100)
80,80,100
C

C SINCE SIMEQ DESTROYS BOTH THE INPUT MATRIX AND THE RIGHT HAND SIDE,
C THESE INPUTS MUST BE ESTA8LISHED FOLLOWING A CALL INTMS8 STATEMENT
C AND PRIOR TO THE CALL TIM5U8 STATEMENT.
C

CALL INTMS8
CALL REVER (R, 501, SPACE)
CALL REVER (SPACE, 500, SPACE(50Z)
00 90
l=l,LA
K '" 50Z - I
J = 1 + (l-ll*LA
90
CALL MOVE (LA, SPACEIKl, AA(J))
o = 1.0
CALL MOVE (LA, G, B8)
CALL TIMSU8(50, SECSIM)
CALL SIMEQ (LA, LA, 1, AA, 88, 0, E, ERR)
CALL VRSQUT(Z, Z, 34H19H LA, ERR, SECSIM = , 15, ZFlZ.4,
1
SPACE, LA, ERR, SECSIM)
100 CONTINUE
CALL EXIT
END

80

3
Program
Categorizations

The usages presented in Section 2 are only samples, and highly specialized ones at
that. For systematic access to programs of interest one needs an orderly indexing
such as that provided by the general sortings discussed in this section. The characteristics on which these categorizations are based can be broadly divided into functional and nonfunctional ones.
The functions performed by the programs of Section 10 can be grouped into the
following fifteen classes.
1.

2.
3.
4.
5.
6.
7.
8.

9.

Administration
Input-output
Data transmission and access
Data-form changing
Data generation
Da ta inquiry
Elementary numerical
functions
Miscellaneous numerical
functions

10.
11.
12.
13.
14.
15.

Probability and statistics
computations
Integration and differentiation
2-D array and 3-D array
operations
Polynomial computations
Correlation and convolution
Harmonic transformation
Miscellaneous spectral-analysis
operations

In the following Summary of Functional Classifications, each of these classes
is broken down into a number of subclasses or categories, according to which the programs are sorted in the bulk of this section. This summary thus delineates the scope
of the programs and constitutes a starting point in a functionally oriented search of the
library. It should be noted that there is some overlap in the category definitions. Moreover, programs with multiple functions may appear in two or more of the categories.
The remainder of the section is then devoted to program sortings based on nonfunctional characteristics such as authorship, language, linkage, and equipment uses,
and on subjective qualities such as speed and utility. The categories used there are
self-explanatory except, perhaps, for the term "FAP necessarily," by which we imply
that it is either impossible or extremely awkward to express the function performed
using only basic FORTRAN statements.

39

Ell

SUMMARY OF FUNCTIONAL CLASSIFICATIONS

I
I

I
I

••••••••••••••••••••••••••••••

I
••••••••••••••••••••••••••••••
I
FOR CONTROL OF PROGRAM FLOW
I
FOR EXPANDING SYSTEM CAPABILITY
I
FOR UNORTHODOX SUBROUTINE USAGE
I
FOR INDEX LOGIC
I
FOR DOCUMENTING EXECUTIONS
I
FOR EQUIPMENT CONTROL
I
FOR PROGRAM TIMING
I
FOR ABSOLUTE MEMORY INFORMATION
I
FOR PROPER USE OF MISNAMED VARIABLES I
I
I
••••••••••••••••••••••••••••
I
• 2. INPUT-OUTPUT PROGRAMS •

I
I
I
I
I
I
I
I
I
I
I
I ••••••••••••••••••••••••••••
I FOR BCD INPUT TO CORE
I FOR BINARY INPUT TO CORE
I FOR BCD OUTPUT FROM CORE
I FOR BINARY OUTPUT FROM CORE
I FOR GRAPHICAL OUTPUT FROM CORE
I FOR FORMAT PURPOSES
I
I ••••••••••••••••••••••••••
I • 3. DATA TRANSMISSION
•
AND ACCESS PROGRAMS •
I •
I ••••••••••••••••••••••••••
I FOR STORAGE-TO-STORAGE MOVEMENT
I FOR STORAGE-TO-TAPE MOVEMENT
I FOR TAPE-TO-STORAGE MOVEMENT
I FOR TAPE-TO-TAPE MOVEMENT
I fOR INFORMATION STORAGE
I FOR INFORMATION RETRIEVAL
I
I
I ••••••••••••••••••••••••••••••••••
I • 4. DATA FORM-CHANGING PROGRAMS.
I ••••••••••••••••••••••••••••••••••
I FOR CONVERTING DATA MODE
I fOR PACKING DATA
I fOR UNPACKING DATA
I FOR SCALING OAT A
I FOR NORMALIZING DATA
I fOR ROUNDING DATA
I FOR SHIFTING DATA
I FOR CHANGING DATA SPACING
I
I

I
I
I
I
I
I
I

I

• 1. ADMINISTRATIVE PROGRAMS.

•••••••••••••••••••••••••••••••

• •••••••••••••••••••••••••••
• •••••••••••••••••••••••••••

• 6. DATA INQUIRY PROGRAMS.

fOR
FOR
FOR
FOR
FOR
FOR

FINDING EXTREMAL VALUES
COMPARING DATA
SEARCHING DATA
SELECTING DATA
ORDERING DATA
CLASSIFYING DATA

•••••••••••••••••••••••••••

• 7. ELEMENTARY NUMERICAL.

•

PROGRAMS

•

•••••••••••••••••••••••••••

I fOR ADDITION

I FOR SUBTRACTION
I FOR MULTI PLICA TI ON
I fOR DIVISION
I FOR MODIFYING SIGN
I FOR RAISING TO POWERS
I FOR TAKING ROOTS
I fOR TRIGONOMETRIC FUNCTIONS
I FOR COLLAPSING VECTORS
I FOR ROTATING VECTORS
I fOR REVERSING VECTORS
I FOR EXCHANGING VECTORS
I FOR REfLECTING VECTORS
I
I
I ••••••••••••••••••••••••••••••
I • 8. MISCELLANEOUS NUMERICAL •
I •
PROGRAMS
•
I ••••••••••••••••••••••••••••••
I FOR INTERPOLATION
I fOR SAMPLE BASE CHANGING
I fOR GENERATING SINUSOIDS
I fOR TRIGONOMETRIC FUNCTIONS
I FOR TREATING ODD AND EVEN PARTS
I FOR fiTTING EQUATIONS TO DATA
I FOR CONTOURING
I fOR DELTA AND STEP fUNCTICNS
I FOR CONVERTING COMPLEX NUM8ERS
I FOR MOVI NG SUMMATION
I FOR INVERTING FUNCTIONS
I fOR DOT PRODUCTS
I

• 5. DATA GENERATING PROGRAMS.

I
I

FOR
FOR
FOR
FOR
FOR

I
I
I
I
I

••••• ** ••••••••••••••••••••••••
GENERATING HOllERITH
GENERATING RANDOM NUMBERS
GENERAl ING SINUSOIDS
GENERATING SCALARS
GENERATING 1-0 ARRAYS

PAGE 1 OF 2

I

I
I
I

I
I
I
I
I

I
I
I
I
I
I
I

I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I

I
I
I
I
I
I

I
I
I
I
I
I
I
I
I
I

I
I
I

SUMMARY OF FUNCTIONAL CLASSIFICATIONS

I

••••••••••••••••••••••••••••••••••

I.

9. PROBABILITY AND STATISTICS •

I ••••••••••••••••••••••••••••••••••

I
I
I
I
I

I
I

I
I
I
I
I

FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR

FINDING MOMENTS
FINDING AVERAGES
FINDING R.M.S. VALUES
FINDING SUMS OF SQUARES
FINDING SUMS OF DIFFERENCES
GENERATING RANDOM NUMBERS
RANDOMIZING DATA
FINDING DISTRIBUTIONS
PROBABILITY TRANSFORMATION
CHI-SQUARE ANALYSIS
DEPENDENCY TESTING
NORMAL CURVE INTEGRATION

I
I
I ••••••••••••••••••••••••••••••••

I • 10. INTEGRATION AND
•
I •
DIFFERENTIATION PROGRAMS.
I

••••••••••••••••••••••••••••••••

I
I
I
I
I

FOR
FOR
FOR
FOR
FOR

DEFINITE INTEGRATION
INDEFINITE INTEGRATION
DIFFERENTIATION
INDEFINITE SUMMATION
DIFFERENCING

I
I
I ••••••••••••••••••••••••••

I • 11. 2-D ARRAY AND
•
I •
3-D ARRAY PROGRAMS •
I

••••••••••••••••••••••••••

I
I
I
I
I
I
I
I
I
I

FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR
FOR

I

I
I
I
I
I

MATRIX MULTIPLICATION
MATRIX INVERSION
SOLVING MATRIX EQUATIONS
DETERMINANT EVALUATION
MATRIX TRANSPOSITION
MATRIX FACTORIZATION
2-D ARRAY ROTATION
INTERPOLATING 2-D ARRAY COLUMNS
2-D ARRAY DOT PRODUCTS
2-D ARRAY CORRELATION
2-D ARRAY FOURIER TRANSFORMATION
SOLVING 2-0 ARRAY EQUATIONS
MATRIX VECTOR REVERSAL
MATRIX VECTOR DOT PRODUCT
MATRIX VECTOR CORRELATION
SOLVING MATRIX VECTOR EQUATIONS

PAGE 2 OF 2

I •••••••••••••••••••••••••••

{

I
II ...........................1
FOR POLYNOMIAL EVALUATION
I
I • 12. POLYNOMIAL PROGRAMS.

I
I
I
I
I

FOR
FOR
FOR
FOR
FOR

FINDING POLYNOMIAL ROOTS
POLYNOMIAL MULTIPLICATION
POLYNOMIAL DIVISION
POLYNOMIAL SQUARE ROOTS
SYNTHESIZING POLYNOMIALS

I
I
I
I

I

1
I

I

1

I • 13. CORRELATIONS ANt.
I •
CONVOLUTIONS.

{

I ••••••••••••••••••••••••

I

I

I ••••••••••••••••••••••••

1

I
I
I
I

I

FOR
FOR
FOR
FOR

AUTOCORRELATION
CROSS-CORRELATION
CONVOLUTION
DOT PRODUCTS

I
I
I

I
I
I •••••••••••••••••••••••••••

I
I
[

I • 14. HARMONIC TRANSFORMS •
I •••••••••••••••••••••••••••

1

I
I
I
I

FOR
FOR
FOR
FOR

I

COSINE TRANSFORMATION
SINE TRANSFORMATICN
FOURIER TRANSFORMATION
INVERSE FOURIER TRANSFORMATION

I
I
I ••••••••••••••••••••••••••••••
I • 15. MISCELLANEOUS SPECTRAL •

I •

ANALYSIS PROGRAMS

•

I ••••••••••••••••••••••••••••••
I FOR DANIELL WEIGHTING

I
I
I
I
I
I

FOR
FOR
FOR
FOR
FOR
FOR

I
1

I
I
I
I
I

I
I

I
1
I

SPECTRAL FACTORIZATION
GENERATING NUMERICAL FILT£RS
I
CONVERTING TO AMPLITUDE AND PHAS!I
CONVERTING TO REAL AND IMAGINARY I
SPECTRAL COMPARISCNS
I
GENERATING SINUSOIDS
I

I

I

I

1

I
I

I
I

I
I
I

I
I
I

Time-Series Computations in FORTRAN and FAP
The sorted lists which will follow below need some introduction with regard to
format. First of all, the sortings have been made on the basis of names of principal
entries, and the lists are alphabetically ordered with respect to these names. In the
case of multiple-entry programs, the names of the secondary entries appear as a
parenthetical list following each appearance of the principal entry name. However,
a parenthetical list following a name is not necessarily a list of secondary entries; it
may alternatively be a list of functionally related programs. For example, each
!lPpearance of the Fourier-transform program QFURRY is followed by a parenthetical
reference to the inverse Fourier-transform program QIFURY, and conversely.
Secondly, it should be noted that we run into an occasional problem resulting
from the fact that the present sortings are necessarily based on six-character names
for the principal entries, whereas in the program listings of Section 10 we sometimes
have appended serial numbers and/or computer numbers to distinguish between programs of identical principal entry names. The sortings have been made on the basis
of effective names. The effective names are identical to the principal entry names in
cases where no ambiguity can arise. Effective names for the exceptional cases are
listed below.
Effective Name

True Name

Effective Name

True Name

CLOCK1

CLOCK1 (7090)

LINE

LINE (709)

CNVLV2

CONVLV-II

LINE90

LINE (7090)

DISPLA

DISPLA (709)

LINEH

LINEH (709)

DSPL 90

DISPLA (7090)

LINH90

LINEH (7090)

FRAME

FRAME (709)

LINEV

LINEV (709)

FRAM90

FRAME (7090)

LINV90

LINEV (7090)

FT24II
HST2

FT24 -II
HSTPLT -II

MULK2
SETK2

MULK -II
SETK -II

HST309

HSTPLT -III (709)

SETKS2

SETKS -II

HST390

HSTPLT -III (7090)

TIMA2B

TIMA2B (7094)

42

PROGRAMS SORTED BY FUNCTION

••••••••••••••••••••••••••••••
• 1. ADMINISTRATIVE PROGRAMS •
••••••••••••••••••••••••••••••
FOR CONTROL OF PROGRAM FLOW
INDEX (CHUSET, SETAPT,

SETEST,

VINDEX), SEVRAL

(PLURALI.

FOR EXPANDING SYSTEM CAPABILITY
FNDFMT,
GETX ( IGETXI, LOCATE
ARG,
CALL,
CAll2, RETURN,
SETSBV,
SETUP,
STORE,
WHERE,
XARG, XINDEX,
XNAME, XNARGSI,
(STH I, (STHDt, (STH"II, PLURNS,
RDATA, REREAD (ENDFIL,
ONLINE
(TSH I, (TSHM», RPLFMT,
EOFSET,
SAME ( XSAME), SEVRAL (PLURAL),
VARARG.
FOR UNORTHODOX SUBROUTINE USAGE
LOCATE (
ARG,
CAlL,
CAll2,
WHERE,
XARG, XINDEX,
XNAME,
VARARG.

RETURN, SETSBV,
XNARGSI, PLURNS,

FOR INDEX LOGIC
FASTRK,
GETX ( IGETX),
LOCATE
ARG,
CAll,
WHERE,
XARG, XINDEX,

INDEX (CHUSET, SETAPT,
CAll2, RETURN, SETSBV,
XNAME, XNARGS).

FOR DOCUMENTING EXECUTIONS
DADECK, LISTNG, MEMUSE,

RDATA,

FOR EQUIPMENT CONTROL
CLKON,
FRAME (FRAM90),
CARIGE,
(STHM», REREAD (ENDFIL, EOFSET,
SWITCH, TRMINO, lEFBCD CZEFBINI.
FOR PROGRAM TIMING
CLKON, CLOCK1,

T1MA2B,

TIMSUB

FOR ABSOLUTE MEMORY INFORMATION
IXCARG,
LOC, MEMUSE, XLCOMN,

SETUP,
STORE,
SEVRAL (PLURAL) ,

SETEST,
SETUP,

VIND"EX),
STORE,

XLCOMN.
FSKIP,
(TSH),

ONLINE ( (STH).
nSHM) I, RSKIP,

CSTHDJ,
SETI NO,

(TSHM)), lEFBCO

(lEFBINt.

(INTMSBI.
XLOCV.

FOR SUBROUTINE LIBRARY STUDY
(NO ENTRIES FOR THIS CATEGORY)
FOR PROPER USE OF MISNAMED VARIABLES
SAME (XSAMEI •

••••••••••••••••••••••••••••
• 2. INPUT-OUTPUT PROGRAMS •
••••••••••••••••••••••••••••
FOR BCD INPUT TO CORE
RDATA, REREAD (ENDFIL,

EOFSET,

FOR BINARY INPUT TO.CORE
INDATA, PACDAT, ZEFBCD

(ZEFBINI.

(TSHI,

PROGRAMS SORTED BY FUNCTION

--------------------------FOR BCD OUTPUT FROM CORE
COLABL,
CSOUT, CVSOUT,
MOUTAI, ONLINE ( (STH I,
VRSOUT,
VSOUT.

DISPLA (DSPL90), FMTOUT,
(STHDI, (STHM), PWMLI V.

MLI2A6.
VECOUT,

MOUT,
VOUT.

FOR BINARY OUTPUT FROM CORE
OUDATA, WRTDAT.
FOR GRAPHICAL OUTPUT
CNTRDB, CNTROW,
(
HST2, HST309.
(LINV90t. PLOTVS,

FROM CORE
CONTUR, OISPLA
HST3901,
LINE
PLTVS1.

FOR FORMAT PURPOSES
COLABL, DSPFMT,

FNDFMT,

(DSPL90t,
(LINE90 I.

GRAPH, GRAPHX, HSTPLT
lINEH (LINH90) • LINIiV

RPLFMT •

••••••••••••••••••••••••••
•
• 3. DATA TRANSMISSION
AND ACCESS PROGRAMS •
•
••••••••••••••••••••••••••
FOR STORAGE-TO-STORAGE MOVEMENT
EXCHVS,
MOVE, MOVECS, MOVREV,

MRVRS,

MVBLOK.

TRMINO,

WRTDAT.

FOR STORAGE-TO-TAPE MOVEMENT
GETRD1, OUDATA, WRTDAT.
FOR TAPE-TO-STORAGE MOVEMENT
INDATA, PACDAT.
FOR TAPE-TO-TAPE MOVEMENT
CPYfl2, DADECK.
FOR INFORMATION STORAGE
OUDATA,
PAKN lUNPAKNI, SETINO,
FOR INFORMATION RETRIEVAL
GETX « IGETX) , INDATA,
PAKNI •

LISTNG,

NTHA

(

XNTHA I, PACDAT,

UNPAKN

••••••••••••••••••••••••••••••••••
• 4. DATA FORM-CHANGING PROGRAMS •
••••••••••••••••••••••••••••••••••
FOR CONVERTING DATA MOOE
FIXV ( FIXVRI. FLOATM, HOATV, FXDATA (HDATA), HVTOIV
XFIXM.
INTHOL, ITOMLI , IVTOHV (HVTOIVI, MLI 2A6.
FOR PACKING DATA
PAKN lUNPAKNI.
FOR UNPACKING DATA
UNPAKN ( PAKN).
FOR SCALING DATA
FXOATA (HDATA I, MLISCL,

SCPSCL,

SMPSON.

l'IVTOHV. ,

PROGRAMS SORTED BY FUNCTION

FOR NORMALIZING DATA
FXDATA (FLDATA', NMZMG1,
FOR ROUNDING DATA
FIXV I FIXVRa, FXDATA
(RNDVDN, RNDVUP"
XDIV
(XDVRBV).
FOR SHIFTING DATA
HLADJ ( HRADJt, ITOMLI,

NRMVEC.
(FLDATAt.
RND
I XDIVRt, XDVIDE

LSHFT

( RNODN,
I XDVIDR',

RNDUPt,
RNDV
XFIXIoi, XVOVBV

IXLSHFT), SHFTR1,

SHFTR2.

FOR CHANGING DATA SPACING
MOVREV •

•••••••••••••••••••••••••••••••
• 5 • DATA GENERATING PROGRAMS •

•••••••••••••••••••••••••••••••
FOR GENERATING HOLLERITH
GENHOL, GETHOL. GNHOL2.
FOR GENERATING RANDOM NUMBERS
GETRD1.
FOR GENERATING SINUSOIDS
COSTBL (COSTBX, SINTBL,

SINTBX), SEQ SAC

FOR GENERATING SCALARS
SETK I SETKS, SETVECt,

SETK2,

FOR GENERATING 1-0 ARRAYS
SETK ( SETKS, SETVEC I,
STZ,
IXSTLINt, SETLNS,

SETKP (SETVCPI,
STZS •

SETKP

(NEXCOS,

NEXSINI.

(SETVCPI, SETKS2.
SETKV,

SETKVS,

SETLIN

IMAXABM,

MINAB~,

MINSNM).

••••••••••••••••••••••••••••
•

6•

DATA INQUIRY PROGRAMS •

••••••••••••••••••••••••••••
FOR FINDING EXTREMAL VALUES
MAXSN ( MAXAB.
MINAB,

MINSN) , MAXSNM

FOR COMPARING DATA
CMPARP (CMPARSI.
(CHUSET, SETAPT,
CALLZ, RETURN,
XNAME, XNARGS',

CMPARV (CMPARLI , CMPRA (CMPRFL,
SETEST, VINDEXI, LIMITS, LOCATE
WHERE,
SETUP,
STORE,
SETSBV,
XAC TEQ, XLIMIT.

FOR SEARCHING DATA
FASCN1, FASTRK,

NXALRM,

FOR SELECTING DATA
CHOOSE,
GETX
FOR ORDERING DATA
SIZEUP (S I ZUPLI.
FOR CLASSIFYING DATA
MONOCK,
XODZE.

IGETX I,

SEARCH,
NTHA

(

XCMPRAI, INDEX
ARG,
CALL,
XARG, XINDEX,

SRCH1.
XNTHA' ,

WHICH

(XWHICHI.

PROGRAMS SORTED 8Y FUNCTION

••••••••••••••••••••••••••••••••••••
••••••••••••••••••••••••••••••••••••

• 7. ELEMENTARY NUMERICAL PROGRAMS •

FOR ADD IT ION
ADDK I ADDKS,
DIVKS,
DIVK.
XADDK, XADDKS,
XDIVK. XDIVKS.
XSUBK. XSUBKS1, BOOST (DPRESS,
SUM ( XSUM), VPLUSV IVMNUSV,

MULK.
XDVRK.
X800ST,
XVMNSV,

SUSK,
MULK2,
XDVRKS,
XMULK,
XDPRSS), FAPSU ....
XVPLSV I.

SUSICS,
XMULKS,
NRMVEC.

FOR SUBTRACTI ON
ADOK (ADDKS,
DIVK,
DIVKS,
XDIVK, XDIVKS,
XADDK. XADDKS.
XSUBK. XSUBKSt. BOOST (DPRESS,
(VMNUSV. XVMNSV. XVPLSV), XREMAV.

MULK.
XOVRK.
XBOOST.

MULK2.
XDVRKS.
XDPRSSI.

SUSK,
XMULK,
REMAV,

SUBKS,
XMULKS t
VPLUSV

FOR MULT I PLI CA TI ON
ADDK ( ADDKS.
DIVK,
DIVKS.
XADDK, XADDKS.
XDIVK. XDIVKS,
XSUBK. XSU8KSI. DUBLX ( DU8lL,
MULPlY. VTIMSV (XVTMSVI.

MULK,
XDVRK.
HALVl,

MULK2.
SUSKt
XMULK,
XDVRKS.
HAlVX), MLlSCl.

SUBKSt
XMUlKS.
MULK2,

FOR DIVISION
MUlK2,
ADDK ( ADDKS,
DIVK,
DIVKS,
MULK.
XOIVK, XDIVKS.
XAODK, XADOKS,
XDVRK. XDVRKS.
HAlVL,
XSUBK, XSUBKS I, DIVIDE.
DUBlX ( DUBll,
XDIV ( XOIVRI, XDVIDE (XDVIDRI, XVDVSV ( XDVRBVI.
FOR MODIFYING SIGN
ABSVAL. CHPRTS

(RVPRTSI, CHSIGN,

FOR RAISING TO POWERS
MVSQAV,
POWER (SMPROV I, SQRMlI,

MOVREV.
SQUARE

FOR TAKING ROOTS
SQROOT, XSQRUT.
FOR TRIGONOMETRIC FUNCTIONS
ARCTAN, SEQSAC (NEXCOS,

NEXSINI.

FOR COLLAPSING VECTORS
COLAPS. KOLAPS.
FOR ROTATING VECTORS
ROTAH.
FOR REVERSING VECTORS
CHPRTS (RVPRTSI, MOVREV t
FOR EXCHANGING VECTORS
EXCHVS.
FOR REFLECTING VECTORS
REFLEC (XRFLECI.

REVER,

REVERS.

(XSQUARI.

SU8MS,
SU8K.
XMULK. XMULKS.
HALVXI, VDVBYV,

PROGRAMS SORTED BY FUNCTION

***************************************

* 8. MISCELLANEOUS NUMERICAL PROGRAMS *
***************************************

FOR INTERPOLATION
ARBCOL, EXPAND,

INTOPR,

LINTRl,

QINTRI.

FOR SAMPLE BASE CHANGING
EXPAND, NURINC,
SIFT.
FOR GENERATING SINUSOIDS
COSTBL ICOSTBX, SINTBL,

SINTBXI, SEQSAC

FOR TRIGONOMETRIC FUNCTIONS
ARCTAN, SEQSAC (NEXCOS,

NEXSINI.

INEXCOS,

NEXSINI.

XSTEPC,

XSTEPL,

FOR TREATING ODD AND EVEN PARTS
CHPRTS IRVPRTSI, SPLIT I REFITI.
FOR FITTING EQUATIONS TO DATA
CUFIT1, INTOPR, LSLINE, PRBFIT,

QUFITI.

FOR CONTOURING
CNTRDB, CONTUR.
FOR DELTA AND STEP FUNCTIONS
DELTA I STEPC,
STEPL,

STEPR,

XDELTA,

MVNSUM,

MVSQAV.

XSTEPRI.

FOR CONVERTING COMPLEX NUMBERS
AMPHl I REIMI.
FOR MOVING SUMMATION
BLKSUM, MUVADD, MVINAV,
FOR INVERTING FUNCTIONS
IFNCTN.
FOR DOT PRODUCTS
DOTJ,
FOOT

I FDOTRI,

VDOTV.

*********************************

* 9. PROBABILITY AND STATISTICS *

*********************************

FOR FINDING MOMENTS
POWER ISMPRDVI.
FOR FINDING AVERAGES
AVRAGE, MVINAV, MVSQAV,
XREMAV.

REMAV,

TAMVL

I TAMVRI, XAVRGE

FOR FINDING R.M.S. VALUES
RMSDEV IRMSDAVJ.
FOR FINDING SUMS OF SQUARES
SQRDFR ISQRDEVI, SQRSUM

IXSQSUMI, XSQDFR

(XSQOEVI.

(XAVRGRI,

PROGRAMS SORTED BY FUNCTION

FOR FINDING SUMS OF DIFFERENCES
SQRDFR lSQRCEVl, SUMDFR ISUMDEV,

XSMOEV,

XSMCFRt, XSQDFR

FOR GENERATING RANDOM NUMBERS
GETRDI.
FOR RANDOMIZING DATA
SHUFFle
FOR FINDING DISTRIBUTIONS
FRQCTl, FRQCT2, POKCTl,

PRBFIT,

PROB2.

FOR PROBABILITY TRANSFORMATION
GRUP2, MPSEQl, NOINTl INOINT21.
FOR CHI-SQUARE ANALYSIS
CHISQR, KIINTI.
FOR DEPENDENCY TESTING
MSCONl, POKCTl.
FOR NORMAL CURVE INTEGRATION
NOINTI INOINT21 •

••••••••••••••••••••••••••••••••

• 10. INTEGRATION AND
•
•
DIFFERENTIATION PROGRAMS •

••••••••••••••••••••••••••••••••
FOR DEFINITE INTEGRATION
MVNTIN (MVNTNAI, SMPSON,

TINGL

(TINGLA).

FOR INDEFINITE INTEGRATION
IDERIV lDERIVAl, INTGRA

lIINTGRl,

TAMVL

FOR DIFFERENTIATION
DERIVA (IDERIV), IINTGR

(INTGRAI.

TAMVRI.

FOR INDEFINITE SUMMATION
INTSUM (DIFPRS, XNTSUM).
FOR DIFFERENCING
DIFPRS (INTSUM,

XDFPRSI •

••••••••••••••••••••••••••••••••••••••••
• 11. 2-D ARRAY AND 3-D ARRAY PROGRAMS.
** •••••••••••• ** ••••••••••••••••••••••••
FOR MATRIX MULTIPLICATION
MATMll, MATML3.
FOR MATRIX INVERSION
MATINV,
SIMEQ (DETRMI.
FOR SOLVING MATRIX EQUATIONS
LSSS1,
RLSPR,
RlSSR,

SIMEQ

(DETRM), WLLSFP.

IXSOOHVI.

PROGRAMS SORTED BY FUNCTION

FOR DETERMINANT EVALUATION
SIMEQ (DETRMl.
FOR MATRIX TRANSPOSITION
MATRA, MATRA1.
FOR MATRIX FACTORIZATION
MFACT.
FOR 2-D ARRAY ROTATION
ROAR2.
FOR INTERPOLATING 2-D ARRAY COLUMNS
ARBCOL.
FOR 2-D ARRAY DOT PRODUCTS
DOTP.
FOR 2-0 ARRAY CORRELATIONS
SPCOR2.
FOR 2-0 ARRAY FOURIER TRANSFORMATION
PLANSP.
FOR SOLVING 2-0 ARRAY EQUATIONS
FIRE2, RLSPR2.
FOR MATRIX VECTOR REVERSAL
MRVRS.
FOR MATRIX VECTOR DOT PRODUCT
MOOT,
MOOTJ.
FOR MATRIX VECTOR CORRELATION
CRSVM.
FOR SOLVING MATRIX VECTOR EQUATIONS
MIFLS,
MIPLS,
MISS •

•••••••••••••••••••••••••••
• 12. POLYNOMIAL PROGRAMS •

•••••••••••••••••••••••••••
FOR POLYNOMIAL EVALUATION
FASCUB, IPLYEV, POlYEV.
FOR FINDING POLYNOMIAL ROOTS
MULLER.
FOR POLYNOMIAL MULTIPLICATION
CONVLV, CNVLV2.
FOR POLYNOMIAL DIVISION
POLYOV.

PROGRAMS SORTEO BY FUNCTION

FOR POLYNOMIAL SQUARE ROOTS
PSQRT.
FOR SYNTHESIZING POLYNOMIALS
PLYSYN, POLYSN •
••• * •••••••••••••••••••••••••••••••••
• 13. CORRELATIONS ANO CONVOLUTIONS •

•••••••••••••••••••••••••••••••••••••
FOR AUTOCORRELATION
CROSS,
CROST,
QXCORR,
WAC.

PROCOR

(FASCOR,

FASCRl,

FASEPC,

FASEPl), QACORR,

FOR CROSS-CORRELATION
CROSS,
CROST, PROCOR
QXCORI.

(FASCOR,

FASCR1,

FASEPC,

FASEP1), QXCORR,

FOR CONVOLUTION
CONVLV, CNVLV2,

QCNVLV.

FOR OOT PRODUCTS
DOTJ,
FOOT' FDOTR),

VOOTV •

•••••••••••••••••••••••••••

• 14. HARMONIC TRANSFORMS •

•••••••••••••••••••••••••••
FOR COSINE TRANSFORMATION
ASPECT, ASPEC2, COSISl,

COSP

FOR SINE TRANSFORMATION
COSIS1,
COSP 'COSISP,

SISP).

FOR FOURIER TRANSFORMATION
COSISl,
COSP (COSISP,
XSPECT.

SISP),

FOR INVERSE FOURIER TRANSFORMATION
QIFURY ,QFURRYI •

••••••••••••••••••••••••••••••

• 15. MISCELLANEOUS SPECTRAL •
•
ANALYSIS PROGRAMS
•
* •••••••••••••••••••••••••••••
FOR DANIELL WEIGHTING
ADANL (ADANX,
XOANL,

XOANX).

FOR SPECTRAL FACTORIZATION
FACTOR.
FOR GENERATING NUMERICAL FILTERS
GNFLTI.

(COSISP,

FT24

SISP).

(FT24II), QFURRY

(QIFURY).

PROGRAMS SORTED BY FUNCTION

FOR CONVERTING TO AMPLITUDE AND PHASE
AHPHZ
REIM).
FOR CONVERTING TO REAL AND IMAGINARY
AMPHZ I REIMt.
FOR SPECTRAL COMPARISONS
MXRARE.
FOR GENERATING SINUSOIDS
COSTBL ICOST8X, SINT8Lt

SINT8X., SEQSAC

(NEXCOS,

NEXSIN).

PROGRAMS SORTED BV NON-FUNCTIONAL ATTRIBUTES

...........................

.. AUTHORSHIP ..

.....................

CLAERBOUT, JON F.
XOANX),
ADANL ( ADANX,
XDANL,
(COSTBX, SINTBL, SINTBX), FAPSUM,
MINAB,
MINSNI,
MOVE, OUDATA,
STZ, UNPAKN
SAME ( xSAMEI,

AMPHZ I REI M) , CCNVLV, COSTBL
FSKIP, INDATA,
fo!AXSN ( MAXII!,
PAKN (UNPAKN), POLVEV,
PSQRT,
PAKNI, VARARG,
WAC.

CLARK, JACQUELINE
COLAPS, KOLAPS.
GALBRAITH, JAMES N.,
CHISQR, FACTOR,
LINEH (LlNH90) ,
PROB2, SMPSON,

JR.
FRQCT2,
GRUP2, HSTPLT « HST2,
LlNH90,
LINEV (LINV90), LINV90,
ZEFBCD (ZEFBINI.

HST309,
MPSEQl,

HST390) ,
MSCONl,

GREENFIELD, ROV J.
PRBFlT •
HANSON, I.
MULLER.
M.I.T. COMPUTATION CENTER STAFF
FRAM90.
PAN, CHEH
FT24

(FT24Il I.

PROCITO, JOSEPH T.
QINTRI.
ROBINSON, ENDERS A.
PLVSVN.
SIMPSON, STEPHEN M., JR.
ABSVAL,
AODK« AODKS,
DIVK,
SUBKS,
XAODK, XADDKS,
XOIVK,
XMULKS,
XSUBK, XSUBKS), ARBCOL,
BOOST (DPRESS, XBOOST, XDPRSS),
CHSIGN, CLOCKI, CMPARP (CMPARS),
COLABL, CONTUR,
COSP (COSISP,
(STEPC,
STEPL,
STEPR, XDELTA,
(IDERIVI, DIFPRS (INTSUM, XDFPRSI,
HALVL,
HALVXI, EXCHVS, EXPAND,
I FIXVR), FLOATM, FLOATV, FMTOUT,
GETHOL, GETRDI, GNFLTI,
GRAPH,
IIVTOHVI,IDERIV IDERIVA',IFNCTN,
SETAPT, SETEST, VINDEX), INTGRA
XNTSUMJ, [TOMLI, IVTOHV (HVTOIVI,
ILINE901, LINE90, LINTRl, LOCATE
SETSBV,
SETUP,
STORE,
WHERE,
MAXSNM (MAXABM, MINABM, MINSNM),

DIVKS,
MULK,
MULK2,
SUBK,
XDIVKS,
XDVRK, XDVRKS,
XMU~K,
ASPECT, ASPEC2, AVRAGE, BLKSUM,
CARIGE, CHOOSE, CHPRTS (RVPRTSI,
CMPARV (CMPARL), CNTRDB, CNTROW,
SISPJ, CUFITI, CVSOUT,
DELTA
XSTEPC, XSTEPL, XSTEPRI, DERIVA
DIVIDE, DSPFMT,
DUBLX (DUBLL,
FASCNI, FASCUB, FASTRK,
FIXV
FNDFMT, FRQCTI, FXDATA (FLOATA),
GRAPHX,
HLAOJ I HRADJ), HVTOIV
IINTGR IINTGRA), INDEX ICHUSET,
(IINTGR), INTOPR, INTSUM (OIFPRS,
IXCARG, KIINTI, LIMITS,
LI~E
I
ARG,
CALL,
CALL2, RETURN,
XARG, XINDEX,
XNAME, ?AGE

21

STO
ILO
TMI
LEAVE
HE
LEAVE
GET3 CLA
••
ARS
18
S10
IH I
TMI
LEAVE
TlE
LEAVE
SUB
ILO
ADO
1<1
STO
LVECT
TMI
LEAVE
HE
LEAVE
STl
IANS
UP.
• SET LOOP
CLA
1.4
SUB
ILO
ADO
1<2
STA
CAL
4,4
CLA
ADD
1<1
STA
STO
LXA
LVECT.l
.. LOOP.
CAL CAL
·.,1
•• ,1
STO S10
T1X
CAL.l,l
• STORE I ANS AND LEAVE.
LEAVE CLA
tANS
AlS
18
PUT5 STO
••
EXIT AXT
*. ,1
TRA
6,4
.. CONSTANTS
1<1 PZE
1
1<2 PZE
2
• VARIABLES
ILO PZE
IHI PZE
IANS PZE
"
LVECT PZE
""
END

......
.

.••••••••••••••••••••••••
ABSVAL

.* •••••.•••••••.••••••.•"
(PAGE

AIIHII

AIA{ANYVEC)}

AIAIABSVECll

AIANYVECI-ILO+2
AIABSVEC1+l

A{IANS)

o OR -1

IHi-ilO+l

0075
0076
0077
0078
0079
0080
0081
0062
0063
0064
0085
0086
0067
0066
0069
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116

21

••••••••••••••••••••••••
ADANl
*
••••••••••••••••••••••••

PROGRAM LISTINGS

•

LAST CARD IN DECK IS NO. 0335
0001
0002
0003
0004
0005
0006
0001
OOOB
0009
0010
----ABSTRACT---0011
TITLE - ADANL WITH SECONDARY ENTRY POINTS XDANL, ADANX, XDANX
0012
MODIFY AUTO- OR CROSS CORRELATIONS FOR DANIELL SPECTRA
0013
0014
0015
AOANL WEIGHTS A ONE-SIDED. FLOATING POINT AUTOCORRELATION
FUNCTION, A(L) L=O ••• N, BY A SINIY)/Y TYPE CURVE TO
0016
PRODUCE A FLOATING POINT OUTPUT OAIL)
0017
0018
0019
M
l*PI
DAlll
All) .. ( ---- .. SINI----)
0020
0021
L-PI
M
0022
0023
FUR L
O.I ••••• N
0024
WHERE M AND N ARE INPUT PARAMETERS
PI = 3.14159265
0025
0026
0027
XDANl WEIGHTS A TWO-SIDED, FLOATING POINT CROSS0028
CORRELATION FUNCTION. XIL) L= -N ••• O••• N. BY A SINCY)/Y
0029
TYPE CURVE TO PRODUCE A FLOATING POINT OUTPUT OXIL)
0030
0031
M
l-PI
0032
DXIl)
Xill - I ---- - SIN(----)
0033
L-PI
M
0034
0035
FOR l • -N.-N+I •••• ~N
0036
WHERE M AND N ARE INPUT PARAMETERS
0031
PI = 3.14159265
0038
0039
ADANX IS IDENTICAL TO AOANL EXCEPT THAT THE INPUTS ANO
0040
OUTPUTS ARE FIXED POINT VECTORS.
0041
XDANX IS IDENTICAL TO XDANL EXCEPT THAT THE INPUTS AND
0042
0043
OUTPUTS ARE FIXED POINT VECTORS.
0044
0045
LANGUAGE - FAP SUBROUTINE (FORTRAN II COMPATIBLE)
0046
EQUIPMENT - 709 OR 1090 IMAIN FRAME ONLY)
0047
- 1B3 CELLS
STORAGE
7090
0048
- CAPPROX)
109
SPEED
0049
1.2M + .1BN
MIlLISECS
FLOATING PT - 6" + .9N
1.2M + .325N
MILLISECS
0050
FIXED POINT - 6M + 1.6N
0051
J.
CLAERBOUT
AUTHOR
0052
0053
----USAGE---0054
0055
TRANSFER VECTOR CONTAINS ROUTINES - NONE
0056
ANO FORTRAN SYSTEM ROUTINES - SIN
0057
0058
FORTRAN USAGE OF ADANl
0059
CALL ADANL IAA,N,M.DAA)
0060
0061
INPUTS
AIO,
•••
,N)
0062
1=1,2,
•••
,N+1
CONTAINS
THE
AUTOCORRELATION
AAIU
0063
WHERE AAII)
AClI-1)
0064
0065
MUST BE NON NEGATIVE
N
0066
0067
IS THE DANIELL WEIGHTING PARAMETER
M
0068
IS A NON-ZERO INTEGER
0069
0010
OUTPUTS
0071
CONTAINS THE WEIGHTED AUTOCORRELATION
1=1 ••• N+1
DUll I
0072
DAIO ••• N) AS DEFINED IN ABSTRACT
0073
WHERE DAAII) = DAll-1)

•
AOANL ISUBROUTINE)
•
FAP
.ADANL
300
COUNT
ADANL
lBL
ADANL IAA,N,M,OAA)
ENTRY
XDANL IXX,N,M,DXX)
ENTRY
AOANX IIAA,N,M,IDAA)
ENTRY
ENTRY
XDANX IIXX,N,M,IDXX)

•.
•..
..

•.

....
..•.
..

•
•
•.

..

.

•

---•
•
-•

•

-.•
•

-•.

•
•

•
•
•

--..
.-.-.
--

-

-

• •••••••••••••••••••••••
ADANl
•
• •••••••••••••••••••••••

*

9/29/64

.••••••••••••••••••••••••
.
ADANL
••••••••••••••••••••••••
IPAGE

PROGRAM LISTINGS

.• •••••••••••••••••••••••
.
ADANL
• •••••••••••••••••••••••

21

IPAGE

..

EQUIVALENCE IDAA.AA) IS PERMITTED

... INPUTS
.... XXIII
..
.

1= -N+1.-N+2 ••••• N+l CONTAINS THE CROSS-CORRELATION
XI-N ••• N) WHERE XXII) = XII-I)

.. FORTRAN USAGE OF XDANL
..
CALL XDANLIXX.N.M.OXX)

N
M

.. OUTPUTS
..
DXXI Il

....
....
.....
..
..
..
....
.

SAME AS FOR AOANL
SAME AS FOR AOANL
1= -N+l,-N+2 ••••• N+1 CONTAINS THE WEIGHTED CROSSCORRELATION DX(-N ••• N) AS DEFINED IN ABSTRACT
WHERE DXXII) = OXll-l)
EQUIVALENCE CXX.DXX) IS PERMITTED

FORTRAN USAGE OF ADANX
CALL ADANX(IAA.N,M,IDAA)
INPUTS
IAAIII

SAME MEANING AS FOR AOANL EXCEPT THAT THE AUTOCORRELATION
ELEMENTS ARE FIXED POINT QUANTITIES. THE POSITION OF
THE BINARY POINT IS IMMATERIAL BUT THE DATA MUST NOT
OCCUpy BITS 1 THROUGH 8 •
SAME MEANING AS FOR AOANL
SAME MEANING AS FOR ADANL

N
M

.. OUTPUTS

AS FOR ADANL EXCEPT THE DATA
.... IDAA SAMEWITHMEANING
BINARY POINT SAME AS THAr OF IAA.
.. FORTRAN USAGE OF XOANX
(II

......
..
...
..

CALL XDANXIIXX.N.M,IDXX)
INPUTS
I XX I I )
N
M

.. OUTPUTS
..
IDXXII)

...
.
..

..
..
..
..

....

..
..

..

....
..

SAME MEANING AS FOR XDANL EXCEPT THAT THE DATA IS FIXED
POINT AND MUST NOT OCCUpy BITS 1 THROUGH 8.
SAME MEANING AS FOR XDANL
SAME MEANING AS FOR XDANl
SAME MEANING AS FOR XDANL EXCEPT IDXX IS FIXED POINT.

EXAMPLES
1. GENERAL BEHAVIOR ON ELEMENTARY CORRELATIONS
INPUTS
AAll ••• 4)=1.0,1.0,1.0,1.0 IAAll ••• 4)=500.500,500,500
XXll ••• 11=1.0.1.0, ••• ,1.0 IXXll ••• 1)=500,500, •••• 500
INOTE - BIT 9 IS THE MOST SIGNIFICANT BIT OCCUPIED
BY IAA OR IXX WITH THESE DEFINITIONS)

..

..
..
..
..
..
..
..
..

IS FIXED POINT

N

USAGE

=3

M

=2

CALL AOANLIAA.N.M,DAA)
CALL XOANLIXXI41,N,M,DXX(4))
C~LL AOANXIIAA,N,M,IOAAI
CALL XOANX(IXXC4).N,M,·IOXXI41)
OUTPUTS - OAA(1 •• ~)=1.0 •• 636620.0.0,-.212201
OXXll ••• 71=-0.212207,0.0,.636620.1.0 •• 636620,O.O,-.212207
IDAAll ••• 41=500.318.0.-106
IOXXll ••• 71=-106,O,318,500,318,O,-106
2. EQUATING OUTPUTS WITH INPUTS
INPUTS - SAME AS EXAMPLE 1.
USAGE
CALL AOANlIAA,N,M,AAI
CAll XOANlIXX(4),N,M,XXI4)1
CALL AOANXIIAA.N.M.IAAI
CAll XOANXIIXXI41,N.M.IXXI411
OUTPUTS - AAll ••• 4)=OAAll ••• 41 OF EXAMPLE 1.
XXll ••• 7)=OXX(1 ••• 7) OF EXAMPLE 1.
IAA(1 ••• 4)=IOAAI1 ••• 4) OF EXAMPLE 1.

0074
0075
0076
0077
0078
0019
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146

2)

•••••••••••• * •••••••••••

-

-

ADANL

PROGRAM LISTINGS

• * ••••••••••••• * ••• ** •••

(PAGE

31

...

IXXll ••• 11:IDXXll ••• 11 OF EXAMPLE 1.

*
- PROGRAM FOLLOWS BElOW

"
ADANL

XDANL

LXL
ADANX

XDANX
XXL
MOIIA
MOIIX
MAX

M1
MM2
T'AX
M3
M4
M6
M5
MOl/Oil
M1
M8
*FLOAT
FLOAT

FLl

H2

HTR
0
l,ADANL
8CI
SlIl,l
SXA
MOil A,1
MOVE DATA TO OUTPUT FIELD
TSX
CLA
"
AORX
STO
AORX"'O IF CROSS
TRA
LXL
SXA
SI/l tl
MOllE DATA
MOIIX,!
TSX
AORX:O IF CROSS
AORX
STZ
CLA
XORD:O IF FIXED
XORL
S10
ADANL-2,4
SXD
SFTUP
SKIP FLOATING
TRA
SXA
SI/1,l
MOIIA,l
MOllE DATA
TSX
ADRX.:O IF CROSS
CLA
*
AORX
STO
TRA
XXL
SXA
SII1,l
MOllE DATA
TSX
MOl/X.!
AORX:O IF CROSS
AORX
STl
XORL=O IF FIXED
XORL
STl
SXO
AOANL-2,4
TRA
FLOAT
M8
CLA
STA
TAX
TRA
MAX
M7
CLA
TAX
STA
1,4
CLA
STA
MI
M3
STA
4,4
CLA
MM2
STA
M4
S.fA
2,4
CLA*
M5
STD
5112,2
SXA
MOIIOI/,l
SXA
0,2
AXT
0,1
AXC
•• ,2
I ".:CC I
CLA
*.,2
I **:DDCC I
STO
1 •• :M3 OR M6)
TRA
CLA
**,1
I ""=CCI
STO
**,1
I **"'OOCC)
,,+ 1,1.-1
TXI
TXI
"+1,2,1
("-=N)
TXL
Ml,2,"*
AXT
**,1
I **=IRlJ
TRA
1tl
PIE
M3
M6
PlE
THE INPUT DATA
4,4
CLA
STA
FLl
STA
Fl2
2,4
CLA"
STD
FL4
STD
11.4
AXT
1tl
1,2
AXC
CLA
··,1
**=R
:0233000000000
ORA
FA[)
=0233000000000
FLl
STD·
AOII.X
II::T
AUT£)
Til. A
Fl3
•• =R
CROSS
CLA
**,2

-

_.

• •• ** ••••••••••• *.******

-

.

ADANL

.** ••••• **** •••• * ••• ****

(PAGE
0141
0148
0149
0150
0151
0152
0153
0154
0155
0156
0151
0158
0159
0160
0161
0162
0163
0164
0165
0166
0161
0168
0169
0110
0111
0112
0113
0114
0175
0116
0171
0118
0119
0180
0181
0182
0183
0184
0185
0186
0181
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0201
0208
0209
0210
Olll
0~12

0213
0214
0215
0216
0217
0218
0219
0220
0221

31

• •• ***_ •••••••• -*.- •••• *
AOANL
*
"

.... _.. _.............-.*
IPAGE

rROGRAM LISTINGS

4)

ORA
=0233000000000
FAD
=0233000000000
STO"
FL2
TXI
...·1,2,-1
FL3
TXI
*+1,1,1
FL4
TXL
FLl,I,*"
*,,=N
*SET UP FOR WEIGHTING Loor
SETUP CLA"
3,4
=M
ARS
17
STO
TWOM
ARS
1
ORA
=0233000000000
FAD
=0233000000000
FOP
=3.14159265
STO
MOVPI
CLA
=1.
For
MOVPI
STO
PIOVM
CLA
4,4
STA
R
STA
Rl
STA
R7
CLA"
2,4
STD
NO
N IN DECR
ARS
18
STO
N
CLA"
3,4
ADD*
3,4
STD
M2
CLA
M2
CAS
NO
CLA
NO
STD
MIN
STO
MIN
STl
ARG
AXC
0,2
AXT
0,1
-BEGIN WEIGHTING LOOP
NXWVL TXI
*+1,2,-1
TXI
*+1,1,1
MIN
TXL
*+2,1,"*
"*=MINIZM,NI
TRA
SMDONt
SMOOTHING DONE
* FORM SINIPI*I/MI
CLA
ARG
FAD
PIOVM
STO
ARG
TSX
$SIN,4
FOP
PIOVM
STQ
IWT
=IM/Pl)SINlrl*I/MI
PXA
0,1
PUT I IN AC
STO
X2MPI
I+MULTIPLE OF 2*M
MORE ORA
=0233000000000
FAD
=0233000000000
STO
L2MPI
I+MULTIPLE OF 2*M
LXA
X2MPI,4
I+MULTIPLE OF 2*M
CLA
IWT
=IM/PIISINIPI*I/MI
FOP
L2MPI
I+MULTIPLE OF 2*M
STO
TEMP
R
FMP
*.,4
**=DATA LOCATION
STO*
*-1
lET
AORX
TRA
LP
AUTO COR
LAC
X2MPI,4
CROSS COR
LDO
TEMP
FMP"
R
STO*
R
•
INCREMENT
X2MPI 8Y 2M
LP
CLA
X2MPI
AOD
TWOM
STO
X2MPI
CAS
N
TEST IF I PLUS SOME
TRA
NXWVL
MULTIPLE OF 2*M IS
TRA
MORE
GREA TER THAN N
TRA
MORE
SMDONE lET
XORL

.*-* .••.. _..• -._. __ ._._.
AOANL
"
"
*.*.*.-*.*.-••.
_(rAGE
.• *._-*4)
0222
0223
0224
0225
0226
0221
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
(>254
0255
0256
0251
0258
0259
0260
0261
0262
0263
0264
0265
0266
0261
0268
0269
0210
0271
0212
0273
0214
0215
0216
0211
0218
0279
0280
0281
0282
0283
0284
0285
0286
0281
0288
0289
0290
0291
0292
0293
0294
0295
0296

.••••••••••••••••••••••••
..
ADANL

PROGRAM LISTINGS

• •••••••••••••••••••••••

••••••••••••••••••••••••
(PAGE

51

R1

( PAGE

TRA
AXT
Axe
eLA
UFA
LRS
ANA
LLS
STO"

ZET

R2

R3
R4
SVI
SV2

KDl
AORX
XORL
MOVPI
PIOVM
N
X2MPI
L2MPI
I HT
TWOM
TEMP
M2

.• •••••••••••••••••••••••
..
AOANL

TRA
eLA
UFA
LRS
ANA
llS
STO.
TXI
TXI
TXL
AXT
AXT
LXO
TRlI
PZE

SVI
DONT FIX DATA
1,1
FIX DATA
1.2
•• ,1
=0233000000000
=0111111111
R1
AORX
R3

AUTO

•• ,2

=0233000000000
=0111111111
R2
"+1,2,-1
".1,1.1
Rl,I .....

*.,1

**=N

·",2
ADANL-2,4
5,4
,,1
=0 IF CROSS
=0 IF FIXEO
M/PI

PIIM
STORES N IN AOOR
FIXED I+MULTIPLE OF 2 .. M
HTG I+MULTIPlE OF ?*M
=(M/PIISIN(PI*I/MI
2*M IN ADDRESS
STORE 2M IN DECR
III IN DEeR
ARGUMENT OF SIN!'

ND

ARG
END

0291
0298
0299
0300
0301
0302
0303
0304
0305
0306
0301
0308
0309
0310
0311
0312
0313
0314
0315
0316
0311
0318
0319
0320
0321
0322
0323
0324
0325
0326
0321
0328
0329
0330
0331
0332
0333
0334
0335

5)

••••••••••••••••••••••••

•

AOANX

•

••••••••••••••••••••••••
REFER TO
ADANL

PROGRAM LISTINGS

••••••••••••••••••••••••
AOANX
•* •••••••••••••••••••••••*
REFER TO
ADANl

..••••••••••••••••••••••••
ADDK
"

PROGRAM LISTINGS

••••••••••••••••••••••••

"
"

ADDK
FAP
COUNT
LBL
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY
ENTRY

"
"
""
"

..

".
"

..

"

...
"

."
.

"

"
"..
"

...

.

..".
..

..
..
..
.

.
.
....
...
....
"..

(SUBROUTINE)

9/29/64

• •••••••••••••••••••••••
ADDK
• •••••••••••••••••••••••"

.

LAST CARD IN DECK IS NO. 0365

250

ADDK
ADDK
SUBK
MULK
DIVK
XADDK
XSUBK
XMULK
XDIVK
XDVRK
ADDKS
SUBKS
MULKS
DIVKS
XADDKS
XSUBKS
XMULKS
XOIVKS
XDVRKS

e. Xl, X2, ••• , XN)
C, Xl, X2, •••• XN)
e, Xl. X2, •••• XN)
( e. Xl, X2, •••• XN)
IIe.IXI.IX2 •••• ,IXN)
(IC,IXl,IX2, •••• IXN)
(Ie,IXl,IX2 ••••• IXN)
(IC,IXl.IX2, ••• ,IXN)
(IC,IXl,IX2, ••• ,IXN)
( Cl, Xl. YI, C2. X2, Y2 ••••• eN. XN. YN)
( CI. Xl, Yl. C2. X2. Y2, •••• eN, XN, YN)
( e1. Xl. YI. C2. X2, Y2, •••• CN. XN, YN)
I el, Xl. YI. C2. X2. Y2, ••• , eN, XN, YN)
(IeI,IXI,IYl.IC2.IX2,IY2, ••• ,ICN,IXN.IYN)
IIel.IXl,IYl,IC2,IX2,IY2 •••• ,ICN,IXN.IYN)
(ICI,IXI.IYl,IC2.IX2,IY2, ••• ,ICN,IXN.IYNI
(ICI,IXl.IYI.IC2,IX2.IY2 ••••• ICN.IXN,IYNI
(IC1.IXl.IYl.IC2.IX2.IY2 •••• ,ICN.IXN.IYN)
----ABSTRACT----

TI HE - ADDK

WITH SECONDARY ENTRIES
MULK.
DIVK.
SUBK.
XADDK. XSUBK. XMULK. XDIVK. XDVRK.
ADOKS. SUBKS • MULKS. DIVKS.
XADDKS. XSUBKS • XMULKS. XOIVKS. XDVRKS

MODIFY A SEr OF VARIABLES BY A CONSTANT OR BY CONSTANTS
ADDK AND ITS OTHER ENTRIES ARE VARIABLE LENGTH CALLING
SEQUENCE SUBROUTINES. FOR THE FIRST NINE ENTRIES THE
FIRST ARGUMENT IS TAKEN AS A CONSTANT BY WHICH THE
REMAINING ARGUMENTS ARE TO BE MODIFIED. THE MODIFICATION
DEPENDS ON THE ENTRY USED AS FOLLOWS
FLOATING
ARGUMENTS

FIXED
ARGUMENTS

ADDK
SUBK
MULK
DIVK

XADOK
XSUBK
XMULK
XOIVK
XOVRK

FUNCT ION
ADDS THE CONSTANT
SUBTRACTS THE CONSTANT
MULTIPLIES BY THE CONSTANT
DIVIDES BY THE CONSTANT
DIVIDES BY THE CONSTANT WITH
ROUNDING INSTEAD OF TRUNCATION

THE LAST NINE ENTRIES ASSUME THAT THE NUMBER OF ARGUMENTS IS A MULTIPLE OF THREE. AND THAT WITHIN EACH
TRIPLET OF THREE ARGUMENTS THE FIRST IS A CONSTANT BY
WHICH THE SECOND IS TO BE MODIFIED WITH THE RESULT
STORED IN THE THIRD ARGUMENT. THE NAMES OF THE LAST
NINE ENTRIES (THE PLURAL ENTRIES) ARE DERIVED FROM THOSE
OF THE FIRST NINE (THE SINGULAR ENTRIES) BY ADDING
THE LETTER S. THE MODIFICATION ASSOCIATED WITH A
PLURAL ENTRY IS THE SAME AS THAT OF ITS SINGULAR
COUNTERPART.
THE ORDER OF PROCESSING IS TOWARDS HIGHER ARGUMENTS.
THE DIVISION ENTRIES SKIP OVER AN ATTEMPT TO DIVIDE BY
ZERO WITHOUT TURNING ON ANY INDICATORS. BUT NO OTHER
TESTS FOR POSSIBLE OVERFLOW ARE MADE •
FOR THE PLURAL ENTRIES. AN ILLEGAL RETURN RESULTS
FROM AN ARGUMENT COUNT WHICH IS NOT A MULTIPLE OF 3 •
THERE IS NO LIMIT ON THE NUMBER OF ARGUMENTS PERMITTED •
THERE ARE NO RESTRAINTS ON ARGUMENT ECUIVALENCES.
HOWEVER NO OUTPUT (THIRD) ARGUMENT MAY BE INVOLVED AS A
SUBSCRIPT Of, OR IN A DEFINING EXPRESSION FOR, A
SUBSEQUfNT INPUT ARGUMENT, OTHER THAN BY A PURE

0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0031
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074

••••••••••••••••••••••••
*
ADDK
*
••••••••••••••••••••••••
(PAGE

••••••••••••••••••••••••
ADDK
•
*
••••••••••••••••••••••••

PROGRAM LISTINGS

2)

•

•..

IPAGE

EQUIVALENCE.
LANGUAGE

- FAP SUBROUTINES (FORTRAN-II COMPATIBLE)

STORAGE
SPEED

- 114 REGISTERS
- K1 + K2.N MACHINE CYCLES, WHERE 1'1 " NO. MOOIFICATIONS.
AND Kl LIES BETWEEN 33 ANO 44
K2 LIES BETWEEN 22 AND 59. DEPENDING ON ENTRY
AND ON COMPUTER.
- S.M. SIMPSON, AUGUST 1963

* EQUIPMENT - 1Q9 OR 1090 (MAIN FRAME ONLY)

*
*

•

•
•

.. AUTHOR

*

•
•

----USAGE----

* TRANSFER VECTOR CONTAINS ROUTINES - (NONE)

FORTRAN SYSTEM ROUTINES
... FORTRANANDUSAGE
..
•
•

*

..

*

•
..

*

•
..
•

*

•
..
..
•
..
•

...

CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL

ADDK
SUBK
MULK
OIVK
XADDK
XSUBK
XMULK
XDIVK
XDVRK
AODKS
SUBKS
MULKS
DIVKS
XADDKS
XSUBKS
XMULKS
XDIVKS
XOVRKS

- INONE)

C, Xl, X2, ••• , XN)
C, Xl. X2 •••• , XN)
C, Xl, X2, ••• , XN)
( C, Xl, X2, ••• , XN)
tIC,IXI.·IX2 ••••• IXN)
tIC,IX1,IX2 •••• ,IXN)
tIC,IXI,IX2, ••• ,IXN)
IIC,IXl,IX2, ••• ,IXNI
IIC,IX1,IX2 •••• ,{XN)
I Cl, Xl, Yl, C2, X2, Y2, ••• , CN, XN. YNI
1 Cl, Xl, Yl, C2, X2, Y2, ••• , CN. XN, YNI
1 Cl, Xl, YI, C2, X2, Y2, ••• , CN, XN, YN)
1 C1, Xl, Y1, C2, X2, Y2 •••• , CN, XN, YN)
IIC1,IXl,IYl,IC2,IX2,IY2, ••• ,ICN,IXN.IYNI
IICl,IX1.IYl,IC2,IX2,IY2 •••• ,ICN,IXN,IYN)
IIC1,IXl,IYl,IC2,IX2,IY2 •••• ,ICN,IXN,IYN)
IICl,IX1,IY1,IC2,IX2,IY2, ••• ,ICN,IXN,IYN)
IICl,IXl,IYl.IC2,IX2.IY2, •••• ICN.IXN,IYN)

IN-THE ABOVE EXPRESSIONS, THE LETTER
ExtEEOING lERO.

.....

1'1

MAY HAVE ANY VALUE

.. INPUTS

...
..

*

C

IS A FLTG CONSTANT FOR MODIFYING X1,X2, ••• XN, FOR THE
FLOATING SINGULAR ENTRIES •

Xl. X2, ••• ,XN

..
..

....
..
..

EQUIVALENCE(C.SOME XJ) IS PERMITTED. THE INITIAL
VALUE OF C WILL ALWAYS BE USED FOR MODIFICATION •
Cl. C2, ••• ,CN

..

...
..

...
*

..
*..

ARE THE FLOATING VARIABLES TO BE MODIFIED, FOR
ALL FLOATING ENTRIES.
THEY ARE ALSO OUTPUTS FOR SINGULAR FLOATING ENTRIES

ARE THE FLOATING CONSTANTS USED. FOR THE FLOATING
PLURAL ENTRIES, TO MODIFY Xl,X2 ••••• XN RESPECTIVELY.

EQUIVALENCEtCJ,XL) IS PERMITTED FOR ANY J.L PAIR.
IC
lXI, lX2, ••• ,IXN
ICl, lC2, ••• ,ICN

IS THE FIXED PT. ANALOG. OF
ARE THE FIXED PT. ANALOGS OF
ARE THE FIXED PT. ANALOGS riF

C
Xl •••• ,XN
Cl ••••• CN

.. OUTPUTS

..
.*
*
...*
*

..

Yl, Y2 ••••• YN

0011

0018
0019
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0131

Xl. X2 •••• , XN ARE OUTPUTS FOR
ADDK GIVES
Xl
SUBK GIVES
Xl"
MULK GIVES
Xl
DIVK GIVES
Xl "
IX1, •••• IXN

0015
0016

ENTRIES ADDK. SUBK, MULK. DIVK
X1+C, •••• XN
XN+C
X1-C ••••• XN = XN-C
X l*C, •••• XN = XN-C
XI/C •••• , XN " XN/C

ARE SIMILAR OUTPUTS FOR XAODK. XSUBK. XMULK. XDIVK.
AND XDVRK, WHERE XDIVK TRUNCATES, XDVRK ROUNDS.
AR~

ADDKS

OUTPUTS FOR ENTRIES ADOKS, SUBKS, MULKS, DIVKS
GIVES
Yl=Xl+C1, Y2=X2+C2, ••• , YN=XN+CN

0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
0148
0149

2)

.••••••••••••••••••••••••
.
ADDK
•••••• - •••••••• -- •••••• *
(PAGE

...

..
..• •••••••••••••••••••••••
ADDK

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

31
SUBKS
HULKS
DIVKS

..
.
"
....

GIVfS
GIVES
GIVES

• YN=XN-CN
YN=XN"CN
• YN=XN/CN

Yl=Xl-CI.
Yl=XI"CI.
Yl=XI/Cl,

EQUIVALENCE (CJ,XLl.ICJ.YL),IXJ.YLl IS PERMITTED
FOR ALL J.L PAIRS. THE VALUES OF THE OPERANDS
USED DURING A MODIFICATION ARE THEIR PRESENT VALUES
AND NOT NECESSARILY THEIR INITIAL VALUES •

."

THE ENTRY DIVK 8YPASSES THE COMPUTATION OF EACH YJ
OUTPUT FOR WHICH THE CORRE,PONDING CJ HAS VALUE
ZERO AT'THE TIME OF MODIFICATION.

"
.."

THE COMPUTATIONAL ORDER IS Yl, Y2, •••• YN.

.."
"

""

.
".
.
....
...

(YI, IY2, •••• IYN ARE SIMILAR OUTPUTS FOR
XDIVKS. AND XDVRKS.
1. EXAMPLES OF THE SINGULAR ENTRIES
INPUTS

-

USAGE

"

..

"
.."

....

....
"
"..
"
"

...
"
......

AI. A2. A3 = 1. ,
CI, C2, C3 = 1.,
I,
IAl,IA2,IA3
ICl,IC2,IC3 = 1,
IEl, IE2, IE3 = 1,
CALL
CALL
CAll
CALL
CAll
CALL
CALL
CALL
CAll
CAll

".
.."

.....
...

XADDKS. XSU8KS. XMUlKS.

ADOK
XADDK
SUflK
XSUBK
MULK
XMULK
OIVK
XDIVK
XDVRK
AODK

2., 3.
2., 3.
2, 3
2. 3
2, 3
12 ••
12,
12. ,
12,
(2. ,
( 2,
12. ,
( 2,
12,
( 2.,

Bl. 82, B3 = 1 ••
01, 02. 03 " 1.,
IBl, 182, IB3
1.
101,102,103 '" 1,
X " 1.0

2., 3.
2., 3.
2, 3
2• 3

AI. A2, A31
IA1.1A2,IA3)
BI, B2, B3)
IBl.IB2,IB3)
Cl, C2, 01
ICI. IC2, IC3)
01, 02, 03)
101.102, lO31
lEI, IE2, IE31
XI

OUTPUTS - AI, A2, A3 - 3., 4 •• 5.
BI, 82. B3 =-1., 0 •• 1.
Cl. C2. C3 = 2., 4 •• 6.
01. 02. 03 = .5, 1., 1.5
lEI. IE2. IE3 = 1. 1. 2

IAI. I A2.
IBl, I B2,
IC 1, IC2.
101. 102.
X
3.

=

IA3 '" 3, 4,
IS3 =-1. 0,
2, 4.
IC3
103 " 0, 1.

5
1

6
1

/>192

2. EXAMPLES OF THE PLURAL ENTRIES

INPUTS
USAGE

-

SAME AS EXAMPLE 1
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CALL
CAll

OUTPUTS - Yl,Y2
Ul,U2
IY = 2,

ADDKS(
SU8KSI
MULKS!
OIVKSI
XADDKSI
XSUBKSI
XMUlKSI
XOIVKSI
XOVRKSI
2.,6.
3. ,4.

IZ = -1.

1 •• AI, YI.
2 •• AI, l l ,
3., AI. Ul.
4 •• AI. VI,
1 .IAltlY)
2 .IAI.Il)
3 ,IAI,IU)
2 ,IA3,IV)
2 ,IA3.IWI

4 ••
3 ••
2.,
1.,

A2,
A2.
A2,
A2,

-1.,-1 •
Z1,Z2
Vl,V2
.25.2.0
I V = 1,
IU " 3.

Y2)
Z2)
U2)
V2)

IW

2

.." PROGRAM FOLLOWS BElOWS

.

"..

0150
0151
0152
0153
0154
0155
0156
0151
015B
0159
0160
0161
0162
0163
0164
0165
0166
0161
0168
0169
0170
0111
0172
0113
0174
0115
0116
0111
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191

NO TRANSFER VECTOR
HTR
0
XR4
BCI
1.ADDK
.. PRINCIPAL ENTRY. ADDKIC.Xl,X2 ••••• XNl = ADDKIARGSKI
AOOK srz
llFK
.. SECOND ENTRY. AODKSICI,Xl.Yl •••• ,CN,XN,YNI = ADOKSIARGSKS)
AODKS CLA
TRAI
TRA
SETUP
" THIRD fNTRY. XADDKIIC.IX1.IX2, ••• ,IXN) = XAOOKIXARGSKI
XAODK srz
ZIFK
.. fOURTH ENTRY. XADDKSIICI,IXI.IYl •••• ,ICN,IXN,IYN) = XADDKSIXARGSKSI

0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0201
0208
0209
0210
0211
0212
0213
0214
0215
0216
0211
021B
0219
0220
0221
0222
0223
0224

31

•• *** •••• ************.*.
ADDK

".* ••••••••• * ••• ******.**"
I PAGE

PROGR AM LI ST1 NG S

••• ****** •• **** •• * ••••••

ADDK
"•••••••••••
** •••• ***.***"

4)

XADDKS CLA
TRA2
TRA
SETUP
" FIFTH ENTRY. SUBKIARGSK)
SUBK STZ
ZIFK
" SIXTH ENTRY. SUBKSIARGSKS)
SUBKS CLA
TRA3
TRA
SETUP
" SEVENTH ENTRY. XSUBK(XARGSK)
XSUBK STZ
ZIFK
" EIGHTH ENTRY. XSUBKS(XARGSKS)
XSUBKS CLA
TRA4
TRA
SETUP
" NINTH ENTRY. MULK(ARGSK)
MULK STZ
ZIFK
" TENTH ENTRY. MULKS(ARGSKS)
MULKS CLA
TRA5
TRA
SETUP
" ~LEVENTH ENTRY. XMULK(XARGSK)
XMULK STZ
ZIFK
" TWELFTH ENTRY. XMUlKS(XARGSKS)
XMULKS CLA
TRA6
TRA
SETUP
" THIRTEENTH ENTRY. DIVK(ARGSK)
DIVK STZ
ZIFK
" FOURTEENTH ENTRY. DIVKS(ARGSKS)
DIVKS CLA
TRA7
TRA
SETUP
" FIFTEENTH ENTRY. XDIVK(XAKGSK)
XDIVK STZ
ZIFK
" SIXTEENTH ENTRY. XDIVKSIXARGSKS)
XDIVKS CLA
XCA
TRA
SETVRY
" SEVENTEENTH ENTRY. XDVRK(XARGSK)
XOVRK STZ
ZIFK
" EIGHTEENTH ENTRY. XDVRKS(XARGSKS)
XDVRKS CLA
RND
SETVRY STO
VARY
CLA
TRA8
" SET BRANCH AT MODIFY. THEN CHECK SINGULAR OR PLURAL
SETUP SXU
ADDK-2,4
S TA
MOD I FY
ZET
llFK
TRA
PLURAL
" SET UP FOR SINGULAR ENTRIES
CLA1,4
C OR IC
STO
CONST
CLA
SINGI
I PZE GETX.O.ll
LDQ
SING2
(PLE
1.0.-11
TXI
STA.4.-1
(SET TO PICK UP Xl FIRST)
" SET UP FOR PLURAL ENTRIES
PLURAL CLA
PLURI
( PZE GETC.O.21
(PZE
LOQ
PLUR2
3.0,-3)
STA
STA
GETXOe
ARS
18
STA
GE TX
XCA
STA
STORE
STD
BACK
" ACQUIRE NEXT POSSIBLE TSX X.O ANO CHECK IF IT JS.
GETSXZ CAL
1.4
A(T5X Xl.o) SINGULAR, A(TSX Cl.O) PLURAL
ANA
MASK
KNOCK OUT ADDRESS
LAS
TSXl
TRA
LEAVE
GETXOC TRA
""
"" = GETX (SINGULAR), = GETC (PLURAL)
" EXIT AT END OF ARGUMENT STRING.
LEAVE SXA
ZIFK,4
RESTORE ZIFK TO NON-ZERO (PLURAL INDICATION)
TRA
1.4
" STORE NEXT C OR IC. GET NEXT X OR IX IN AC.
" BRANCH TO MODIFY.
GETC CLA.
1,4
Cl,C2, •••
STO
CONST
GETX CLA"
·*,4
** :: 1 (SINGULAR). = 2 (PLURAL)
MODIFY TRA
** :: M001.MOD2 •••• ,MOD8
""
" MODIFICATION 1. ADDK OR AOOKS
MODI FAD
CONST

,PAGE
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0231
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
U254
0251)
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274
0215
0276
0211
0218

0219
0280
0281
0282
02B3
0284
0285
0286
0287

0288
0289
0290
0291
0292

0293
0294
0295
0296
0291
0298
0299

4)

••••••••••••••••••••••••
ADDK
••••••••••••••••••••••••
(PAGE

PROGRAM LISTINGS

••••••••••••••••••••••••
ADDK
•
••••••••••••••••••••••••

-

(PAGE

5)

• STORE RESULT. GO BA~K FOR MORE
STORE STO•• ,4
....
(SINGULAR), .. 3 (PLURALI
8ACK TXI
GETSX·Z,4,.... ..-1 (SINGULAR), =-3 (PLURALI
• MODIFICATION 2. XAODK OR XADDKS
MOD2 ADD
CONST
TRA
STORE
• MODIFICATION 3. SU8K OR SUBKS
MOD3 FSB
CONST
TRA
STORE
• MODIFICATION 4. XSUBK OR XSUBKS
MOD4 SUB
CONST
TRA
STORE
• MODIFICATION 5. MULK OR MULKS
MOD5 XCA
FMP
CONST
STORE
TRA
• MODIFICATION 6. XMULK OR XMULKS
M006 XCA
MPY
CONST
ALS
17
TRA
STORE
• MODIFICATION 7. DIVK OR DIVKS
MOD7 NZT
CONST
BYPASS FOR CONST = D.
TRA
8ACK
fOP
CONST
XCA
TRA
STORE
• MODIFICATION 8. XDI VK, XDIVKS, XOVRK, OR XDVRKS
MOD8 NIT
CONST
TRA
BACK
LRS
35
DVP
CONST
VARY
NOP
= XCA OR TRA ROUND
ALS18 ALS
18
TRA
STORE
• ROUNDING INSERT, COMPARES TWICE THE REMAINDER AGAINST DENOMINATOR.
ROUND SSP
ALS
1
SBM
CONST
CLM
PREPARE fOR ROUNDING DOWN
TMI
RXCA
KRND
PREPARE FOR ROUNDING UP
CLA
RXCA XCA
RNO
TRA
ALS18
• CONSTANTS, TEMPORARIES
TRA1 TRA
MODI
TRA2 TRA
MOD2
TRA3 TRA
MOD3
TRA4 TRA
MOD4
TRA5 TRA
MOD5
TRA6 TRA
MOD6
TRAl TRA
MOD1
TRA8 TRA
MOD8
0,0
TSXZ TSX
MASK OCT
111111100000
XCA
XCA
RND
TRA
ROUNO
KRNO OCT
200000000000
SINGl PZE
GETX,O.l
1,0,32167
SING2 PZE
GETC,0,2
PLURI PZE
3,0,32165
PLUR2 PZE
•• ,ee,.e
.. C OR IC, CL OR ICL
L == 1, ••• ,N
CONST PZE
ZIFK PZE
SET
0 FOR SINGULAR
1
END

=

0300
0301
0302
0303
0304
- 0305
0306
0301
0308
0309
0310
0311

0312
0313

0314
0315
0316
0311
0318
0319
0320
0321
0322
0323
0324
0325
0326
0321
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337

0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0351
0358
0359
0360
0361
0362
0363
0364
0365

5)

••••••••••••••••• * ••••• *

•

ADDKS

• * •• * ••• * •••• *.** •••• ***
REFER TO
ADOK

PROGRAM LISTINGS

*** ••••••••••••• * •• * ••••

•.

ADDKS
• _..••.....••..•••.•••.
•
REFER TO
AOOK

•••••••••••• ** •••••• ** ••

•

PROGRAM LISTINGS

AMPHZ

••••••••••••••••••••••••"

•
•

AMPHZ (SUBROUTINE)
FAP

..
..• •••••••••••••••••••••••
AMPHI
••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0250
0001
·AMPHZ
0002
COUNT
0003
280
AMPHZ
LBL
0004
AMPHl
(RE,XIM,LR,AMP,PHZ,R)
ENTRY
0005
REIM (AMP,PHZ,LR,RE,XIM)
ENTRY
0006
0007
•
0008
----ABSTRACT---0009
• TITLE - AMPHI , WITH SECONDARY ENTRY POINT REIM
0010
•
AMPLITUDE AND PHASE FROM REAL AND IMAGINARY, OR REVERSE
0011
0012
•
AMPHZ COMPUTES AN AMPLITUDE (AMP) AND PHASE (PHI) VECTOR
0013
FROM THE VECTORS OF THE REAL (RE) AND IMAGINARY (XIM)
0014
PARTS.
THUS IF
0015
•
0016
Z(J)
RE(J)+I.XIMIJ)
0017
•
0018
WHERE
0019
•
THEN
0020
•
0021
•
AMPIJ)
IREIJ1·*2+XIM(Jl··2) ••• 5
0022
ARCTAN(XIM(J)/RE(J)1
PHZ(J)
0023
(WITH PROPER QUADRANT CHOICE)
0024
0.0 IF XIM=RE=O.O
0025
0026
0027
PHZIJ) IS COMPUTED SUCH THAT
-PI LSTHN PHZIJ) LSTHN= PI
0028
THEN, IF DESIRED, A MULTIPLE OF 2PI IS ADDED TO PHZ(JI SO
0029
AS TO MINIMIZE THE DIFFERENCE BETWEEN PHZIJ) AND PHI(J-l).
0030
•
FOR THE LATTER CONDITION, PHZ(l) WILL BE BETWEEN
0031
•
+ AND - PI. THIS PROCESS GIVES POINTS ON THE TRUE
0032
CONTINUOUS PHASE CURVE PROVIDED THE TRUE PHASE JUMPS ARE
0033
LESS THAN MAGNITUDE PI.
0034
0035
PI = 3.14159265 •
0036
"
REIM REVERSES THE ABOVE PROCESS. IT CALCULATES THE REAL
0037
AND IMAGINARY VECTORS FROM THE AMPLITUDE AND PHASE
0038
•
0039
VECTORS •
0040
RE(JI = AMPIJ).COSIPHZ(J)
0041
"
XIMIJ) = AMPIJ)"SINIPHZ(J»)
0042
0043
.. LANGUAGE
FAP SUBROUTINE IFORTRAN II COMPATIBLE)
0044
0045
• EQU I PMENT - 109 OR 7090 (MAIN FRAME ONLY)
.. STORAGE
- 149 REGISTERS
0046
.. SPEED
- ABOUT .00050-LR SECONDS ON THE 1094 MOD 1 FOR BOTH
0047
0043
AMPHZ AND REIM, WHERE LR IS LENGTH OF THE VECTORS.
0049
- J.F. CLAERBOUT
• AUTHOR
0050
•
----USAGE---0051
"•
0052
0053
• TRANSFER VECTOR CONTAINS ROUTINES - RND
•
AND FORTRAN SYSTEM ROUTINES - ATAN,SQRT,COS,SIN
0054
0055
.. FORTRAN USAGE Of AMPHZ
0056
..
CALL AMPHZ IRE,XIM,LR,AMP,PHZ,R)
0057
0058
.. INPUTS
0059
0060
"
REI I)
I=l ••• L~ IS fLOATING POINT VECTOR Of REAL VALUES •
0061
0062
"
XIM{I)
0063
I=l ••• LR IS fLOATING POINT VECTOR OF IMAGINARY VALUES.
0064
"
LR
IS FORTRAN II INTEGER.
0065
"
MUST EXCEED 0
0066
"
0067
R
=0 INOICATES PHASE IS BETWEEN + ANO - PI.
0068
NOT = 0 INDICATES THAT THE PHASE IS TO BE A CONTINUOUS
0069
FUNCTION FOR WHICH THE FIRST VALUE IS BETWEEN + ANO -PI
0070
0071
0072
.. OUTPUTS
0073
AMP II)
0074
I=I ••• LR IS FLOATING POINT VECTOR Of THE AMPLITUDES.

..

..
.
.

..
.
....
..
..
..
..
...
..

.
..

.
.

..

...

--.
-

10/1/64

••••••••••••••••••••••••

..

AMPHI
..............•...
(PAGE

21

..

••••••••••••••••••••••••

PROGRAM LISTINGS

-.....
..

•

AMPHI
•
• •••••••••••••••••••••••
(PAGE

EQUIVALENCE WITH RE IS ALLOWED.

•.

PHIII)

.

it

•

l=l ••• L~ IS fLOATING POINT VECTOR OF THE PHASES.
If AMP(JI=O. THEN PHIIJ)=O.
EQUIVALENCE WITH XIM IS ALLOWED.

.. FORTRAN USAGE OF REIM
..
CALL REIM IAMP,PHI,LR,RE,XIMI
it

• INPUTS AND OUTPUTS HAVE THE SAME DEFINITIONS AS FOR AMPHI
..
EXCEPT AMP, PHI, AND LR ARE INPUTS,
..
RE, AN~ XIM ARE OUTPUTS.

•..
•

EXAMPLES OF AMPHI

• 1. INPUTS - RE(I ••• 1)
•
XIMll ••• 1)
..
OUTPUTS - AMPll ••• 1)
•
PHIll ••• 1)

.

1.,3.,0.,-3.,-1.,-3.,0.

LR

0.,4.,1.,+4., 0.,-4.,-1.
1.,5.,1.,5.,1.,5.,1.

=1

R

=0

0.,0.9213,1.5108,2.2143,3.1416,-2.2143.-1.51

• 2. INPUTS
SAME AS EXAMPLE 1. EXCEPT R=l.
•
OUTPUTS - AMPll ••• 11 = 1.,5.,1.,5.,1.,5.,1.
..
PHIIl ••• 1) = 0.,0.9213,1.5108,2.2143,3.1416.4.0689,4.1124

.

8SS
8CI
AMPHI SXD
SXA
CLA*
STO
CLA.
STD
CtA
ADD
STA
CLA

PIPI

Al
AZ

•
..

1
I,AMPHZ
.-Z,4
SVl,1
6,4
TSTCN
3,4
AI0
1,4
=1
A2
2,4
=1
Al
4,4
=1
A4
5,4
=1
A5
=1
A6
FIRST

GET
N
RE

1M
ADO
STA
ClA
AMP
ADO
STA
ClA
PHZ
ADD
STA
THIS PHI
ADO
STA
PREVIOUS PHI
STO
STORE SOME NON-ZERO QUANTITY
AXT
1,1
SET FOR LOOP OF LENGTH N
lET.
A2
If REAL PART IS ZERO
TRA
Al
ISN*T
=1.57079633
SET EQUAL +PI/Z OR -PI/Z
ClA
TRA
A3
ClA
... ,1
IMAG
FOP
... ,1
REAL
XCA
SSP
TSX
$ATAN,4
THE fOUR QUADRANT AM81GUITY IS ELEGANTLY RESOLVED IN THE NEXT 5
I~STRUCTIONS

A3

A4

LDQ.
TQP
fSB
LDQ*
LLS
STO
LDQ"
FMP.
STO
LDQ.
FMP"
FAD
TSX
STO
TNZ
STZ

AZ
A3
=3.14159Z65

RIGHT OR lEfT HALF PLANE
RIGHT
lEfT

AI

0
PHZ
Al
Al
AMP
AZ
AZ
AMP
SSQRT,4
•• ,1
.+2
PHI

UPPER OR LOWER HALF PLANE
COMPUTE AMPLITUDE

STO AMPl
IF AMP=O.
SET PHI=O.

0075
0016
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
011Z
0113
0114
0115
0116
0117
0118
0119
0120
0121
01Z2
0123
01Z4
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149

2)

.••••••••••••••••••••••••
..
••••••••••••••••••••••••

PROGRAM LISTINGS

AMPHI

(PAGE

*

IfT
TRA
A5
A9
AIO

All
SVI
CONT

•

..
..

A6

CLA

TSTCN
CONT
FIRST
PHI

STO

• •• 1

STZ

(PAGE

REPRESENT PHASE PI TO -PI
OR CONTI NUOUSL V
STORE PHASE

TXI
*+1,1,1
REPEAT LOOP
TXL
PIPI.l.· ..
**=N
AMPHZ-2,4
LXD
AXT
*·,1
7,4
TRA
lET
FIRST
TRA
A45
WE DONT HAVE A FIRST VALUE VET
GET M=IPREV PHASEJ/(2 * PI) ROUNOED TO INTEGER
CLA
**.1
GET PREV PHASE
FDP
=6.2831853
XCA
$RNO,4
TSX
XCA
FMP
=6.2831853
TWOPIM
STO
FORM
SS=ABSF(PHI+2.*PI*M-PHZPRV)
SM=ABSF(PHZ+2.*PI*M-PHZPRV-2.*PII
FORM
SP=ABSFIPHZ+2.*PI*M-PHIPRV+Z.*PI)
FORM
FAD
Pfil
A6
FSB*
SS
SS STILL NEEDS ABS VALUE
STO
FSB
=6.2831853

SSP
GOT SM
STO
SM
CLA
SS
FAD
=6.2831853
SSP
STO
SP
GOT SP
CAL
SS
STO
SS
GOT SS
FORM
PHITRIAL=PHI+2.*PI*M
CLA
PHI
FAD
TWOPIM
STO
PHZ
WHIC IS SMALLER, SS,SP, OR SM
*
IF SS, THEN PHASE
PHITRIAL
*
IF SM. THEN PHASE
PHlTRIAL - 2 PI
*
IF SP. THEN PHASE
PHITRIAL + 2 PI
CLA
SS
SUB
SM
TPL
A7
TRA IF SS GREATER SM
CLA
SS
SS SMALLER SM
SUB
SP
SS SMALLEST, STORE PHASE
TMI
A5-1
SP SMALLEST
A65
CLA
PHI
FAD
=6.2831853
TRA
AS
STORE CORRECT PHASE
CLA
SM
SM SMALLER SS
A7
SUB
SP
TPL
A65
SP SMALLEST
CLA
PHI
SM SMALLEST
FSB
=6.2831853
TRA
A5
STORE CORRECT PHASE
TSTCN PIE
rWOPIM PIE
PIE
SS
PIE
SM
PIE
SP
FIRST PZE
AMP
PIE
PHI
PIE
REIM SXD
AMPHI-2,4
R5,t
SXA
1,4
AMP
ClA
AOD
=1
STA
R2
2,4
PHASE
ClA
AOD
=1
STA
R1
4,4
RE
CUI

..
.

.

AMPHZ

••••••••••••••••••••••••

3)

A45

• •••••••••••••••••••••••

0150
0151
0152
0153
0154
0155
0156
0157
015B
0159
0160
0161
0162
0163
0164
0165
0166
0167
016B
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224

3)

..• _.....................
AMPHZ

I' ROGR AM 1I STINGS

*

••••••••••••• ** ..........
(PAGE

RI

R3

R4
R5
ORF

•

AMPHZ

••••••••••••••••••••••••
(PAGE

4)

R2

••••••••••••••••••••••••

•

ADO
STA
ClA
ADO
STA
ClA*
POX
ClA
STO
ClA
STO
TSX
XCA
HIP
510
ClA
TSX
XCA
FMP
STO
TIX
AXT
lXD
TRA
OCT
END

=1
R3
5,4
=1
R4
3,4
,1

*·,1
AMP

*·,1
PHZ
SCOS,4
AMP
**,1
PHZ
$SHl,4
AMP

.*,1
R2, 1,1
... ,1

AMPHZ-2,4
6,4
233000000000

1M
GET N

STORE IN IRI

0225
0226
0221
0228
0229
0230
0231
0232
0233
0234
0235
0236
0231
0238
0239
0240
0241
0242
0243
02 It It
0245
0246
0241
0248
0249
0250

4)

*
.•••••••••••••••••••••••
..
ARBCOL
................... _....

PROGRAM LISTINGS

...
.. -•............ -_ ......
ARBCOL

• •••••••••••••••••••••••

..
ARBCOL (SUBROUTINE)
9/9/64
LAST CARD IN DECK IS NO. 0210
..
FAP
0001
-ARBCOL
0002
COUNT
200
0003
ARBCOL
0004
LBL
ENTRY
ARBCOL (FOFIJ,LI,LJ,IDIMEN,FJCOL,COLI
0005
0006
0001
----ABSTRACT---0008
0009
.. Tl TLE - ARBCOL
0010
..
FINO A MATRIX COLUMN WITH ARBITRARY INDEX BY INTERPOLATION
0011
0012
ARBCOL IS GIVEN A MATRIX AND A FLOATING POINT NUMBER
0013
(GENERALLY NOT A WHOLE NUMBER) REPRESENTING A DESIRED
0014
COLUMN NUMBER IN THE MATRIX. THE FOUR COLUMNS WHICH
0015
ARE CLOSEST IN NUMBER TO THE DESIRED COLUMN NUMBER ARE
0016
SUBJECTED TO CUBIC INTERPOLATION TO YIELD THE
0017
INTERPOLATED COLUMN.
0018
0019
0020
ARBCOL REDUCES THE DEGREE OF INTERPOLATION IN THE
CASES OF MATRICES WITH ONLY 3, 2. OR 1 COLUMNS.
0021
0022
THE PROCEDURE USED IS TO FINO THE PROPER INTERPOLATION
0023
OPERATOR FOR THE GIVEN COLUMN NUMBER AND THEN APPLY IT
0024
IN A HIGH SPEED LOOP ON THE ROW INDEX •
0025
0026
.. LANGUAGE
- FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
0027
.. EQUI PMfNT - 109 OR 1090 (MAIN FRAME ONLY)
0028
.. STORAGE
- 129 REGISTERS
0029
.. SPEED
- TAKES ABOUT 530 + 90-N MACHINES CYCLES ON THE 1090.
0030
WHERE N
NO. ROWS IN THE MATRIX.
0031
.. AUTHOR
- S.M. SIMPSON. MARCH 1964
0032
0033
0034
----USAGE---0035
0036
.. TRANSFER VECTOR CONTAINS ROUTINES - INTOPR
0037
..
AND FORTRAN SYSTEM ROUTINES - (NOT ANY)
0038
0039
.. FORTRAN USAGE
0040
CALL ARBCOL(FOFIJ,LI,LJ,IDIMEN,FJCOL,COL)
0041
0042
.. INPUTS
0043
0044
FOFIJ(I,JI I=l ••• LI. J=l ••• LJ IS A MATRIX OF FLOATING POINT
0045
ELEMENTS.
0046
0047
MUST EXCEED ZERO
0048
LJ
0049
MUST EXCEED ZERO
LJ
0050
0051
IDIMEN
IS THE DIMENSION,IN THE CALLING PROGRAM, OF THE
0052
0053
INDEX 1 OF FOFIJ(I,J)
MUST BE GRTHN= LI
0054
0055
IS THE FLOATING POINT COLUMN NUMBER FOR WHICH AN
0056
FJCOL
INTERPOLATED COLUMN IS DESIRED
0051
MUST BE GRTHN= 1.0. AND LSTHN FLOATFtLJ+l)
0058
0059
0060
.. OUTPUTS
STRAIGHT RETURN WITH NO OUTPUTS IF LI, LJ, IDIMEN. OR
FJCOL IS ILLEGAL
0061
0062
0063
COL (I)
l=l ••• LI IS THE INTERPOLATED COLUMN
0064
0065
.. EXAMPLES
0066
0061
0068
.. 1. THIS EXAMPLE INTERPOLATES ALL HALF-INDEX AND FULL-INDEX COLUMNS
0069
..
IN A I-COLUMN. A 2-COLUMN •••• , AND A 5-COLUMN MATRIX. IT ALSO
0010
..
SHOWS THAT NO INTERPOLATION RESULTS FOR ILLEGAL FJCOL VALUES.
0011
0072
..
INPUTS - FOFIJ(1,2,3"l,2,3,4,5) =
It
0.,0.,0 •• , 0.,1 •• 2 •• t 0.,2.,4 •• , 0.,3.,6." 0.,4.,8.
0073

....
...
..
.....
..

...

....

...

-.
.
...

.
.
.

....

.....
..

...
.
..

-.
..
...

.

*** •••••••••••••••••
.••••
.
••••••••••••••••••••••••

PROGRAM LI S Tt NG S

AR8COL

(PAGE

2)

.."

LI=3
USAGE

(PAGE

IDfMEN=10

COLll ••• 3,,1 ••• 9,,1 ••• 51 = -99., •••

DIMENSION FOFIJII0,51,COLI3,9,51
00 10
LJ=1,5
00 10
J=1,9
FJCOL
IFLOATFIJ+111/2.0
CAll ARBCOL{FOFIJ,LI,LJ,IOIMEN,FJCOL,COLll,J,LJII

"
"

10
....
0., 0., O.
FOR LJ= 1 ••• 5
OUTPUTS - COLll ••• 3,I,LJI
COLll ••• 3,2,1l
0., 0., O.
..."
0., .5, 1.
COLl1 ••• 3,2,LJI
FOR LJ=2 ••• 5
COLl1 ••• 3,3.LJI = 0., 1., 2.
FOR LJ=2 ••• 5
COllI ••• 3,4, LJ I
0.,1.5, 3.
FOR LJ=2 ••• 5
....
0., 2., 4.
COlll ••• 3,5,LJI
FOR lJ=3 ••• 5
COll1 ••• 3,6,lJI
0.,2.5, 5.
FOR LJ=3 ••• 5
COLIl •••.3,7,LJ)
FOR LJ=4,5
0 •• 3., 6.
".
COLll ••• 3,8,LJ I
0.,3.5. 7.
FOR LJ,4,5
..
COLl1 ••• 3,9,5)
0., 4. , 8.
COllI ••• 3, J, L J)
-99.,-99.,-99. WHE"IEVER J
•
".
" PROGRAM FOLLOWS BELOW
.
.. TRANSFER VECTOR CONTAINS INTOPR ONLY

"

o
o

HTR
HfR
BCI

XR1
XR4

1, ARBCOL

*
* ONLY E"ITRY.

.

ARBCOL(FOFIJ,LI,LJ,IOIMEN,FJCOL,COLI

AR8COL SXO
SXO

ARBCOL-2,4
AR8COL-3d

it

LI,
... CHECK ClA.

LJ AND fOIMEN
2,4
LEAVE
LfAVE
0,1
3,4
LEAVE
LEAVE
4,4
2.4
LEAVE
2,4
18
101M

TMI

TlE
POX
CLA.
TM!

HE
CLA.

sua ..

TMI
ADO*
ARS
STO

•

LI

IFOR LOOP AT STZI
LJ
10lMfN
MINUS LI

* FIND JCOL
FJCOL ROUNDEO OOWN EXCEPT IN THE CASE THAT
*
FJCOL
FlOATFILJI AND lJ EXCEEDS 1
*
IN WHICH CASE SET JCOl = LJ-l

=

.

CLA.
UFA
LRS
ANA
LLS

5,4
K233

ALS

18
3.4
LEAVE
LJCK
LEAVE
LEAVE
JCOK
K01
JCOK
KG1

TZE

.

..*

TRA
SUfi
TNZ
ADO

THEN FORM

JCOK

STO
LRS
ORA
FAD

FJCOL

o
KDECR
o

CASTRA
TRA
TMI
LJCK

• •••••••••••••••••••••••
AR8COL
"
"• •••••••••••••••••••••••

X

=

EXCEEDS lJ
EQUALS LJ

([QUALS LJ EQUALS 1)

FJCOL - FLOATF(JCOL)

JCOL
18
K233
K233

GRTHN 2*LJ

0014
0015
0076
0077
0078
0019
0080
0081
0082
0083
0.084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
DIU
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148

2)

••••••••••••••••••••••••

•

• •••••••••••••••••••••••
ARBCOl
•
• •••••••••••••••••••••••

PROGRAM LISllNGS

•

ARReOL

..

••••••••••••••••••••••••
(PAGE

(PAGE

3)

CHS
FAD-

•
•
•

sro

0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175

5,4
X

NOW SOME ADDRESS SETUPS
CLA
SUB
XeA
MPY
llS
CHS
ADD
ADO
STA

JCDL
KD2
ID[M
17

K1
1,4
LDQ1

SUB

IO[M

STA

LDQ2
1D[M
lDQ3
101M
lDQ4
6,4
Kl
STORE

SUB
STA
SUB
STA
eLA
ADD
STA

AIFOFIJ)-IJCOl-2).ID[MEN+1

AICOLI

... SET UP AS THOUGH NDATA=4 THEN TEST

JCOl

It

eLA
STA
CLS
STO
elA
STO
CLA
SUB
TlE

FMPI
TSXOP

0176
0177

KlL

0178
0179
0180
0181
0182
01B3
0184
0185
0186
0187
018B
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223

XLO
KD4
NDATA
JCOL
KD1
JCOll

It

.. SETTINGS FOR JCOl EXCEEDING 1 ARE All MADE UNLESS JCOL+1=lJ

•

ADD
SUB.
TlE
TRA

.

JCOl+l
COMPARE WITH LJ
SAME, CHANGE NDATA TO 3
SMALLER, ALL SETTINGS OK

KD2
3,4
NDATA3
GETOP

.. SETTINGS IF JCOL=l

"JCOll

CLA
STA
STZ

CLA.
STO
SUR
TMI

..

FMP2
TSXOP
XlO
3,4
NDAJA
KD3
STZOP

AIFMP2)

= OPER2

XLO=O.O
TRIAL SET NOATA
=lJ 10K IF LJ=l OR 2)
THEN TEST
(NEGATIVE IF LJ=1 OR 2)

.. CHANGE NDATA TO 3 FOR [NTERPOlATING NEAR RIGHTMOST COLUMN.

"
NDATA3
CtA
STO

KD3
NDATA

".. CLEAR OPER1,},4, IF
" STlOP STl
OPERI
STl

... GO GET

STZ

. GETOP
..

NOATA IS NOT 4

OPER3
OPER4

THE OPERATOR

TSX
TSX
TSX
TSX
TSX
TSXDP TSX
lXO

$I NTOPR,4
NOATA,O
XlO,O
KIL,O
X,O

•• ,0

ARBCOl-2,4

123
0.0
0.0
0.0

3

4

-1.0

-1.0

OPERI

OPERI

DELX

..

:.

OPER2

OPER2

OPER2

3)

••••••••••••••••••••••••

•

••••••••••••••••••••••••

PROGRAM LISTINGS

•

ARBCOl

•

••••••••••••••••••••••••
4)

(PAGE

• lOOP FORMING I NTERPOlA TES,

•

STZ
lOO
FiliP
FAD
STO
lOO2 lOO
FMP2 FMP
FAD
STO
lOO3 lOO
FMP
FAD
STO
lOO4 lOO
FiliP
FAO
STORE STO
TIX

STZ
lOOl
FMPI

-

TEMP
.... ,1
OPERI
TEMP
TEMP
*.,1
OPER2
TEMP
TFMP
•• ,1

OPER3
TEMP
TEMP
•• ,1

OPER4
TEMP
**.1

STZ,l,1

(PAGE

XRl=lI,ll-l •••• ,l

....

AIFOFIJI-IJCOl-21.IOIMEN+1

...

DITTO lOOl MINUS IOIMEN

...

DITTO l002 MINUS IOIMEN

...
...

DITTO l003 MINUS 10IMEN
AICOll+l

.. EXIT

.

LEAVE lXO
TRA

ARBCOL-3,1
7,4

- CONSTANTS, VARIABLES

• Kl

KOI
K02
K03
K04
K233
KOECR
Kll
101M
JCOl
NOATA
XlO
X

TEMP
OPER4
OPER3
OPER2
OPER1

PIE
PZE
PIE
PZE
PIE
OCT
OCT
DEC
PZE
PZE
PIE
PZE
PZE
PZE
PZE
PIE
PZE
PZE
END

1

0,0,1
0,0,2
0,0,3
0,0,4
233000000000
000000377777
1.0

.. -

0,0, ••

0,0,-"

1, 2, 3, OR 4
NORMALLY = -1.0 IMAY BE 0.0)
EOUAlS FJCOl-FlOATFIJCOLI

•• , •• ,**

IIIULTIPlIES
MULT IPlleS
MULTIPLIES
MUL TIPLIES

.... .... ....
.. , .• , ..
.... ,, .... ,, •...
•• , •• ,*.
, ,
, ,

•

ARBCOl

••••••••••••••••••••••••

COLUMN
COLUMN
COLUMN
COLUMN

NO •
NO.
NO •
NO.

.ICOL +2
JeOL +1
JCOL
JCOl-1

0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270

4)

••••••••••••••••••••••••

PROGRAM LISTINGS

"
ARCTAN (FUNCTION)
..
FAP
"ARCTAN
COUNT
30
LBL
ARCTAN
ARCTAN F(X,Y)
ENTRY

••••••••••••••••••••••••

.

ARCTAN
• •••••••••••••••••••••••"

ARCTAN
"
"••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0091
0001
0002
0003
0004
0005
0006
0007
0008
----ABSTRACT---0009
"" TJ TLE - ARCT AN
0010
..
ARCTANGENT FUNCTION
0011
0012
it
ARCTAN FINDS THE ANGLE IN RADIANS ASSOCIATED WITH AN
0013
0014
X AND Y COORDINATE SUCH THAT
"
0015
"
it
-3.14159265 LSTHN ANGLE LSTHN= 3.14159265
0016
0017
0018
0019
.. LANGUAGE
- FAP FUNCTION (FORTRAN II COMPATIBLE)
0020
.. EQUIPMENT - 709 OR 7090 (MAIN FRAME ONLY)
0021
- 29 REG I STERS
" STORAGE
0022
it SPEED
- ABOUT 250 MACHINE CYCLES ON 7090.
0023
- R.A. WIGGINS
MARCH 1964
" AUTHOR
0024
"
0025
"
It
0026
----USAGE---0027
.. TRANSFER VECTOR CONTAINS ROUTINES - (NOT ANY)
0028
0029
It
AND FORTRAN SYSTEM ROUTINES - ATAN
0030
"" FORTRAN USAGE
0031
0032
"
ANGLE = ARCTANF(X,Y)
0033
"
0034
"" INPUTS
0035
It
0036
0037
X
IS THE ABSCISSA OF THE POINT
0038
"it
0039
IS THt ORDINATE OF THE POINT
Y
0040
"
0041
"" OUTPUTS
0042
0043
0044
IS THE ANGLE IN RADIANS FROM THE POSITIVE X-AXIS TO THE
ANGLE
0045
POINT,
ARCTANGENT OF Y/X.
"
0046
0047
0048
.. EXAMPLES
0049
0050
.." 1. USAGE
ANGLEl
ARCTANF
-2., 0.)
-2., 1. )
0051
ANGLE2
ARCTANF
"
O. ,
1. )
0052
ANGlE3
ARCTANF
"
0053
ARCTANF
2., 1. )
ANGLE4
0054
ARCTANF
2. , 0.)
ANGLE5
"
2. , -1. )
0055
ANGLE6
ARCTANF
O. , -1. )
0056
ANGlE7
ARCTANF
"
0057
ARCTANF ( -2. , -1. )
ANGLE8
ANGLE3
1.5708
0058
ANGLE!
3.1416
ANGLE2
2.6779
..
OUTPUTS =
=
'"
0059
ANGLE4 = 0.4636
ANGLES = O.
ANGlE6 =-0.4636
"
0060
ANGLE7 =-1.5708
ANGLE8 =-2.6779
0061
"
0062
0063
" PROGRAM FOLLOWS BELOW
0064
0065
XR4
HPR
o
0066
I,ARCTAN
BCI
0067
XR4,4
ARCTAN SXO
0068
STO
Xl
0069
A
TlE
0070
TMI
Al
0071
CRRCT
STZ
0072
TRA
A3
0073
A
CLA
=1.57079632
0074
TRA
Al+ 1

...
.
.

...

.

..

....
....

.
..
.

.
.
.

9/4/64

••••••••••••••••••••••• *
UCTAN
*

•

••••••••••••••••••••••••
IPAGE

2)

Al
A2

A3

ADD

CLA
TQP
SSM
STO
PXD
NZT
TRA
XCA
FOP
XCA
TSX
FAD
LXO
TRA

CRRCT pze
pze
Xl
END

=3.14159265
A2
CRRCT
,0
Xl
ADO
Xl
SATAN,4
CRRCT
XR4,4
1,4
0
0

PROGRAM LISTINGS

••••••••••••••••••••••••

•

•

ARCTAN

••••••••••••••••••••••••
IPAGE

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091

21

................. *_ .....

ARG
•••••••••••••
•
* •••••••••••
REFER TO
LOCATE

PROGRAM LISTINGS

•••••••••••••••••••••• **
*•••• *ARG
••••••••••••• w•• ~.*
REFER TO
LOCATE

••••••••••••••••••••••••

..

ASPECT

..

•, •• ~ ••••••••••••••••• *.

PROGRAM LISTINGS

••••••••••••••••••••••••
*

ASPECT

..
ASPECT (SUBROUTINE)
9/29/64
LAST CARD IN DECK IS NO. 0535
0001
"
FAP
"ASPECT
0002
COUNT
560
0003
LBL
ASPECT
0004
ENTRY
ASPECT (ACOR,N,COSTAB,M.JMIN,JMAX,TYPE,SPECT.SPACE,
0005
ISCALE.ERR)
0006
"
0007
----ABSTRACT---0008
0009
*
" TITLE - ASPECT
0010
..
FAST COSINE TRANSfORMS OF ONE-SIDED AUTOCORRELATIONS
0011
0012
"
ASPECT PRODUCES A HI-SPEED POWER- OR ENERGY-DENSITY
0013
SPECTRUM (OR PORTION THEREOF) FROM AN N-LAG AUTOCORREL0014
ATION FUNCTION. AC(I) I=O,l •••• ,N, ACCORDING TO
0015
0016
N
0011
it
SP(J)
ACIO) + 2-SUM ( ACII )-COS( I*J*(PI/M»
0018
1=1
0019
0020
fOR J = JMIN,JMIN+I, •••• JMAX
0021
WHERE
0022
PI = 3.14159265
0023
N,M,JMIN AND JMAX ARE INPUT PARAMETERS
0024
COS(J*(PI/M» J=O,I, •••• M IS AN INPUT TABLE
0025
o LSTHN= JMIN LSTHN JMAX LSTHN= M
0026
0027
SPEED IS ATTAINED BY
0028
1. (FOR M LSTHN=N)
0029
- COLLAPSING AC(I) INTO THE RANGE 0 TO 2M
0030
- SPLITTING THE COLLAPSED
0031
CORRELATION INTO ODD AND EVEN PARTS AND
0032
SUBPARTS (ONLY 2 OF THESE 4 ARE USED)
0033
2. USING THE HIGH-SPEED LOOPING LOGIC OF SUBROUTINE
0034
COSP TO PERFORM THE TRANSFORMS OF THE SHORTENED
0035
PARTS (LENGTH = M/21
0036
0037
THE AUTOCORRELATION MAY BE FLOATING POINT OR FIXEO
0038
(COMPUTATIONS SLIGHTLY FASTER FOR FIXED POINT)
0039
0040
2*M+l TEMPORARY REGISTERS ARE NEEDEO UNLESS USER IS
0041
WILLING TO SACRIFICE THE AUTOCORRELATION FOR THIS PURPOSE
0042
(TEMPORARIES NOT REQUIRED FOR M GRTHN N)
0043
0044
.. LANGUAGE - FAP SUBROUTINE (FORTRAN II COMPATIBLE)
0045
" EQU I PMENT - 709 OR 7090 (MAIN FRAME ONLYI
0046
.. STORAGE
- 278 REGISTERS
0047
- FIXED PT, M LSTHN= N - 17*M*(JMAX-JMIN+ll MACH. CYCLES
0048
" SPEED
FLTG. PT, M LSTHN= N - 19*M*(JMAX-JMIN+IJ MACH. CYCLES
0049
(FOR M GRTHN N SUBSTITUTE 2N FOR M IN ABOVE FORMULAS)
0050
- S.M. SIMPSON JR, OCT, 1961
" AUTHOR
0051
0052
----USAGE---0053
0054
.. TRANSFER VECTOR CONTAINS ROUTINES COLAPS, COSP, OUBLX, DUBLL •
0055
SPLI T, RVPRTS
0056
"NONE
AND FORTRAN SYSTEM ROUTINES 0057
0058
- FORTRAN USAGE
0059
"
CALL ASPECT(ACOR,N,COSTAB.M,JMIN,JMAX,TYPE,SPECT.SPACE,ISCALE,ERRI
0060
0061
0062
- INPUTS
0063
ACOR (I)
I=I ••• N+l CONTAINS AC(J) J=O,I •••• ,N
0064
ACUR IS FIXED OR FLTG AS SPECIFIED BY TYPE
0065
0066
N
MUST EXCEED ZERO
0061
"
0068
"..
COSTAB(I) I=l ••• M+l CONTAINS COS(J"PI/MI J=O,I •••• ,M
0069
..
COS TAB IS FIXED OR FLTG AS SPECIFIED BY TYPE
0070
..
IF FIXED PT IT IS ASSUMED THAT THE BINARY POINT IS
0011
..
BETWEEN THE SIGN BIT AND BIT 1 SO THAT VALUES =+1. AND
0072
"
-1. SHOULD BE ENTERED AS OCT 377717717777 AND
0073
..
OCT 771777777777 RESPECTIVELY. THE BINARY POINT OF
0074

..

...
..
..
....

...

...
...
...
.

.-..
.

-.-.
.
..
.

.

..
..

.

••••••••••••••••••••••••

•••••••••••••••••••• ** ••
ASPECT
*.**.* ••••••• **.** •• ** ••
IPAGE 2)

.

•

...
...

PROGRAM LISTINGS

.* ••••••••••••••••••••••
.*
ASPECT
** ••••••• *** ••••••••••• *
IPAGE

ACOR IS IMMATERIAL BUT ACCURACY IS GREATER FOR FEWER
LEADING ZEROES.
M

MUST EXCEED ZERO

JMIN

DEFINES LOWEST MULTIPLE OF FUNDAMENTAL OESIRED
MUST BE GRTHN= 0 AND LSTHN jMAX

JMAX

DEFINES HIGHEST MULTIPLE OF FUNDAMENTAL DESIRED
MUST BE GRTHN JMIN AND LSTHN= M

.

TYPE

= 0.0 SIGNIFIES ACOR AND COS TAB ARE FIXED POINT
NOT = 0.0 MEANS ACOR AND COSTAB ARE FLTG. POINT

""

SPACEII)

1=1 ••• 2"M+l MUST BE AVAILABLE FOR TEMPORARY USE IF
M IS LSTHN= N. SPACEII) NOT USED FOR M GRTHN N.
EQUIVALENCEISPACE,ACORI IS PERMITTED IACIII WILL BE LOST)

"
"
.."
".
"
"
..
"

.

.. OUTPUTS

."

SPECTII)

I-l ••• JMAX-JMIN+l WILL CONTAIN SPIJI J=JMIN ••• JMAX AS
DEFINED IN ABSTRACT. lIT IS FIXED OR FLOATING
ACCORDING TO TYPE)

I SCALE

IS NOT USED FOR FLOATING POINT DATA
IS A SCALE FACTOR FOR FIXED POINT RESULTS, DETERMINED
BY ASPECT SO AS TO AVOID OVERFLOW.
=0 MEANS BINARY POINT OF SPIJ) SAME AS ACIJ)
NOT - 0 MEANS BINARY POINT OF SPIJ) IS ISCALE BITS
TO THE RIGHT OF BINARY POINT OF ACIJ)

ERR

0.0 NORMAL
'" 1.0 IF N,M,JMIN OR JMAX IS ILLEGAL

"
"

"
."
".
"

..
..
.

...

EXAMPLES

• 1. COMPLETE
..
INPUTS
..
"
..
"USAGE
..
•
..
OUTPUTS "
..
..

...

..."
.....

2. USE OF SPACE SAVING FEATURE
INPUTS - SAME AS EXAMPLE 1.
CALL ASPECTIACOR,N,COSTAB,M,JMIN,JMAX,l.O,SPECT,
USAGE
ACOR,OUMMY,ERR)
CALL ASPECTIIACOR,N,COSTBL,M,JMIN,JMAX,D.O,ISPECT,
IACOR,ISCALE,ERR)
OUTPUTS - SAME AS EXAMPLE 1. IBUT ACOR AND IACOR ARE DESTROYED)

" 3. PARTIAL
..
INPUTS
..
USAGE
..
OUTPUTS
..

.

SPECTRUM, NOT TRYING TO SAVE SPACE, FIXED OR FLOATING
ACORll ••• 4) = 2.,2.,3.,4. IACORll ••• 4) '" 200,200,300,400
COSTABll ••• 3) = 1.0,0.0,-1.0
N=3
M=2
COSTBll1 ••• 3)-OCT377777777777,0000000DOOOO,777177177777
JMIN = O.
JMAX = 2
CALL ASPECTIACOR,N,COSTAB,M.JMIN,JMAX.1.0,SPECT,
SPACE,OUMMY.ERRll
CALL ASPECTIIACOR,N.COSTBL,M,JMIN.JMAX,O.,ISPECT,
SPACE.ISCALE,ERR2)
ERR 1 = ERR2 = O.
SPECTll ••• 3J=20.,-4.,-4. ISPECTl1 ••• 3)=2000.-400.-400
ISCAlE - 0

SPECTRUM
- SAME AS EXAMPLE 1. EXCEPT JMIN=l
- SAME AS EXAMPLE 1.
- SAME AS EXAMPLE 1. EXCEPT SPECTll ••• 21=-4.,-4.
ISPECTl1 ••• 2)=-400,-400

.. 4. FINER GRAINED SPECTRUM, M GRTHN N , FLTG PT
..
INPUTS - SAME AS EXAMPLE I. EXCEPT
..
COSTABll ••• 5)=1.0,.70711,O.O,-.70711,-1.0
M=4
..
USAGE
- SAME AS FIRST CALL IN EXAMPLE 1.
"
OUTPUTS - ERR=O. SPECTll ••• 5) = 20.,-.82844,-4.,4.82844,-4.

"..
"
"
"
"

5. FIXED POINT CASE INVOLVING SCALING
INPUTS - SAME AS EXAMPLE 1. EXCEPT IACORl1 ••• 4) '"
20000,20000,30000,40000
USAGE
- SAME AS SECOND CALL IN EXAMPLE 1.
OUTPUTS - ERR2=0. ISPECT=100000,-20000,-20000 ISCALE=1

II.E.

0075
0016
0077
0078
0019
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148

2)

••••••••••••••••••••••••
ASPECT
•
••••••••••••••••••••••••

-

IPAGE

PROGRAM LISTINGS

3)

-•

••••••••••••••••••••••••
ASPECT
••••••••••••••••••••••••
(PAGE

ISPECT VALUES SHOULO BE DOUBLED FOR TRUE SCALE)

• 6. ERROR EXI1S (WITH NO COMPUTATION)
•
USAGE
CALL ASPECT(ACOR,-I,COSTAB,3,0,3,1.0.SPECT,ACOR,
•
DUMMY,ERRl)
•
CALL ASPECT(ACOR,2,COSTAB,O,O,3.1.0,SPECT,ACOR,
•
DUMMY,ERR2)
•
CALL ASPECTIACOR,2,COSTAB,3,-1,3,1.0,SPECT,ACOR,
•
DUMMY,ERR3)
•
CALL ASPECTIACOR,2,COSTAB,3,O,4,1.0,SPECT,ACOR,
•
DUMMY,ERR4)
•
CALL ASPECTIACOR,2.COSTAB,3,2,2,l.0,SPECT,ACOR,
*
DUMMY,ERR51
•
OUTPUTS - ERRl=l. IILLEGAL N) ERR2=1. (ILLEGAL MI
•
ERR3=1. (ILLEGAL JMINI ERR4=1. (ILLEGAL JMAXI
•
ERR5=1. IILLEGAL JMAXI

•

**
•
*
•

-

PROGRAM FOLLOWS BELOW
NOTATION DIFFERENCES IN PROGRAM NOTES ARE
AACC=ACOR
SCALE=ISCALE

HTR
0
BCI
l,ASPECT
ASPECT SXO
*-2,4
SXA
LV+l,l
SXA
LV+2,2
-MAKE PARTIAL ARGUMENT MAP (CHECKING N,M,JMIN)
Al
CLA
1,4
AACC
STA
n
CLA2,4
N
TMI
A2A
HE
AlA
STD
T2
CLA
3,4
COSTAB
STA
13
CLA*
4,4
M
TMI
A2A
TZE
A2A
STD
T4
CLA5,4
JMIN
TMI
A2A
STD
T5
CLA6,4
JMAX
STD
T6
CLA7,4
CONTENTS OF TYPE
STO
T7
CLA
8,4
SPECT
STA
TB
CLA
9,4
SPACE
STA
T9
CLA
10,4
SCALE
STA
no
-CHECK LEGALITIES, JMIN LESS THAN JMAX LESS THAN OR-M
A2
CLA
T6
JMAX
CAS
T5
JMIN
TRA
A2B
OK
NOP
NO GOOD
A2A CLA
KLI
NO GOOD
STO*
11,4
SET ERR INDICATOR
TRA
LV
EXIT
A28 CAS
T4
M
TRA
A2A
NO GOOD
~P

STZ11,4
-IF OK SET UP CONSTANTS
A3
CLA
T4
ADD
KDl
STO
115
ADO
T4
STO
Tl6
SUB
KDl
STD
Tl7
CLA
T2

~

OK SET ERR-O.O
M
M+l
2M+l
2M
N

0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0110
0111
0172
0173
0114
0175
0176
0177
0178
0179
0180
0181
0182
0183
01B4
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223

3)

........... _._ ..........

PROGRAM LI STINGS

ASPECT
*
•••••••••••••••••••••••••
(PAGE

(PAGE

41

ADD
STD
CLA
SUB
ADD
STD
CLA
ARS
STD
.NOW ADDRESSES
A4
CLA
STA
STA
STA
STA
STA
STA
STA
STA
STA
STA
STA
STA
STA
STA
STA
ADD
STA
STA
STA
CLA
STA
CLA
STA
STA
STA
STA
STA
STA
STA
STA
STA
ALS
SU8
ARS
STA
ALS
AOD
SUB
ARS
STA
STA
CLA
ALS
SUB
SUB
ARS
STA
STA
STA
CLA
STA
STA
CLA
STA
STA
STA
STA
.WHEN ALL SET
A5
lET
TRA
.FIXED
A6
CLA
ARS
A7
STO

KDl
Ti8
T6
T5
KOI
H9
TIt

1
H4
H
A6
A7
A8
A9
A23
A26
A27
A28
A29
A30
A31
A34
A3S
A37
A38
Kl
All
AI9
A21
HO
Al8
T9
A24
M4
A48
A49
A50
AS2
A53
AS5
A56
18
Ti7
18
A40
18
T4
KDl
IB
ASI
A55B
T9
18
TI4
KDl
IB
A54
A55A
A57

••••••••••••••••••••••••
ASPECT
•
••••••••••••••••••••••••

•

N+l
JMAX
JMAX-JMIN
JMAX-JMIN+l
MI2 FOR M EVEN
SET P=
(M-1I12 FOR MODO
AACC

AACC+l

SCALE
SPACE

SPACE-2M

SPACE-M
SPACE-M-I

SPACE
SPACE-P
SPACE-P-l

COSTAB
A32
AS8
SPECT
T8
AH
A36
A39
AS9
UP BEGIN BY DIVIDING AUTOCOR OF ZERO BY 2
T7=CONTENTS OF TYPE
T7
A8
T3

.*

( "'=AACCI

**

I **=AACCI

0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
0280
0281
0282
0283
0284
07.85
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298

41

••••••••••••••••••••••••
..................
ASPECT
-......"
(PAGE

51

PROGRAM LISTINGS

• •••••••••••••••••••••••

-• ••••••••••••••••••••••••

TRA
AI0
-nOATI NG
I .-=AACC I
A8
CLA
.FOP
KL2
A9
STQ
-'-"=AACCI
TRA
A22
AVOIO SCALING CHECK
"IF DATA IS FIXED POINT DECIDE IF IT NEEDS DOWN-SCALING
.TO PREVENT OVERFLOW IN THE COSINE TRANSFORM. IT WILL BE
"DOWN SCALED IF TWICE THE SUM OF THE MAGNITUDES OF THE
"CORRELATION CFROM LAG 0 TO NI OVERFLOWS.
.. MARK SUMMATION
AI0 STZ
SUMHI
TOV
.+1
CLA
KO
LXD
H8.4
TI8=PZE 0.0.N+1
All ADM
.... 4
I -.=AACC+1 I
TOV
A13
A12 TIX
Al1.4,1
TRA
A14
.. ADD L TO SUMHI FOR EACH OVERFLOW, AND GO BACK
A13 XCA
CLA
K1
ADD
SUMHI
STO
SUMHI
XCA
TRA
A12
.WHEN DONE CHECK IF SUMHI ZERO
A14 ZET
SUMHI
TRA
A16
THERE WAS OVERFLOW
.FOR SUMHI ZERO CHECK BIT1 OF SUM IN AC
ALS
1
TOV
A15
YES
CLA
KO NO SEALING NEEDED
TRA
A17
WE NEED TO SCALE DATA DOWN 1 BIT
"IF BIT 1 IS
Kl
A15 CLA
TRA
A11
.IF OVERflOW IN SUMHI WE NEED TO SCALE DOWN BY C(SUMHII+l
Al6 CLA
SUMHI
ADD
K1
-SET SCALE CONSTANT AND THEN DO IT IUNLESS SCALE IS ZEROI
A11 S TA
A20
ALS
IB
A18 STO
I "-=SCALE I
..
TZE
A22
"SCALE DOWN
LXD
Tl8,4
TIB=PZE O,O,N+l
Al9 CLA
.",4
I*"=AACC+1)
A20 ARS
I""=SCALE CONSTANT)
."
A21 STO
.. ".4
( ""= AACC+ 1)
T1X
AI9,4,1
.. CHECK IF COLLAPSING IS VALID lONLY FOR M LESS THAN OR =NI
A22 CLA
T4
T4=PZE O,O,M
T2=PZE O,O,N
CAS
T2
TRA
CSP2
NOT VALID
NOP
VALID
-IF VALID GO DO IT (NOTE COLAPS FItLS IN ZEROS IF N lESS THAN 2M)
CLPS TSX
SCOLAPS,4
A23 TSX
-"
I."=AACCI
TSX
T18
TIB=PZE O,O,N+l
TSX
T1
T1=CONTENTS OF TYPE
A24 TSX
"..
I""=SPACEI
TSX
Tl1
T11=PZE O,O,2M
-THEN RESTORE THE AurOCOR OF ZERO LAG TO ITS ORIGINAL VALUE
.UNLESS THE USER HAD US COLLAPSE IT ON TOP OF ITSELF ISPACE=AACC)
A25 CLA
Tl
Tl=PIE AACC
CAS
T9
T9=PZE SPACE
TRA
.+2
OK TO RESTORE
TRA
A40
AVOID RESTORING ACIOI
-RESTORE FIXED OR FLOATING
ZET
T1
T7=CONTENTS OF TYPE
TRA
A28
FLOATING
"FIXED
AZ6
CLA
I""=AACC)
""
ALS
1

-

ASPECT

(PAGE

0299
0300
0301
0302
0303
0304
0305
0306
0307
030B
0309
0310
0311
0312
0313
0314
0315
0316
0311
0318
0319
0320
0321
0322
0323
0324
0325
0326
03;>1
0328
0329
0330
0331
0332
0333
0334
0335
0336
0331
0338
0339
0340
0341
0342
0343
0344
0345
0346
0341
0348
0349
0350
0351
0352
0353
0354
0355
0356
0351
0358
0359
0360
0361
0362
0363
0364
0365
0366
0361
0368
0369
0310
0311
0312
0313

51

* ••••••••••
.•••••••••••••••••••••••••
•
** ••••••••••

ASPECT

(PAGE

61

....

PROGRAM LISTINGS

••••••••••••••••••••••••

•

( ... =AACC)
STO
TRA
A40
.. flOATING
( .... =AACC)
A2B lDQ
••
FMP
KL2
A29 STO
...
(".=AACC I
TRA
A40
.IF COLLAPSING IS NOT VALID COMPUTE SPECTRUM DIRECTLY FROM
.AACC. THEN DOUBLE THE SPECTRUM. RESTORE AC(OI ANO EXIT
"(DONT WORRY ABOUT AC(OI SINCE SPACE WAS NOT USED)
SCOSP.4
CSP2 TSX
( * ..=AACC)
A30 TSX
**
A31 TSX
...
' •• =AACC)
TSX
T2
T2=PZE O.O.N
( "=COSTA8)
A32 TSX
**
TSX
T4
T4=PlE O.O.M
TSX
T5
T5=PlE O,O.JMIN
TSX
T6
T6=PlE O,O,JMAX
T7=CONTENTS OF TYPE
TSX
T1
A33 TSX
..
(··=SPECT)
"FIXED OR FLOATING
ZET
T1
TRA
AH
flOATING
-FIXED
A34 CUI
( ".=AACC)
ALS
(".=AACC)
A35 STO
••
OUBlX,4
DeXl TSX
A36 TSX
(,,"=SPECT)
TSX
Tt9=JMAX-JMIN+1
Tl9
TRA
GO EX IT
LV
.. FLOATING
( ... =AACC)
A37 LDQ
**
FMP
KL2
( .... =AACC)
A38 STO
**
DBLI TSX
OUBLL.4
( ""=SPECT)
A39 TSX
-TSX
Tl9
Tl9= JMAX-JM I N+ 1
TRA
LV
GO EX IT
-IF COLLAPSING WAS PERFORMED
.THEN END-POINT ADJUST THE COLLAPSED CORRELATION AND OOUBLE IT
A40 S T l . .
(.*=SPACE-2M)
lET
T7
T7=CONTENTS OF TYPE
TRA
DBL2
.FIXED POINT
$OUBLX,4
DBX2 TSX
••
A44 TSX
( "·=SPACE)
TSX
Tt6
TI6=PIE 0.0.2M+1
TRA
SPL Tl
.. flOATING POINT
DBl2 TSX
SOUBLl,4
A48 TSX".
(*.=SPACE)
TSX
T16
Tl6=PIE 0.0,2M+l
.NOW SPLIT THE ADJUSTED COLLAPSED AUTOCORRELATION ON TOP OF ITSELF
SPLTI TSX
SSPLIT,4
( **=SPACE)
A49 TSX
**
Tl6=PZE 0,0,2M+l
TSX
J16
TSX
T1
T7=CONTENTS OF TYPE
("'=SPACE)
A50 TSX
**
( **=SPACE-M-1)
A51 TSX
**
.NOW RESPLIT THE SYMMETRIC PART ON TOP OF ITSELF
SPLT2 TSX
SSPLIT,4
A52 TSX
..
(*"=SPACE)
TI5=PZE O.O,M+l
TSX
TI5
TSX
T7
T7=CONTENTS OF TYPE
A53 TSX
...
( ·*=SPACE)
( *"=SPACE-P-l)
A54 TSX
**
"REVERSE THE RESPLIT PARTS AND seT AS(PI=O FOR COSP
REV
TSX
SRVPRTS,4
("*=SPACE)
A55 TSX
**
A55A TSX
..
(**=SPACE-P-l)
(TI5=PIF. O.O,M+l)
TSX
Tl5
A55B STZ
...
( **=SPACE-M-l)
.. NOW COMPUTE SPECTRUM FROM THE RfSPLIT PARTS
CSP1 TSX
SCOSP,4
A27

...

...

•

ASPECT

••••••••••••••••••••••••
(PAGE

0374
0375
0376
0377
0378
0379
03BO
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0199
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447
044B

61

••••••••••••••••••••••••

•••••••••••••••••••• _ •• *
ASPECT

PROGRAM 1I STINGS

-••••••••••••••••••••••••-

-...................*_ ....

ASPECT
7)

IPAGE

IPAGE

-"

A56
A57

TSX
TSX
""
TSX
Ti4
A58 TSX
""
TSX
T4
TSX
T5
TSX
T6
TSX
T1
A59 TSX
-FINAL EXIT
LXD
ASPECT-2,4
LV
AXT
"·,1
•• ,2
AXT
TRA
12,4
"TEMPORARIES, ETC
"INPUT ARGUMENTS
T1
PZE
""
T2
PIE
0,0,-"
13
PZE
.. "
T4
PZE
0,0,··
PZE
0,0,*.
T5
PIE
0,0,.T6
T7
PZE
""
T8
PZE
T9
PZE
".
TlO PZE
""
H4 PZE
0,0,""
Tl5 PZE
0,0,""
Tl6 PZE
0.0,".
0,0,.Tl7 PlE
0,0,
••
H8 PZE
Tl9 PZE
0,0.""
SUMHI PZE
PZE
KO
PIE
K1
1
0,0,1
KOl PZE
KLl DEC
1.0
KL2 DEC
2.0

I."=SPACEI
I ""=SPACE-P-II
TI4=PZE O,O,P
I··=COSTA8)
T4=PZE O,O,M
T5=PZE O.O,JMIN
T6=PZE O,O,JMAX
T7=CONTENTS OF TYPE
I **=SPECT I

".

I"·=XRll
I.·=XR21

I "=AACCI
I"·=N)
I "=COSTAB)
I·.=M)
I··=JMINI
I •• =JMAXI
I."=CONTENTS OF TYPE=O.OIFXO)=l.OIFLTGll
I •• =SPECT)
I""=SPACEI
I .""'SCALE I
I".=P FOR COSP=M/2 OR IM-I)/21
I."=M+I FOR REV, SPLT2,1
1."=SM+l FOR SPLT2, OUBlX, OUBlL,)
I **=2M FOR CLPS I
1•• =N+l FOR CLPS, SCALING,)
I **·JMAX-JMIN+ll
OVERFLOW REG FOR COR. MAGN. SUM

."

."
°

"
".USE

OF SPACE WHEN M IS EVEN

"
"•

AFTER
COLAPS

•

AFTER END
POINT ADJUST
AND OUBL

"

All MI

2XC12M-1I

•

" ETC

•

.-M-1
• -M

-1

.SPACE

""THUS

•
"
.USE

AFTER
SECOND
SPLIT

AfTER
RVPRTS
ANO END
POINT SET

ISAME
BUT
THESE
NOT
USEDI
A1I1I
A21P)

O.O=ASIP)
A21 ll=ASIP-ll

XCIMI

2XCIMI

A1I21
All II
S1I M)

XCIPI

2XCIPI

Sl( P+lI
Sl( P)

A2(1)
S21PI

A2IPI=ASIO)
S2101=SSIP)

XC I 11
XC 101

2XC(1)
2XCIOI

S l ( 11
Sl( 0)

S21 1)
S2(0)

S2tP-ll=SS( 11
S2IPl=SS(0)

" ETC

• -P-l
" -P
"ETC

AfTER
FIRST
SPLIT
Al ( MI

0.0
0.0

• -2M 8LANK
• -2M BLANK
"-2M+l XC12M-11

I P=M/21

WHEN M EVEN

RSS

SPACE,

Of SPACE WHEN M 15 ODD

RAS

IQ=IM+11/2,

SPACE-P-1
P=IM-1)/2=Q-l)

It

"
..•

•

AFTER
COLAPS

• -2M
BLANK
"-2M+1 XC12M-11

-

AFTER END
POINT ADJUST
AND DUBL
0.0

2XCI2M-1)

AFTER
FIRST
SPLI T

AFTER
SECOND
SPLIT

AFTER
RVPRTS
AND END
POINT SET

SAME

SAME

All M)
A1 I M-l
A1I1I

All

1)

O.O=NOT USED

0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487
0488
0489
0490
0491
0492
0493
0494
0495
0496
0497
0498
0499
0500
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517
0518
0519
0520
0521
0522
0523

7)

••••••••••••••••••••••••

-

-

ASPECT

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

81

- -M
--M+l
-ETC

xc I MI
XC 1M-II

-

2XCIM)

(PAGE
S1I M)

--QI=-P+ 1)
--Q+lI=-PI
-ETC
•
-1
XC 111
2XCIl)
SIll)
-SPACE XCIO)
2XCIO)
SIlO)
-THUS WHEN MODO
RSS = SPACE,
RAS

•

END

••••••••••••••••••••••••

ASPECT
•
•••••••••
* •••••••••••••••

A2IQ)

A2111=AS(PI

A2(2)
A2111
S2IQ)

A2{Q-ll=ASIII
A2IQ)=ASIO)
S21 11=SSIPI

S2(2)
S2111
SPACE-P-l

S2IQ-1I=SSI1I
S2(QI=SSI0)

0524
0525
0526
0527
0528
0529
0530
0531
0532
0533
0534
0535

81

••••••••••••••••••••••••

.
••••••••••••••••••••••••

•

ASPEC2

PROGRAM LISTINGS

.•••••••••••••••••••••••••
.
ASPEC2
•••••••••••••••••••••••

..
ASPEC2 (SUBROUTINE)
3115/65
LAST CARD IN DECK IS NO. 0205
..
FAP
0001
dSPEC2
0002
COUNT
250
0003
0004
ASPEC2
LBL
ENTRY
ASPEC2 (ACOR, MXLAG, FREQLO, FRQOEL, NFREQS, lERRLO,
0005
SPECT, IANS)
0006
0007
----ABSTRACT---0008
•
0009
.. TITLE - ASPEC2
0010
..
AUTOSPECTRUM BY COSINE TRANSFORM OF AUTOCORRELATION
0011
a
0012
ASPEC2 COMPUTES THE COSINE TRANSFORM VALUES
0013
•
0014
MXLAG
0015
SPECTIJ) = ACIO) + 2 - SUM ACII)-COSIWIJ)-I)
0016
1=1
0011
0018
FOR J = 1,2, ••• ,NFREQS
0019
0020
WHERE
0021
W(J) = FREQLO + (J-l)aFRQDEL, AND
0022
AC(I). MXLAG, FREQLO, FRQDEL, AND NFREQS ARE INPUTS
0023
0024
THE COMPUTATIONS ARE SPEEDED UP BY THE USE OF SUBROUTINE
0025
SEQSAC AND FUNCTION NEXCOS TO GENERATE COSINE VALUES •
0026
0021
WHILE THREE OR FOUR TIMES SLOWER THAN SUBROUTINE ASPECT,
0028
THE COMPUTATIONS HERE REQUIRE NO TEMPORARIES.
0029
0030
.. LANGUAGE
- FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
.. EQUIPMENT - 709,7090,7094 (MAIN FRAME ONLY)
0031
0032
- 74 REGISTERS
- STORAGE
.. SPEED
- ON THE 1090 ASPEC2 TAKES ABOUT
0033
100 + l18-NFREQS + 140-NFREQS.IMXLAG+1) MACHINE CYCLES
0034
WHERE NFREQS AND MXLAG ARE DEFINED ABOVE
0035
a AUTHOR
- S.M. SIMPSON, JUNE 1964
0036
0031
0038
0039
----USAGE---0040
.. TRANSFER VECTOR CONTAINS ROUTINES - SEQSAC, NEXCOS
0041
..
AND FORTRAN SYSTEM ROUTINES - NOT ANY
0042
0043
•
0044
- FORTRAN USAGE
CALL ASPEC2IACOR, MXLAG, FREQLO, FRQDEL, NFREQS, IERRLO, SPECT,
0045
0046
1
IANS)
•
0047
0048
.. INPUTS
0049
0050
CONTAINS THE AUTOCORRELATIONS AC(J),
0051
ACOR III
I=1 ••• MXLAG+1
a
0052
J=O ••• MXLAG.
0053
0054
MUST BE GRTHN OR EQUAL ZERO
• MXLAG
0055
FREQLO
IS THE LOWEST FREQUENCY, WIll OF THe ABSTRACT, IN RADIANS
0056
0057
FRQDEL
IS THE FREQUENCY INCREMENT IN RADIANS
0058
0059
NFREQS
IS THE DESIRED NUMBER OF OUTPUT SPECTRAL VALUES
0060
0061
MUST EXCEED ZERO
0062
IS THE DESIRED IANS OUTPUT FOR ILLEGAL MXLAG
0063
IERRLO
0064
0065
0066
NO COMPUTATIONS ARE MADE FOR ILLEGAL MXLAG OR NFREQS
• OUTPUTS
0067
VALUES •
0068
0069
SPECTlJ) J=l ••• NFREQS CONTAINS THE VALUES DEFINED IN THE ABSTRACT
0070
0,
IF ALL OK
0071
IANS
•
0072
IERRlO,
IF MXLAG ILLEGAL
•

...
.

-..
.

...

----.
...

-.
-..

--

--.
-.
...
..
....
.

...
..
...

••••••••••••••••••••••••

PROGRAM LISTINGS

• ASPEC2
•
........................
(PAGE

2)

•
•
•

••••••••••••••••••••••••

ASPEC2
•••••••••••••••••••••••••
•
IPAGE

= IERRLO+1.

IF NFREQS ILLEGAL

• EXAMPLES

•
•
•
•
•
•
•
•

-••
-•
-•
-••
•
--•
--•
-•

1. INPUTS

- ACOR(1 ••• 4) • 1.0 •• 5 •• 5,.5
FREQLO = 3.14159265/6.0 130 DEGREES)
FREQDEL
2.0-FREQLO
NFREQS=2
IERRLO=l
USAGE
DIMENSION SPECTI2,4), IANS(4)
DO 10 LACOR=1,4
MXlAG = LACOR-1
10 CALL ASPEC2CACOR, MXLAG, FREQLO, FRQDEL, NFREQS,
1
IERRLO, SPECTl1,LACOR), IANSILACOR))
OUTPUTS - SPECTll ••• 2,1) = 1.000, 1.000
SPECTl1 ••• 2.2) = 1.866, 1.000
SPECTl1 ••• 2,3) = 2.366. 0.000
SPECTl1 ••• 2,4) = 2.366, 0.000
IANSl1 ••• 4)
0,0,0,0

=

- SAME AS EXAMPLE 1. EXCEPT ACORl1 ••• 4) = 2.,1.,1.,1.
NFREQS=l
USAGE
- SAME AS EXAMPLE 1.
OUTPUTS - SPECTl1.1 ••• 4) = 2.000,3.732,4.732,4.732
IANSl1 ••• 41
0.0.0,0

2. INPUTS

=

3. ILLEGAL CASES

10 IS A DUMMY VARIABLE BELOW)
CALL ASPEC21D,-l,D.D,1.3.D,IANS1)
CALL ASPEC21D,O,D.D,O,3,D,IANS2)
OUTPUTS - IANS1=3
IANS2=4
USAGES

• PROGRAM FOLLOWS BELOW

••

••
•

TRANSFER VECTOR CONTAINS
HTR
HTR
HTR
BCI
ONLY ENTRY.

•ASPEC2

-

SXD
SXD
SXD

o
o
o

SEQSAC,

NEXCOS

XR1
XR2
XR4

l,ASPEC2

ASPEC21ACOR, MXLAG, FREQLO, FRQDEL. NFREQS, IERRLO.
SPECT, IANS)
ASPEC2-4,l
ASPEC2-3.2
ASPEC2-2,4

• DIVIDE ACOR(1) BY 2. SET ADDRESSES. DECREMENTS, CHECK MXLAG. NFREQS

••
•

CLASTO
FOP
STQCLA
AOD
STA
CLA
AOD
STA
CLA*
POX
CLAADD

1,4
ACORl
KL2
1,4

ACORIl)
ISAVE IT)

1,4

AtACORI
AtACOR)+l

Kl
FMP
7,4
K1
STO
6,4
0,1
2,4
KD1

STD

TXU

TMI
TlE
TXI
CLA.
STD
SUB
TlE
TMI

LEAVE
LEAVE
-+1,1,1
5.4
TXL2
KDl
CLAFl
LEAVE

AI SPECTI
AI SPECTI+1
IERRlO
TO XR1
MXLAG
MXlAG+1

NFREQS

ALL OK, INITIALIZE FOR FREQUENCY INCREMENTING

0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147

21

••••••••••••••••••••••••

•

•

ASPEC2

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

31

•
•
•

CLAFL CLA.
STO
CLA"
STO

FREQLO
FRQDEL

OUTER LOOP COUNTS SPEC TRAL VALUES WITH XR2 ,. 1 ••• NFREQS
TSXl

•
•
•

3,4
FREQ
4,4
FRQDEL

AXT
TSX
TSX
TSX

1,2
$SEQSAC,4
KZ,O
FREQ,O

INNER LOOP COUNTS ACOR VALUES WITH XRl

TSX2
FMP

TXll

•..

AXT
STZ
TSX
XCA
FMP
FAD
STO
TXI
TXL

1 ••• MXLAGS+l

1.1
SUM
$NEXCOS,4

··,1

SUM
SUM
"+1.1,1
TSX2.1 .....

....
....

A(ACORI+l

" MXLAG+1

. STORE XCARESULT AND INDEX FOR MORE
STO

TXL2

•

..•

•

...

FMP
STO
CLA
FAD
STO
TXI
TXL
AXT

KL2
.... ,2
FREQ
FRQOEL
FREQ
.+1.2.1
TSX1,2, ...
0,1

....

AI SPECT) +l

•• = NFREQS
IIANS = 0)

EXIT, SETTING IANS AND RESTORING ACORll)
LEAVE PXO
LOQ
LXD
LXD
LXD
STO"
STQ"
TRA

0.1
ACORl
ASPEC2-4.1
ASPEC2-3.2
ASPEC2-2.4
8,4
1.4
9.4

CONSTANTS. TEMPORARIES

KZ
K1
K01
KL2
FRQDEL
FREQ
SUM
ACORI

PZE
PZE
PZE
DEC
PZE
PZE
PZE
PZE
END

0
1

0,0.1
2.0

.... , ...... ,,, ......
.. , .....
".,
,

'

ASPEC2

••••••••••••••••••••••••
(PAGE

.. .......................•

INPUT
FREQLO, FREQLO+FRQDEL, •••
ACORllI

0148
0149
0150
0151
0152
0153
0154
0155
0156
0151
0158
0159
0160
0161
0162
0163
0164
0165
0166
0161
0168
0169
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0180
0181
0182
0183
0184
0185
0186
0181
0188
0189
0190
0191
0192
0193
0194
0195
0196
0191
0198
0199
0200
0201
0202
0203
0204
0205

3)

••••••••••••••••••••••••
AVRAGE
•
••••••••••••••••••••••••

PROGRAM LISTINGS

•

LAST CARD IN DECK IS NO. 0078
0001
0002
0003
150
AVRAGE
0004
AVRAGE IX,LX,XAVG)
0005
0006
0007
----ABSTRACT--0008
0009
TITLE - AVRAGE
0010
FINO AVERAGE OF FLOATING VECTOR
0011
AVRAGE COMPUTES THE MEAN OF A FLTG VECTOR.
0012
0013
0014
- FAP SUBROUTINE IFORTRAN-II COMPATIBLE)
LANGUAGE
0015
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLYI
0016
- 24 REGISTERS
STORAGE
- 52.4 + 8.4*LX MACHINE CYCLES ON 7090, LX • VECTOR LENGTH
0017
SPEED
0018
57.4 + 8.4-LX
ON 709
0019
AUTHOR
- S.M. SIMPSON, AUGUST 1963
0020
0021
---USAGE---0022
0023
TRANSFER VECTOR CONTAINS ROUTINES - (NONEI
0024
AND FORTRAN SYSTEM ROUTINES - INONE)
0025
0026
FORTRAN USAGE
CALL AVRAGE(X,LX,XAVG)
0027
0028
0029
INPUTS
0030
XIII
l=l ••• LX IS A FLTG VECTOR
0031
0032
0033
LX
SHOULD EXCEED ZERO
0034
STRAIGHT RETURN WITH NO OUTPUT IF LX LSTHN 1
0035
OUTPUTS
0036
XAVG
IS 11/lXI-SUM IFROM 1-1 TO LX) OF XII) IFlTGI
0037

•
AVRAGE
FAP
•
.AVRAGE
COUNT
LBL
ENTRY

•
•

•
•

•
•

••
•
•
•

*

•
•

*•
•

*•

*

**

•
*

•*
**

*•
•
•
•

(SUBROUTINE)

9129/64

0038

EXAMPLES

• 1. INPUTS - Xll ••• 4I a l.,2 •• 3.,4. u=o.
USAGE
CALL AVRAGEIX,4,XAVGI
•
CALL AVRAGEIX,I,Y)
•
CALL AVRAGEIX,O,UI
•
OUTPUTS - XAVGa2.5 Y=l. UzO.O CNO OUTPUT CASEI

-

• PROGRAM FOLLOWS BELOW

••

••••••••••••••••••••••••
•
AVRAGE
•
• •••••••••••••••••••••••

NO TRANSFER VECTOR
XR4
HTR
0
l,AVRAGE
8CI
AVRAGECX,LX,XAVG)
ENTRY.
• ONLY
AVRAGE SXO
AVRAGE-2,4
CLA
1,4
Kl
AIX)+l
ADD
K1
STA
AOOI
• CHECK LX AND FLOAT IT
LX
CLA2.4
TMI
LEAVE
POX
0,4
LOOP SET
TXL
LEAVE.4,O
18
LRS
OCTK
ORA
FAD
OCTK
FLOATED LX
STO
FLX
- SUM XI1 ••• LXI, DIVIDE, STORE, EXIT
PXD
0.0
•• =AIXI+l
-.,4
AD01 FAD
AODl,4,1
TIX
'FOP
FlX
LXD
AVRAGE-2.4
3.4
S'OLEAVE UD
AVRAGE-2.4
4,4
TRA

0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061

0062
0063

0064
0065
0066
0067
0068
0069
0070
0071
0072

0073
0074

.**** •• ***********.****.
AVRAGE
*

PROGRAM LISTINGS

* ••••• *.**.*******.*****
(PAGE 21

(PAGE

• CONSTANTS, VARIABLES
OCTK OCT
233000000000
FLX

PIE

END

..

***********.***.*.******

AVRAGE
*••• *******.****.*.*.*.*.
*

LX

FLOATED

0015
0016
0017
0078

21

..••••••••••••••••••••••••
.
BLKSUM
••••••••••••••• * ••••••••

PROGRAM LISTINGS

••••••••••••••••••••••••

BLKSUM
_.......
_........ _.*_ .. ...

..

9/4/64
LAST CARD IN nECK IS NO. 0168
BLKSUM (SUBROUTINE)
..
fAP
0001
0002
-BLKSUM
COUNT
200
0003
LBL
BLKSUM
0004
0005
ENTRY
BLKSUM (X, LX. LBLOK. DVSR, XBSMOD, LXBSODJ
0006
0001
----ABSTRACT---0008
0009
0010
.. TITLE - BLKSUM
..
SUMMATION OF VECTOR OVER ABUTTING BLOCKS OF CONSTANT LENGTH
0011
0012
BLKSUM COMPUTES
0013
•
0014
0015
I*L
•
S (II
SUM
XIJI
0016
0017
o J= (1-1 I.L+l
0018
0019
FOR I
1.2 ••••• N=(LX/LIROUNDED DOWN
0020
WHERE X(l ••• LX). LX, L, AND 0 ARE INPUTS •
0021
0022
THE OUTPUT VECTOR MAY REPLACE THE INPUT VECTOR, AND THE
0023
0024
LENGTH N IS AN ADDITIONAL OUTPUT FROM BLKSUM •
0025
0026
.. LANGUAGE
- FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
0021
0028
• EQUIPMENT - 109,1090.1094 (MAIN FRAME ONLY)
0029
- 49 REG I STERS
• STORAGE
- REQUIRES 80 + 29*N + 8.4.L-N MACHINE CYCLES ON THE 1090
0030
• SPEED
0031
WHERE LAND N ARE DEFINED ABOVE •
0032
- S.M. SIMPSON.
JULY 1964
• AUTHOR
0033
0034
•
0035
----USAGE---0036
0031
• TRANSFER VECTOR CONTAINS ROUTINES - (NOT ANY)
0038
•
AND FORTRAN SYSTEM ROUTINES - (NOT ANY)
0039
•
0040
.. fORTRAN USAGE
0041
..
CALL 8LKSUMIX. LX. LBLOK, DVSR, XBSMOD. LXBSOD)
0042
0043
0')44
• INPUTS
0045
•
0046
I=I ••• LX IS A FLOATING POINT VECTOR.
XI II
0041
0048
LX
MUST 8E GRTHN= 1 •
0049
•
0050
LBLOK
IS THE BLOCK LENGTH L OF THE ABSTRACT.
0051
MUST EXCEED ZERO AND BE LSTHN= LX.
0052
0053
IS THE DIVISOR 0 OF THE ABSTRACT.
DVSR
0054
MUST BE NON-ZERO.
0055
0056
0051
STRAIGHT RETURN WITH NO OUTPUTS IF LX, LBLOK, OR DVSR
OUTPUTS
005B
ILLEGAL.
•
0059
0060
•
XBSMOD(I) I=l ••• LXBSOD ARE THE SUMS SI1 ••• N) OF THE ABSTRACT.
0061
EQUIVALENCE (X.XBSMODI IS PERMITTED.
0062
0063
(LX/LBlOKI ROUNDED DOWN.
lXBSOD
WILL
0064
0065
0066
.. EXAMPLES
0061
0068
.. 1. MISCELLANEOUS VALUES OF LX, LBLOK
0069
..
INPUTS - X{1 ••• 41 = 2.,4.,6 •• 8. DVSR=2.0
0010
SI1 ••• 4,1 ••• 4,1 ••• 4) = -9.,-9., •••
0071
lS(1 ••• 4,1 ••• 4) = -9,-9, •••
0012
DO 10 LX=1,4
USAGE
0013
DO 10 L=l,LX
0014
It
10
CALL BLKSUMIX,LX,L,DVSR,S(l,L.lXI,LSfl,LXII

..

..
.

......
.

..
...
.
.

-•

....

...

..

..

.•
•
•

..

•

.

..
..

.

.

--.

=

.••••••••••••••••••••••••
.
BLKSUM

••••••••••••••••••••••••
BLKSUM
..
••••••••••••••••••••••••

PROGRAM LISTINGS

..

••••••••••••••••••••••••
(PAGE

21

..

IPAGE

OUTPUTS - S(l ••• ~.l ••• ~.l)

•

1 •• -9 •• -9 •• -9 ••• -9 •• -9 •• -9 •• -9 •••

•

S(1 ••• 4,1 ••• 4,2) =

•

511 ••• 4,1 ••• 4,3)

•

Sfl ••• 4,1 ••• 4,4)

*
..
..

LS(1 ••• ~,1 ••• 41

•

•

... 2.
..
-

.

-9.,-9.,-9 •• -9.,,-9.,-94,-9.,-9.
1., 2.,-9.,-9."
3.,-94,-9.,-9."
-9.,-9.,-9.,-9.,,-9.,-9 •• -9 •• -9.

~

I., 2., 3.,-9 ••• 3.,-9.,-9 •• -9 •• ,

6.,-9.,-9.,-9.'f-9 •. ,-9~,-9.,-9.

1., 2., 3., 4 ••• 3., 7.,-9 •• -9."

6.,-9.,-9.,-9.,,10.,-9.,-9.,-9.
1,-9,-9.-9 •• 2, 1.-9,-9"
3. 1, 1,-9,. 4, 2. I, 1

0081

00B8
0089
0090
0091
0092

INPUTS
USAGE

- SAME AS EXAMPLE 1.
CALL BLKSUMIX,-1,2,l.0,S.LSI
CALL ~LKSUMIX, 3.0,1.O,S,LSI
CALL BLKSUMIX, 3,4.1.0,S,LSI
CALL BLKSUMIX, 3,2,O.O,S,LSI
OUTPUTS - S " -9. LS"-9

0093

.
...•
•
FOLLOWS BELOW
...• PROGRAM
NO TRANSFER VECTOR
.

HTR
HTR
8CI

•
It

... CHECK SXOAND

-

LRS

•..

..

ClAt>
HE
STO
CLAARS
STO
TMI
HE
ClACASNOP
TRA
TRA
LRS
DVP.
CLM
llS
XCA
STOlt
STD
CLA
ADD
STA
CLA
ADO
STA
AXT

PXO
FAD

XR2
XR4

8lKSUM IX, LX, LBLOK, DVSR, XBSMOD, lXBSODI
BLKSUM-3,2
BLKSUM-2,4

SET

DVSR,
4,4
LEAVE
DVSR
3,4
IB
LBLOK
LEAVE
LEAVE
2,4
3.4
LRS
LEAVE
35
3.4

lBLOK.

lX8S0D

AND SET ADDRESSES

DVSR
lBLOK

LX
AGAINST LBlOK
OK
OK
NG
LX/LBLOK ROUNDED DOWN

18
6,4
TXL
1.4
Kl
FAD
5,4
Kl
STQ
1,2

DOU8LE LOOP STARTS.
PXD
LXA
FAD
TIX
FOP

0094
0095
0096
0091
0098

0
0
1,BLKSUM

ONLY ENTRY.
.BLKSUM
SXD

EQUALS lXBSOD

0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
6129
0130
0131
0132
0133
013~

AIXI
AIX 1+1
AI XBSMOD 1
AIXBSMODl+l
XR2 WILL CONTROL OUTPUT STORAGE
XR2=1 ••• LXBSOD.

XR4=LBlOK ••• l

REPEATED

0,0
LBLOK.4

(SUMMATION IN At)

•• ,4

.... = AIX)+1,-LBLOK,-2 .. L8l0K ••••

FAD,4,1
DVSR

0084

0085
0086

OUTPUT REPLACING INPUT
INPUTS - SAME AS EXAMPLE 1.
USAGE
CALL BLKSUMIX,4.2,OVSR,X,LSI
OUTPUTS - Xl1 ••• 41 = 3.,1.,6.,8. LS" 2

.. 3. I LLEGAL CASES

.-.

0015
0016
0071
0018
0019
0080
0081
0082
0083

0135
0136
0131
0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
0148
0149

21

••••••••••••••••••••••••

PROGRAM LISTINGS

BLKSUM
"••••••••••••••••••••••••
"
3)

(PAGE

STg

•

TXL

STg
CAL
SUB
STA
TXI
TXL

" •• 2
FAD
LBLOK
FAD
"+1.2.1
PXD.2,·"

LXD
LXD
TRA

BLKSUM-3,2
SLKSUM-2,4
7.4

• EXIT

•LEAVE
•

• CONSTANTS TEMPORARIES

•K1

PZE
DVSR PZE
LBLOK PZE
END

.. , .., ..
1

... ,0,0

••••••••••••••••••••••••
• BLKSUM
•
• •••••••••••••••••••••••
(PAGE

••

A(XBSMOD)+l

". = LXBSOD

0150
0151
0152
0153
0154
0155
0156
0157
015B
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168

31

••••••••••••••••••••••••
*

BOOST

PROGRAM .1lSTINGS

-

••••••••••••••••••••••••
*
BOOST (sUBROUTINEI
9/29/64
*
FAP
*BOOST
COUNT
150
lBl
BOOST
ENTRY
BOOST ( X, lX, XRIZE, XBUSTDJ
ENTRY
XBOOST (IX,lIX.IXRllE.IXBSTD)
ENTRY
OPRESS ( X. lX, XSINK, XlWRDI
ENTRY
XOPRSS CIX,llX,lXSINK,lXLWRDJ

-.
*

..

...
..
*

.-..
*
..
..

...

.

-

--.
..

*
..
*
-

-..
..
-.
-..
-

...
..-

-.
.-.
...
.
..
....

..

.....
.....
-

-.

••••••••••••••••••••••••
BOOST
*
• •••••••••••••••••••••••

*

lAST CARD IN DECK IS NO. 0146
0001
0002
0003
0004
0005
0006
0007
0008
0009
----ABSTRACT---0010
0011
TITLE - BOOST WITH SECONDARY ENTRIES XBOOST, DPRESS, AND XDPRSS
0012
ADO A CONSTANT TO ELEMENTS OF A FXD OR FlTG VECTOR
0013
0014
BOOST ADDS A FLTG CONSTANT TO A VECTOR.
0015
XBOOST ADDS A FXD CONSTANT TO A VECTOR.
0016
OPRESS SUBTRACTS A FLTG CONSTANT FROM A VECTOR.
0017
XDPRSS SUBTRACTS A FXD CONSTANT FROM A VECTOR •
0018
0019
THE CONSTANT MAY BE ONE OF THE VECTOR ELEMENTS.
0020
0021
LANGUAGE
- FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
0022
EQUIPMENT - 709 ~R 7090 (MAIN FRAME ONLY)
0023
STORAGE
- 34
REGISTERS
0024
SPEED
- BOOST
36 + 12.4-lX MACHINE CYCLES, LXzVECTOR LENGTH
0025
XBOOST - 38 + a-LX
0026
DPRESS - 3B + 12.4-LX
0027
XDPRSS - 38 + a-LX
002B
- S.M. SIMPSON, AUGUST 1963
0029
AUTHOR
0030
----USAGE---0031
0032
TRANSFER VECTOR CONTAINS ROUTINES - INONE)
0033
AND FORTRAN SYSTEM ROUTINES - INONEI
00.34
0035
FORTRAN USAGE
0036
CALL BOOST I X, lX, XRIlE.XBUSTDI
0037
CALL XBOOSTIIX,LIX.IXRIZE.IXBSTDI
0038
CALL DPRESSI X. LX. XSINK. XLWRDI
0039
0040
CALL XDPRSSIIX,LIX,IXSINK,IXLWRDI
0041
0042
INPUTS
0043
XI II
1=1 ••• LX IS A FLTG PT VECTOR
0044
0045
LX
SHOULO EXCEED 0
0046
0047
XRllE
IS ANY FLTG VARIABLE. EQUIVALENCE IXRIZE, SOME Xli I) OK.
004B
0049
XSINK
IS ANY FLTG VARIABLE. EQUIVALENCE IXSINK, SOME XIII} OK.
0050
0051
IXII I
l=l ••• LIX IS A FXD PT VECTOR
0052
0053
L1X
SHOULD EXCEED 0
0054
0055
IXRIZE
IS ANY FXD VARIABLE. EQUIVAlENCEIIXRIZE, SOME IXI I)) OK.
0056
0057
IXSINK
0058
IS ANY FXD VARIABLE. EQUIVALENCE IIXSINK, SOME IXCI)I OK.
00.59
OUTPUTS
STRAIGHT RETURN WITH NO OUTPUTS IF LX OR llX lSTHN 1.
0060
0061
XBUSTD(II 1=1 ••• lX HAS VALUES XBUSTDIII=XIII+XRIZE
0062
0063
EQUIVALENCE IXBUSTD,XI IS PERMITTED.
0064
XLWRDIII I=l ••• LX HAS VALUES XLWRDI!I=XI!I-XSINK
0065
EQUIVALENCE IXlWRD,XI IS PERMITTED.
0066
0067
IXBSTDI!I I=l ••• LIX HAS VALUES !XBSTDIII=IXIII+IXRIZE
0068
EQUIVALENCE (IXBSTD,IXI IS PERMITTED.
0069
0070
IXLWRDIII l=l ••• LIX HAS VALUES IXLWRDII}=IXIII-!XSINK
0071
0072
EQUIVALENCE (IXLWRD,IXI IS PERMITTED.
0073
0074
IF ANY OF THE ABOVE EQUIVALENCES OBTAIN, THE INITIAL

••••••••••••••••••••••••

•

.

BOOST

PROGRAM LISTINGS

••••••••••••••••••••••••
IPAGE

••••••••••••••••••••••••
..

800ST

...

VALUE OF THE QUANTITY IS ALWAYS USEO AS THE AODEND OR
SUBTRAHEND.

.

..... EXAMPLES
. 1. INPUTS

•.

- Xll ••• 4)=1.,2 •• 3 •• 4. Yll ••• 41-1 •• 2 •• 3.,4.
IXll ••• 41=l,2.3.4 IYll)-1
W=WW=O.O IW=IWW=O
CALL BOOSTIX.4,2 •• ZI
CALL DPRESSIY.4,2.,Ul
CALL XBOOSTIIX.4.2.IZI
CALL XDPRSSIIY,1,2,IU)
CALL BOOSTIX,O.2.,W)
CALL DPRESSIY.0,2 •• WWl
CALL XBoOSTIIX.0,2,IW)
CALL XDPRSSIIY,0,2,IWWI

..
..

OUTPUTS - Zll ••• 4)=3.,4.,5.,6. UII ••• 4)=-1.,0 •• I.,2.
Illl ••• 4)=3,4,5,6 lUll )=-1
W=WW=O.O IW=IWW=O INO OUTPUTS FROM LAST 4 CALLS)

•

.
..

USAGE

.•
•
•

....

••
..
..
..

.

2. INPUTS
USAGE

- SAME AS EXAMPLE 1.
CALL BOOSTIX,4,2.,X)
CALL DPRESSIY,4,YI31.Yl
OUTPUTS - Xll ••• 4)=3.,4.,5.,6. Yll ••• 4)=-2.,-1.,0.,l.

.. PROGRAM FOLLOWS BELOW

•..

"•

••••••••••••••••••••••••

2)

NO TRANSFER VECTOR
HTR
0
XR4
BCI
l,BOOST
.. PRINCIPAL ENTRY. BOOSTIX,LX,XRIZE.X8USTDI
BOOST CLA
FAD
SETUP STo
MODIFY
SXD
BOOST-2,4
Kl
CLA
1.4
ADD
Kl
AIXI+l
STA
GET
CLA
4,4
ADD
Kl
AIXBUSTD)+l
STA
STORE
CLA3.4
XRllE
STD
TEMP
• CHECK LX
CLA2,4
LX
TMI
LEAVE
POX
0,4
TXL
LEAVE,4.0
.. LOOP
•• ,4
.... =AIXI+l
GET
CLA
FAD TEMP, ADD TEMP, FSB TEMP OR SUB TEMP
MODIFY NoP
•• ,4
... =AIXBUSTD)+l
STORE S TO
GET.4,l
T1.X
• EXIT
LEAVE LXD
BOOST-2,4
TRA
5.4
• SECOND ENTRY. X800STIIX,LIX,IXRIZE,IXBSTDI
XBOOST CLA
ADO
TRA
SETUP
• THIRD ENTRY. DPRESSIX,LX,XSINK,XLWRD)
OPRESS CLA
FSB'
TRA
SETUP
• FOURTH ENTRY. XDPRSSIIX,LIX,IXSINK,IXLWRDI
XDPRSS CLA
SUB
TRA
SETUP
• CONSTANTS. VARIABLES.
ADD
ADD
TEMP
SUB
SUB
TEMP
FAD
FAD
TEMP
FSB
FSB
TEMP
TEMP PZE
...... ,...
ADDEND OR SUBTRAHEND
END

IPAGE

0075
0076
0077
0078
0079
0080
OOBI
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
012B
0129
0130
0131
0132
0133
0134
0135
0136
0137
0136
0139
0140
0141
0142
0143
0144
0145
0146

2)

••••••••••••••••••••••••

•

CALL

•

••••••••••••••••••••••••
REFER TO
LOCATE

••••••••••••••••••••••••
CALL2
•
••••••••••••••••••••••••

•

REFER TO
LOCATE

PROGRAM LI STINGS

••••••••••••••••••••••••
•

CALL

•

•REFER
•••••••••••••••••••••••
TO
LOCATE

••••••••••••••••••••••••
CALL2
•
••••••••••••••••••••••••
•

REFER TO
LOCATE

••••••••••••••••••••••••

•
• CARIGE
••••••••••••••••••••••••

PROGRAM LISTINGS

•
CARIGE (SUBROUTINE)
•
LABEL
CCARIGE
SUBROUTINE CARIGECITAPE,NSPACEI
C

C
C

C
C
C
C
C

C
C
C

C
C

C
C

C
C
C
C

C
C

C
C
C
C
C
C
C

C
C
C
C
C
C

C
C
C

C
C
C
C
C
C
C

C
C
C
C

C
C
C
C
C
C
C
C

C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

........................
•

CARIGE

•

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0097
0001
0002
0003
0004
----ABSTRACT--0005
0006
0007
TITLE - CARIGE
SPACE CARRIAGE N LINES OR RESTORE PAGE
0008
0009
CARIGE WRITES OUT CARRIAGE CONTROL HOlLERITH ON A GIVEN
0010
OUTPUT TAPE FOR OFF-LINE PRINTING UNDER PROGRAM CONTROL.
0011
IT WIll EITHER SPACE THE PRINTED PAGE N LINES (WHERE N
0012
MAY BE ZERO) OR GIVE A SINGLE PAGE RESTORE.
0013
0014
LANGUAGE
- FORTRAN-II SUBROUTINE
0015
EQUIPMENT - 709 OR 7090 CMAIN FRAME + 1 TAPE UNIT)
0016
STORAGE
- 47 REGISTERS
0017
0018
SPEED
AUTHOR
- S.M. SIMPSON, SEPTEMBER 1963
0019
0020
0021
----USAGE---0022
TRANSFER VECTOR CONTAINS ROUTINES - (NONEI
0023
AND FORTRAN SYSTEM ROUTINES - (STH), (FIL)
0024
0025
FORTRAN USAGE
0026
CALL CARIGE(ITAPE,NSPACE)
0027
0028
0029
INPUTS
0030
IS A FORTRAN-II INTEGER SPECIFYING THE LOGICAL TAPE TO
0031
ITAPE
BE USEO.
0032
IS NOT EXAMINED FOR LEGALITY.
0033
0034
NSPACE
IS A FORTRAN-II INTEGER SPECIFYING THE NUMBER OF SPACES
0035
(CARRIAGE RETURNS) DESIRED.
0036
=+N PRODUCES N CARRIAGE RETURNS
0037
=-N PRODUCES 1 PAGE RESTORE
0038
= 0 STRAIGHT RETURN WITH NO EFFECT
0039
0040
CARRIAGE CONTROL HOLLERITH IS WRITTEN OUT ON ITAPE.
0041
OUTPUTS
0042
0043
EXAMPLES
0044
0045
1. INPUTS - NSPACEll ••• 5)=1,0,-5,4,9
0046
DO 5 1=1,5
0047
USAGE
004B
WRITE OUTPUT TAPE 2,10,1
CALL CARIGE(2,NSPACE(I))
0049
0050
WRITE
OUTPUT
TAPE
2,10,1
5
FORMAT(17H THIS IS A MARKER,6X,2HI=,Il)
0051
10
0052
0053
OUTPUTS - 2 PAGES OF PRINTED OUTPUT FROM LOGICAL UNIT 2, AS FOLLOWS
0054
0055
PAGE 1
0056
0057
(LINE 11
THIS IS A MARKER
(BLANK LINE)
0058
0059
THIS IS A MARKER
1=1
Ia2
0060
THIS IS A MARKER
1:2
0061
THIS IS A MARKER
0062
(LINE 6)
THIS IS A MARKER
1=3
0063
0064
0065
PAGE 2
0066
0067
(LINE 11
THIS IS A MARKER
1=3
0068
THIS IS A MARKER
1"4
0069
(BLANK LINE)
0070
(BLANK LINE)
0071
(8LANK LINE)
0072
(BLANK LINE)
0073
THIS IS A MARKER
1=4
0074
THIS IS A MARKER
1=5
9/29/64

••••••••••••••••••••••••

CARIGE
•
•••••••••••••••••••••••••
(PAGE

PROGRAM LI STINGS

•

CARIGE

• •••••••••••••••••••••••
(PAGE

2)

C
(BLANK lINE)
(BLANK LINE)
C
(BLANK LINE)
C
(BLANK LINE)
C
C
(BLANK LINE)
(BLANK LINE)
C
C
(BLANK LINE)
(BLANK LINE)
C
C
(BLANK LINE)
C (LINE 18)
THIS IS A MARKER
C
C
C PROGRAM FOLLOWS BELOW
C
IF (NSPACE)
10,9999,30
10
WRITE OUTPUT TAPE ITAPE,20
20
FORMATllHll
GO TO 9999
30
DO 40 I=l,NSPACE
40
WRITE OUTPUT TAPE fTAPE,50
FORMATIlH )
50
9999 RETURN
END

• •••••••••••••••••••••••

•

1=5

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097

2)

••••••••••••••••••••••••
CHISQR
•
*••••••••••••••••••••••••
•

PROGRAM 1I ST INGS

••••••••••••••••••••••••

*

CHISQR

CHISQR ISUBROUTINE)
9/29/64
LAST CARO IN OECK IS NO. 0084
0001
LABEL
CCHISQR
0002
SUBROUTINE CHISQRINBLOCS,ICOUNT,N,CHISQ,IANS)
0003
0004
C
000.5
----ABSTRACT---C
0006
C
0007
C TITLE - CHISQR
COMPUTES CHI-SQUARE FOR EQUALLY LIKELY PROBABILITY CASE.
0008
C
0009
C
CHISQR COMPUTES CHI SQUARE WHEN GIVEN THE OISTRIBUTION
0010
C
COUNT AND THE NUMBER OF EQUALLY LIKELY BLOCKS INTO WHICH
0011
C
THE DATA IS PUT. NUMBER OF BLOCKS = NBLOCKS, N = TOTAL
0012
C
0013
NUMBER OF OBSERVATIONS, ICOUNT = OISTRI8UTION COUNT.
C
0014
C
CHISQ=SUMIIICOUNTIII-N/NBLOCKS) •• 2/IN/N8LOCKS»
0015
C
0016
C
SUMMEO OVER N8LOCKS, WHERE FLOATING OPERATIONS ARE ASSUMED
0017
C
RATHER THAN THE INDICATEO INTEGER OPERATIONS.
0018
C
0019
C
0020
- FORTRAN II SUBROUTINE
C LANGUAGE
0021
C EQUIPMENT - 709 DR 7090 IMAIN FRAME ONLY)
0022
C STORAGE
- 105 REGISTERS
0023
C SPEED
0024
- J.N. GALBRAITH
C AUTHOR
0025
C
0026
C
----USAGE---0027
C
002B
TRANSFER
VECTOR
CONTAINS
ROUTINES
NONE
C
0029
ANO FORTRAN SYSTEM ROUTINES - NONE
C
0030
C
0031
C FORTRAN USAGE
CALL CHISQRIN8LOCS,ICOUNT,N,CHISQ,IANS)
0032
C
0033
C
0034
C INPUTS
0035
C
0036
IS NUMBER OF EQUALLY LIKELY BLOCKS.
NBLOCKS
C
MUST BE GRTHN 1.
0037
C
0038
C
0039
ICOUNTII)
l=l
•••
NBLOCKS
IS
THE
DISTRIBUTION
COUNT.
I.E.
THE
NUMBER
C
0040
OF VALUES IN I-TH EQUALLY LIKELY BLOCK.
C
MUST BE NON-NEGATIVE
0041
C
0042
C
0043
IS TOTAL NUMBER OF OBSERVATIONS I=SUMIICOUNTIIJ).
C
N
0044
MUS T BE GRTHN= 1.
C
0045
C
0046
C OUTPUTS
0047
C
0048
CHISQ
IS THE CHI-SQUARE VALUE
C
0049
C
0050
IANS
C
=0 NORMAL
0051
C
=1 IllEGAL N8LOCS
0052
=2 ILLEGAL N
C
0053
C
0054
C EXAMPLES
0055
C
0056
ICOUNTll ••• 31=1,3,5
N=9
C 1. INPUTS - NBLOCS:3
0057
OUTPUTS - CHISQ=2.666667
IANS=O
C
0058
C
0059
N=9
C 2. INPUTS - NBLOCS-l
ICOUNTll)=l
0060
OUTPUTS - ERROR
IANS=l
C
0061
C
0062
- NBLOCS=3
ICOUNTll ••• 31=1,3,5
N=O
C 3. INPUTS
0063
OUTPUTS
ERROR
IANS=2
C
0064
C
0065
ICOUNTll ••• 5)=1.2.3.4,5
N=15
C 4. INPUTS - NBLOCS=5
0066
OUTPUTS - CHISQ=3.333333
IANS=O
C
0067
C
0068
DIMENSION ICOUNTII00)
0069
IANS:O
0070
IFINBLOCS-l) 990,990,5
0071
5
IFINI 992,992,10
0072
10
P=l./FLOATFINBLOCS)
0073
EXPNO=P*FLOATFIN)
0074
CHISQ=O

*

*

• •••••••••••••••••••••••

.................. _.....
._.....CHISQR
-._._- ••••.....••...
(PAGE

PROGRAM 1I STINGS

2)

25

26
990
992

DO 25 I~l.NBLOCS
OIF=FLOATF(ICOUNT(I»-EXPNO
CHISQ=CHISQ+OIF-OIF
CHISQ=CHISQ/EXPNO
RETURN
IANS=l
GO TO 26
IANS=2
GO TO 26
END

.

••••••••••••••••••••••••

-

CHISQR

••••••••••••••••••••••••
(PAGE

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084

21

••••••••••••••••••••••••

-

CHOOSE

-

••••••••••••••••••••••••
*•••••••••••••••
CHOOSE
*.~.* •• * •

PROGRAM LISTINGS

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0083
9/4/64
CHOOSE (SUBROUTINE)
0001
FAP
0002
-CHOOSE
COUNT
100
0003
LBl
CHOOSE
0004
0005
ENTRY
CHOOSE (ZIFRST, X,Xl,Xl, Y,Yl,Yl, ••• , l,ll.ll)
0006
0007
•
----ABSTRACT---0008
0009
0010
- TITLE - CHOOSE
•
SET A LIST OF VARIABLES TO ONE OF TWO SETS OF VALUES
0011
0012
•
0013
•
CHOOSE
SETS
A
VARIABLE
LENGTH
LIST
OF
VARIABLES
(X.Y
•••••
0014
•
l) FROM THE FIRST LIST (Xl,Yl, ••• ,Zl) OF A PAIR OF LISTS
0015
OF CONSTANTS IF lIFRST-O. OR FROM THE SECONO LIST IF
0016
•
ZIFRST NOT-O. I.E., IF ZIFRST=O. CHOOSE SETS X-Xl,Y-Yl,
0017
•
••• ,Z-ll. IF llFRST NOT=O. CHOOSE SETS X=Xl,YzYZt ••• ,
001B
•
l=ll.
0019
0020
•
0021
FAP
SUBROUTINE
(FORTRAN
II
COMPATIBLE)
0022
• LANGUAGE
709
OR
7090
(MAIN
FRAME
ONLY)
0023
• EQUIPMENT
- 17 REGI STERS
0024
• STORAGE
- 6 + l6.N MACHINE CYCLES. WHERE N .. NO. OF SETrINGS
0025
• SPEED
- S.M. SIMPSON, APRIL 1964
0026
- AUTHOR
0027
0028
----USAGE---0029
0030
•.. TRANSFER VECTOR CONTAINS ROUTINES - (NOT ANY)
0031
..
AND FORTRAN SYSTEM ROUTINES - (NOT ANY)
0032
0033
.. FORTRAN USAGE
0034
..
CALL CHOOSEIIIFRST, X.Xl.Xl, Y,Yl,YZ, ••• , l,ll.lZ)
0035
0036
.. INPUTS
0037
0038
ZIFRST
= O. IF VALUES Xl,Yl, •••• Zl ARE TO BE CHOSEN.
0039
NOT= O. IF VALUES Xl,Yl, ••• ,Zl ARE TO BE CHOSEN •
0040
0041
..
Xl.XZ,Yl,YZ, ••• ,II.ll. ARE ANY MODE
0042
0043
0044
.. OUTPUTS
ILLEGAL RETURN OCCURS IF ARGUMENT COUNT IS NOT
0045
1 + MULTIPLE OF 3.
0046
0047
..
X,Y, •••• Z ARE FORMED AS OESCRIBED IN ABSTRACT.
0048
0049
0050
.. EXAMPLES
0051
0052
.. 1. USAGES
CAll CHOOSEI-O •• Xl,l •• l., IXl.l,l)
0053
CAll CHOOSE(1.X2.1 •• 2.)
0054
CAll CHOOSEf-.000l,X3.1 •• 2 •• IX3,1.2. X4.X3,X3)
0055
..
OUTPUTS - Xl-I. IXl=l Xl=2. X3=2. IX3=2 X4=2.
0056
0057
005B
•
0059
- PROGRAM FOllOWS BELOW
0060
.. NO TRANSFER VECTOR
0061
0062
BCI
I.CHOOSE
0063
0064
.. ONLY ENTRY • CHOOSE( ZIFRS T. X.Xl.Xl. Y.Yl.Yl,
., l.11.l21
0065
0066
•CHOOSE ClA
K3
0067
lEh
1.4
0068
ADD
0069
·-1
STA
GET
0070
2.4
CAL
CAL
0011
0072
ANA
AMASK
TSXl
LAS
0073
0074
TRA
2.4

.
..

..

..

-

..
.

.
.
..
.

-.

.
...
..

.
.

-

.
.

.

...

.** •• **** •••••••••••••••
CHOOSE
*
*
•• ********.* •••• ********
(PAGE

PROGRAM LISTINGS

2)

TRA
TRA
GET
CLA*
STO"
TXI
K3
PlE
AMASK OCT
TSXl TSX
END

GET
2,4
**,4 *"=3 (ZIFRST=OI, OR 4 (lIFRST NOT=O)
2,4
CAl,4,-3
3

717171700000
0,0

•••••• *.*.*.* •• *.***.*.*
CHOOSE
*
*

** •••• ****** •••••• * •••••
(PAGE

0075
0076
0017
0078
0079
0080
0081
0082
0083

2)

••••••••••••••••••••••••

PROGRAM LI STINGS

CHPRTS
"••••••••••••••••••••••••
"
"
CHPRTS (SUBROUTINE)
"
FAP
*CHPRTS
COUNT
150
LBL
CHPRTS
CHPRTS (SYM,ANT,NI
ENTRY
RVPRTS (SYM,ANT,NI
ENTRY

•••••••••••••••••• ** ••••
"CHPRTS
"

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 014B
0001
0002
0003
0004
0005
0006
0007
"
----ABSTRACT---OOOB
"
0009
"" TITLE - CHPRTS, WITH SECONDARY ENTRY RVPRTS
0010
"
FAST REVERSAL OF SPECIAL VECTORS (AS PRODUCED BY SPLIT)
0011
0012
"
CHPRTS REVERSES THE STORAGE ORDER OF TWO VECTORS (CALLED
0013
"
ANT AND SYMI AND CHANGES THE SIGN OF ANT.
0014
"
0015
"
RVPRTS REVERSES THE STORAGE ORnER OF TWO VECTORS.
0016
"
0017
"" LANGUAGE - FAP, SUBROUTINE (FORTRAN II COMPATIBLE)
001B
0019
" EQUIPMENT - 709 OR 7090 (MAIN FRAME ONLYI
- 76 REGISTERS
0020
" STORAGE
- ABOUT 6.5.(COMBINED LENGTH OF THE VECTORS I MACHINE CYCLES
0021
" SPEED
S.M.
SIMPSON
JR
0022
" AUTHOR
0023
"
----USAGE--0024
"
0025
"" TRANSFER VECTOR CONTAINS ROUTINES - NONE
0026
"
AND FORTRAN SYSTEM ROUTINES NONE
0027
0028
"" FORTRAN USAGE
0029
"
CALL CHPRTS(SYM,ANT,NI
0030
"
CALL RVPRTS(SYM,ANT,N)
0031
0032
" INPUTS
0033
"
0034
"
SYM(II
1=1 ••• LS IS FIRST VECTOR TO BE REVERSED
0035
"
(NAME NEED NOT BE FLOATING POINT)
0036
"
0037
"
ANT( II
l=l ••• LA IS SECOND VECTOR TO BE REVERSED lAND SIGN
0038
"
CHANGED FOR CHPRTS E~rRY)
0039
"
(NAME NEED NOT BE FLOATING POINT)
0040
"
0041
"
N
0042
" LS+LA
"
IF N IS EVEN LS " LA = N/2
0043
"
IF N I S ODD
LS " (N+1l/2
0044
LA " IN-lIl2
"
IS FORTRAN II INTEGER
0045
"
0046
"" OUTPUTS
0047
0048
"
0049
SYM( II
I=l ••• LS IS THE REVERSED SYM SERIES.
"
0050
"
ANT (II
I=l ••• LA IS THE REVERSED ANT SERIES (WITH SIGN CHANGED
005i
"
IF THE CHPRTS ENTRY WAS USED).
0052
"
(NOTE- PROGRAM EXITS WITHOUT MODIFYING SYM OR ANT
0053
"
IF N IS LSTHN= 11
0054
"
0055
"" EXAMPLES
0056
0057
"" 1. INPUTS - SYM(1 ••• 31 = 3.,2.,1. ANTll ••• 3) = 4.,1 •• 2. N=6
0058
"
OUTPUTS - CHPRTS SYM(I ••• 31" 1 •• 2.,3. ANTll ... 31" -2.,-1 •• -4.
0059
"
RVPRTS SYM(I ••• 3) = 1.,2.,3. ANTIl ••• 3) a 2 •• 1.,4.
0060
0061
"" 2. INPUTS - SYMtl ••• 3) = 3.,2.,1. ANTll ••• 21 = 4.,5. N=5
0062
"
OUTPUTS - CHPRTS SYMll ••• 31 = 1.,2.,3. ANTIl ••• 21
-5.,-4.
0063
"
RVPRTS SYM(1 ••• 3) = 1.,2.,3. ANTIl ••• 21" 5.,4.
0064
0065
"" 3. INPUTS - SYM(11 = 1. ANT(11=2. N=2
0066
0067
"
OUTPUTS - CHPRTS SYM(l)=l. ANTIll=-2.
"
RVPRTS SYM(l)=l. ANTl11=2.
0068
0069
"
0070
PZE
l,CHPRTS
0071
BCI
CHPRTS CLA
K3
0072
STO
CI0
0073
CLA
K4
0074
9129/64

...... _....
-...._.-*

........... __
CHPRTS
•................
(PAGE

21

PROGRAM LISTINGS

(PAGE

STO
C12A
TRA
C2
RVPRTS CLA
K5
STO
CI0
CLA
K6
STO
C12A
C2
SXD
CHPRTS-2,4
SXA
LV+ 1.1
SXA
LV+2,2
• FIGURE THE LENGTHS OF SYM(LS) AND ANTtLA)
3,4
GET N
CLA"
ARS
18
1 N ADDRESS
CAS
Kl
TRA
*+3
TRA
LV
EX IT UNLESS
TRA
LV
N EXCEEDS 1
L8T
TRA
C3
EVEN
ARS
1
LA=(N-1112=N/2 TRUNCATED
ODD
STA
LA
ADD
Kl
LS=(N+1)/2=LA+l
TRA
C4
C3
ARS
1
EVEN
LA=LS=N/2
STA
LA
C4
STA
LS
.. SET DECREMENT AND ADDRESSES
CLA
LA
DECR
LA12 ROUNDED UP
LRS
1
RND
ALS
HI
STD

CLA
ADD
STA
STA
SUB
SUB
STA
STA
CLA
ADD
STA
STA
SUB
SUB
STA
STA

CI0

Cll
C12

C18

1,4
Kl

SYM+l

C14
el7
LS
Kl

SYMtLS)-l

C16
2,4
C13

Cll
C12

AXT
AXT
NOP
**,2

**.2

C14

STO
XCA
NOP
STO
CLA

CIS

LOQ

C16

STO
STQ
TXI
TXI
TXL
LXD
AXT
AXT
TRA
PlE
PZE
PZE
CLS
CHS
CLA
NOP
END

C13

C11
C18

LV

Kl

LS
LA
K3
K4
K5
K6

ANTlLA)-l

1<1

LOQ

C12A

ANT+l

CI0
LA

"*,1
**,1
.*,2

.*,2
**,1
.+1,2,-1

IRI COUNTS UP FROM 1 TO LA/2
IR2 COUNTS DOWN FROM -1 TO -LA/2
(""ANT+ 1)
REVERSE AND
(*.=ANTILA)-l)
POSSIBLY CHANGE
(**=ANTtLAI-l)
SIGN OF
ANTI SYMMETRIC
PART
t .*=ANT+ 11
(".=SYM+ 11
REVERSES
(**=SYMILSI-1)
SYMMETRIC
PART
(··=SYM(LSI-1)
( .*=SYM+1I

.+1,1,1

CI0,1,.·
CHPRTS-2,4

1*.=LA/2 ROUNDED UP)

**,1
**,2
4,4
1

.*
....

'•• ,1

*.,1

0075
0076
0077
007B
0079

OOBO
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111

0112

C15
1<1

.....

* •• * ••••••• * ••••
CHPRTS
•
*
••••••••••••••••••••••••

~.*

t .*=LS=LENGTH OF SYM)
I*·=LS=LENGTH OF ANT)
fOR CHPRTS
FOR CHPRTS
FOR PVPRTS
FOR RVPRTS

0113
0114
0115
0116

0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132

0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148

2)

••••••••••••••••••••••••
-

CHSIGN

PROGRAM LISTINGS

•

-

••••••••••••••••••••••••
ISUBROUTINE)

•••••••••••••••••••••••••
CHSIGN

LAST CARD IN DECK IS NO. 0077
0001
0002
100
0003
CHSIGN
0004
CHSIGN IX,LX,XNEG)
0005
0006
----ABSTRACT---0001
0008
0009
- TITLE - CHSIGN
DOlO
CHANGE ALL SIGN BITS OF A VECTOR
0011
•
CHSIGN CHANGES SIGN BITS IN A FLOATING OR FIXEO VECTOR
0012
0013
- FAP SUBROUTINE IFORTRAN-II COMPATIBLE)
0014
- LANGUAGE
0015
- EQUIPMENT - 709 OR 1090 IMAIN FRAME ONLY)
- 1B REGISTERS
0016
- STORAGE
- 27 + 6-LX MACHINE CYCLES, LX
VECTOR LENGTH
0017
- SPEED
- S.M. SIMPSON, AUGUST 1963
0018
- AUTHOR
0019
•
0020
----USAGE--0021
0022
- TRANSFER VECTOR CONTAINS ROUTINES - INONE)
0023
AND FORTRAN SYSTEM ROUTINES - (NONE)
0024
0025
• FORTRAN USAGE
0026
•
CALL CHSIGNCX,LX,XNEG)
0027
0028
• INPUTS
0029
• XCI)
1-1 ••• LX IS A FIXED OR FLOATING VECTOR
0030
•
0031
• LX
0032
SHOULD EXCEED 0
0033
•
STRAIGHT RETURN WITH NO OUTPUT IF LX lSTHN 1 •
0034
- OUTPUTS
0035
•
0036
• XNEG I II I=l ••• LX IS XNEGII)= -XIII
0037
•
EQUIVALENCE eXNEG,XI IS PERMITTED.
003B
0039
•
0040
• EXAMPLES
0041
•
0042
• 1. INPUTS - Xel ••• 41 = 1.,-1.,2.,0. IXll ••• 41 = -1,1,-2,-0 Y-O.
0043
•
USAGE
CALL CHSIGNI X,4, XNEG)
0044
•
CALL CHSIGNIIX,4,IXNEGI
0045
•
CALL CHSIGNI X,4, XI
0046
•
CALL CHSIGNIIX,I,IXI
0047
•
CALL CHSIGNI X,D, Yl
•
OUTPUTS - XNEGIl ••• 4) = -1.,1.,-2.,-0. IXNEGel ••• 4) = 1,-1,2,0
0048
0049
•
Xll ••• 41 = -1.,1.,-2.,-0. IX(1)· 1
•
Y • 0.0 INO OUTPUT CASE)
0050
0051
•- PROGRAM FOLLOWS BELOW
0052
0053
•
0054
•
0055
• NO TRANSFER VECTOR
HTR
XR4
o
0056
BCI
I,CHSIGN
0057
0058
• ONLY ENTRY. CHSIGN(X,LX,XNEGI
0059
CHSIGN SXO
CHSIGN-2,4
Kl
CLA
1,4
0060
AIX)+l
ADO
K1
0061
STA
0062
GET
3,4
0063
CLA
0064
AIXNEGI+I
ADD
Kl
0065
STA
STORE
CLA.
0066
2,4LX
0067
TMI
LEAVE
0,4
0068
POX
LEAVE,4,O
0069
TXL
0070
- REVERSING LOOP
••
,4
0011
••
=AeXI+I
GET
CLS
0072
STORE STO
*-=AI XNEG 1+1
0073
TlX
0014
• EXIT
CHSIGN
FAP
-CHSIGN
COUNT
LBL
ENTRY

---

--

-

-

••••••••••••••••••••••••

9/29/64

.*••••••••••••••••••••••••
..
CHSIGN
•• * ••••••••• **** •••••••
(PAGE

21
LEAVE

PROGRAM LISTINGS

.*. ...... *•••••••••••••••.
CHSIGN

••••••••••••••••••••••••
(PAGE

LXO
TRA
END

CHSIGN-2,4
4,4

0075
0076
0077

21

••••••••••••••••••••••••
...•••.•••.......•.•••.
CHUSET
_.

It

REFER TO

INDEX

PROGRAM LISTINGS

* ••••••
.*••••••••••••••••••
..
CHUSET
* •••••••••••••••••••••
REFER TO

INDEX

••••••••••••••••••••••••

PROGRAM LISTINGS

CLKON
"••••••••••••••••••••••••
"

••••• *•••••••• ** ••••• ••
~

•

ClKON

LAST CARD IN OECK IS NO. 0041
0001
0002
0003
C
0004
----ABSTRACT---0005
C
0006
C
C TITLE - CLKON
0001
C
CHECKS IF INTERVAL TIMER IS ON
0008
0009
C
CLKON
OPERATES
CLOCKI
TO
OETERMINE
IF
THE
INTERVAL
TIMER
C
0010
C
IS ON. IF IT IS NOT ON. CLKON PRINTS AN ON-LINE MESSAGE
0011
0012
C
OPERATOR. PLEASE TURN INTERVAL TIMER ON
C
0013
0014
C
REPEATEDLY UNTIL THE TIMER IS TURNED ON. IF THE TIMER
C
0015
IS ON. CLKON RETURNS TO THE CALLER.
C
0016
C
0011
C LANGUAGE
- FORTRAN II SUBROUTINE
0018
C EQUIPMENT - 709 OR 1090 IMAIN FRAME. INTERVAL TIMER. AND ON-LINE
0019
PRINTER)
C
0020
C STORAGE
- 46
REGISTERS
0021
C AUTHOR
0022
- R.A. WIGGINS
MAY. 1963
0023
C
----USAGE---0024
C
0025
C
C TRANSFER VECTOR CONTAINS ROUTINES - CLOCK 1
0026
C
AND FORTRAN SYSTEM ROUTINES - IFIL).(SPH)
0027
C
0028
C FORTRAN USAGE
0029
C
CALl CLKON
0030
0031
C
C PROGRAM FOLLOWS BELOW
0032
0033
C
10
JOB=O
0034
CALL CLOCKI (JOB.TIME)
0035
IF (JOB) 20.40.40
0036
0037
PRINT 30
20
FORMATIIH05X39HOPERATOR. PLEASE TURN INTERVAL TIMER ON)
30
0038
GO TO 10
0039
40
RETURN
0040
END
0041
"
CLKON
ISUBROUTINE)
"
LABEl
CCLKON
SUBROUTI NE CLKON

•

••••••••••••••••••••••••

9/29/64

••••••••••••••••••••••••

•

CLOCKI (70901

•

PROGRAM LISTINGS

••••••••••••••••••••••••

•
CLOCK! 170901 (SUBROUTI NE)
•
FAP
.CLOCK1 (7090)
COUNT
130
LBL
CLOCK1
ENTRY
CLOCKI (JOB,TIME)

•
•
•
•
•

•
•
•
•
•
•
•
•
•
•
•
•
•

•

•
•
•
•

•
•
•

•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

••

• •••••••••••••••••••••••

CLOCK1 170901
•
•••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0147
0001
0002
0003
0004
0005
0006
---.. ABSTRACT---0001
0008
0009
TITLE - CLOCKI
FOR REAL TIME TIMING IN SECONDS USING 7090 INTERVAL CLOCK
0010
0011
CLOCKI ALLOWS FORTRAN ACCESS TO THE CORE STORAGE CLOCK
0012
SO THAT IT MAY BE USED AS A TIMER. IT WILL RETURN THE
0013
ELAPSED TIME IN SECONDS AS A FLOATING POINT NUMBER OR IN
0014
FIXED POINT MULTIPLES OF 1/60 SECONO.
0015
0016
CLOCKI WILL ALSO TELL IF THE INTERVAL CLOCK IS RUNNING
0011
0018
LANGUAGE - FAP, SUBROUTINE IFORTRAN II COMPATIBLE)
0019
EQUIPMENT - 7090, 7094 IMAIN FRAME, CORE STORAGE CLOCK
0020
AND INTERVAL TIMER)
0021
STORAGE
- 51 REGISTERS
0022
AUTHOR
- S.M. SIMPSON,
MAY, 1962
0023
0024
----USAGE---0025
0026
0021
TRANSFER VECTOR CONTAINS ROUTINES NONE
0028
AND FORTRAN SYSTEM ROUTINES NONE
0029
0030
FORTRAN USAGE
0031
CALL CLOCKIIJOB,TIME)
0032
0033
INPUTS
0034
JOB
DEFINES WHAT CLOCK1 DOES.
0035
=0 CHECKS TO SEE IF CLOCK IS RUNNING.
0036
=1 REMEMBERS PRESENT CORE STORAGE CLOCK VALUE.
0031
=2 TELLS ELAPSED TIME FROM LAST TIME JOB=l
0038
(IN SECONDS, FLOATING POINT).
0039
=3 TELLS ELAPSED TIME FROM LAST TIME JOB=l
0040
lIN FORTRAN II INTEGER MULTIPLES OF 1/60 SECOND).
0041
IS FORTRAN 11 INTEGER.
0042
0043
0044
OUTPUTS
0045
JOB
IS UNDISTURBED EXCEPT FOR THE CASE OF INPUT JOB=O AND
0046
THE CORE STORAGE CLOCK (REGISTER 5) IS NOT RUNNING.
0041
0048
IN THIS CASE JOB IS SET = -1.
0049
0050
TIME
IF iNPUT JOB
0 IS UNDISTURBED.
= 1 IS UNDISTURBED.
0051
= 2 IS SET = NO. SECONDS (IN FLOATING POINT) 0052
0053
WHICH HAVE ELAPSED SINCE THE LAST USE
WITH JOB = 1.
0054
3 IS SET = NO. OF COUNTS lIN FORTRAN II
0055
0056
INTEGERS) II COUNT = 1/60 SEC)
0057
MODULO 2**11 •
MAY DIFFER ON SUCCESSIVE RUNS BY .016661 SEC.
0058
0059
0060
EXAMPLES
0061
0062
1. INPUTS - ASSUME THE FOLLOWING USE OF CLOCK1
0063
10
CALL CLOCK1IJOB1,TIME1)
0064
20
DO 30 1=1,32165
CONTINUE
0065
30
40
CALL CLOCK1IJOB2,TIME2)
0066
0061
JOB1=0 JOB2=2 CLOCK IS NOT ON.
0068
0069
OUTPUTS - JOB1=-1 TIME1 IS UNDISTURBED TIME2 CONTAINS A
0010
MEANINGLESS NUMBER.
3/15/65

2. INPUTS - SAME AS EXAMPLE 1. EXCEPT CLOCK IS ON.
•
OUTPUTS - JOBl=O TIME1 IS UNDISTURBED TIME2 CONTAINS A

0011

0012
0013

........................
•

ClOCKI (7090)

•

PROGRAM LISTINGS

• • • • • • • •4 • • • • • • • • • • • • • • •

iPAGE

2)

•
•
•
•
•
•

(PAGE

MEANINGLESS NUMBER
3. INPUTS - SAME AS EXAMPlf 1. EXCEPT CLOCK IS ON JOB1=1 JOB2'"2
OUTPUTS - JOB1:1 TIMEl UNDISTURBED JOB2 .. 2 T1ME2= .28 (7090)
OR .13 (7094)

• 4. INPUTS - SAME AS EXAMPLE 1. EXCEPT CLOCK IS ON JOB1=1
OUTPUTS - JOB1-1 TIME1 UNDISTURBED JOB2=3 TIME ,. 17
OR 8

•
•
•

••••••••••••••••••••••••

ClOCK1 (7090)
•• •••••••••••••••••••••••
•

HTR
0
BCI
1,ClOCK1
ClOCKl SXO
ClOCKl-2,4
ClA
5
STO
TEMP
SXA
lV,l
ClA
1,4
STA
SJ1
STA
SJ2
ClA
2,4
STA
STORE
.FIND OUT WHICH JOB
SJ1 ClA
••
• ... JOB
TMI
lV
CAS
KDl
TRA
J20R3
TRA
JOBl
TRA
JOBI
KD1
J20R3 SUB
CAS
KD1
TRA
JOB3
TRA
JOB2
TRA
lV
• WAIT A SECOND (IN THE 709)
JOBI lXA
K32K,1
lOOP TIX
lOOP,l,l
.010 CLOCK INCREMENT (VES IF NOW DIFFERENT FROM TEMP)
ClA
5
CAS
TEMP
TRA
lV
TRA
NOClOK
TRA
lV
.INDICATE CLOCK NOT RUNNING
NOClOK ClS
K01
SJ2
STO
••
..=JOB
TRA
lV
.FOR JOB 1 SAVE REG 5 AND EXIT
JOB1 ClA
5
STO
ORG
TRA
lV
.FOR JOB 2 OR 3 SET DIFFERENCE
JOB3 ClA
TEMP
SUB
ORG
ANA
KMSK
AlS
18
TRA
STORE
JOB2 ClA
TEMP
SUB
ORG
ORA
KOCT
FAD
KOCT
FOP
KCONV
STQ
TEMP
ClA
TEMP
STORE STO
••
•• "TIME
.... XRl
lV
AXT
•• ,1
TRA
3,4
KD1
PIE
0,0,1
KOCT OCT
233000000000
KMSK OCT
000000377777
K32K PIE
32767
KCONV DEC
60.0
••
TEMP PZE
•• .. TEMPORARV
PZE
••
....ClOCK SAVE
ORG
END

JOB2=3
(7090)
(7094)

0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147

2)

* •• * •• *.**.*.*** ••••••• *

• CMPARl
•
• *.* •• ****.*.***********
REFER TO

CMPARV

PROGRAM LISTINGS

***.*.** •••••••• *****.**

•

CMPARl

•

********* •••• **.****.**.
REFER TO

CMPARV

••••••••••••••••••••••••
..

CMPARP

..

••••••••••••••••••••••••

PROGRAM 1I STINGS

• •••••••••••••••••••••••
..
CMPARP
..
• •••••••••••••••••••••••

..
CMPARP I SUBROUTINE I
9129/64
LAST CARD IN DECK IS NO. 0150
..
FAP
0001
*CMPARP
0002
COUNT
150
0003
CMPARP
LBL
0004
ENTRY
CMPARP (IANS,Xl,Yl,X2,Y2, ••• ,XN,YNI
0005
ENTRY
CMPARS IIANS,Xl,X2, ••• ,XNI
0006
0001
----A8STRACT---0008
0009
.. TITLE - CMPARP WITH SECONDARY ENTRY CMPARS
0010
..
COMPARE PAIRS OF VARIABLES OR A SET OF VARIABLES FOR EQUALITY
0011
0012
CMPARP IS A VARIA8LE-LENGTH-CALLING-SEQUENCE SUBROUTINE
0013
"
WHICH TREATS ITS ARGUMENTS, BEYOND THE FIRST ONE, IN
0014
PAIRS. THE TWO ELEMENTS IN EACH PAIR ARE COMPARED FOR
0015
IDENT lTY.
0016
0017
CMPARS IS A VARIABLE-LENGTH-CALLING-SEQUENCE SUBROUTINE
0018
"
WHICH TREATS ITS ARGUMENTS, BEYOND THE FIRST ONE, AS A
0019
SET OF QUANTITIES. THE ELEMENTS IN THIS SET ARE
0020
COMPARED TO SEE IF THEY ARE ALL IDENTICAL.
0021
0022
BOTH ENTRIES CONSIDER +0 TO BE THE SAME AS -0 AND LEAVE
0023
THE RESULT OF THE TEST IN THEIR FIRST ARGUMENT.
0024
0025
.. LANGUAGE
- FAP SUBROUTINES (FORTRAN-II COMPATIBLE I
0026
.. EQUIPMENT - 709 OR 7090 (MAIN FRAME ONLY)
0027
.. STORAGE
- 53 REGISTERS
0028
.. SPEED
0029
.. AUTHOR
- S.M. SIMPSON JR.,
OCTOBER 1963
0030
0031
----USAGE---0032
0033
.. TRANSFER VECTOR CONTAINS ROUTINES - INONEI
0034
..
AND FORTRAN SYSTEM ROUTINES - (NONEI
0035
0036
.. FORTRAN USAGE OF CMPARP
0037
..
CALL CMPARPIIANS,Xl,Yl,X2,Y2, ••• ,XN,YNI
003B
0039
.. INPUTS
0040
0041
Xl, VI
IS FIRST PAIR TO BE TESTED, ANY MODE
0042
X2,Y2
IS SECOND PAIR TO BE TESTED, ANY MODE
0043
ETC
0044
XN,YN
IS N-TH PAIR TO BE TESTED, WHERE N MUST EXCEED 0 •
0045
0046
.. OUTPUTS
ILLEGAL RETURN RESULTS IF ARGUMENT COUNT IS EVEN OR LESS
0047
THAN 3 •
0048
0049
IANS
=0 IF xl=Yl AND X2=Y2 AND ••• AND XN=YN
(+0=-0)
0050
0051
=K IF XK NOT= YK
IK IS LOWEST SUCH INDEX IF MORE THAN
"
ONEI
0052
0053
0054
.. FORTRAN USAGE OF CMPARS
..
CALL CMPARSIIANS,Xl,X2, ••• ,XN)
0055
0056
.. INPUTS
0057
0058
..
Xl,X2, ••• ,XN ARE THE N QUANTITIES (ARBITRARY MODE) TO BE TESTED.
0059
..
N MUST BE GRTHN=2 •
0060
0061
.. OUTPUTS
AN ILLEGAL RETURN RESULTS IF ARGUMENT COUNT IS LESS
0062
THAN 3 •
0063
0064
I ANS
(+0 EQUALS -0 IN THE TEST)
=0 IF Xl'X2= ••• =XN
0065
0066
=K IF XK NOT: XK+l
(K IS THE LOWEST SUCH INDEX)
0067
0068
.. EXAMPLES
0069
0070
.. 1. INPUTS - Al,A2,A3 = 1.,2.,3. BI,B2,83 = 1.,2.,3.
IXI = IYl = 1
0011
0012
..
Al = O.
BZ = -0.
C3 = 03 = 3.
0073
CALL CMPARP(IANS1,Al,BZ,Al,Bl,A2,B2,A3,B3,IXI,IYl)
0074
USAGE

......

.
...
.

..
...
..

..

.....

.

.
...
..
.

..
..
...

.
.
.
.
..
..
..

.

.

..

.

••••••••••••••••••••••••
•

CMPARP

••••••••••••••••••••••••
CMPARP
•
••••••••••••••••••••••••

PROGRAM LISTINGS

•

•

••••••••••••••••••••••••
IPAGE

21

•
•
•

••
••
•
•

IPAGE

CAll CMPARPIIANS2,Al,B1,IX1,IY1.Al.AZ.A3.B21
CAll CMPARSIIANS3,A3,B3.C3.031
CAll CMPARSIIANS4,A3.B3,B2,03)
OUTPUTS - IANS1

t

0

IANS2" 3

IANS3. 0

IANS4. 2

PROGRAM FOllOWS 8ElOW

• NO TRANSFER VECTOR
HTR
o
XR1
HTR
o
XR2
HTR
o
XR4
• PRINCIPAL ENTRY. CMPARPIIANS,X1,Yl,X2.Y2~ •••• XN,YNI
l.CMPARP
8CI
CMPARP ClA
KOM2
TRA
SETUP
• SECONDARY ENTRY. CMPARSIIANS.X1,X2, ••• ,XN)
I,CMPARS
8CI
KOMI
CMPARS ClA
TXI2
SETUP STD
STA
EXIT
STA
CALX
CMPARP-2,4
SXO
SXO
CMPARP-3,2
CMPARP-4,1
SXO
1,4
CLA
AIIANS)
STA
STOANS
• POSITION 1,4 TO Xl AND CLEAR XRl
.+1,4,-1
TXI
lXA
AMASK,l
• lOOP TO MOVE ALONG ARGUMENTS 1 OR 2 AT A TIME
.+1,1,1
XR1 COUNTS COMPARISONS
TXIl TXI
CAL
2.4
TSX Y1,O TSX Y2,0 •••
TSXICK,2
TSX
TRA
PXOI
RUN OFF
CAL
MAY8E OK
1.4
TSX
TSXICK,2
TRA
RUN OFF
PXDI
TRA
ISARG
NEW PAIR
• SET IANS"O IF RUN OFF ARGUMENTS, AND LEAVE
PXDI PXO
0,0
• EXIT
••
STOANS STO
•• AI tANS)
LXD
CMPARP-3.2
L'XO
CMPARP-4.1
EXIT TRA
•• ,4
•• : 1ICMPARP) OR 21CMPARSI
• FOR MORE ARGUMENTS MAKE COMPARISON
ISARG ClA.
1,4
X1.X2 •••• IEITHER ENTRY)
TNZ
CAS
NZT2,4
SPECIAL TREATMENT
TRA
TKI2
FOR FIRST MAGNITUDE ZERO
CAS2,4
Y2,Y3, ••• OR X2,X3 ••••
CAS
TRA
*+2
TXI2 TXI
TXI1,4 •••
•• "-2 OR -1
• COMPARISON FAILS. RUN TO END OF ARGUMENTS. SET IANS. EXIT
CALX CAL
•• ,4
•• " IICMPARP) OR 2(CMPARS)
TSX
TSXZCK.2
TRA
*+2
END
TXI
CALX,4.-1
MORE
PXD
0,1
END
TRA
STOANS
• INTERNAL SUBROUTINE TO CHECK IF AC = TSX X,O
LINKAGE XR2
•
•
RETURNS TO 1,2 IF NOT, ~O 2,2 IF SO
TSXICK ANA
AMASK
lAS
TSXZ
TRA
*+2
TRA
2,2
YES
TRA
1,2
NO
• CONSTANTS. VARIABLES
AMASK OCT
777777700000
TSXZ TSX
O,D
KOMI PZE
2,0,-1
KDM2 PZE
1,0,-2
END

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
Olll
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150

21

••••••••••••• * ••••••••••
CMPARS
"•• * •••••••••••
"
*.***** •••
REFER 10
CMPIIRP

PROGRAM LI S TJ NGS

•• * •••••••••••••••• ** •••

"• ••• * CMPARS
•••••••••••••• * ••••"
REFER 10
CMPIIRP

•••••••••••••••••••••• *.

CMPARV
•••••••••••••••••••••
•
* •••

PROGRAM LJ STINGS

•
..

•.

.

•
..•

•

•

•
•
•
..
..
•

•

••

.
..•
•
•

••
•
..

•
•.

..

.
It

•..
It

..
•.
..
...
.
..

•

•

..
...
•

it

.
it

.

it

•
•.

.

CMPARV

•

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0155
0001
0002
0003
0004
0005
0006
0007
0008
0009
----ABSTRACT---0010
0011
TITLE - CMPARV WITH SECONDARY ENTRY CMPARL
FAST COMPARE TWO ARBITRARY MOOE VECTORS FOR IDENTITY
0012
0013
CMPARL COMPARES TWO VECTORS, VIII) AND V2II) I-l ••• LV,
0014
ELEMENT BY ELEMENT (36 BIT COMPARISON) CHECKING FOR
001S
IDENTITY. IT EITHER CONFIRMS THAT THE TWO VECTORS ARE
0016
IDENTICAL OR, IF THEY ARE NOT, IT RETURNS THE FIRST INDEX
0011
FOR WHICH THE ELEMENTS WERE FOUND TO DIFFER.
0018
0019
CMPARV IS IDENTICAL TO CMPARL EXCEPT THAT IT CONSIDERS
0020
+0 TO BE THE SAME AS -0 •
0021
OOZLY-2
0020
WHERE
0021
LX AND LY ARE INPUT PARAMETERS
0022
YIK) IS ASSUMED = 0.0 FOR K OUTSIDE OF
0023
0024
THE RANGE 0 TO LY-l
0025
NOTE THAT THE CONVOLUTION IS INDEPENDENT OF THE ORDER
OF THE INPUTS X AND Y•
0026
0027
CONVLV-II IS A FAP PROGRAM FUNCTIONALLY IDENTICAL TO THE
0028
FORTRAN PROGRAM CONVLV BUT IS ABOUT 35 PERCENT FASTER.
0029
0030
LANGUAGE - FAP SUBROUTINE (FORTRAN II COMPATIBLE)
0031
0032
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
56
REGISTERS
0033
STORAGE
0034
ABOUT
.32
(LX-LY)
MILLISEC
ON
709
SPEED
0035
.051 - ILX-LY) MILLISEC ON 7090
AUTHOR
- J. CLAERBOUT AND R. WIGGINS
0036
0037
----USAGE---0038
0039
0040
TRANSFER VECTOR CONTAINS ROUTINES - (NONE)
AND FORTRAN SYSTEM ROUTINES - INONE)
0041
0042
FORTRAN USAGE
0043
CALL CONVLVILX,XX,LY,YY,CC)
0044
0045
0046
INPUTS
0047
IS NO. OF TERMS IN X VECTOR
0048
LX
FOR MAXIMUM SPEED THE X VECTOR SHOULD BE THE LONGEST
0049
IF X AND Y HAVE DIFFERENT LENGTHS
0050
MUST EXCEED ZERO IPROGRAM EXITS IF ZERO OR LESS)
0051
0052
XXII )
I=I, ••• ,LX CONTAINS X(0), ••• ,XILX-1) RESPECTIVELY
0053
0054
0055
LY
IS NO. OF TERMS IN Y VECTOR
MUST EXCEEO ZERO (PROGRAM EXITS IF ZERO OR LESS)
0056
0057
0058
YYI I)
l:l ••• LY
CONTAINS YIO), ••• ,YILY-1) RBSPECTIVElY
0059
EQUIVALENCE (XX,YY) IS PERMITTED
0060
OUTPUTS
0061
0062
0063
CCII)
I=I, ••• ,LX+LY-l CONTAINS CIO), ••• ,CILX+lY-2) RESPECTIVELY
WHERE C(I) IS GIVEN IN ABSTRACT
0061t
0065
0066
EXAMPLES
0067
006B
1. SHOWING REVERSIBILITY OF X AND Y
0069
INPUTS - lX : 3 XX(I ••• 3) = 1.,2.,3.
0010
lY = 2 YY(I ••• 2) = 10.,1.
0071
CALL CONVLVILX,XX,LY,YY,CCl)
0072
USAGE
CALL CONVLVILY,YY,LX,XX,C(2)
0013
10/2/64

••••••••••••••••••••••••

.
CONVLV-I I
•••••••••••••••••••••
***.
IPAGE

PROGRAM LISTINGS

2)

.
•

••••••••• * ••••••••••••••

CONVLV-II
•.........•...........
_.•
•

IPAGE

OUTPUTS - CC111 ••• 4) = CC211 ••• 4)

= 10.,21.,32.,3.

• 2. ILLEGAL INPUT CASES INO OUTPUT)
•
INPUTS - SAME AS EXAMPLE 1. EXCEPT START WITH OUTPUT VECTORS
•
CLEANEO, I.E. CClI1 ••• 41 = CC211 ••• 41 = 0.,0.,0.,0.
..
USAGE
CALL CONVLVI-2.XX,LY,YY,CCl)
..
CALL CONVLVILX,XX,0,YY.CC21
..
OUTPUTS
CClI1 ••• 41
0 •• 0 •• 0 •• 0.
(ILLEGAL LX)
•
CC2(1 ••• 4) = 0 •• 0.,0 •• 0.
(ILLEGAL LY)

.

• PROGRAM FOLLOWS BELOW
• IN PROGRAM NOTES BELOW
..
X=XX
..
Y=YY
..
C=CC
HTR
0
HTR
0
HTR
BCI
I.CONVLV
CONVLV SXD
CONVLV-4.1
SXD
CONVLV-3.2
SXD
CDNVLV-2.4
CLA.
1.4
GET AND SET UP
ARS
18
STA
LADl
LENGTH OF X SERIES.
TMI
LEAVE
TlE
LEAVE
ClA..
3.4
GET AND SET UP
ARS
18
LENGTH OF
STA
lAD2
Y SERIES.
TMI
LEAVE
TZE
LEAVE
CLA
2.4
SET
ADO
=1
UP
STA
S2
ADDRESS.
ClA
4.4
SET
ADO
=1
UP
STA
S1
ADDRESS.
ClA
5.4
SET UP
SUB
LAD2
ADDRESS
ADD
=2
EQUAL TO
STA
S3
LOCIC)-lY+2.
STA
S4
CLA
5.4
ADO
=1
STA
Z
=BES C
CLA
LADI
ADD
LAD2
SUB
=1
PAX.l
LC=LX+LY-l GOES TO XRl
•
FILL
ANSWER BLOCK WITH ZEROS
Z
STZ
.".1
TI X
*-1.1,1
LXA
LAD2.2
..
OUTER
LOOP
S
lXA
LADl.1
..
CENTRAL lOOP
SI
LDQ
" •• 2
**=BES Y
S2
FMP
•• ,1
**=BES X
S3
FAD
.".1
."=BES C -LY+1 (INITIALLY)
S4
STO
•• ,1
•• =BES C -LY+1 (INITIALLY)
TIX
Sltl,l
..
END CENTRAL LOOP
CLA
S3
RESET CENTRAL
ADO
=1
LOOP FOR
STA
S3
THE NfXT
STA
S4
LAG.
TIX
S,2.1
..
END OF OUTER LOOP
LEAVE LXD
CONVLV-4,1
LXD
CONVLV-3,2
TRA
6,4
LADI PZE
LENGTH X SERIES IN ADDR.
LAD2 PlE
LENGTH Y SERIES IN ADDR.
END

°

0074
0075
0076
0017
0018
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148

2)

·.** •••.•••••.•••••••.••

COSISP
••••••••
* •••••• * •••• ***.*
REFER TO
COSP

PROGRAM LISTINGS

•••• **.*.*** ••• **.*****.

*
*• •••• COSISP
******.***.*** •• ***
REFER TO
COSP

••••••••••••••••••••••••

COSISI
•................
__

......•

PROGRAM LISTINGS

••••••••••••••••••••••••

• COSISI
•..•.........•....•....
-*

•
COSISI ISUBROUTINEI
9/10/64
LAST CARD IN DECK IS NO. 0263
•
LABEL
0001
CCOSISI
0002
SUBROUTINE COSIS! (JOB,XX,LX,COSTAB,SINTAB,M,JMIN,JMAX.
0003
1
CTR,STR,AOD.SPACE,IANSI
0004
C
0005
C
0006
----ABSTRACT---0007
C
C
OOOB
C TITLE - COSISI
0009
C
FAST COSINE AND/OR SINE TRANSFORMS OF ODD-LENGTH SERIES
0010
C
0011
COSISI PRODUCES A HIGH-SPEED COSINE AND/OR SINE TRANSFORM
C
0012
lOR PORTION THEREOF I FROM AN ODD-LENGTH SERIES XCI),
C
0013
I=-N,-N+l, ••• ,N
C
0014
C
0015
C
N
0016
CTC JI
SUM
C
0017
E
I=-N
0018
AND/OR
C
0019
C
N
0020
SUM
STC JI
0021
C
C
I=-N
0022
0023
C
FOR J = JMIN,JMIN+l, •••• JMAX
C
0024
WHERE
C
0025
C
PI = 3.14159265
0026
C
N,M.JMIN AND JMAX ARE INPUT PARAMETERS
0027
C
COSIJ*PI/MI AND/OR SINIJ*PI/MI J=O,l, ••• ,M
0028
C
ARE REQUIRED AS INPUT TABLES
0029
o LSTHN= JMIN LSTHN JMAX LSTHN= M
C
0030
C
0031
ATTAINED
BY
C
SPEED IS
0032
1. SPLITTING THE XII) SERIES INTO ODD AND EVEN
0033
C
PARTS AND, IF N=M, RESPLITTING THESE INTO
C
0034
C
THEIR ODD AND EVEN SUBPARTS.
0035
C
0036
C
2. USING THE HIGH-SPEED LOOPING LOGIC OF SUBROUTINE
0037
C
COSISP TO PERFORM THE TRANSFORMATIONS OF THE
0038
C
SHORTENED SUBPARTS.
0039
0040
C
C
AN OPTION IS PROVIDED FOR ADDING CTCII AND OR STII) TO
0041
THE OUTPUT AREA RATHER THAN STORING THEM THERE.
C
0042
C
0043
0044
C
2*N+4 TEMPORARY REGISTERS ARE REQUIRED BY COSISI UNLESS
THE USER IS WILLING TO SACRIFICE XII) lIN WHICH 3 EXTRA
C
0045
REGISTERS BEHIND XIII ARE NEEDED).
C
0046
C
0047
C LANGUAGE
- FORTRAN.II SUBROUTINE
004B
C EQUIPMENT
- 709 OR 7090 IMAIN FRAME ONLYI
0049
C STORAGE
- 406 REGISTERS
0050
- FOR M=N COSIS! TAKES ABOUT
C SPEED
0051
20*M*IJMAX-JMIN+ll MACHINE CYCLES ION THE 70901
C
0052
C
TO PRODUCE EITHER THE SINE OR COSINE TRANSFORM,
0053
TWICE THAT TIME FOR BOTH.
C
0054
C
FOR M NOT= N SUBSTITUTE 2*N FOR M IN ABOVE FORMULA.
0055
C AUTHOR
- ~.A. WIGGINS, JUNE, 1963
GEOSCIENCE, INC.
0056
C
0057
C
0058
C
----USAGE---0059
C
0060
C TRANSFER VECTOR CONTAINS ROUTINES - CHPRTS,COSISP,COSP,IXCARG,MOVREV,
0061
C
SISP,SPLIT
0062
C
AND FORTRAN SYSTEM ROUTINES - NONE
0063
C
0064
0065
C FORTRAN USAGE
CALL COSISIIJOB,XX,LX,COSTAB,SINTAB,M,JMIN,JMAX,CTR,STR,ADD,
0066
C
1
SPACE,IANS)
0067
C
0068
C
0069
C
0070
C INPUTS
C
0071
JOB
INOICATES WHETHER USER DESIRES THE COSINE TRANSFORM, THE
C
0072
SINE TRANSFORM, OR BOTH.
0073
C
=1 INDICATES COSINE TRANSFORM ONLY.
C
0074

••••••••••••••••••••••••

COSIS!
•
•••••••••••••••••••••••••
IPAGE

21

PROGRAM LISTINGS

•••••• * •••••••••••••••••
COSISI
••••••••••••••••••••••••*

•

C
=2 INDICATES SINE TRANSFORM ONLY.
C
=3 INDICATES COSINE AND SINE TRANSFORMS.
C
C
XXIII
I=l, ••• ,LX CONTAINS THE SERIES XIJI. J=-N.-N+l ••••• N AS
C
DESCRiBED IN THE ABSTRACT.
C
C
LX
=2*N+l
C
MUS T EXCEED ZERO.
C
MUST BE ODD.
C
C
COSTABIII I=1 ••••• M+1 CONTAINS COSIJ*PI/MI J=O,l, ••• ,M
C
IS DUMMY ARGUMENT IF JOB=2
C
C
SINTABIII I=l ••••• M+l CONTAINS SINIJ*PI/MI J=O,l ••••• M
C
IS DUMMY ARGUMENT If JOB=l
C
C
M
MUST EXCEED 0
IF = N COSIS1 BECOMES MUCH MORE EFFICIENT - SEE SPEED.
C
C
C
JMIN
MUST BE NON-NEGATIVE.
C
C
JMAX
MUST BE GRTHN JMIN. LSTHN= M
C
C
ADD
=0. IMPLIES THAT OUTPUTS ARE TO BE STORED IN THE OUTPUT
C
AREA WITHOUT ADDITION.
C
NOT= O. IMPLIES THAT THE OUTPUTS ARE TO ADDED INTO THE
C
IJUTPUT AREA.
C
C
SPACEIII I=1 •••• ,LX+3 IS A BLOCK OF TEMPORARIES NEEDED BY COSISI.
C
MAY BE EQUIVALENT TO XXIII IXXIII WILL BE DESTROYEDI.
C
NOTE THAT 3 ADDITIONAL SPACES ARE NEEDED IN ADDITION TO
C
THE LENGTH OF XXIII.
C
C
C OUTPUTS
C
C
CTRIII
I=l •••• ,JMAX-JMIN+l CONTAINS CTIJI J=JMIN •••• ,JMAX AS
C
DEFINED IN THE A8STRACT.
C
IS DUMMY ARGUMENT If JOB=2
C
C
STRIII
I=I, ••• ,JMAX-JMIN+l CONTAINS STIJI J=JMIN, ••• ,JMAX AS
C
DEFINED IN THE A8STRACT.
C
IS DUMMY ARGUMENT IF JOB=l
C
ClANS
=0 NORM ALL Y
C
=1 IF JOB ILLEGAL INOT = 1,2. OR 31
C
=3 IF LX ILLEGAL ILSTHN= 0, OR 0001
=6 IF M ILLEGAL ILSTHN= 01
C
C
=7 IF JMIN ILLEGAL ILSTHN 01
C
=B IF JMAX ILLEGAL ILSTHN= JMIN, OR GRTHN MI
C
C
C EXAMPLES
C
C 1. COMPLETE SPECTRUM, NOT TRYING TO SAVE SPACE, 2*M+l NOT = LX
C
INPUTS
LX=7 XXll ••• 71 = -36.,-27.,-18.,2.,22.,33.,44.
C
M=2 COSTABll ••• 3) = 1.,0.,-1. SINTABll ••• 31 * 0.,1 •• 0.
C
JOB=3 JMIN=O JMAX=M ADD=O.
C
USAGE
CALL COSISI IJOB,XX,lX.COSTAB,SINTAB,M,JMIN,JMAX,
C
1
CTR,STR,ADD,SPACE,IANSI
C
OUTPUTS - I ANS=O
C
CTRll ••• 3)
20.,-4.,-4. STRll ••• 31 = 0.,-40 •• 0.
C
C 2. COMPLETE SPECTRJM SAVING SPACE, 2*M+l NOT= LX
C
INPUTS - SAME AS EXAMPLE 1.
C
USAGE
CALL COSISI IJOB.XX.LX,COSTAB,SINTAB.M,JMIN,JMAX.
C
1
CTR,STR.ADD,XX,IANSI
C
OUTPUTS - SAME AS EXAMPLE 1. EXCEPT XXll ••• 10) ARE DESTROYED.
C
C 3. COMPLETE COSINE SPECTRUM. NOT TRYING TO SAVE SPACE, 2*M+l=LX
C
INPUTS - LX=5 XXll ••• 5) = -17.,-5.,9.,7.,16.
C
M=2 COSTABll ••• 3) = 1.,0.,-1.
C
JOB=l JMIN=O JMAX=M ADD=O.
C
USAGE
CALL COSISI IJOB,XX,LX,COSTAB,DUMMY,M,JMIN.JMAX,
C
1
CTR,DUMMY,ADD,SPACE,IANSI

IPAGE

007~

0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0096
0099
0100
0101
0102
0103
0104
0105
0106
0107
0106
0109
0110
0111
0112
0113
0114
0115
0116
0117
0116
0119
0120
0121
0122
0123
0124
0125
0126
0127
0126
0129
0130
0131
0132
0133
0134
0135
0136
0137
0136
0139
0140
0141
0142
0143
0144
0145
0146
0147
0146
0149

21

••••••••••••••••••••••••
COSIS1
•
••••••••••••••••••••••••

PROGRAM LISTINGS

•

(PAGE

~

COSIS1

(PAGE

OUTPUTS - IANS=O
CTRll ••• 31 = 12.,8.,8.

C

C It. COMPLETE SINE SPECTRUM, NOT TRYING TO SAYE SPACE, 2*M+1=LX, AND
ADDING OUTPUT INTO OUTPUT AREA.
C
INPUTS - LX=5 XX(I ••• 5) = -17.,-5.,9.,7.,18.
C
M-2 SINTA811 ••• 31 = 0 •• 1., O. STRIl ••• 3 • • I., 1 •• 1.
JOB=2 JMIN=O JMAX=M ADD=l.
C
USAGE
CALL COSISI IJOB.XX.LX,DUMMY.SINTAB,M,JMIN,JMAX,
C
1
DUMMY,STR,ADD.SPACE,IANS)
C
C
OUTPUTS - IANS=O
STRI1 ••• 3) = 1., 13 •• 1.
C
C

C

C 5. ERROR EXITS W[TH NO COMPUTATION
USAGE
CALL COS[Sl lO,XX.3.COSTAB.S[NTA8.3.0,3.
C
t
CTR,STR,ADD,SPACE.IANS11
C
C
C
C

C
C
C
C

C
C

C
C

C
C
C

CALL COS[Sl 13,XX,2,COSTAB,S[NTAB.3,O.3,
CTR,STR,ADD,SPACE,1ANS21
CALL COS1Sl 13,XX,3,COSTAB,SINTAB,O,O,3,
1
CTR,STR,ADD,SPACE,IANS3J
CALL COSIS1 13,XX,3,COSTAB,SINTAB.3,-1,3,
1
CTR,STR,ADD,SPACE.IANS4)
CALL COSIS1 13,XX,3,COSTAB,SINTAB,3,5,It,
1
CTR,STR,ADD.SPACE,IANS5)
OUTPUTS - IANSl=l (ILLEGAL JOB)
IANS2=3 IILLEGAL LX)
[ANS3=6 I[LLEGAL MI
IANSIt=7 IILLEGAL JM[NI
IANS5=8 I [LLEGAL JMAX AND JMINI
t

C
C

•

• •••••••••••••••••••••••

3)

C
C

•..•...... ......•......

•

PROGRAM FOLLOWS

C

DIMENSION XXI21,CMI21
COMMON CM
J=JOB
L=LX
JMN=JMIN
JMX=JMAX
C CHECK LEGALITIES OF INPUT PARAMETERS
IAN=O
IF IJ.'It-JII 10,10,20
10
IAN=l
GO TO 999
20
[F IL .XMODFIL,211 30,30,40
30
I AN=3
GO TO 999
IF IMI 50,50,60
40
50
IAN=6
GO TO 999
60
IF IJMNI 70,80,80
70
IAN=7
GO TO 999
80
IF IJMX-JMNI 100,100,90
90
[F IM-JMXI 100,110,110
100 IAN=8
GO TO 999
110 CONTINUE
M1=M
[F IADDI 120.130,120
120 M1=-M1
130 CONT[NUE
N=L/2
LS=N+1
CALL IXCARG ISPACE,[SSI
[SA= I SS+LS+l
C SPLIT XX ONCE ONTO SPACE
CALL SPLIT IXX,L,1.,CMI[SSI,CMI[SA-111
CALL MOYREYIN,1,CMIISA-1),1,CMIISA+1',1)
CMIISA-U=O.
CMIISAI=O.
[SL"'ISS+L+2
CMI I SLI =0.
C CHECK [F FURTHER SPLITTING IS YALID
IF 1M-HI 300,200,300

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
018,6
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224

31

••••••••••••••••••••••••

COS.ISl
•
•••••••••••••••••••••••••
IPAGE

4)

PROGRAM LISTINGS

••••••••••••••••••••••••
•
COSISl
•
••••••••••••••••••••••••

C YES IT IS VALID
200 CONTI NUE
LSS=N12
GO TO 1210,230,210),J
C SPLIT AND REVERSE SYMMETRICAL PART
210 CONTINUE
IAS=ISS+lSS+l
CAll SPLIT ICMCISS),lS,I.,CMIISS),CMIIAS))
CALL CHPRTSCCMCISS),CMCIASl,lSl
GO TO C220,10,230),J
C ONLY COSINE TRANSFORM WANTED - CALL COSP.
220 CONTI NUE
CALL COSP ICMIJSSl,CMIIAS),lSS,COSTAB,Ml,JMN,JMX,I •• CTRJ
GO TO 999
C SPLIT AND REVERSE ANTI SYMMETRICAL PART
230 CONTINUE
IAA=ISA+lSS+l
CALL SPLIT ICMIISAl,lS,I.,CMltSAl,CMfIAA)l
CALL CHPRTSCCMCISAl,CMIIAA),LSl
GO TO IIO,240,2501,J
C ONLY SINE TRANSFORM WANTED - USE SISP
240 CONTINUE
.
CAll SISP ICMIISAl,CMCIAAI,LSS,SINTAB,MI,JMN.JMX,l.,STRl
GO TO 999
C BOTH COSINE AND SINE TRANSFORMS WANTED - USE COSISP
250 CONTINUE
. CALL COSISP ICMIISSI,CMIIAS),CMIISAI,CMIIAAI,LSS,COSTAB,SINTAB,
1
Ml,JMN,JMX,l.,CTR,STR)
GO TO 999
C FURTHER SPLITTING IS NOT VALID
300 CONTINUE
IAS"'ISS
IAA=ISA
LSS"'N
GO TO 1220,240,250l,J
C THAT'S ALL.
999 IANS=IAN
RETURN
END

I PAGE

0225
0226
0227
0228
0229

0230
0231
0232
0233

0234

0235
0236.

0237
0238
0239
0240
021t1
0242
0243

0244
0245
0246
0247

0248
0249
0250
0251
0252
0253
0254
0255
0256

0257
0258
0259
0260
0261
0262
0263

4)

..••••••••••••••••••••••••
.
casp

PROGRAM 1I STINGS

••••••••••••••••••••••••

...
•.
•.
..
..

..
.

...-

--..
.
.--.
.
.-.
•

•

..

...

•.
•
...

•
•
.•

.

•
•.

.

•

.--

--

•

LAST CARD IN DECK IS NO. 0811
0001
0002
COUNT
1000
0003
LBL
COSP
0004
ENTRY
COSP ISSX,ASX,L,COSTAB,M,JMIN,JMAX,TYPE,COSTRl
0005
SISP ISAX,AAX,L,SINTAB,M,JMIN,JMAX,TYPE,SINTRl
ENTRY
0006
COSISP ISSX,ASX,SAX,AAX,L,COSTAB,SINTAB,M,JMIN.JMAX,TYPE.
ENTRY
0001
CDSTR,SINTRl
0008
0009
----ABSTRACT---0010
0011
TITLE - COSP WITH SECONDARY ENTRY POINTS SISP AND COSISP
0012
FAST COSINE AND/OR SINE TRANSFORMS FROM 2 OR 4 EVEN-ODD PARTS
0013
0014
COSP COMPUTES COSINE SUMS, CTIJI J=JMIN, ••• ,JMAX , ON
0015
TWO INPUT SERIES, SS!II AND ASIII I=O,l, ••• ,L , ACCORDING
0016
TO
L
0017
SUM I SSIII.COSII.J*IPI/MII.
J EVEN
0018
1:0
0019
CTIJI =
0020
L
0021
0022
SUM I ASIII*COSII-J*IPI/MII
J 000
1=0
0023
0024
FOR J =JMIN,JMIN+1, ••• ,JMAX
0025
WHERE
0026
PI = 3.14159265
0027,
M '" INPUT PARAMETER
0028
COSII*IPI/MII I=O,l, ••• ,M IS AN INPUT TABLE
0029
SSIII,ASIII, MAY BE EITHER FIXED OR FLOATING POINT
0030
ITHE COSINE TABLE MUST CORRESPOND IN TYPEI
0031
o LSTHN= JMIN LSTHN JMAX LSTHN= M
0032
0033
SISP COMPUTES SINE SUMS, STIJI
0034
0035
L
SUM 1 AAIIl*SINII*J*IPI/MII
J EVEN
0036
0037
1=0
Sf( Jl
0038
0039
L
SUM I SAIII*SINII*J-IPI/MII
0040
J ODD
1=0
0041
0042
FOR J = JMIN,JMIN+1, ••• ,JMAX
0043
WHERE
0044
SINII*IPI/MII I=O,l, ••• ,M IS AN INPUT TABLE
0045
AA,SA, AND THE SINE TABLE ARE FIXED OR FLOATING
0046
0047
COSISP COMPUTES BOTH CTIJ) AND STIJ) AS DEFINED ABOVE
0048
0049
AN OPTION IS PROVIDED FOR ADDING THE TRANSFORMS INTO THE
0050
OUTPUT AREAS.
0051
0052
NOTE THAT THE FUNDAMENTAL FREQUENCY AS DEFINED BY THE
0053
0054
INPUT TABLES HAS PERIOD'" EVEN NO. OF POINTS
2M
0055
0056
LANGUAGE - FAP SUBROUTINE IFORTRAN II COMPATIBLE)
0057
EQUIPMENT - 109 OR 1090 IMAIN FRAME ONLYl
0058
STORAGE
- 504 REGISTERS
109-FIXED PT
109-FLDATING PT
0059
SPEED
MACHINE CYCLES
0060
COSP
34*K*ll+ll
31-K*ll+ll
MACHINE CYCLES
SISP
39*K*ll+ll
43.K-IL+l1
0061
MACHINE CYCLES
COSISP 61*K*IL+11
12.K-IL+11
0062
WHERE K '" JMAX-JMIN+l
0063
IREDUCE ESTIMATES ABOUT 10 PERCENT FOR 10901
0064
- S.M. SIMPSON, OCT 26, 61
0065
AUTHOR
0066
0067
----USAGE---0068
0069
TRANSFER VECTOR CONTAINS ROUTINES NONE
0010
AND FORTRAN SYSTEM ROUTINES NONE
0071
0012
FORTRAN USAGE OF COSP
CALL COSP !SSX,ASX,l,COSTAB,M,JMIN,JMAX,TYPE,COSTRl
0073
0074

---

..
•

...

-

COSP ISUBROUTINEI
FAP

•••••••••• ** ••••••••••••
.•••••••••••
.
casp
** •••••••••••

9/29/64

.••••••••••••••••••••••••
casp
•
................
_...... .
IPAGE

••••••••••••••••••••••••

PROGRAM LI STINGS

to

21

IPAGE

.. INPUTS TO COSP

•

..*..
•.*
.
..
..
..
..

..
..

..
..

SSXIIl

l=l ••• L+l

CONTAINS SSIJ) J=O,l, •••• L

FIXED OR FLOATING

ASXIII

l=l ••• L+l CONTAINS ASIJI J=O.l, •••• L
EQUIVALENCE ISSX,ASX) IS PERMITTED

FIXED OR FLOATING

L

MUST EXCEED 0

COSTABII) l=l ••• M+l CONTAINS COSIJ.PI/MI J= O.l •••• ,M
COSTAB IS FIXED OR FLOATING
FOR FIXEO POINT IT IS ASSUMED THAT THE BINARY POINT
IS BETWEEN THE SIGN BIT AND BIT 1 SO THAT VALUES
1.0 AND -1.0 SHOULD BE ENTERED AS OCTAL 377717717771
AND 717777777777 RESPECTIVELY. THE BINARY POINT OF
SSX AND ASX IS IMMATERIAL, BUT OVERFLOW MAY ARISE.
M

IS LENGTH OF COSTAB.

IF NEGATIVE, COSP ADDS TRANSFORM CT(II TO THE OUTPUT
BEFORE STORING IN THE OUTPUT AREA •
....
MUST NOT =0
LOWEST MULTIPLE OF FUNDAMENTAL DESIRED
.... JMIN
MUST BE GRTHN= 0 AND LSTHN JMAX
HIGHEST MULTIPLE OF FUNDAMENTAL DESIREO
.... JMAX DEFINES
MUST BE GRTHN JMIN AND LSTHN= M
SS.AS, AND COSTAB ARE FIXED PT •
.... TYPE =NOT=0.0 0.0SIGNIFIES
MEANS
SS.AS. AND COSTAB ARE FLTG. PT •
.. OUTPUTS FROM COSP
.
..
COSTRII) l=l ••• JMAX-JMIN+l CONTAINS CTIJI J=JMIN ••• JMAX AS
DEFINED IN ABSTRACT.
..•
IPROGRAM
EXITS WITHOUT COMPUTATION IF l.M,JMIN,
•..
OR JMAX I LlEGAlI
.... FORTRAN USAGE OF SISP
DEFIN~S

..

.
•
..
.

It

CALL SISP

ISAX,AAX,L.SINTAB,M,JMIN,JMAX.TYPE,SINTR)

INPUTS TO SISP
SAXI I I

l=l ••• L+l

AAXIII

l=l ••• L+l CONTAINS AAIJI J=O.l, ••• ,L
EQUIVALENCE ISAX,AAX) IS PERMITTED.

L

SAME MEANING AS FOR COSP

It

CONTAINS

SAIJI J=O,l, ••• ,L

It
It
It
It

•
•..

..

SINTABII I I=l ••• M+l CONTAINS SINIJ.PI/MI
M

SAME MEANING AS FOR COSP

JMIN

SAME MEANING AS FOR COSP

SAME MEANING AS FOR COSP
..• TYPE SAME
... OUTPUTS FROM SISP MEANING AS FOR COSP
... SINTRIII I=l ••• JMAX-JMIN+l CONTAINS STIJ)

.... FORTRAN USAGE
..
..

J=O,l ••••• M

JMAX

..

1

J=JMIN ••• JMAX AS

DEFINED IN ABSTRACT

OF COSISP
CALL COSISPISSX.ASX.SAX.AAX.L.COSTAB,SINTAB.M.JMIN.JMAX.
TYPE,COSTR.SINTRI

..
..... EXAMPLES
.

.

casp

••••••••••••••••••••••••

WHERE ARGUMENTS ARE THE SAME AS FOR COSP AND SISP
EQUIVALENCE ISSX,ASX.SAX.AAX) IS PERMITTED •

0075
0076
0077
007B
0079
OOBO
0081
0082
0083
0084
00B5
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
014B
0149

2)

••••••••••••••••••••••••
COSP
•
*••••••••••••••••••••••••
(PAGE

••••••••••••••••••••••••
COSP
*
••••••••••••••••••••••••

PROGRAM LISTINGS

*

31

IPAGE

* 1. USE OF COSP, SISP, COSISP WHEN ALL INPUTS EQUATED, FIXED AND
*
FLOATING, ALL FREQUENCIES
•
INPUTS - Xll ••• 4) = 1.,2.,3.,4.
IXll ••• 4)
100,200,300,400 La 3
•
COS'AB11 ••• 3)=1.0,0.0,-1.0 SINTABI1 ••• 3)-0.0,1.0,0.0 M=2
•
ICOST811 ••• 31=OCT377777777777,000000000000,777777777777
•
ISINTBll ••• 31=OCTOOOOOOOOOOOO,377777777777,000000000000
JMIN = 0
JMAX = 2
•
•
USAGE
CALL COSP IX,X,L,COSTAB,M,JMIN,JMAX,1.,CI1
•
CALL COSP IIX,IX,L,ICOSTB,M,JMIN,JMAX,O.,ICl)
CALL SISP IX,X,L,SINTA8.M,JMIN,JMAX,l.,SI)
•
*
CALL SISP IIX,IX.L,ISINTB,M,JMIN.JMAX,O •• ISl)
•
CALL COSISP IX.X,X.X,L,COSTA8.SINTA8.M.J"IN,JMAX.
1.,C2.S2)
*
•
CALL COSISP IIX,IX,IX,IX,l,ICOSTB,ISINTB,M,JMIN,
•
JMAX,0.,IC2,IS2)
•
OUTPUTS - ClI1 ••• 31 = C211 ••• 3)
10 •• -2.,-2.
SlI1 ••• 3) = S211 ••• 3) = 0.,-2.,0.
•
IC111 ••• 3) = IC211 ••• 3) = 1000,-200,-200
*
ISlI1 ••• 3) = IS211 ••• 31 • 0,-200.0

=

=

•

• 2. PARTIAL
•
INPUTS
•
USAGE
•
OUTPUTS
•
•
•

•

FREQUENCY COVERAGE
- SAME AS EXAMPLE 1. EXCEPT JMIN
- SAME AS EXAMPLE 1.
- ClI1 ••• 21 = C211 ••• 2)
-2 •• -2.
SlI1 ••• 21
S211 ••• 2) = -2.,0.
IClI1 ••• 2) = IC211 ••• 2) a -200,-200
ISlI1 ••• 21 = IS211 ••• 2) • -200,0

=

=

=

• 3. USE OF COSISP TO FINO COEFFICIENTS OF TRIGONOMETRICAl SERIES FOR
AN EVEN-LENGTH VECTOR
•
ISEE CARSLAW, 1930, FOURIER SERIES AND INTEGRALS. P324,325)
GIVEN XXII) 1=1 ••• 2.M CONTAINING XIJ) J=0,1, ••• ,2.M-1
•
FINO AIOI.All), ••• AIM) AND 8(1),812) •••• ,BIM-1) SUCH THAT
•

*

••
•
•
•
•
•
•

•

XIJ)=AIOI+AI1)COSIJ*0)+ ••• +A(M-1)COSIIJ-I).O)+AIM1COSIPI)
+BII1SINIJ.0)+ ••• +8IM-1)SINIIJ-1).0)
WHERE O=PI/M
J=0.1 •••• ,2.M-l
SOLUTION
INPUTS - COSTA811 ••• M+l) = COSIJ-PI/M) J . O.l, •••• M
SINTA811 ••• M+l) • SINIJ-PI/M) J
O.l •••• ,M
L = 2-M-l
USAGE
CALL COSISPIX,X,X,X,L.COSTAB.SINTA8,M,0.M.1.,AA.8B)
AAll) = AAIII/FLOATFI2-MI
AAIM+1) = AAIM+l1/FLOATFI2-MI
00 10 1~2,M
AAII)=AAII)/FLOATFIM)
10 BBII'=8B(I'/FLOATFIMI
OUTPUTS - AAll ••• M+l1 WILL CONTAIN AIOI.All, •••• AIM) AS nEQUIREO
8812 ••• M) WILL CONTAIN 811) •••• 8IM-l) AS REQUIRED
18Bll'=B8IM+l)=0.I

=

- 4. USE OF COSISP TO INVERT COEFFICIENTS OF TRIG SERIES FOR AN EVEN•
LENGTH VECTOR
GIVEN AIOI •••• AIMI Bll) ••• BIM-l1 AS DEFINED ABOVE
•
FINO XIJI = TRIG SERIES ABOVE
J = 0.1 ••••• 2.M-l
SOLUTION
•
INPUTS
AAII) AND BBIII ARE SAME AS UUTPUTS OF EXAMPLE 3.
•
USAGE
CALL COSISPIAA.AA.BB.BB,M,COSTAB,SINTAB,
•
1
M.O.M.l •• XS.XAI
•
12M=2.M
•
DO 20 1=2,M
•
J=I2M+2-I
XSIJI=XSIII
20
XAIJ)=-XAIII
•
DO 30 1=1,12M
30
XBACII)=XAII)+XSII)
OUTPUTS - XBACll ••• 2-MI WILL CONTAIN X(0.1, •••• 2.M-l1 AS REQUIRED

••
•
-

•

5. ILLUSTRATION OF FINDING TRIG SERIES
INPUTS - SAME AS EXAMPLE 1.
USAGE
- SAME AS EXAMPLE 3.
OUTPUTS - AAll ••• 31 = 2.5,-1 •• -.5
BBll ••• 31 • 0 •• -1.,0.

• 6. ILLUSTRATION OF INVERTING TRIG SERIES

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
01BO
0181
0182
01B3
0184
0185
0186
01B7
018B
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224

31

.
.••••••••••••••••••••••••
COSP

PROGRAM LISTINGS

COSP

••••••••••••••••••••••••

••••••••••••••••••••••••
(PAGE

4)

..
*
*

.*

...
_.•.......•..........
..
..
I PAGE

INPUTS - SAME AS EXAMPLE 5. WITH AA,BB. SAME AS OUTPUTS FROM EX 5.
USAGE
- SAME AS EXAMPLE 4.
OUTPUTS - XBACIl ••• 4) = 1 •• 2.,3.,4.

1. USE OF SYMMETRIES TO REDUCE TIME IN COMPUTING TRANSFORMS ABOUT
MIDPOINT OF AN ODD-LENGTH SERIES
GENERAL FORM
I=M
CI J) = SUM ( XI I )*COSI I"J*PI/M) )
I=-M
AND
I=M
SIJ) - SUM I X(I)"SINtI-J"PI/M) )
*
I=-M
J = JMIN ••• JMAX
..
SUPPOSE XI-6 ••• 6)-1.,3.,I.,2.,1.,I.,5.,4.,3.,3.,5.,4.,I.
FIRST SPLIT X ABOUT ITS MIDPOINT INTO ITS SYMMETRIC ANO
"
ANTISYMMETRIC PARTS
..
SXll ••• 7) = 5.,5.,4.,5.,6 •• 7.,2.
AXll ••• 7) = 0.,3.,2.,1.,4 •• 1.,0.
..
THEN SPLIT EACH OF THESE ABOUT THEIR MIDPOINTS
..
SSXll ••• 4) - 5 •• 10.,12.,1. ASXll ••• 4) = 0.,2.,2.,-3.
"
SAXl1 ••• 4) = 1.,6.,4.,0. AAXI1 ••• 4) = 0.,2.,-2.,0.
*
INPUTS - THEN REVERSE ALL THE VECTORS AND CHANGE SIGNS OF ASX
"
AAX TO GIVE
..
SSXll ••• 4) = 7.,12.,10.,5. ASXll ••• 4) = 3.,-2.,-2.,0.
•
SAXI1 ••• 4)
0 •• 4.,6.,1. AAXI1 ••• 4) = 0.,2 •• -2 •• 0.
"
L=3 M=6 C05TABII ••• 7)=CDSIJ.Pllhl
SINTABI1 ••• 7)=SINIJ"PI/6) J = 0 ••• 6
"USAGE
CALL COSISP ISSX,ASX,SAX.AAx,3,eOSTAB,SINTAB.M,0,M,
"
I.,COSTR,5INTR)
..
OUTPUTS - C05TRl1 ••• 1)
CIO ••• 6)
34.,.26195,3 •• 5.,1.,3.73205,0.
..
5INTRI1 ••• 1)
SI0 ••• 6) = 0.,8.19615,0 •• 3.,3.46410,
..
-2.19615,0.
*

...
..
.
..

=

....
.

•
..
•
"
*
..
..
..
"

....

..
"

..*.

8. AODITION OF OUTPUTS TO VALUES ALREAOY IN THE OUTPUT AREA
- SAME AS EXAMPLE 1. EXCEPT M=-2
ClI1 ••• 3) = C211 ••• 3) = 1.,2.,3.
5111 ••• 3) = 5211 ••• 3) = 1.,-1.,-2.
IC111 ••• 3)= IC211 ••• 3)= 100,200,300
15111 ••• 3)= 15211 ••• 3)= 100,-100,-200
USAGE
- SAME AS EXAMPLE 1.
CUTPUTS - C111 ••• 3) - C211 ••• 3) = 11 •• 0 •• 1.
SI11 ••• 3) = 5211 ••• 3) = 1.,-3 •• -2.
IClll ••• 3)= IC211 ••• 3)= 1100,0.100
ISlI1 ••• 3)= 15211 ••• 3)= 100.-300,-200
INPUTS

PROGRAM fOLLOWS BELOW
NOTATION DIFFERENCES IN PROGRAM NOTES ARE
RSS=SSX
~AS=ASX
RAA=AAX
RSA=SAX
P=L

HTR
0
BCI
1.COSP
COSP 5XD
*-2,4
SXA
LV+ltl
LV+2,2
SXA
KIO
CLA
5TA
EXIT
.SET ARGUMENT TABLE
CLA
1,4
STA
11
CLA
2.4
STA
T2
eLA.
3,4
T5
5TD
4,4
eLA
STA
T6
5.4
CLA"
STO
T8
eLA·
6.4
T9
5TD
7,4
CLA*

SET UP EXIT

0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0241
0248
0249
0250
0251
0252
0253
0254
0255
0256
0251
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0213
0214
0275
0216
0277
0278
0279
0280
0281
0282
02B3
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299

4)

-*
.........................
COSP
••..•.•...... -..........
(PAGE

PROGRAM LISTINGS

5)

no
STD
CL.A*
8.4
STO
Tl1
CLA
9.4
STA
Tl2
*SET COSP SWITCHES
KAla
CLA
STA
Z30
CLA
KA6
STA
133
CLA
KA15
STA
Zl06
CLA
KA19
STA
Zl098
CLA
KTl
STO
ZIl4
STO
1112
CLA
KT2
STO
ZI2lA
STO
ZI22A
TRA
Zl4
*SET EXIT
SISP SXO
COSP-2.4
SXA
LV+I,1
SXA
LV+2.2
CLA
KIO
STA
EXIT
ARGUMENT
TA8LE
-SET
1,4
CLA
STA
13
2,4
CLA
STA
T4
3,4
CLA*
STO
T5
4,4
CLA
STA
T7
5,4
CLA*
STO
T8
6,4
CLA*
T9
STD
7,4
CLA*
STO
no
8,4
CL.A*
STO
Tll
9,4
CLA
STA
Tt3
*SET SISP SWITCHES
CLA
KAl4
STA
no
KA9
CLA
STA
Z33
KA7
CLA
STA
Z56
STA
166
STA
Z76
STA
Z86
CLA
KA16
STA
Zl06
Kll
CLA
STO
Z114
STO
Z112
CLA
Kl2
Zl21A
STO
STO
ZI22A
TRA
Zl4
-SET EXI T
COSISP SXO
COSP-2,4
LV+ 1,1
SXA
SXA
LV+2,2
CLA
K14
STA
EXIT
-SET UP ARGUMENT TA8LE
1,4
CLA
STA
Tl
2,4
CLA

......... -....... _--_ ...

•..• *-_._. __ .-._. __ ..•.*

COSP

*

(PAGE

KA6
190

1107
1130

TRA

llO4

TRA

1102

KA9
150
1100

Z1l5

lET

SWE

lET

SWO

SET UP EXIT

0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311
0312
0313
0314
0315
0316
0317
0318
0319
0320
0321
0322
0323
0324
0325
0326
0327
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
fJ373

0374

5)

.••••••••••••••••••••••••
..
COSP
••••••••••••••••••••••••
IPAGE

PROGRAM LISTINGS

••••••••••••••••••••••••

..

61

STA
eLA
STA
CLA
STA
CLA..
STD
CUI
STA
CLA
STA
CLA"
STO
eLA*
STD

T2
3,4
T3
4,4
T4
5,4
T5
6,4
T6
7,4
T7

8,4
T8
9,4
T9
10,4

eosp

..

••••••••••••••••••••••••

CLA*
STO
no
eLA*
11,4
STO
Ttl
CLA
12,4
STA
Tl2
eLA
13,4
STA
Tl3
*SET COSISP SWITCHES
eLA
KA14
KA9
STA
l30
CLA
KA9
l50
STA
In
eLA
KA6
190
STA
l56
STA
l66
STA
Z16
STA
l86
eLA
KA15
ll07
STA
Zl06
CLA
Kll
lET SWE
STO
l1l4
STO
l1l2
CLA
Kl2
lET SWO
STO
Zl2lA
STO
1122A
CLA
KA16
ll15
STA
1l09B
TRA
Zl4
"MAKE COMMON SETTINGS FOR COSP, srsp, COSISP AS IF IT WERE COSISP
.FIRST FOR FIXED POINT OR FLOATING POINT
l14
lET
Til
TRA
lI5
FLOATING
eLA
MPY
FIXED
LDQ
ADO
TRA
116
l15
CLA
FMP
FLOATING
LDQ
FAD
l16
STO
l51
STO
l61
STO
l7l
STO
l81
STO
191
STQ
l52
STQ
l62
STQ
Z12
STQ
l82
STQ
192
STO
l54
STO
l64
STO
l74
STO
l84
STO
194
STQ
l55
STQ
l65
srQ
l15
STQ
l85
STQ
195
SLQ
Zl08
SLQ
Zl09A

IPAGE

0315
0316
0311
0318
0319
0380
0381
0382
0383
0384
0385
0386
0381
0388
0389
0390
0391
0392
0393
0394
0395
0396
0391
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0411
0418
0419
0420
0421
0422
0423
0424
0425
0426
0421
0428
0429
0430
0431
0432
0433
0434
0435
0436
0431
0438
0439
0440
0441
0442
0443
0444
0445
0446
0441
0448
0449

61

••••••••••••••••••••••••
.••••••••••••••••••••••••
.
casp
(PAGE

PROGRAM LISTINGS

11

SLQ
Z1l6
SLQ
Z1l8
CLA
KA2
SMSE
STA
l52
STA
l62
STA
Z12
STA
l82
CLA
KA3
SMSO
STA
l55
STA
l65
STA
115
STA
l85
CLA
KA4
SMCE
STA
In
CLA
KA5
SMCO
STA
195
-THEN ADDRESSES
CLA
T1
SINfAB (OR HASH)
STA
l50
STA
l53
STA
l60
STA
l63
STA
Z10
STA
In
STA
l80
STA
l83
CLA
T4
RAA (OR HASH)
STA
l51
STA
l6I
STA
l11
STA
l8I
CLA
T3
RSA lOR HASH)
STA
l54
STA
l64
STA
Z14
STA
l84
CLA
T6
COSTA8 (OR HASH)
STA
190
STA
zen
CLA
Tl
RSS (OR HASH)
S fA
Z91
CLA
T2
RAS (OR HASH)
STA
194
CLA
T8
M
TlE
LV
TMI
Zl7
CLA
1131A
STD
Zl08
STD
1l09A
STO
Z116
STO
lllS
CLA
T8
STD
l17
ZlOl
STD
Zl03
ADD
T8
2M
STD
2M
CLA
T5
P
TMI
LV
TZE
LV
STD
l105
CLA
Tl2
COSTR (OR HASH)
STA
Zl08
STA
1l09A
CLA
Tl3
SINTR (OR HASH)
STA
Z1l6
STA
lllS
-FOR JMIN EVEN SET JE=JMIN+l,JO=JMIN+l,ESTOR=O.OSTOR=l
JMIN ODD SET JOzJMIN.JE=JMIN+l),OSTOR=O,ESTOR=l
l20
CLA
T9
JMIN
TMI
LV
CAS
TlO
TRA
LV
TRA
LV
ARS
18
L8T

-

.••••••••••••••••••••••••
.
COSP
••••••••••••••••••••••••
(PAGE

0450
0451
0452
0453
0454
0455
0456
0451
0458
0459
0460
0461
0462
0463
0464
0465
0466
0461
0468
0469
0410
0411
0412
0413
0414
0415
0416
0411
0418
0419
0480
0481
048;>
0483
0484
0485
0486
0481
0488
0489
0490
0491
0492
0493
0494
0495
0496
0497
0498
0499
0500
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517
0518
0519
0520
0521
0522
0523
0524

11

••••••••••••••••••••••••

•

COSP

.

••••••••••••••••••••••••
(PAGE

81

PROGRAM LISTINGS

• •••••••••••••••••••••••

COSP
*
"••••••••••••••••••••••••

TRA
Z21
IS EVEN
IS ODD
ALS
18
STD
JO
ADD
KDl
STD
JE
STZ
OSTOR
CLA
Kl
STA
ESTOR
TRA
123
ALS
18
IS EVEN
121
STD
JE
ADD
KDl
STD
JO
STZ
ESTOR
CLA
Kl
STA
OSTOR
-CLEAR DUMMV SWITCHES
123
STl
DUME
STl
DUMO
"NOW BEGIN LOOPING
.. INITIALIZE Zl05 SWITCH, CLEAR SUM REGISTERS, SET TRAVEL SWITCHES
" FORWARD
(**=KA6 COSP. *"=KA9 OTHERWISE)
Z30
CLA
""
STA
Zl05
STl
SMSE
STZ
SMSO
STl
SMCE
STl
SMCO
STl
SWE
STZ
SWO
CLA
JE
STO
ZlOO
CLA
JO
STO
Zl02
"SET MINUS JE.JO
LDC
JE,l
SXD
MJE, 1
LOC
JO,1
SXO
MJO.l
"XR4 WILL CONTROL MOTION FOR EVEN HARMONIC INDEX
"XR2 WILL CONTROL MOTION FOR 000 HARMONIC INDEX
"XRl WILL CONTROL MOTION FOR DATA INDEX
"DATA INDEX=SINE INDEX=COSINE INDEX=O
AXT
0,7
133
TRA
It.
(""=190 FOR COSP, =Z50 OTHERWISE)
-LOOP FOR FORWARD MOTION ON SINE WAVE FOR BOTH HARMONICS
THIS PART IS FOR EVEN HARMONICS (XR41 SUMMED IN SMSE
Z50
LOQ
*",4
(*"=SINTAB)
151
NOP
(MPV OR FMP $$,1 WITH "* = RAAI
Z52
NOP
(ADD OR FAD SMSEI
STO
SMSE
HARMONICS
(XR21, SUMMED IN SMSO
THIS
PART
IS
FOR
ODD
• Z53 LOQ
( **=SINTAB)
*",2
(MPV OR FMP *.,1 wITH ""=RSA)
Z54
NOP
(ADD OR FAD SMSO
155
NOP
STO
SMSO
"NOW GO TO COSINE SUMS IF COSISP, OR AVOID IF SISP
(""=Z90 FOR COSISP, ""=lI00 FOR SISPI
TRA
""
Z56
-LOOP FOR FORWARD MOTION ON SINE WAVE OF EVEN HARMONIC AND
"
REVERSE MOTION ON SINE WAVE OF 000 HARMONIC
FOR EVEN
( **=SINTAB)
Z60
LOQ
··,4
(MPV OR FMP *",1 WITH 1t"=RAA)
l61
NOP
(ADO OR FAD SMSEI
Z62
NOP
S,.,SE
STO
ODD
"163 FORCLS
( **=SINTAB)
XCA
(MPV OR FMP *",1 WITH "*=RSA)
NOP
l64
(ADO OR FAD S,.,SO)
Z65
NOP
STO
SMSO
TRA
""
(""=Z90 IF COSISP, **=Z100 IF SISP)
Z66
*LOOP FOR REVERSE ,.,OTION ON SINE WAVE OF EVEN HARMONIC AND
MOTION ON SINE WAVE OF ODD HARMONIC
" FORFORWARD
EVEN

"

(PAGE

0525
0526
0527
0528
0529
0530
0531
0532
0533
0534
0535
0536
0537
0538
0539
0540
0541
0542
0543
0544
0545
0546
0547
0548
0549
0550
0551
0552
0553
0554
0555
0556
0557
0558
0559
0560
0561
0562
0563
0564
0565
0566
0567
0568
0569
0570
0571
0'>72
0573
0574
0575
0576
0577
0578
0579
0580
0581
0582
0583
0584
0585
0586
0587
0588
0589
0590
0591
0592
0593
0594
0595
0596
0597
0598
0599

8)

••••••••••••••••••••••••

COSP
•
"••••••••••••••••••••••••
(PAGE

9'

PROGRAM LISTINGS

•••• * •••••••••••••••••••
..

COSP

(PAGE

l70

CLS
(**=SINTABI
XCA
NOP
(MPY
OR FMP **,1 WITH **=RAA'
Z71
NOP
Z72
(ADD OR FAD SMSE'
STO
SMSE
FOR ODD
l73
LDQ
(""=SINTABI
··,2
174
NOP
(MPY OR FMP **.1 WITH ."=RSAI
l75
NOP
(ADD OR FAD SMSOI
STO
SMSO
( •• =Z9D COSISP, *.=lI00 IF SISP)
Z76 TRA
**
*LODP FOR REVERSE MOTION ON SINE WAVE FOR BOTH HARMONICS
*
THIS PART IS FOR EVEN HARMONICS
("=SINTABI
l80
CLS
"*,4
XCA
(MPY OR FMP •• ,1 WITH **=RAA I
NOP
l81
NOP
l82
(ADD OR FAD SMSE'
STO
SMSE
THIS PART IS FOR ODD HARMONICS
*
•• ,2
(."=SINTAB'
CLS
l83
XCA
(MPY OR FMP •• ,1
Z84
NOP
WITH *"=RSA)
l85
(ADD OR FAD SMSQI
NOP
STO
SMSO
"NOW GO TO COSINE SUMS IF COSISP, OR AVOID IF SISP
l86
TRA
"*
(**=l90 FOR COSISP, "*=ZI00 FOR SISPI
"LOOP FOR FORWARD OR BACKWARD MOTION ON COSINE WAVE
"
THIS PART FOR EVEN HARMONICS
SUMMED IN SMCE
190
LDQ
•• ,4
(**=COSTAO'
191
NOP
(MPY OR FMP **,1 WITH **=RSSI
192
NOP
(ADD OR FAD SMCE'
STO
SMCE
PART IS FOR ODD HARMONICS
SUMMED IN SMCO
"193 THIS
LDQ
**,2
( "-COSTABI
(MPY OR FMP •• ,1 WITH ""=RASI
Z94
NOP
(ADD OR FAD SMCD'
Z95
NOP
STO
SMCO
-INCREMENT INDEX FOR EVEN HARMONICS (BY +JE FOR FORWARD
*
TRAVEL, BY -JE FOR REVERSE TRAVEL'
*.1,4,**
(**=JE FORWARD'
(**=-JE REVERSE'
Z100 TXI
-CHECK IF INDEX HAS RUN OFF END (GREATER THAN M FOR
*
FORWARD TRAVEL, LESS THAN ZERO FOR REVERSE'
(HOWEVER FOR REVERSE TRAVEL XR4 GOING NEGATIVE MEANS
"
XR4 GETS GREATER THAN M, SO SAME TEST APPLIES'
l101 TXH
ZI20,4,**
"*=M
-INCREMENT INDEX FOR ODD HARMONICS (RY+JO OR -(JOII
*
AND MAKE SAME KIND OF END TEST
("=-JO REVERSE)
Z102 TXI
"+1,2,"*
(**=JO FORWARD'
l103 TXH
lI10,2,**
(**=MI
AND CHECK FOR END OF OATA
-INCREMENT DATA INDEX BY
"
LOOPING BACK TO PLACE OETERMINED 8Y WHETHER COSP OR
"
SISP OR COSISP ANO FORWARD OR BACKWARD AND EVEN OR ODD
l104 TXI
*.1,1,1
•• B=PI
(TXL **A,I,'HB
l105 TXL
**,1,**
**A=Z90 FOR CDSP
"
FOR SISP OR COSISP (INITIAL = l501
**A-ZSO EVEN AND 000 HARMONICS FORWARO
"
""A-l60 EVEN FORWARD, ODD REVERSE
""A=Z70 EVEN REVERSE, ODD FORWARD
"
"*A=ZSO EVEN AND ODD REVERSE
(**-l107 FOR COSP OR COSISP,
Zl06 TRA
..=lllS FOR SISPI
-READJUSTMENTS WHEN DOD HARMONIC INDEX RUNS OFF END
-FORWARD OR BACKWARD
lll0 lET
SWO
BACKWARD
TRA
Zl13
CLA
KI
STO
SWO
*IF FORWARD SET TO GO BACKWARD ON ODD
Zill SXD
TEMP,2
CLA
2M
SUB
TEMP
POX
0,2
CLA
MJO
STD
Zl02

-

.
.

-•

*

• •••••••••••••••••••••••

*.

0600
0601
0602
0603
0604
0605
0606
0601
0608
0609
0610
0611
0612
0613
0614
0615
0616
0617
0618
0619
0610
0621
0622
0623
0624
0625
0626
0621
0628
0629
0630
0631
0632
0633
0634
0635
0636
0631
0638
0639
0640
0641
0642
0643
0644
0645
0646
0641
0648
0649
0650
0651
0652
0653
0654
0655
0656
0651
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669
0670
0671

0672
0673

0674

9'

••••••••••••••••••••••••

•

COSP

•

••••••••••••••••••••••••
COSP
•
• •••••••••••••••••••••••

PROGRAM LISTINGS

•

••••••••••••••••••••••••
(PAGE 10)

(PAGE 10)

l105

OR

SISP OR COSISP
lET S~I

l50)

l701
RUNS OFF END

AND DECREM OF TXI

.......... -............ .
'it

•

COSP

••••••••••••••••••••••••
(PAGE 111

PROGRAM LISTINGS

•..•............... _....

•

COSP

-If NOT STORE SMCO IN COSTR BLOCK
LXA
OSTOR,4
CLA
SMCO
Zl09A ADO
-.,4
, **=COSTRI
--I
STO.
ZI09B TRA
_.
( •• =lI15 COSISP, **=l130 COSP)
*COSISP OR SISP RESULT STORAGE FOR SINE TRANSFORMS
*WAS LAST EVEN HARMONIC A DUMMY
ll15 ZET
DUME
TRA
ll11
YES
.IF NOT STORE SMSE IN SINTR BLOCK
LXA
ESTOR,4
CLA
SMSE
l116 ADO
*.,4
[ **=SINTRI
*-1
STO.
-WAS LAST ODD HARMONIC A DUMMY
ll11 lET
DUMO
TRA
l130
YES
*IF NOT STORE SMSO IN SINTR BLOCK
LXA
OSTOR,4
CLA
SMSl1
lll8 ADO
*.,4
[**=SINTR)
STO.
.-1
-RESET FOR NEXT LOOP STORAGE
l130 CLA
ESTOR
ADO
K2
STO
ESTOR
CLA
OSTOR
ADO
K2
STO
OSTOR
*INDEX JE BY TWO AND CHECK IF TOO 8IG
CLA
JE
ADO
KD2
STO
JE
CAS
no
COMPARE WITH JMAX
TRA
Zl35
TOO BIG
NOP
OK
-If NEW JE OK, INDEX JO 8Y TWO AND CHECK ITS SIZE
JO
1131 CLA
ADD
KD2
STO
JO
CAS
no
TRA
lIB
TOO BIG
Zl3lA NOP
OK
*RETURN TO BEGINNING OF LOOP
Zl32 TRA
Z30
-If JO TOO BIG SET SWITCH
ZlB CLA
K1
STO
DUMO
*IS JE ALSO TOO BIG
DUME
lET
TRA
LV
YES - ALL FINISHED
TRA
Zl32
NO - ONE MORE TO GO
*IF JE TOO BIG SET SWITCH
K1
l135 CLA
STO
DUME
TRA
Zl31
GO CHECK JO
-FINAL EXIT
LV
LXD
COSP-2,4
[.-=IRll
AXT
·*,1
•• ,2
AXT
[·"=IR2)
•• ,4
EXIT TRA
[**=10 FOR COSP OR SISP, .*=14 FOR COSISP)
*CONSTANTS. TEMPORARIES, ETC
, **=0 WHILE EVEN HARMONIC GOING FORWARDS I
SWE PZE
••
(**=1 WHILE EVEN HARMONIC GOING BACKWARD)
•
( **=0 WHILE ODD HARMONIC FORWARDS)
SWO PZE
*.
( **=1 WHILE ODD HARMONIC 8ACKWARDS)
• JE PZE
**=JE
0,0.**
MJE
PlE
0,0,*.
* .. =25 COMP OF JE
0,0, ••
PZE
JO
''''=JO
MJO
PlE
0,0,**
**=25 COMP OF JO
DUME PZE
[**=0 FOR REAL EVEN,-"=l FOR DUMMY EVEN I
••
DUMO PZE
(**=0 FOR REAL 000,*.=1 FOR DUMMY 0001
-*
ESTOR PlE
' •• =ZERO INDEX OF INITIAL EVEN HARMONIC STORAGE)
(**=ZERO INDEX OF INITIAL 000 HARMONIC STORAGE)
OSTOR PZE
.*

..

•

••••••••••••••••••••••••
(PAGE III
0150
0151
0152
0153
0154
0155
0156
0151
0758
0159
0160
0761
0762
0763
0764
0765
0766
0767
0768
0769
0770
0771
0772
0773
0774
0775
0776
0777
0778
0779
0780
0781
0782
0783
0784
0785
0786
0787
0788
0789
0790
0791
0792
0193
0194
0195
0796
0191
0198
0199
0800
0801
0802
0803
0804
0805
0806
0801
0808
0809
0810
0811
0812
0813
0814
0815
0816
0811
0818
0819
0820
0821
0822
0823
0824

••••••••••••••••••••••••

COSP
•
•••••••••••••••••••••••••

PROGRAM LISTINGS

13

T4
T5
T6
T7

T8
T9
flO
fll
Tl2
Tl3
KO
Kl
K2
KI0
K14
KTl
KT2
KZl
KZ2
K01
KD2
KA2
KA3
KA4
KA5
KA6
KA7
KA8
KA9
KAI0
KAll
KA12
KA13
KA14
KA15
KA16
KA17
KAl8
KA19

MPY
FMP
ADD
FAD
PZE
PZE
PlE
pze
PIe
pze
PIE
PIE
PIe
PU
PZE
PZE
PZE
PZE
PZE
PIe
PIE
PZE
PIe
pze
PIe
PZE
pze
PZE:
TRA
TRA
lET
ZET
pze
PZE
PIe
PZE
pze
PZE
PZE
PZE
PZE
PZE
PZE
PZE
PZE
pze
PZE
PZE
pze
PZE
pze
PlE
END

••••••••••••••••••••••••
(PAGE 121

(PAGE 121

MPY
FMP
ADD
FAD
SMSE
SMSO
SMce
SMCO
2M
TEMP
Tl
T2

.
COSP
•••••••••••••••••••••••••

··.1
••• 1

••
••
••

...
-••

0.0, ••

••
••
••
••
••
0,0 •••
••

_.

0,0.·.
0.0, ••
0.0 ....

••
••
••
0
1

2
10
14
Zl04
1102
SWE
SWO
0,0.1
0.0.2
SMSE
SMSD
SMce
SMCD
Z90
1100

no

Z50
Z60
Z70
Z80
KA8
KA9
1107
Zll5
1120
KA6
1130

SUM FOR
SUM FOR
SUM FOR
SUM FOR
'''·=2MI

EveN HARMONIC SINE T~ANSFORM
ODD HARMONIC SINE TRANSFORM
eVEN HARMONIC COSINe TRANSFORM
000 HARMONIC COSINe TRANSFORM

(**"RSS)
\.·=RAS)
' ..... RSAI
( _·=RAA)
I ._=P I
(··=COSTA81
\**=SINTABI
' •• =M)
Cu=JMINI
\ •• =JMAX I
'''=Typel
C.... COSTRI
' •• =SINTRI

0825
0826
0827
0828
0829
0830
0831
0832
0833
0834
0835
0836
0837
0838
0839
0840
0841
0842
0843
01144
0845
0846
0847
0848
0849
0850
0851
0852
0853
0854
0855
0856
0857
0858
0859
0860
0861
0862
0863
0864
0865
0866
0867
0868
0869
0870
0871
0872
0873
0874
0875
0876
0877

••••••••••••••••••••••••

PROGRAM LISTINGS

"••••••COSTBl
*.* •••••••••• ••••"

lAST CARO IN OECK IS NO. 0199
0001
0002
0003
0004
0005
0006
0001
0008
0009
"
----ABSTRACT---0010
"
0011
"" TITLE - COSTBl WITH SECONDARY ENTRY POINTS SINTBL. COSTBX. SINIBX
0012
•
GENERATE COSINE OR SINE HALF-WAVE TABLES, FIXED OR FLOATING
0013
0014
•
COSTBL GENERATES A HALF-WAVE COSINE TABLE FLOATING POINT
0015
"•
SINTBL GENERATES A HALF-WAVE SINE TABLE FLOATING POINT
001&
COSTBX GENERATES A HALF-WAVE COSINE TABLE FIXED POINT
0011
"
SINTBX GENERATES A HALF-WAVE SINE TABLE FIXED POINT
0018
"
WHERE
0019
"
THE HALF-WAVE LENGTH IS AN INPUT PARAMETER.
0020
"
FOR FIXED POINT TABLES THE BINARY POINT [S BETWEEN
0021
"
THE SIGN BIT AND BIT 1.
0022
"
0023
"- LANGUAGE - FAP SUBROUT[NE IFORTRAN II COMPAIIBLEI
0024
" EQUIPMENT - 109 OR 1090 (MAIN FRAME ONLY)
0025
"STORAGE
- 121 REGISTERS
0026
0021
" SPEED
- ABOUT 2N MIll[SEC ON 109. WHERE N
HALF-WAVE lENGTH
"AUTHOR
- JON ClAERBOUT
0028
0029
"
----USAGE---0030
"
0031
"" TRANSFER VECTOR CONTAINS ROUTINES - INONE)
0032
"
AND FORTRAN SYSTEM ROUTINES - COS,SIN
0033
0034
"• FORTRAN USAGE OF COSTBL
0035
"
CAll COSTBLIN,COSTAB)
003&
0031
"" INPUTS TO COSTBl
0038
•
N
DEFINES THE HALF-WAVE LENGTH TO BE N+1
0039
0040
"
MUST EXCEEO ZERO IPROGRAM EXITS IF N IS NEGATIVE OR ZERO)
0041
"" OUTPUTS FROM COSTBL
0042
"
COSTABII) I=I ••• N+1 CONTAINS TABLEIJ) = COStJ.P[/NI J=O,l ••••• N
0043
"
I.E. COSTAB(I) CONTAINS TABLE I 1-1)
0044
0045
• FORTRAN USAGE OF SINTBL
0046
0041
•
CALL SINTBL(N.SINTABI
" INPUTS TO SINTBl
0048
"N
SAME MEANING AS FOR COSTBL
0049
" OUTPUTS FROM SINTBL
0050
"
SINTABII) I=1 ••• N+1 CONTAINS TABLEtJ)
SINIJ"PI/NI FOR J=O,l ••• N
0051
0052
"" FORTRAN USAGE OF COSTBX
0053
"
CAll COSTBXIN,ICCSTB)
0054
" INPUTS TO COSTBX
0055
"N
SAME MEANING AS FOR COSTBL
005&
" OUTPUTS FROM COSTBX
0051
"
ICOSTBII) I=I ••• N+l IS SAME AS FOR COSTBL BUT DATA [S FIXED POINT
0058
0059
"" FORTRAN USAGE OF SINTBX
OObO
"
CALL SINTBXIN,ISINTBI
00&1
" INPUTS TO SINTBX
00&2
"N
SAME MEANING AS FOR COSTBL
00&3
" OUTPUTS FROM SINTBX
0064
"
ISINTBIII I=1 ••• N+1 IS SAME AS FOR SINTBL BUT DATA IS FIXED POINT
00&5
00&&
"• EXAMPLES
00&1
" 1. GENERAL BEHAVIOR FOR N=4
0068
"
INPUTS - N=4
00&9
•
USAGE
CALL COSTBL(N,COSTAB)
0010
"
CALL SINTBL(N,SINTA8)
0011
0012
•
CALL COSTBXtN,ICOSTBI
CALL SINTBX(N,ISINTB)
"
0073
"
OUTPUTS - NOTE - THESE NUMBERS ARE GOOD TO 8 OCTAL PLACES.
0014

•

"

••••••••••••••••••••••••

~

"
COSTBl (SUBROUTINE)
"
FAP
-COSTBl
COUNT
200
COSTBl
lBl
ENTRY
COSTBl (N,COSTAB)
ENTRY
SINTBL IN,SINTAB)
ENTRY
COSTBX IN,ICOSTB)
ENTRY
SINTBX IN,ISINTBI

••••••••••••••••••••••••

"COSTBl

9/29/&4

••••••••••••••••••••••••

••••••••••••••••••••••••

PROGRAM LISTINGS

•

COSTBL
•
• •••••••••••••••••••••••

COSTBL
"••••••••••••••••••••••••
"

(PAGE

2)

(PAGE

..

."

COSTABIl ••• 5 )
SINTA6(l·••• 5)
ICOST6 11 ••• 5)

"

ISINT61l ••• 5)

•"
"

HTR
0
BCI
I,COST6L
COSTBl ClA
•
STO
Fl
TRA
·"3
COSTBX STZ
Fl
CORS
STZ
COST6l-2,4
SXD
SXA
SV,1
CLA
KCOS
STO
AL
2,4
ClA
STA
63
ADD
=1
A
STA
STA
6
STA
61
STA
62
STA
64
TRA
0
SINT8l CLA
"
Fl
STO
TRA
*+4
SINT8X STZ
Fl
ClA
STO
CORS
COST6l-2,4
SXD
SXA
SV,l
KS I N
CLA
STO
Al
UP
FIXING
lOOP
SET
CLA
2,4
ADD
=1
STA
A
STA
6
S TA
61
STA
62
STA
L2
.. SET UP COMPUTATION lOOP
1,4
0
CLASV
HI;
TM!
SV
STD
N
ADD
KDl
STD
AN
STD
8N
N
CLA
ARS
18
ORA
ORF
FAD
ORF
STO
Nfl
ClA
=3.14159265
FOP
NFL
STQ
INCR
STZ
ARG
- LOOP
1,1
AXT
CLA
ARG
NOP
AL
""
•• ,1
A
STO
ARG
CLA
INCR
FAD
STO
ARG
TXI
*+1,1,1
AN
AL,l,."
TXL
lET
Fl
TRA
SV
1,1
AXT

1.0,.70711,0.0,-.70711,-1.0
0.0,.70711,1.0,.70711,0.0
OCT 377777777777,265011714000,
000000000000,665011714000,771777717777
OCT 000000000000,265011714000,
317117777771,265011114000,000000000000

(TSX

5COS,4)

GET COSINS
COSINSH

•

.

ITSX

SSIN,41

GET SINS
SINS+l

GET N

FORM N+l
FLOAT N

FORM PI/N

COS

SIN

TSX $COS,4
"·=COSINS+l

TSX SSIN,4
•• =SINS+l

·"=N+l
FIX IF ZERO
EXIT - NOT ZERO

0075
0076
0077
0076
0079
0080
0081
0082
00B3
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0131
0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
0148
0149

2)

....................... -

•

COSTBL

••••••••••••••••••••••••

PROGRAM LISTINGS

•

*

••••••••••••••••••••••••
(PAGE

31

BC
B

Bl

RlSH
82
BN

83
B4
Ll

L2
SV
N
FL

INCR
ARG
ORF
NFL
KD1
KCOS
KSIN
CORS

MD

CLM
LDQ
LLS
SSP
SUB
STA
CLA
LRS
ANA
ALS
LLS
ARS
STO
lXI
TXL
CLA
TNZ
CLA
STO
SSM
LXD
STO
TRA
CLA
ARS
LST
TRA
TRA
CLA
ARS
ADD
STD
CLA
LXD
STO
AXT
LXD
TRA
PZE
PZE
PZE
PIE
OCT
PZE

PZE
TSX
TSX
PZE
PZE
END

.·,1

(PAGE

"·=COSINS+l

B
=0200
RTSH
•• ,1

""=COSINS+l

=0000777777777
8

.·,1

"*

"" FROM B+4
*"=COSINS+l

"+1,1,1
BC,l,*"
CORS

*"=N+1

Ll

=0377777777777

."

""=COSINS

SET FIRST AND
LAST VALUES
IN TABLE = 1

BN,!
•• ,1

**=COSINS+l

SV
N
18
IF = 0, N EVEN - EXIT
.+2
SV
N
N ODD - SET MDPT
1
GET (N+1I/2
KD1
MD
=0377771777777
MO,!
.·,1
.*
S INS+l

··.1

COSTBL-2,4
3,4

...""••

""
233000000000
"*
0.0.1
$COS,4
$SIN,4
""
0,0,"*

.

COSTBL

••••••••••••••••••••••••

""=N IN DECR
."=O.FXD
**=PI/N •
"*:I*PI/N. I=O.l •••• ,N
.... =FLOATF(NI

"*=0 IF COS
**=(N+1I/2

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
01B
0174
0175
0176
0177
0178
0179
0180
0161
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199

3)

••••••••••••••• * ••••••••
COSTBX
•
* •••••••••••• ***********
REFER TO
COSTBL

•

PROG~AM

LISTINGS

••••••• * ••••••• **** •• ***
COSTRX
*
************************
REFER TO
COSTBL

•

.••••••••••••••••••••••••
CPYFl2
••••••••••••••••••••••••"
..
CPYFl2
..
FAP
"CPYFl2
COUNT
l8l
ENTRY

.....
..
it

•
•
•.

..
...
it

it

•

.

•
•
..
•
•

.
..."
.....
"

.

•
•..
..
..

•
"
•

•..

.

•
•..
•"

..
..
..
.

...
...

..•..

...•
.•

..
..
•

(SUBROUTI NE)

PROGRAM LISTINGS

.....
. .......................
'

,

CPYFL2

••••••••••••••••••••••••

9/9/64

lAST CARD IN DECK IS NO. 0303
0001
0002
300
0003
0004
CPYFl2
CPYFl2 (ITPIN,ITPOUT,lRECMX.ZFEOFW,SPACE.IANSI
0005
0006
----ABSTRACT---0007
0008
0009
nTlE - CPYFl2
FAST COPY FILE FROM ONE TAPE TO ANOTHER - VERSION 2
0010
0011
CPYFl2 COPIES ONE FILE OF BCD AND/OR BINARY RECORDS FROM
0012
ONE TAPE TO ANOTHER TAPE. THE END-OF-FllE MARK IS ALSO
0013
COPIED IF THE USER DESIRES IT.
0014
0015
IF A REOUNDANCY IS ENCOUNTERED ON EITHER TAPE. CPYFl2
0016
WIll ATTEMPT TO RECOPY 20 TIMES BEFORE GIVING AN ERROR
0011
0018
EXIT. AN ERROR EXIT WIll ALSO OCCUR IF AN END-TAPE
CONDITION IS SENSED.
0019
0020
CPYFl2 DERIVES ITS SPEED BY OPERATING BOTH TAPES
0021
0022
SIMULTANEOUSLY IF THEY ARE ON DIFFERENT DATA CHANNELS.
0023
- FAP SUBROUTINE (FORTRAN (III COMPATIBLE)
0024
LANGUAGE
EQUIPMENT - 709, 7090, OR 1094 (MAIN FRAME AND TWO TAPE UNITS)
0025
- 118 REGISTERS
0026
STORAGE
- FOR THE 1090 (556 BPI)
0027
SPEEO
0.00927 SECONDS/14 WORD RECORD IF THE TAPES ARE ON
0028
0029
DIFFERENT CHANNELS.
0.01828 SECONOS/14 WORD RECORD IF THE TAPES ARE ON
0030
THE SAME CHANNEL •
0031
(NOTE THAT FORTRAN COPYING (READING ONE RECORD ANO THEN
0032
WRITING ONE RECORDI REQUIRES 0.02845 SECONOS/PER 14 WORD
0033
RECORD. I
0034
AUTHOR
R.A. WIGGINS
JULY. 1964
0035
0036
----USAGE--0037
0038
TRANSFER VECTOR CONTAINS ROUTINES - NONE
0039
AND FORTRAN SYSTEM ROUTINES - (IOSI, (TCOI. IWRSI, (RCHI, (TRCI,
0040
(ETTI, (WEFI. (BSRI. (RIJS)
0041
0042
0043
FORTRAN USAGE
0044
CAll CPYFl2(ITPIN,ITPOUT.LRECMX,ZFEOFW,SPACE.IANSI
0045
INPUTS
0046
0047
ITPIN
lOGICAL TAPE NUMBER THAT FILE IS COPIED FROM.
0048
0049
ITPOUT
lOGICAL TAPE NUMBER THAT FILE IS TO BE COPIED ONTO.
0050
0051
lRECMX
MAXIMUM NUMBER OF WORDS PER RECORD THAT Will BE COPIED.
0052
0053
IF RECORDS ARE ENCOUNTEREO THAT ARE LONGER. THEY WIll
BE CHOPPED AT THIS LENGTH AND THE REMAINING WORDS WILL
0054
BE lOST.
0055
SOME STANDARD FORTRAN RECORD LENGTHS ARE
0056
0057
BCD CARDS
14 WORDS
BCD OUTPUT RECORDS
0058
22 WORDS
BINARY CARDS
0059
27 WORDS
BINARY OUTPUT RECORDS
- 256 WORDS
0060
MUST B~ GRTHN 1 BUT IS NOT CHECKED.
0061
0062
lFEOFW
IS ZERO IF AN END-OF-FILE IS TO BE WRITTEN ON ITPOUT.
0063
0064
IS NOT ZERO IF NO END-OF-FILE IS TO BE WRITTEN.
0065
SPACE(I) l:l, •••• 2.LREC IS TEMPORARY STORAGE SPACE NEEDED BY
0066
0061
CPYFL2.
0068
OUTPUTS
0069
0070
0071
ONE FILE FROM TAPE ITPIN IS COPIEO ONTO ITPOUT. ITPIN IS lEFT
POSITIONED AFTER THE END-OF-FILE MARK AND ITPOUT IS lEFT
0072
POSITIONED AFTER THE END-OF-FILE MARK IF ZFEOFW = 0., OR AFTER
0013
0014
THE LAST RECORD COPIED IF ZFEOFW NOT= O. IF A PERMANENT

.••••••••••••••••••••••••
..
CPYFl2
••••••••••••••••••••••••
(PAGE

PROGRAM LISTINGS

••••••••••••••••••••••••
..

CPYFL2

21

..
..
..
..
..
..
..
..

.

..
..

..
.

IANS

..
.

..
..

...

....
..
..
....
.. EXAMPLE

.

......
.....

.....
.

...

.....
...
.
...
..
..
..
...

(PAGE

REDUNDANCY IS ENCOUNTERED ON ITPIN, IT IS LEFT POSITIONED AFTER THE
REDUNDANT RECORD AND ITPDUT IS LEFT POSITIONED AFTER THE PREVIOUS
RECORD. IF A PERMANENT REDUNOANCY IS ENCOUNTERED ON ITPOUT, ITPIN
IS LEFT POSITIONED AFTER THE RECORD IMMEDIATELY SUCCEEDING THE
REDUNDANT RECORD AND ITPOUT IS LEFT POSITIONED AFTER THE REDUNDANT
RECORD. IF AN tND-TAPE CONDITION IS SENSED ON ITPIN, ITPOUT IS
LEFT POSITIONED AFTER THE LAST SUCCESSFULLY READ RECORD. IF AN
END-TAPE CONDITION IS SENSED ON ITPOUT, ITPIN IS LEFT POSITIONED
ONE RECORD BEYOND THE LAST RECORD SUCCESSFULLY COPIED.
SPACEII)

CONTAINS THE NUMBER OF RECORDS COPIED IN THIS FILE
IFIXED POINT).

o

=1

If All OK •

IF REDUNDANCY ON ITPIN (AFTER 20 ATTEMPTS TO RECOPY).
2 IF REDUNDANCY ON ITPOUT (AFTER 20 ATTEMPTS TO RECOPY)
3 IF REDUNDANCIES ON ITPIN AND ITPOUT (AFTER 20
ATTEMPTS TO RECOPY).
4 IF END TAPE ON ITPIN.
5 IF END TAPE AND REDUNDANCY ON ITPIN.
.. 6 IF END TAPE ON ITPIN, REDUNDANCY ON ITPOUT.
1 IF END TAPE ON ITPIN. REDUNDANCIES ON HPIN AND
ITPOUT •
8 IF END TAPE ON ITPOUT.
z 9 IF END TAPE ON ITPOUT, REDUNDANCY ON ITPIN.
=10 IF END TAPE AND REDUNDANCY ON ITPOUT.
=11 IF END TAPE ON ITPOUT, REDUNDANCIES ON ITPIN AND
ITPOUT.
=12 IF END TAPE ON ITPIN AND ITPOUT.
=13 IF END TAPE ON ITPIN AND ITPOUT, REDUNDANCY ON ITPIN.
=14 IF END TAPE ON ITPIN AND ITPOUT. REDUNDANCY OF rTPOUT
=15 IF END TAPE AND REOUNDANCIES ON ITPIN AND JTPOUT.

1. A COMPREHENSIVE TEST

END-OF-FILE CONTROL AND COPYING
AL TERNAT ING BCD AND BINARY RECORDS.
INPUTS - ITPIN .. 6
ITPOUT = 8
LRECMX .. 10
IFEOFI .. 1 •
IAIl ••• 51
1,2,3,4,5
IFEOF2 .. O.
USAGE
- C SET UP ITPIN WITH ALTERNATING BCD AND BINARY RECORDS.
REWIND ITPIN
WRITE OUTPUT TAPE ITPIN,10,IA(11
FORMATI5I6)
10
WRITE TAPE ITPIN, t IA( I 1,1=1,3)
WRITE OUTPUT TAPE ITPIN,lO,IIA(II,I=1.5)
END FILE ITP IN
REWIND ITPIN
REWIND ITPOUT
C COPY THE FILE TWICE
CALL CPYFL2IITPIN,ITPDUT,LRECMX,IFEOF1.SPACE,IANSI
REWIND ITPIN
CALL CPYFL2IITPIN,ITPOUT,LRECMX,IFEOF2,SPACE,lANSI
C READ THE FILE FROM ITPOUT (LAST READ SHOULD CAUSE EXITI
REWIND ITPOUT
READ INPUT TAPE ITPOUT,IBII)
READ TAPE ITPOUT,(IBII),I=2,41
READ INPUT TAPE ITPOUT,IIB(I),I=5,10)
READ TAPE ITPOUT,{IBIII,I=11,13)
READ INPUT TAPE ITPOUT,(IBII),1=14,181
READ INPUT TAPE ITPOUT,IBII9)
OUTPUTS - IANS = 0
IBll ••• 18) = 1, 1,2,3, 1,2.3,~,5,
1, 1,2,3, 1,2,3.4,5

FOLLOWS
.. XR4PROGRAM
HTR

BCI
CPYFL2 SXD
SXA
SXA
CLA
STO
CLA

BELOW

o

1. CPYFL2
XR4,4
IRl,l
IR2,2
11

NIH
13

..

•••••• ** •••••• ~ •• * •• ~ •••

SAVE
INDEX
REGISTERS.
SAVE
TRAPPING
INSTRUCTIONS.

0015
0016
0071
0018
0019
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0131
0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
0148
0149

21

.••••••••••••••••••••••••
.
CPYFL2
••••••••••••••••••••••••
(PAGE

PROGRAM LISTINGS

.•• •••••••••••••••••••••••
..
CPYFL2
•••••••• ** •••••••••••••

3)

TPSET

TCOB
RDSB
RCHB
SCHB

STO
AXT
CLA ..
STO
CLA*
S10
POX
SXA
CAL
ADD
SUB
STA
SUB
STA
AXT
LXD
CLA*
lET
ADD
TSX
LXO
LDO·
SlQ
LDOSTO
lDO*
SlO
lDQ*
SlO
lDO*
STO
LDOlET
lDO
STO
LDO*
STO
ClA*
lET
ADD
TSX
lDO*
SLO
SlO
SLO
lOO·
STO
LDO*
STO
STO
lDO*
SLO
ClA
llS
XCA
SlO
lDO*
STO
XCl
ANA
ARS
PAX
SXD
SXA
AlS
ADD
STA
CLA
STO
STO
TCOB
RTDB
ENB
RCHB
SCHB

NIF2
20,2
4,4
WEFSW
3,4
IN
,1
LREC,l
5,4
=1
LREC
IN
LREC
UT
0,1
XR4,4
2,4
MODE
=020
SilOS I ,4
XR4,4
S( TCo)
TCOA
S(WRS)
WRSA
S(RCH)
RCHA
S(TRC)
TRCA
S(EH)
ETTA
S(WEFI
WEFSW
NOP
WEFA
S(BSR)
BSRAI
1,4
MODE
=020
S (IDS), 4
SITCO)
TCOB
TCDBI
lCOB2
SIRDS)
RDSB
SIBSRI
BSRB1
BSRB2
S(RCH)
RCHB
SCHB
0

IPAGE

CHANNEL
COMMANOS.

GET OUTPUT TAPE NO. I ITPOUTI
TEST FOR
BINARY MODE
SET UP INSTRUCTIONS IN IIOS)
RESTORE IR 4.
SET UP
INSTRUCTIONS
BY
A.

GET INPUT TAPE NO. ( lTPINI
TEST FOR
BINARY MODE.
SET UP INSTRUCTIONS IN II OS) •
SET
UP
INSTRUCnO"lS
DES IGNATED

BY
B.

SCHB
S(EHI
ETTB
:03000
9
,4
ENBIN.4
E"IBIN,4
1
=BB35
ICB
TRA2
11
13

*
* ..
ENBIN
1"1

DC

STORE
TRAPPING
INSTRUCTIO"lS.
DelAY IF CHANNel IN OPERATION.
READ SELECT.
ENABLE INPUT DATA CHANNEL.
RESET AND lOAD CHANNEL.
MONITOR

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
019B
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224

3)

••••••••••••••••••••••••

•

•

CPYFl2

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

41

ICB

TRA1

ETTB
TCOA
TRCA
ETTA

WRSA
RCHA

TRA
LXO
ENS
TRA
TRA
TRA
TRA
TRA
TRA
TRA
CLA
ANS
LOQ
CLA
STA
XCA
STA
ANA
SUB
ALS
STO
AXT
PXD
ETTB
ADO
TCOA
TRCA
ETTA
ADD
TMI
TNl
WTOA
RCHA

no

REDUNA ADD
TNX
TCOB2 TCOB
BSRB2 BSRB
BSRAI BSRA
TRA
ENDFIL ClS
TRA
WEFA WEFA
CLA
TRA
REOUNB CLA
TNX
CLA
ADO
ANA
STO
TCOBI TCOB
BSRBI BSRB
TRA
END
LXD
STD·
CLA
STO
CtA
STO
PXD
STO·
AXT
IRI
AXT
IR2
TRA
TRA2 T.RA

•

NOP
MODE
NIFl
NIF2
LREC
IN
UT
ENBIN

NOP
PZE
PZE
PZE
PZE
10RT

IORT
PZE

·-1

··,4
=0

TRAl+1,4
ENDFIL
ENDFIL
ENDFIL
ENDFIL
REDUN6
REDUNB
=071717

DC
IN
UT
IN
UT
=077117

DC
18

UT
20,2
,0

.

=4811

REDUNA

=8B11

WEFA
E"lD

••

UT
re08,I,l

=2817
END,2,1

•

••

*.

••••••••••••••••••••••••

CPYFL2
••..•..............

READING PROCESS.
.REENTRY FROM TRAP.
DISENABLE CHANNELS FOR OUTPUT.
CHECK

REASON
FOR
TRAPPING.
END RECORD.
SWITCH
INPUT
ANa
OUTPUT
ADDRESSES.
FIND
NO.
OF
WORDS IN REC.
CHECK
FOR
REDUNDANCY ON ITPOUT
OR
END TAPE
CONDITIONS
GO WRITE END-OF-FILE ON ITPOUT.
LEAVE IF END TAPE OF END OF FILE)
WRITE THIS
RECORD.
BUMP RECORD COUNTER AND GO TO NEXT REC
SIGNAL ITPOUT REDUNDANCY
SLICE REDUNDANCY COUNTER
PREPARE TO RETRY WRITING

TCOBl
=IB17
ETT8
O'O'

=1

TCOA
=1B17

ETTB,2.1
MODE
=1
=1

MODE

•

-O'

TPSET
XR4,4
6,4

NIFl
13

NIF2
14

,I
5,4
•• ,1

··.2
7,4
ICB

..o.. "" ......

-.....-

(PAGE

NOP IF lFEOFW NOT= o.
SIr.NAL TO LEAVE AFTER WRITING
CHECK FOR END TAPE
SIGNAL ITPIN REDUNDANCY
SLICE REDUNDANCY COUNTER
CHANGE
MODE
AND
PREPARE TO
RETRY READING
IN ANOTHER MODE
RESET I R 4.
SET I ANS, 4ND
RESTORE
TRAPPING
INSTRUCTIONS

0225
0226
0221
022B
0229
0230
0231
0232
0233
0234
0235
0236
0231
023B
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274
0275
0276
0271
0278
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299

41

••••••••••••••••••••••••

•

•

CPYFL2

••••••••••••••••••••••••
5)

(PAGE

•

PROGRAM 1I STINGS

••••••••••••••••••••••••
•

CPYFL2

•

• •••••••••••••••••••••••
(PAGE

DC
PZE
WEFSW PZE
END

0300
0301
0302
0303

5)

••••••••••••••••••••••••

•

CROSS

PROGRAM LISTINGS

•

••••••••••••••••••••••••
•
CROSS (SUSROUTINE)
9/29/64
•
LASEL
CCROSS
SUBROUTINE CROSS (LX.X,LY,Y,LC,C)
C
C

C

C
C
C
C
C
C
C
C
C
C
C

C
C

C
C
C

C
C

C
C

C
C

C
C
C
C
C

C
C
C
C
C
C
C

C
C

C
C
C
C
C

C
C
C
C
C

C
C
C

C
C
C

C

C
C
C

C
C
C

C
C
C
C
C
C
C

C

••••••••••••••••••••••••

•

CROSS

LAST CARD IN DECK IS NO. 0086
0001
0002
0003
0004
----ABSTRACT---0005
0006
0007
Tl TlE - CROSS
CROSSCORRELATION OF TRANSIENTS BEGINNING WITH ZERO LAG
0008
0009
CROSS FINDS THE CROSSCORRELATION OF TRANSIENTS
0010
BEGINNING WITH ZERO LAG.
0011
0012
0013
LX
SUM ( X(I). Y(I-K) )
0014
CIK+lJ
0015
0016
0017
FOR K = 0 ••••• LC
0018
WHERE X AND Y ARE TRANSIENT SERIES OF LENGTH LX AND LY
0019
RESPECTIVELY. ANDLC IS AN INPUT PARAMETER. THE COMPU0020
TATION IS MADE AS THOUGH X AND Y HAD ZEROS EXTENDING
0021
0022
SEYOND THEIR ENOS.
0023
0024
LANGUAGE
- FORTRAN II SUBROUTINE
EQUIPMENT - 709 OR 7090 (MAIN FRAME ONLY)
0025
STORAGE
0026
- 107 REGISTERS
SPEED
0027
AUTHOR
- R.A. WIGGINS
0028
0029
----USAGE---0030
0031
TRANSFER VECTOR CONTAINS ROUTINES - FOOT, STZ
0032
AND FORTRAN SYSTEM ROUTINES - NONE
0033
0034
0035
FORTRAN USAGE
CALL CROSS ILX,X,LY.Y,LC.C)
0036
0037
INPUTS
0038
0039
0040
LX
LENGTH OF X SERIES.
0041
I=l ••••• LX IS THE X TRANSIENT SERIES.
0042
XIII
0043
LY
LENGTH OF Y SERIES.
0044
0045
l=l, •••• LY IS THE Y TRANSIENT SERIES.
0046
YI II
0047
0048
IS THE DESIRED LENGTH OF THE CROSSCORRELATION.
LC
0049
0050
IF LC, LX, OR LY ARE LESS THAN 1, THE ROUTINE EXITS WITH
NOTE
NO COMPUTATION.
0051
0052
OUTPUTS
0053
0054
CII)
0055
I=I, ••• ,LC IS THE CROSSCORRELATION SERIES. THIS VECTOR
0056
IS SET TO ZERO BEFORE COMPUTATIONS ARE MADE.
0057
0058
EXAMPLES
0059
1.,2.,3. LY=2 Yll ••• 2l • 2.,1. (')
0060
1. INPUTS - LX=3 XIl ••• 31
.1,.1,.1,.1,.1
0061
LC=5 CIl ••• 5)
0062
4.,1.,6.,0.,0.
Cll ••• 51
OUTPUTS 0063
SAME AS EXAMPLE 1. EXCEPT lC=2
0064
2. INPUTS
0065
OUTPUTS - CIl ••• 51 = 4.,1.,.1,.1 •• 1
0066
0067
3. INPUTS
SAME AS EXAMPLE 1. EXCEPT LC=O
0068
OUTPUTS - CIl ••• 5) = .1,.1,.1 •• 1,.1
0069
0070
4. INPUTS - SAME AS EXAMPLE 1. EXCEPT LX=O
0071
OUTPUTS - Cll ••• 5) = 0.,0.,0.,0.,0.
0072
0013
SAME AS EXAMPLE 1. EXCEPT LY=O
5. INPUTS

-

•

••••••••••••••••••••••••

••••••••••••••••••••••••

•

CROSS

•

PROGRAM 1I STINGS

••••••••••••••••••••••••
IPAGE

OUTPUTS - Cl1 ••• 51

•

CROSS

••••••••••••••••••••••••

21

C

• •••••••••••••••••••••••

•

(PAGE

0.,0 ... 0.,0.,0.

C PROGRAM FOLLOWS BELOW

0074
0075
0076

C

0077

C

10
15
20
30

DIMENSION XI21,YI21,C(21
IF I LC I 30,30,10
CALL STZ ILC,CI
IF IXMINOFILX,LYII 30,30,15
LC1=XMINOFILX,LCI
DO 70 I=1,LC1
CALL FOOT IXMINOFILY+I-1,LXI-I+1,XIII.Y,CIIII
RETURN
END

0078
0079
0080
0081
0082
0083
0084
0085
0086

21

••••••••••••••••••••••••

•

CROST

•

PROGRAM LISTINGS

••••••••••••••••••••••••

C
C

C
C
C

C
C
C
C
C

C
C
C

C
C
C

C
C
C
C
C

C
C
C

C
C

C
C
C
C
C
C
C
C
C

C
C
C

C
C
C

C
C

C
C

C
C
C
C
C
C
C

C
C
C
C

C
C

C
C
C

C
C

C
C
C
C

C

C

CROST

•

• •••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0098
0001
0002
0003
0004
0005
----ABSTRACT---0006
0007
fI TLE - CROS T
0008
0009
CROSSCORRELATION OF TRANSIENTS BEGINNING WITH ANY LAG
0010
CROST FINDS LC TERMS OF THE CROSSCORRELATION CIJ) Of TWO
0011
TRANSIENTS XII) AND YII) OF LENGTH LX AND LY RESPECTIVELY
0012
0013
BEGINNING WITH ANY LAG K
0014
LX
0015
0016
C(JI
SUM I XII) • YII-J) I
0017
1=1
0018
0019
FOR J ~ K, •••• K+LC-1
0020
WHERE THE COMPUTATION IS MADE AS THOUGH X AND Y HAD ZEROS
0021
0022
EXTENDING BEYOND BOTH ENDS.
0023
0024
LANGUAGE
- FORTRAN II SUBROUTINE
0025
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
0026
STORAGE
- 134 REGISTERS
0027
SPEED
0028
AUTHOR
- R.A. WIGGINS
0029
0030
----USAGE--0031
0032
TRANSFER VECTOR CONTAINS ROUTINES - CROSS, REVERS
0033
AND FORTRAN SYSTEM ROUTINES - NONE
0034
0035
FORTRAN USAGE
0036
CALL CROST ILX,XX,LY,YY,K,LC,CCI
0037
0038
INPUTS
0039
0040
IS LENGTH OF XX.
LX
0041
IF LSTHN 1 NO COMPUTATION IS MADE.
0042
0043
I=l, ••• ,LX CONTAINS XIll, ••• ,XILXI AS OESCRIBED IN THE
XXI II
0044
ABSTRACT.
0045
0046
IS LENGTH OF YY.
LY
0047
IF LSTHN 1 NO COMPUTATION IS MADE.
0048
0049
YYI I)
l=l, ••• ,LY CONTAINS Ylll, ••• ,YILYI AS DESCRIBED IN THE
0050
ABSTRACT.
0051
0052
K
IS THE INITIAL LAG.
0053
0054
IS THE NUMBER OF LAGS WANTEO.
LC
0055
IF LSTHN 1 NO COMPUTATION IS MADE.
0056
0057
OUTPUTS
0058
0059
I=l, ••• ,LC CONTAINS CIK1, ••• ,CIK+LC-ll AS DESCRIBED IN
CC I I I
0060
THE ABSTRACT.
0061
0062
EXAMPLES
0063
0064
1.,2 •• 3. LY=2 YYll ••• 2) = 2.,1.
1. INPUTS - LX=3 XXll ••• 31
0065
.1,.1,.1,.1,.1
K=O
LC=5 CCIl ••• 51
0066
CCll
•••
5)
4.,7
••
6.,0.,0.
OUTPUTS 0067
0068
2. INPUTS - SAME AS EXAMPLE 1. EXCEPT K=2
0069
OUTPUTS - CCl1 ••• 5) = 6.,0.,0.,0.,0.
0070
0071
3. INPUTS - SAME AS EXAMPLE 1. EXCEPT K=-2
0072
OUTPUTS - CCl1 ••• 51 = 0.,1.,4.,7.,6.
0073
0074
4. INPUTS - LX=2 XXl1 ••• 21 = 2.,1. LY=3 YYIl ••• 3) = 1.,2.,3.

•
CROST (SUBROUTINE)
9/29/64
•
LABEL
CCROST
SUBROUTINE CROST (LX,XX,LY,YY,K,LC.CC)
C
C

••••••••••••••••••••••••

•

-......... ...
..............
••••••••••••••••••••••••

PROGRAM LISTINGS

IPAGE

••••••••••••••••••••••••
I PAGE

21

C
C

LC=5
OUTPUTS -

CCll ••• 51
CCIl ••• 51

.1,.1,.1,.1,.1 K=-2
6.,1.,4.,1.,0.

C

C 5. INPUTS C
OUTPUTS C
C 6. INPUTS
C
OUTPUTS -

••••••••••••••••••••••••
CROST

CROST

SAME AS EXAMPLE 4. EXCEPT LX=O
CCI1 ••• 5) = 0.,0.,0.,0.,0.
SAME AS EXAMPLE 4. EXCEPT LY=O
CCll ••• 51 = 0.,0.,0.,0.,0.

C

C 7. INPUTS - SAME AS EXAMPLE 4. EXCEPT LC=O
C
OUTPUTS - CCll ••• 5) - .1,.1,.1,.1,.1
C

C PROGRAM FOLLOWS BELOW
C

DIMENSION XXI21,YYI21,CCI21
II-XMAXOFIl,-K-LC+ll
LCl=XMINOFILC,-K)
CALL CROSS ILY-Il,YYII1+1),LX,XX,LC1,CCI
CALL REVERSILC1,CCI
Il=XMAXOFIO,K)+1
12-XMAXOFll,LC1+ll
CALL CROSS ILX-11+1,XXII11,LY,YY,LC-12+1,CC(121)
RETURN
END

0015
0016
0077
007B
0079
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098

2)

• •••••••••••••••••••••••

.••••••••••••••••••••••••
CRSVM
•

PROGRAM LI STINGS

-..•......•.............
..

CRSVM

*
CRSVM ISUBROUTINE)
9/10/64
LAST CARD IN DECK IS NO.
•
LABEL
CCRSVM
SU8ROUTINE CRSVM INRAC.NCAR8.NCBC,LAA.AA.L88.88,ZFN8TR,
1 IFSTLG.LCC.CC)
C
C
----A8STRACT---C
C TITLE - CRSVM
C
CROSSCORRELATION OF TRANSIENT VECTORS OF MATRICES.
C
C
CRSVM FINDS LCC TERMS OF THE TRANSIENT ~ROSSCORRELATION
C
OF A VECTOR OF NRAC X NCAR8 MATRICES All) WITH A
C
VECTOR OF NCAR8 X NC8C MATRICES (AFTER TRANSPOSITION)
C
81K) BEGINNING WITH A FIRST LAG IFSTLG
C
INF
C
( AI I ).B( I-J I
CIJ)
SUM
C
C
I=-INF
OR
C
INF
C
C (J)
SUM
C
AI Il"BII-J)
I=-INF
C
C
C
FOR
J = IFSTLG,IFSTLG+1 ••••• IFSTLG+LCC-l
C
C
C
WHERE INF
INFINITY. RII) = 8(11 TRANSPOSE, AND THE
C
ASSUMPTION IS MADE THAT THE VECTORS ARE ZERO BEYONO THE
C
RANGE OF DEFINITION.
C
C LANGUAGE
- FORTRAN II (SUBROUTINE)
C EQUIPMENT - 709. 7090. OR 7094 IMAIN FRAME ONLY)
C STORAGE
- 327 REGISTERS
C SPEED
LET M03TIMINRAC.NCARB.NCBC.LAA)
TIME FOR MDOT3
C
TO FINO THE DOT PRODUCT OF 2 SERIES OF LENGTH LAA.
C
THEN TI~E FOR ONE LAG OF A CROSS CORRELATION IS
C
(M03TIMINRAC.NCAR8.NCBC.LAA)
C
+ .00085 - MD3TIMl1,1.1.1))
SECONDS
C
ON THE 7094 MOD 1 •
C
FOR THE 3/63 VtRSIONS OF MDOT3 AND MATML3 THIS
C
BECOMES
C
(.000036*NRAC*NCARB*NCBC + .000170"NRAC*NCBC
C
+ .000040*NCBC + .000024) * LAA + .00010 SECONDS.
C
THUS THE TI ME FOR HALF OF MXLAGS LAGS OF AN
C
AUTOCORRELATION OF A SERIES OF LENGTH LAA
C
WILL RE" ABOUT
C
1.000036"NRAC*NCARB*NC8C + .000170*NRAC*NC8C
C
+ .000040.NCBC + .000024)
C
.. IILAA.ILAA-MXLAGS»)/2 + .00010) • MXLAGS SECONDS.
C AUTHOR
- R.A. WIGGINS
AUGUST. 1964
C
C
----USAGE---C
C TRANSFER VECTOR CONTAINS ROUTINES - MDOT3. SETKS. STZ
C
AND FORTRA~ SYSTEM ROUTINES - (NOT ANY)
C
C FORTRAN USAGE
C
CALL CRSVM INRAC.NCARB.NC8C,LAA,AA.LB8.88.ZFN8TR,IFSTLG,LCC.CC)
C
C INPUTS
C
C
NRAC
NUMBER OF ROWS IN THE AA AND CC MATRICES.
C
MUST EXCEED ZERO.
C
C
NCARB
NUMBER OF COLUMNS IN THE AA MATRICES. NUMBER OF ROWS
C
(AFTER TRANSPOSITION) IN THE B8 MATRICES.
C
MUST EXCEED ZERO.
C
C
NCBC
NUMBER OF COLUMNS IN THE BB AND CC MATRICES.
C
MUST EXCEED ZERO.

=

C

C
C

LAA

..

• •••••••••••••••••••••••

NUMBER OF NRAC X NCAR8
MATRICES AA.

MATRIX ELEMENTS IN THE VECTOR OF

0219
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
O~B

0069
0070
Q071
0072
0073

••••••••••••••••••••••••

• CRSVM
*
••••••••••••••••••••••••
(PAGE

••••••••••••••••••••••••

PROGRAM LISTINGS

•

CRSVM

2)

IPAGE

MUST EXCEEO ZERO.

C
C
C
C
C
C

AA I I)

l=l, ••• ,NRAC.NCARB*LAA CONTAINS THE VECTOR OF MATRICES
Al11, ••• ,AILAAI STORED CLOSELY SPACED BY COLUMNS.

LBB

NUMBER OF NCARB X NCBC
MATRICES BB.
MUST EXCEED ZERO.

BB(I)

I=l, ••• ,NCARB*NCBC*LBB CONTAINS THE VECTOR OF MATRICES
BI11 •••• ,BILBBI STORED CLOSELY PACKED 8Y COLUMNS IIF
ZFNBTR=O.I OR BY ROWS (IF IFN8TR=1.).

ZFNBTR

=0. I MPLI ES THAT THE MATRICES IN
COLUMNS.
=1. I MPLI ES THAT THE MATR ICES IN
ROWS.

C

C
C
C
C
C
C

C
C
C
C

C
C

MATRIX ELEMENTS IN THE VECTOR OF

88( I)

ARE STORED BY

B8(1)

ARE STORED BY

IFSTLG

INDEX OF THE FIRST LAG OF THE CROSSCORRELATION.

LCC

NUMBER OF LAGS OF THE CROSSCORRELATION TO BE COMPUTED.
MUST EXCEED ZERO.

C

C
C
C

C OUTPUTS
C

STRAIGHT RETURN WITH NO COMPUTATIONS IF
LAA, LBB, OR LCC LSTHN= O.

C
C

C
C
CCIII
C
C
C
C
C EXAMPLES
C
C 1. INPUTS
C
C
C
C

NRAC, NCARB, NCBC,

l=l •••• ,NRAC.NCBC*LCC CONTAINS THE CROSSCORRELATION
VECTOR OF MATRICES CIIFSTLGI ••••• C(IFSTLG+LtC-l) AS
OEFINED IN THE ABSTRACT STORED CLOSELY SPACED 8Y
COLUMNS.

- NRAC=l NCAR8=2 NCBC=3
LAA=4 AAll ••• 8)=(1.,2.),13 •• -2.),15 •• -4.1.ll.,-I.)
LBB=2 BBIl ••• 12)=( 3., 4 •• 1.) (-2 •• -2., 4.)
I 2 •• 3 •• -1.). (-3 •• 2 •• -5.)

INOTE THAT B8 IS STORED AS
I 8Bll ••• 12)=3.,2.,4.,3.,1.,-1.,-2.,-3.,-2.,2.,4.,-5.
ZFN8TR=0. IFSTLG=-2 LCC=1
OUTPUTS - CCl1 ••• 211= (0,0,01, 1-8.,2.,-6.), 1-1.,0 •• 21.),
17 •• -12.,45.1, 18.,4.,18.1, 11.,1 •• 2.), (0.0,0)

C
C
C
C

C
C 2. INPUTS
C

- SAME AS EXAMPLE 1. EXCEPT ZFN8TR=1.
THIS CAUSES
CRSVM TO SEE THE ARRAY 8B(I) AS 3 X 2 MATRICES
BB(1 ••• 121=(3 •• 3.1 1-2., 2.)
12., 1.1 (-3 •• 4.)
14 •• -1.1. 1-2.,-5.)
OUTPUTS - CCll ••• 211= (0,0,01, 12.,5.,-12.1. 1-1.,-13.,6.1,
1-15.,-21.,24.), (-1.,-1.,27.), (0.,1.,5.), (0,0,0)

C

C
C

C
C
C
C
C
C

PROGRAM FOLLOWS BELOW

C
C
C
C

DUMMY OIMENSION
DIMENSION AA(2),BBI2),CCI21

C

C BRING IN PARAMETERS AND SET SOME USEFUL COMBINATIONS
C

CALL SETKS INRAC.N, NCARB,M, NCBC,L, LAA,LA, LBB,LB.
1 IFSTLG,K. LCC,LC, 1,ICCI
NM=N*M
NL=N*L
ML=M*L
C

C LEAVE IF ANY VALUES ILLEGAL
C

10
C

IF IXMINOFIN,M,L,LA.LB,LCII
CONTINUE

*

••••••••••••••••••••••••

100,100,10

0074
0015
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148

2)

••••••••••••••••••••••••

-

PROGRAM LISTINGS

•

CRSVM

••••••••••••••••••••••••
(PAGE

••••••••••••••••••••••••

-•

CRSVM

3)

C CLEAR THE OUTPUT AREA
C

CALL STI IlC-Nl,CC)
C

C IF NEGATIVE LAGS ARE SPECIFIED 00 THESE FIRST
C

20

IF IK) 20,50,50
CONTINUE

C

C SET UP MDOT3 CONTROL PARAMETERS
C

IS
IS
IS
IS
IS

IC
ICC
LCM
IB
IBB

C
C
C
C
C
C

IC
ICC
LCM
IB
IBB

MATRIX
VECTOR
MATRIX
MATRIX
VECTOR

INDEX -1 OF NEXT OUTPUT
INDEX OF NEXT OUTPUT
NO. OF PRODUCTS TO COMPUTE
INDEX -1 OF BB FOR NEXT PRODUCT
INDEX OF BB FOR NEXT PRODUCT

XMAXOFIO,-K-LB+1)
IC-NL+1
XMINOF{-K,LB-1,LC-IC)
XMINOF{-K,LB-l)
IB-ML+l

C

C IF THERE ARE NO PRODUCTS, LEAVE

(PAGE

0149
0150
0151
0152
0153
0154
0155
0156
0157
015B
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173

C

30

IF ILCM)
CONTINUE

100,100,30

C

C COMPUTE THE NEGATIVE LAGS
C

40

00 40 1=I,LCM
CALL MDOT3 IN,M,L,XMINOFIlB-IB,LA),AA,BBIIBB),IFNBTR,CCIICC),l)
IB=IB-l
IBB=IBB-ML
ICC=ICC+NL

C

C ADJUST

K

AND

LC

FOR POSITIVE LAG COMPUTATION

C

50

LC=LC+K
K=O
CONTINUE

C

C SET UP MDOT3 CONTROL PARAMETERS
C
C
C
C

IS
IS
IS
IS

LCM
IA
IAA
ICC

C

MATRIX
MATRIX
VECTOR
VECTOR

NO. OF PRODUCTS TO COMPUTE
INDEX -1 OF AA FOR NEXT PRODUCT
INDEX OF AA FOR NEXT PRODUCT
INDEX OF NEXT OUTPUT IALREADY SETI

C

lCM
lA
I AA

XMINOF ILA-K,lC-K)
= K
= I A-NM+l

C

C LEAVE IF THERE ARE NO PRODUCTS
C

60

IF ILCM)
CONTINUE

IDO,100,60

C

C COMPUTE THE POSITIVE LAGS
C
00 70 l=l,LCM

70

CALL MDOT3 IN,M.l,XMINOFILA-IA,lB).AAIIAAI,BB,IFNBTR,CCIICC),l)
IA=IA+l
IAA= IAA+NM
ICC=ICC+Nl

C

C THAT'S ALL
C

100

CONTINUE
RETURN
END

-

•••••••••••••••••••••••

0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
01B4
01B5
0186
01B7
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
020B
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219

3)

.••••••••••••••••••••••••
.
CSOUT

••••••••••••••••••••••••

.

.

it

•

..

.•.
...

•
..
..
..
..

..
•..
..

..

.

..
..

....

..

•
...

..
..

...
....
...
...•
..
•.

.

".
..

•..
..
..
..

...
..

.."
•
..
..

.

** ••••
.••••••••••••••••••
..
CSOUT
••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0126
0001
0002
COUNT
150
0003
LBL
CSOUT
0004
ENTRY
CSOUT (ITAPE.NSPACE.Cl.C1NAME,C2.C2NAME ••• J
0005
0006
0001
----ABSTRACT---0008
0009
0010
T[ TLE - CSOUT
CONSTANTS OUTPUTTED IN fIXED fORMAT
0011
0012
CSOUT WRITES A LIST OF VARIABLES AND THEIR NAMES ON A
0013
LOGICAL TAPE ACCORDING TO A fIXED fORMAT WITH INITIAL
0014
SPACING (OR PAGE RESTORE).
0015
0016
- fAP SUBROUTINE (fORTRAN-II COMPATIBLE)
0011
LANGUAGE
EQUIPMENT - 109 OR 1090 IMAIN fRAME PLUS ONE TAPE UNIT)
0018
STORAGE
- 49 REGISTERS
0019
SPEED
0020
AUTHOR
- R.A. WIGGINS. JULY. 1964
0021
0022
0023
----USAGE---0024
0025
TRANSfER VECTOR CONTAINS ROUTINES - CARIGE, HRADJ
0026
AND fORTRAN SYSTEM ROUTINES - ISTH1,(fIL)
0027
0028
FORTRAN USAGE
0029
CALL CSOUT IITAPE.NSPACE,C1.CINAME,C2.C2NAME ••••• CN,CNNAME)
0030
0031
0032
INPUTS
0033
0034
ITAPE
IS LOGICAL TAPE NUMBER OF DESIRED OUTPUT TAPE.
0035
0036
IS DESIRED NUMBER (MAY BE ZERO) OF SPACES BEFORE ANY
0037
NSPACE
OUTPUT. IF NEGATIVE AN INITIAL PAGE RESTORE OCCURS •
0038
0039
0040
Cl.C2 ••••• CN ARE THE FIXED OR FLOATING POINT VARIABLES TO BE
PRINTED.
0041
0042
CINAME.C2NAME, ••• ,CNNAME ARE THE HOLLERITH NAMES OF Cl,C2, •••• CN
0043
RESPECTIVELY IN FORMATIA6) OR IA5) OR ••• IAI).
0044
0045
0046
OUTPUTS
1. NSPACE SPACES OR A PAGE RESTORE OCCURS
0047
2. THE VARIABLES AND THEIR NAMES ARE WRITTEN AS THEY
0048
WOULD BE BY THE FORTRAN STATEMENTS
0049
0050
WRITE OUTPUT TAPE ITAPE, 10, C1NAMR.Cl.C2NAMR.C2,
0051
1 ••• , CNNAMR.CN
0052
10
FORMAT(S(2XA6,3H = GI4.1))
0053
0054
WHERE CNNAMR = HRAOJFICNNAME) •
0055
0056
0057
EXAMPLES
0058
0059
0060
1. INPUTS - Cl=l. CINAME=3HONE C2=2 C2NAME=3HTWO
0061
ITAPE = 2 NSPACE = 2
USAGE
CALL CSOUT (ITAPE.NSPACE.Cl.CINAME.C2,C2NAME)
0062
OUTPUTS - THE FOLLOWING 3 LINES
0063
0064
0065
ONE = 1.0000000
TWO = 2
0066
WILL BE PRINTED OFF LINE FROM LOGICAL TAPE 2 IUNDER
0067
PROGRAM CONTROL) •
0068
0069
0070
2. EXAMPLE WITH LITERAL ARGUMENTS. THE LAST ARGUMENT IS IGNORED SINCE
0071
IT HAS NO NAME.
USAGE
CALL CSOUT{2,1,.01,lHX,5)
0072
0073
OUTPUTS - THE FOLLOWING 2 LINES
0074

•.CSOUT

....

CSOUT (SUBROUTINE)
FAP

PROGRAM LISTINGS

9/4/64

** ••••••••••
.••••••••••••
CSOUT
-

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

..
..

..-

CSOUT

(PAGE

x

=

0.1000000E-Ol

WILL BE PRINTED OFF LINE FROM LOGICAL TAPE 2 (UNOER
PROGRAM CONTROL).
PROGRAM FOLLOWS BELOW

HTR
BCI
CSOUT SXD
CtA
STA
CLA
STA
TSX
ITAPE TSX
NSPACE TSX
LXD
CLA"
TSX
PZE
LXD
TRA
LOOP
CLASXD
TSX
LXD
XC.A
STR
LOOSTR
LKAHD CAL
ANA
LAS
TRA
TRA
SXO
EXIT
TSX
LXO
TRA
Al
CAL
ANA
LAS
TRA
TIX
TIX
XR4

.-..TSXCONSTANTS
TSX
FORMAT BCI
END

..

••••••••••••••••••••••••

21

..

••••••••••••••••••••••••

..

o
l.CSOUT
XR4,4
1,4

ITAPE
2,4
NSPACE
$CARIGE,4
... ,0
.*,0

XR4,4
1,4

$( S TH),4
FORMAT"l
XR4,4
LKAHO
2,4

XR4,4
SHRAOJ ,4
XR4,4

STORAGE REGISTER FOR IR 4
SAVE IR4
AND
USE
CARIGE
TO
_MAKE THE
INITIAL
SPACES.
RESET IR 4
AND
-GO INITIAliZE
(STH). (1 IN DECREMENT INDICATES THAT
RESET IR 4
IS STORED IN THE REVERSE
AND GO CHECK.
OF THE NORMAL ORDER)
GET NEXT NAME
AND
RIGHT ADJUST IT.

PUT IN MQ
-AND FEED IT TO (IOHI.
1,4
GET NEXT VARIABLE
AND FEED IT TO (IOH).
3,4
THEN CHECK IF
=0111111100000 NEXT ARGUMENT (VARIABLE)
TSX
IS TSX ,0
IT IS NOT
-+2
Al
JT IS, GO CHECK NEXT ARGUMENT.
XR4,4
IT IS NOT, PREPARE TO LEAVE
$(FllI,4
-GO ROUND-OUT (STH).
XR4,4
AND
3,4
-RETURN
4,4
CHECK NEXT ARGUMENT (NAME)
=0171177100000 FOR
TSX
TSX ,0 FORM.
-+2
IT I S NOT.
LOOP,4,2
IT IS, BUMP IR4 AND GO WRITE
EXIT,4,1
IT IS NOT, BUMP IR4 AND PREPARE TO RETURN.

0,0

4,(5(2XA6,3H

G14.1»)

0015
0016
0011
0018
0019
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126

2)

••••••••••••••••••••••••

.

PROGRAM LISTINGS

CUFITI

••••••••••••••••••••••••"

..
..

"
"
"

.

"

."

•

..

"
•"
•"
"•
"
..
"

.

"
"
•"

•
•
•
"

•"
•"
•
..

""
..

•
""

..

"•
..

..
•.
..

"

".

."

•
•

..
•
.."
•

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0325
0001
0002
0003
0004
0005
0006
0007
0008
----ABSTRACT---0009
0010
TITLE - CUFITl
FIND CUBIC WHICH EXACTLY FITS 4 EQUALLY SPACED POINTS
0011
. 0012
CUFIT1 FINDS CO,Cl,C2, AND C3 SUCH THAT THE CUBIC
0013
0014
POLYNOMIAL
0015
2
3
FIX)= CO + Cl"X + C2.X + C3.X
0016
0017
0018
TAKES ON SPECIFIED VALUES AT 4 EQUALLY SPACED VALUES
OF X, NAMELY AT XLO, XLO+DELX, XLO+2.DELX AND XLO+3.DELX,
0019
WHERE XLO AND DELX ARE PARAMETERS •
0020
0021
0022
CUFITI HAS TWO AUTOMATIC HI SPEED BYPASSES, ONE E~FECTIVE
0023
IN CASES WHERE XLO=-3 AND DELX"'+2, THE OTHER APPLYING
0024
TO REPEATED CALLS OF CUFITl WITH IDENTICAL VALUES OF XLO
0025
AND DELX.
0026
0027
- fAP SUBROUTINE IFORTRAN-II COMPATIBLE)
LANGUAGE
0028
EQUI PMENT - 709 OR 7090 IMAIN FRAME ONLY)
0029
STORAGE
- 158 REGISTERS
0030
ON
709
,
ON
7090
SPEED
0031
1. GENERAL.
614MC"'7.37MS, 545MC-l.19MS
2. REPEAT CALL IN GENERAL
0032
WITH SAME XLO, DELX.
496MC"'5.95MS, 445MC=.970MS
0033
0034
3. CASE IN WHICH XLO '" -3
0035
AND DELX '" 2 •
290MC=3.48MS, 268MC=.584MS
0036
WHERE MC = MACHINE CYCLES, MS" MILLISECONDS.
0037
0038
0039
- S.M. SIMPSON, MARCH 1964
AUTHOR
0040
0041
0042
----USAGE---0043
0044
TRANSFER VECTOR CONTAINS ROUTINES - INOT ANY)
0045
AND FORTRAN SYSTEM ROUTINES - INOT ANY)
0046
0047
FORTRAN USAGE
CALL CUFITIIFOFX,XLO,DELX,COEFS)
0048
0049
0050
0051
INPUTS
0052
0053
FOFXII)
1=1 ••• 4 CONTAINS THE VALUES THAT THE POLYNOMIAL
0054
MUST ASSUME, AS DETAILED BELOW
0055
0056
IS DEFINED IN THE ABSTRACT
XLO
0057
0058
DELX SHOULD NOT 8E lERO
IS DEFINED IN THE ABSTRACT.
DELX
0059
BUT MAY BE NEGATIVE •
0060
0061
0062
OUTPUTS
STRAIGHT RETURN WITH NO OUTPUTS IF 4FELX"'O •
0063
0064
COEFSII ) 1=1 ••• 4 WILL CONTAIN CO,Cl,C2,C3 DETERMINED SO THAT
0065
THE POLYNOMIAL FIX) GIV~N IN THE ABSTRACT WILL SATISFY
0066
FIXLO)
FOFX 111
0067
FOFX(2)
FIXLO+OELX)
0068
F1XLO+2*DELX) '" FOFX(3)
0069
FOFX(4)
FIXLO+3*OELX)
0070
0071
0072
EXAMPLES
0073
0074
2.,4.,10.,26.
XLO=-l.
DELX"'I.0
1. INPUTS - FOFXll ••• 4)

9/4/64
"
CUFITI I SUBROUTINE)
..
FAP
.CUFITl
COUNT
300
LBL
CUFIT1
ENTRY
CUFIT1 IFOFX,XLO,DELX,COEFS)

•
•
•"

_..........•............
CUF ITl
•
"

•••••••••••••••••••••••
..
..•••••••••••••••••••••••••
CUFIT1
CPAGE

PROGRAM LISTINGS

.••••••••••••••••••••••••
.
CUFIT1
• •••••••••••••••••• * ••••

2)

..
..
..

IPAGE

USAGE

CALL CUFIT1CFOFX,XLO,DELX,COEFS11
CALL CUFIT!CFOFX,XLO,DELX,COEFS2)
OUTPUTS - COEFS1C1 ••• 4) = COEFS2(1 ••• 4) = 4.0,3.0,2.0,1.0

.

.. 2. INPUTS - FOFX(1 ••• 4) = -14.,2.,10.,58. XLO=-3. DELX=2.0
..
COEFS4(1 ••• 4) = -99.,-99.,-99.,-99.
..
USAGE
CALL CUFITICFOFX,XLO,DELX,COEFS3)
..
CALL CUFITl(FOFX,XLO.0.O,COEFS4)
..
OUTPUTS - COEFS3C1 ••• 4) = 4.0,3.0,2.0,1.0
..
COEFS4C1 ••• 41 = -99.,-99 •• -99.,-99.

.

.. 3. INPUTS - FOFXll ••• 4) = 2.0.3.0.4.0,5.0 XLO=2.0 DELX=1.0
USAGE
CALL CUFIT1CFOFX,XLO,OELX,COEFS5)
..
..
OUTPUTS - COEFS5(1 ••• 4) = 0.0,1.0,0.0.0.0

....

.

.. PROGRAM FOLLOWS BELOW
HTR
HTR
BCI

.

.. ONLY ENTRY •
..CUFITI
SXD
SXD

0
0
l,CUF IT 1

CUFITIIFOFX,XLO,DELX,COEFSI
CUFITI-2,4
CUFITI-3,l

*
• EXIT ON ZERO DELX
*
3,4
NZT*
TRA
LEAVE

.

.... BRINGCLAIN FM3,FM1,Fl,F3
1,4
CLAF

.
...

ADD
STA
AXT
CLA
STO
TlX
CLA
STA
SUB
STA
SUB
STA
SUB
STA

XR1
XR4

DELX
AND SET ADDRESSES
A(FOFXlll)

K1
CLAF
4,1
•• ,1

FM3+1.1
CLAF,l,l
4,4
STOCZ
Kl
STOC1
Kl
STOC2
Kl
STOC3

•• =AIFOFXIl)l+l
AICOEFSClll

.. ISO FAR IT HAS TAKEN ABOUT 29 HI SPEEDS)

.. SET TRIAL VALUES OF CO, C1, C2, C3 (FOR XLO=-3.0, DELX=2.0)
(C3)
1
..
I-I +3 -3 +11 (FM3)
..
(C2)
C+3 -3 -3 +3) (FM1)
(Cll
'.8 (+1 -21 +21 -11 (Ftl
..
..
(COl
(-3 +21 +21 -31 IF3)

.
.

.. FIRST C3

..

.

CLA
FSB
XCA
FMP
FSB
FAD
XCA
FMP
STOO STO
STO

FMl
Fl
K~L

FM3
F3
R48

*.

C3

.. THEN C2
CLA

FM3

... =A I CDEFS 1-3

0015
0016
0011
0018
0019
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0131
0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
0148
0149

2)

••••••••••••••••••••••••

CUFITl
•
"••••••••••••••••••••••••
(PAGE

PROGRAM LISTINGS

31

FSB
FSB
FAD
XCA
FMP
STOC2 STO
STO

""

CLA
FSB
XCA
FMP
FAD
FSB
XCA
FMP
STOCI STO
STO

-

"•

"•
•"

-

""

•

*"=AICOEFSI-2

Fl

FMl
K271
FM3
F3

_.

R48
Cl

*""AICOEFSI-l

FMl
Fl

K9L
FM3
F3
R16

""

**"A(COEFS)

Cl

NOW WE ARE ALL DONE IN THE CASE THAT
XLO " -3.0 AND OELX = 2.0
CLS·
CAS
TRA
TRA
TRA
CLA.
CAS
TRA
TRA

2,4
K3L
CKJUMP
"+2
CKJUMP
3,4
K2L
CKJUMP
LEAVE

-XLO
NO
MAYBE
NO
OELX
NO
EX IT

(IF XLO=-3 AND DELX*2, THE CHECK TAKES 7 HI SPEEDS, OTHERWISE
AVERAGE " 3)
OTHERWISE JUMP AHEAO IN THE CASE THAT
AND DELX ARE BOTH THE SAME AS LAS T CALL.
CLA"
LDQ.
CAS
TRA
TRA
TRA
XCA
CAS
TRA
TRA
XCA

"" STORE THE
" NEW STO
•"

R16

""
C2

(SETTING THE ABOVE TAKES 19 HI SPEEDS, 12 FAOS, 7 FMPSI

• XLO
•
CKJUMP

•

FM1
Fl
F3

THEN CO

CLA
FAD
XCA
FMP
FSB
FSB
XCA
FMP
STOCl STO
STO

"

(PAGE

THEN Cl

""

"

••••••••••••••••••••••••

CUFITl
"
"••••••••••••••••••••••••

STQ

3,4
2,4
LASOEl
NEW
·+2
NEW
LASXLO
·+2
REVISE

OELX IN AC
XLO IN MQ
FIRST CHECK DELX
NEW
MAYBE OLD
NEW
CHECK XLO IF MAYBE
NEW
JUMP AHEAD
NEW, RESTORE ACt MQ

NEW XLO AND DElX
LASOEl
LASXLO

(TAKES B HI SPEEOS IF JUMP, 7 I F NOT)
IN THE GENERAL CASE WE HAVE TO SET THE CONSTANTS

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
01Bl
01B2
01B3
0184
01B5
0186
0187
01BB
01B9
0190
0191
0192
0193
0194
0195
0196
0197
019B
0199
0200
0201
0202
0203
0204
0205
0206
0207
020B
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224

3)

••••••• *** ••••••••••••••

•

-

eUFITI

PROGRAM LISTINGS

-

41

..
•
•

-

eLA
FOP
STQ
FMP
STO
XCA
FMP
STO
CLS
XCA
FMP
FSB
STO
FAD
S TO
FAD
STO
XCA
FMP
STO

K2L
LASOH
K
K
KSQUAR
K
KCUBE
K
LASXLO
K3L
G
G
TWG
G
THG
G
THGSQR

ITHESE SETTINGS TAKE 12 HI SPEEDS. 1 FOP. 4 FMPS. 3 FADSI

- COMPUTE AND STORE THE REVISED COEFFICIENTS AS FOLLOWS
IK .... 3
0
o 0) I(3)
IC31
o 0) IC21
13IK--2IG
K--2
IC21
K
0) (ClI
ICII
I3KIGull
2KG
It
G 11 ICOI
ICOI
IG--3
G**2

•-

REVISE LDQ
FMP
STOLOQ
FMP
FAD
XCi'<
FMP
STOLOQ
FMP
STO
LOQ
FMP
FAD
FAD
XC"
FMP
STOLOQ
FMP
FAD
XCA
FMP
FAD
XCA
FMP
FAO
STO-

-

C3
KCUBE
STOC3
C3
THG
C2
KSQUAR
STOC2
C3
THGSQR
TEMP
C2
TWG
TEMP
Cl
K

STOC1
C3
C2
G

Cl
G

cz
SToez

IREVISEON TAKES 16 HI SPEEDS, 9 FMPS. 6FADS)

-

- EXIT
LEAVE lXD
TRA

-

el=Cl+GIC1+GIC2+GItC311

G

It

CUFITI-3,1
5,4

.. CONSTANTS
Kl
K2L
K3L

PZE
OEe
DEC

1

2.0
3.0

It

IPAGE

K. KSQUAR, KCUBE. G. 2G. 3G. 3GSQR
WHERE K
2/DELX
G = -K-IXLO+3/KI = -K-XLO-3

•

CUFIT1

••••••••••••••••••••••••

••••••••••••••••••••••••
(PAGE

••••••••••••••••••••••••

0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
024B
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0213
0274
0275
0276
0217
0278
0279
0280
0261
0262
0283
0284
0285
0286
0287
0286
0269
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299

4)

.........................
*

•

CUFITI

PROGRAM 1I STINGS

••••••••••••••••••••••••
(PAGE

(PAGE

51

K9l
K27l
RIb
R48

DEC
DEC
DEC
DEC

*
* VARIABLES

•F3

Fl
FMl
FM3
lASXlO
lASDEl
KCUBE
KSQUAR
K
THGSQR
THG
TWG
G

CZ
Cl
C2
C3
TEMP

PIE
PIE
PZE
PIE
PZE
PZE
PZE
PZE
PZE
PZE
PZE
PZE
PZE
PZE
PlE
PZE
PZE
PZE
END

9.0
27.0
.0625
.020833333

.. , .. ., ..
··f··'
....
··t··t··

··t··,··
··t··.··
••
,--,*.
··.,··f··
..... , ..
··t··,··
·*'··f··
··t··.,··

··f··,··
.... ,., .....
.. , ..
··f·-'··
.. , ... , ....
··f-·.··

.* •• *.*.

••••••••• * ••••••••••••••

CUF I Tl
*
•••••••••••••••••••••••••

=1116
=1148

NOTE ORDER
OF F SEQUENCE
IS IMPORTANT
K**3
K**2
210ElX
3*(G*.21
3*G
2*G

0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311
0312
0313
0314
0315
0316
0317
0318
0319
0320
0321
0322
0323
0324
0325

51

••••••••••••••••••••••••
..••••••••••••••••••••••••
CVSOUT

••••••••••••••••••••••••
.••••••••••••••••••••••••
CVSOUT

PROGRAM LISTINGS

It

It

..
CVSOUT tSUBROUTINE)
9/29/64
lAST CARD IN DECK IS NO.
..
FAP
"CVSOUT
COUNT
200
CVSOUT
lBl
ENTRY
CVSOUT IITAPE,NSPACE.FMTHED.FMTLIN.ILO.IHI.ARGlO,ARGDEL,
SPACE.Xl,X2 ••••• XNI

."

----ABSTRACT----

"
.."

....

TITLE - CVSOUT
OUTPUT COLUMN VECTORS BY NORMAL OR LITERAL FORMATS

.
"
..
It

.."
.. LANGUAGE
..
..
..
..

..

EQUIPMENT
STORAGE
SPEED
AUTHOR

CVSOUT IS A VARIABLE-LENGTH-CALLING-SEQUENCE PROGRAM
WHICH OUTPUTS AN ARBITRARY NO. OF VECTORS IN COLUMN
FASHION ONTO A SPECIFIED TAPE UNIT. IT PROVIDES A
LEFTMOST COLUMN WITH VALUES INCREMENTED BY A SPECIFIED
AMOUNT FROM A SPECIFIED BASE. USER SUPPLIES HEADING
FORMAT AND LINE FORMAT AS EITHER NORMAL FORMAT VECTORS
OR LITERAL ONES •
- FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
- 109 OR 7090 (MAIN FRAME PLUS ONE TAPE UNIT)
- 84 REGISTERS
- S.M. SIMPSON JR,

SEPTEMBER 1963

----USAGE---.... TRANSFER VECTOR CONTAINS
ROUTINES FORTRAN SYSTEM ROUTINES .... FORTRANANDUSAGE

CARIGE,FMTOUT,VECOUT
NONE

It

..
..

....
..
...
...
...
..
...
......
..
..
..
..
..

1

CALL CVSOUTtITAPE,NSPACE.FMTHED,FMTLIN,ILO,IHI.ARGlO,ARGDEL,
SPACE.Xl,X2, ••• ,XN)

INPUTS

DEFINE A NORMLIT FORMAT VECTOR AS EITHER
Al A NORMAL FORMAT VECTOR •
OR B) LITERAL HOLLERITH IN A CALLING SEQUENCE WHOSE
CHARACTERS tREADING CONTINUOUSLY FROM LEFT TO RIGHT)
ARE THE DESIRED FORMAT STRIPPED OF THE ENCLOSING
PARENTHESES. THE FIRST AND SECOND CHARACTERS MUST
NOT BE QUOTE ( UNQUOTE DR QUOTE ) UNQUOTE
RESPECTIVELY. (TWO 8LANKS FOLLOWED BY I WOULD BE OK.)

I TAPE

IS DESIRED LOGICAL TAPE NUMBER

NSPACE

IS DESIRED NO. OF INITIAL SPACES (MAY BE ZERO) BEFORE
ANY PRINTING •
IF NEGATIVE A PAGE RESTORE OCCURS BEFORE PRINTING •

FMTHEDII) 1:1,2, ••• OR 1:1.0.-1, ••• IS A NORMLIT FORMAT VECTOR TO
BE PRINTED AS A HEADING FOR THE COLUMNS.
FMTLIN(I) 1=1,2, ••• OR 1=1.0.-1, ••• IS A NORMLIT FORMAT VECTOR
GIVING THE PRINTING FORMAT FOR A SINGLE LINE OF
OUTPUT. THE LIST OF QUANTITIES PRINTED ON A LINE IS
ARG(L),XltI).X2II), •••• XN(Il WHERE ARG(L) IS DEFINED
BELOW. FMTLIN MUST INCLUDE THE IFLTGI FORMAT FOR
ARGILI AS WELL AS FOR THE X VECTORS.

it

..

...
...
..
...

ILO

IS FIRST SUBSCRIPT OF VECTOR RANGE TO BE PRINTED.
MUST EXCEED a (NOT CHECKEDI.

IHI

IS LAST SUBSCRIPT OF VECTOR RANGE TO BE PRINTED.
MUST BE GRTHN: ILO INOT CHECKED) •

ARGLO

INITIAL VALUE OF QUANTITY ARGIL) TO APPEAR IN LEFTMOST
COLUMN •
MUST BE FLOATING POINT •

ARGDEL

INCREMENT FOR ARG, FLOATING POINT.
ARGIL):ARGLO+IL-I)ttARGDEL WHERE L

it

it

it

LINE INDEX •

0220
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0031
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0051
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0013

* ••• - •••••••••
.••••••••••
..
CVSOUT
• * •••••

PROGRAM LISTINGS

*** ••• ***.*******

IPAGE

CVSOUT

**.*.*****.*******.*.** •

2)

.....
.....
.....
...

IPAGE
SPACE I I )

l=l ••• N+l IS SCRATCH AREA WHERE N : NO. OF VECTORS.

X1 I I )
X2(1)
ETC
XNI I)

I=ILO ••• IHI
I=ILO ••• IHI

IS FIRST VECTOR, ANY MODE
IS SECOND VECTOR, ANY MODE

I=ILO ••• IHI
ZERO.

IS N-TH VECTOR, ANY MOOE.

OUTPUTS

N MUST EXCEEO

THE VECTORS ARE PRINTED COLUMNWISE AS ILLUSTRATED BELOW •

.. EXAMPLES

.

.. 1. USING NORMAL FORMATS
..
INPUTS - Xll ••• 10) = 1.1,2.2, ••• ,10.10
IXlI1 ••• 10l = 1,2, ••• ,10
..
IX211 ••• 10) = 2,3, ••• ,11
IX311 ••• 10) = 3,4, ••• ,12
..
FMTHll ••• 6) = 34HI26H ARGX
X
IX1 IX2 IX3,11)
..
FMTLll ••• 31 = 18HIF6.2,F6.1,2x,3I4)
..
USAGE
DIMENSION SPACE(5)
..
CALL CVSOUTI2,3,FMTH,FMTL,4,10,-.03,.01,SPACE,X,
..
1
IXl,IX2,IX31
..
OUTPUTS - THE FOLLOWING 12 LINES

...
..

..

....
..
....
.

ARGX

x

IXI IX2 IX3

-0.03
4.4
4
5
6
-0.02
5.5
7
5
6
-0.01
6.6
6
7
8
9
7.7
0.00
7
8
0.01
8.8
9 10
8
0.02
9.9
9 10 11
0.03 10.1
10 11 II
WILL BE PRINTED OFF-LINE FROM LOGICAL l

(UNDER PROGRAM
CONTROLI

.. 2. USING LITERAL FORMATS
..
INPUTS
X,IXl,IX2,IX3 SAME AS IN EXAMPLE 1.
..
USAGE
CALL CVSOUTIl,3,32Hl6H ARGX
X
IXI IXl IX3,
..
1 11,16HF6.l,F6.1,lX,3I4,4,10,-.03,.01,SPACE,X,
..
2 lXI, IXl, IX3)
..
OUTPUTS - IDENTICAL TO THOSE OF EXAMPLE 1.

....
.....

PROGRAM FOLLOWS BELOW

TRANSFER VECTOR CONTAINS CAR I GEt FMTOUT, VECOUT
HTR
o
XRl
HTR
o
XR2
XR4
HTR
o
1,CVSOUT
BCI
.. ONLY ENTRY. CVSOUTIITAPE,NSPACE,FMTHED,FMTLIN,ILO,IHI,ARGLO,ARGDEL,
SPACE,Xl,X2, ••• ,XNI
CVSOUT SXO
CVSOUT-2,4
SXO
CVSOUT-3,2
CVSOUT-4,1
sxn
1,4
AI ITAPE)
Kl
CLA
STA
Cl
STA
Fl
STA
VI
2,4
AINSPACE)
CLA
STA
C2
3,4
AIFMTHEO)
CLA
STA
F2
4,4
AIFMTLINI
CLA
STA
V2
9,4
AISPACEI
CLA
STA
V3
STA
STO
.. SET UP LOOP CONTROLS
6,4
CLA ..
IHI
TXL2
TO LOOP CONTROL.
STD
7,4
ARGLO
CLA"
9,4
TO SPACEIlI.
STO"

..

.

*****.*.***.*.**********
It

0074
0075
0076
0077
0078
0079
0080
0081
0082
00B3
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111

0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131

0132
0133
0134
0135

0136
0131
0138
0139

0140
0141
0142
0143
0144
0145
0146
0147
0148

21

••••••••••••••••••••••••
CVSOUT
*
_ ........... *

...... ...(PAGE

_.

3)

CLA.
POX
CLA

5,4
0.2
8.4
STA
FAD
* OPERATE THE CARRIAGE
TSX
SCARIGE.4
*.,0
TSX
Cl
TSX
C2
**,0
* AND PRINT THE HEADING
TSX
SFMTOUT ,4
TSX
Fl
**,0
F2
TSX
*",0
* THEN COUNT THE VECTORS
LXO
CVSOUT-2.4
AXT
0,1
TXI
*+1,4,-9
NXTLIN,4
SXA
1,4
CAL
CAL
ANA
AMASK
lAS
TSXl
TRA
TRA
*+2
TRA
COVER
TXI
*+1,1,1
CAL,4,-1
TXI
* FINISHED
TXLl,l
COVER SXD
TX!
*+1,1,1
SXD
NPl,1
SXA
LEAVE ,4
* SET NEXT LINE OF OUTPUT IN

*•

PROGRAM LISTINGS

••••••••••••••••••••••• *
*
CVSOUT
*

*--•.••••.••••••. _-*---(PAGE

ILO
TO XR2.
AIARGDEll

**=A(ITAPEI
**=AINSPACEI
**=AI ITAPEI
**=AIFMTHEDI

ISAVE FOR INITIALIZING LOOPI
TSX Xl,O
TSX X2,0 •••
OONE
MORE
DONE

STORE N,
AND N+l.
ISAVE FOR EXITING TO 1,4)
SPACEl1 ••• N+l)

XR4 ACQUIRES VECTOR ADDRESSES
•
XR2 ACQUIRES VECTOR ELEMENTS IILO TO I HII
•
XRl STORES IN SPACE VECTOR 12 ••• N+l)
11,4 IS THEN TSX Xl,O)
NXTLIN AXT
**,4
A XT
1,1
• START LOOP
1,4
CLA
CLA
ADD
Kl
TSX XK+l,O
H-l
STA
CLA
**=AIXK)+1
* •• 2
STO
STO
**=AISPACEl
**,1
TXI
*+1,4,-1
TXI
*+1,1,1
TXLl TXL
ClA,I,**
* GO OUTPUT ONE LINE
TSX
$VECOUT,4
TSX
*.=AI ITAPEl
VI
·*,0
V2
TSX
""=AIFMTllNl
**.0
V3
TSX
**=AISPACEI
**to
TSX
KD1,O
1
NPl,O
TO N+l
TSX
• CHECK FOR MORE AFTER INCREMENTING SPACEll)
CLA.
V3
**=A 1_~RGDELl
FAD
FAD
**
TNZ
SSP
STO.
V3
*+1,2,1
TXI
TXl2 TXL
**=IHI
NXTLIN.2, **
* EXIT
LEAVE AXT
**,4
lXD
CVSDUT-3,2
CVSOUT-4,1
LXD
TRA
1,4
* CONSTANTS, TEMPORARIES
0,0,1
KDl
PIE
AMASK OCT
717717700000
0,0
TSXZ TSX
NPI
PZE
**=NO. OF VECTORS + 1
0,0,**
ENO

0149
0150
0151
0152
0153
0154
0155
0156
0151
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0110
0171
0172
0113
0114
0175
0116
0117
0118
0119
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0191
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220

3)

••••••••••••••••••••••••

•

DADECK

•

PROGRAM LISTINGS

•

DADECK

•

••••••••••••••••••••••••

••••••••••••••••••••••••

•
DADECK ISUBROUTINE)
•
LABEL
CDADECK
SUBROUTINE DADECK IITPIN.ITPOUT)

••••••••••••••••••••••••

9/1t/64

LAST CARD IN DECK IS NO. 0069
0001
0002
0003
C
0004
C
0005
C
----ABSTRACT---0006
C
0007
C TITLE - DADECK
0008
C
LIST DATA DECK AND REPOSITION TAPE TO FRONT OF DECK
0009
C
0010
C
DADECK LISTS THE DATA ON TAPE ITPIN FROM THE PLACE WHERE
0011
THE TAPE IS POSITIONED WHEN DADECK IS CALLED TO THE END
C
0012
C
OF FILE. THE TAPE IS REPOSITIONED BEFORE RETURN IS MADE.
0013
ALL BO COLUMNS OF A CARD WILL BE LISTED. THE OUTPUT
C
0014
C
FORMAT SPACES ONE COLUMN TO THE RIGHT SO THAT CHARACTERS
0015
IN COLUMN ONE WILL NOT AFFECT THE CARRIAGE CONTROL. THE
C
0016
C
LISTING IS MADE ON ITPOUT.
0011
C
0018
C
DADECK MAKES NO COMMENTS ANO DOES NOT RESTORE THE
0019
CARRIAGE. IF THERE IS NO DATA ON ITPIN. THERE WILL BE NO
C
0020
C
OUTPUT AT ALL FROM DADECK.
0021
C
0022
C LANGUAGE
- FORTRAN II
0023
C EQUIPMENT - 1091109011094 CMAIN FRAME AND TAPE DRIVES)
0024
STORAGE
- 100 REGISTERS
C
0025
- PROPORTIONAL TO NO. OF DATA CARDS
C SPEED
0026
C AUTHOR
- J. N. GALBRAITH, JR.
AND R. A. WIGGINS
0021
C
0028
C
0029
C
----USAGE---0030
C
0031
C TRANSFER VECTOR CONTAINS ROUTINES - EOFSET,RSKIP
0032
C
AND FORTRAN SYSTEM ROUTINES - CTSHl,IRTNl.ISTH).IFIL)
0033
C
0034
C FORTRAN USAGE
0035
C
CALL DADECKIITPIN,ITPOUTl
0036
C
0031
C
0038
C INPUTS
0039
C
0040
C
ITPIN
FORTRAN II INTEGER. LOGICAL TAPE NUMBER OF INPUT TAPE
0041
C
ITAPE CONTAINING DATA OECK).
0042
C
0043
I TPOUT
C
FORTRAN II INTEGER. LOGICAL TAPE NUMBER OF OUTPUT TAPE
0044
ITAPE ON WHICH DATA DECK WILL BE WRITTENl.
C
0045
C
0046
0041
C
C OUTPUTS
0048
C
0049
PRINTED AS DESCRIBED ABOVE.
C
0050
C
0051
C
0052
C PROGRAM FOLLOWS BELOW
0053
0054
C
DIMENSION DATA(14)
0055
INUM=O
0056
CALL EOFSETIO,EOF,ITAPE)
0051
IF IEOFl 40,10,40
0058
10
CONTINUE
0059
READ INPUT TAPE ITPIN,20,{DATAIIl,I=1,14l
0060
20
FORMATI13A6,A2l
0061
0062
WRITE OUTPUT TAPE ITPOUT,30,CDATAII),1=1,14)
30 FORMATI1X13A6,A2l
0063
INUM=INUM+l
0064
GO TO 10
0065
CAll RSKIPIITPIN,-INUM-1.EOF)
40
0066
0061
CALL EOFSET l-l,EOF,ITAPEl
RETURN
0068
END
0069

.••••••••••••••••••••••••
.
DELTA
••••••••••••••••••••••••
..

..
...

..
..
..

.....

....
....
...
...
.
....
......
....
..

...

....
..

..
..
..
..

...

....
..
...
..
...
....
..
."

DELTA (FUNCTIONS)
FAP

PROGRAM LISTINGS

.••••••••••••••••••••••••
..
DELTA
••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0140
0001
0002
COUNT
0003
75
LBL
DelTA
0004
ENTRY
DELTA F(ARG)
0005
ENTRY
XDELTA F(ARG)
0006
ENTRY
0007
STEPR F(ARG)
0008
ENTRY
XSTEPR F(ARG)
STEPL F(ARG)
EfliTRY
0009
EfliTRY
XSTEPL F(ARGJ
0010
ENTRY
STEPC F{ARG)
0011
ENTRY
XSTEPC FIARG)
0012
0013
0014
----ABSTRACT---0015
0016
TITLE - DELTA, WITH SECONDARY ENTRIES XDELTA, STEPR, XSTEPR, STEPL,
0017
XSTEPL, STEPC, XSTEPC
0018
DELTA FUNCTION AND STEP FUNCTIONS, FLOATING AND FIXED POINT
0019
0020
DELTA HAS VALUE EQUAL TO PLUS ZERO UNLESS THE MAGNITUDE
0021
OF ITS ARGUMENT (WHICH MAY BE EITHER FIXED OR FLOATING
0022
POINT) IS ZERO, IN WHICH CASE DELTA HAS VALUE EQUAL TO
0023
1.0 (flOATING) •
0024
0025
XDELTA IS IDENTICAL TO DELTA EXCEPT THAT IT GIVES A
0026
FIXED POINT OUTPUT •
0027
0028
STEPR HAS VALUE EQUAL TO PLUS ZERO UNLESS THE VALUE OF
0029
ITS ARGUMENT (EITHER FIXEO OR FLOATING POINT) EXCEEDS
0030
ZERO, IN WHICH CASE STEPR HAS VALUE EQUAL 1.0 (FLOATING) •
0031
0032
XSTEPR IS IDENTICAL TO STEPR EXCEPT THAT IT GIVES A
0033
0034
FIXED POINT OUTPUT •
0035
STEPL HAS VALUE EQUAL TO PLUS 1.0 UNLESS THE VALUE OF
0036
ITS ARGUMENT tEITHER FIXED OR FLOAITNG POINT) IS LESS
0037
THAN ZERO, IN WHICH CASE STEPL HAS VALUE EQUAL 0.0 (FLTG)
0038
0039
XSTEPL IS IDENTICAL TO STEPL EXCEPT THAT IT GIVES A
0040
FIXED POINT OUTPUT •
0041
0042
STEPC HAS VALUE EQUAL TO ZERO WHENEVER THE SIGN BIT OF
0043
ITS ARGUMENT IS NEGATIVE. OTHERWISE STEPC HAS VALUE
0044
1.0 IFLTG) •
0045
0046
XSTEPC IS IDENTICAL TO STEPC EXCEPT THAT IT GIVES A
0047
FIXED POINT OUTPUT •
004B
0049
LANGUAGE
- FAP FUNCTIONS (FORTRAN II COMPATIBLE)
0050
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
0051
STORAGE
- 17 REGISTERS
0052
SPEED
- 6, 8, OR 10 MACHINE CYCLES
0053
AUTHOR
0054
- S.M. SIMPSON, APRIL 1964
0055
0056
0057
---USAGE---0058
TRANSFER VECTOR CONTAINS ROUTINES - (NOT ANY)
0059
0060
AND FORTRAN SYSTEM ROUTlfIIES - (NOT ANY)
0061
FORTRAN USAGES
0062
Y
DELTAFIX)
OR
DELTAFI IX)
0063
STEPRFt IX)
0064
Y = STEPRFt Xl
OR
Y = STEPLFIX)
OR
STEPLFIIXI
0065
0066
Y = STEPCFIXI
OR
STEPCFI IX)
XDELTAFIIX)
IY=XDELTAFIX)
OR
0067
IY=XSTEPRFtX)
XSTEPRF( IX)
0068
OR
XSTEPLFI IX)
0069
IY=XSTEPLFIX/
OR
0070
OR
XSTEPCFIIX)
IY=XSTEPCFIX)
0071
0072
0073
INPUTS
0074
9/4/64

.••••••••••••••••••••••••
.
DELTA

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE 2)

••••••••••••••••••••••••
(PAGE

2)

.. X
.. IX
.
.. OUTPUTS
.. Y
..

.... IY
..... EXAMPLES
1. INPUTS
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..

....
.....
....

.••••••••••••••••••••••••
.
DELTA

IS ANY FLOATING POINT NO.
IS ANY FIXED POINT NO.

AS DESCRIBED IN ABSTRACT
AS DESCRIBED IN ABSTRACT

- Xl1 ••• 6) = -2., -1., -D., 0., 1., 2.
IXll ••• 6) = -2, -I, -0, 0, 1, 2
USAGES
DO 10 1=1,6
01111
DELTAFI XII)I
02111
OELTAFIIXIII)
101111
XDELTAFI XIII)
102111
XDELTAFIIXII))
SRlll1
STEPRFI XCI)I
SR21I I
STEPRFI IX( I) I
ISRlIII
XSTEPRF( XII))
ISR2111
XSTEPRFIIXII1I
SLl111
STEPLF( XII»)
SL21I1
STEPLFIIXI[)I
[SLl 111
XSTEPLF( XII)I
ISL21I1
KSTEPLF(IXII)I
SCI1I1
STEPCFIKII)
SC21I1
STEPCFIIKI[»
[SClI II
KSTEPCFIXI [) I
10 [SC2(1)
XSTEPCF([XII)I
OUTPUTS - 0111 ••• 61 = D211 ••• bl = 0 •• 0 •• 1 •• 1., 0., O.
10111 ••• 6) = 10211 ••• 6) " 0, 0, 1, I, 0, 0
SRlll ••• b) = SR2II ••• 61
0., 0., D., D., I., 1.
ISRlI 1 ••• 6) = SR2( 1 ••• bl = 0, 0, 0, 0, I, 1
SLlll ••• 61 = SL21l ••• 61 " 0., 0., I., I., I., 1.
ISLIII ••• bl = ISL2II ••• 61 = 0, 0, 1, 1, 1, 1
SClI1 ••• bl = SC211 ••• 61 = D., D., 0., I., 1., 1.
ISClIl ••• bl = ISC2Cl ••• 61 = 0, 0, 0, I, 1, 1

=

PROGRAM FOLLOWS BELOW
NO TRANSFER VECTOR

8CI
DELTA HE
KDElTA TlE
GETZ PKD
TRA
STEPL TZE
STEPR TZE
STEPC TMI
GETlL CLA
TRA
KSTEPL TZE
KSTEPR HE
KSTEPC TMI
GETI CtA
TRA
XDI
PZE
DEC
KIL
END

I,OELTA
GETIL
GETl
0.0
1.4
GETlL
GETZ
GETZ
KIL
1,4
GETl
GETZ
GETZ
KOI
1,4
0,0,1
1.0

FIRST ENTRY
SECOND ENTRY
ANOTHER
ANOTHER
ANOTHER
ANOTHER
ANOTHER
ANOTHER

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140

••••••••••••••••••••••••

•

DETRM

•

••••••••••• **** ••• ******
REFER TO

SIMEQ

PROGRAM LISTINGS

••••••••••••••••• ** ••• **
•

DETRM

•

••••••••••• ** ••• ** •• * •••
REFER TO

SIMEQ

.••••••••••••••••••••••••
••••••••••••••••••••••••"

••••••••••••••••••••••••

PROGRAM L ISTlNGS

OERIVA

OERIVA
"••••••••••••••••••••••••
"

..
DERIVA I SUBROUTINE I
9/29/64
..
FAP
.DERIVA
COUNT
150
LBL
DERIVA
ENTRY
DERIVA IYOFX,LY,DELX.DYDX,YOFXll

•
•
•..

.•

----ABSTRACT---TITLE - DERIVA
DERIVATIVE OF A VECTOR BY

DIFFERENCI~G

0011

DERIVA FORMS A VECTOR, DYDXIII 1=1 ••• 2Y , REPRESENTING
THE DERIVATIVF OF ANOTHER VECTOR, YOFXIII l=l ••• LY ,
FROM THE DIFFERENCING FORMULAS

•"
•"
"
•.

.
.

IYOFXIZI - YOFXIIII/DELX

DYDXIKI

IYOFXCK+ll - YOFXIK-11/12.0.DELX)
FOR K = 2,3 •••• ,LY-l
IYOFXCLY) - YOFXILY-l))/DELX

WITH MINIMUM LENGTH OF LY

=2

THE OUTPUT DYDXl1 ••• LYI MAY REPLACE THE INPUT YOFX.

.

DERIVA HAS ONE OTHER OUTPUT YOFXl WHICH [T SETS= YOFXCl).
USING THIS QUANTITY [T [S POSSIBLE TO INVERT EXACTLY
THE DIFFERENTIATED VECTOR DYDX, AND REOBTAIN YOFX.
THIS INVERSION IS PERFORMED BY SUBROUTINE [DERIV. WHOSE
CALLING SEQUENCE IS THE REVERSE OF THAT OF DER[VA •

•

•..

...

LANGUAGE
.. EQUIPMENT
• STORAGE
• SPEED

- FAP SUBROUTINE IFORTRAN-II COMPATIBLE)
- 709 OR 7090 IMAIN FRAME ONLYI
- 61 REGISTERS
7090
709
7090
709
168
0101 831 + 139.4 OR 42.6)"LY MACHINE CYCLES
- S.M. SIMPSON, AUGUST 1963

.•

AUTHOR

"

TRANSFER VECTOR CONTAINS ROUTINES - INONEI
AND FORTRAN SYSTEM ROUTINES - INONE}

•

0014

0015
0016

DYDX 111

DYIJXILY)

..

•
•"

0012
0013

0011

•.
.•

•

LAST CARD IN DECK IS NO. 0159
0001
0002
0003
0004
0005
0006
0001
0008
0009
0010

0031

----USAGE----

.. FORTRAN USAGE
•
CALL DERIVAIYOFX,LY,DELX,DYDX.YOFXl)

....
.

"
..•

.•
...

•
..•

INPUTS
YOFXI II

1=1 ••• LY

LY

SHOULD EXCEED 1

DELX

SHOULD BE NON-ZERO

OUTPUTS
DYDXIII

.

•.
•

IS THE VECTOR TO BE DIFFERENT[ATED

IMAY BE NEGATIVE)

STRAIGHT RETURN WITH NO ACTION IF LY LSTHN 2 OR DELX
1=1 ••• LY

IS GIVEN IN ABSTRACT

EQUIVALENCEIDYDX,YOFX) IS PERMITTED
YOFXl

IS SET = YOFXIlI

• EXAMPLES

...

•
•

•
•
..•
•.

.

1. 8EHAVIOUR WITH VARIOUS DELX, LY VALUES
INPUTS - Yll ••• 51 = 2., 6. , 14., 18. , 18.
04 = FY4 = 05 = FY5 = -999.
USAGE
CALL DERIVAI Y. 5, 1., 01,
CALL DERIVA( Y, 5, -2., 02,
CALL DERIVAI Y, 2, I., 03,
CAL DERIVAI Y, I, I., 04,
CALL DERIVAI Y, 5, 0., 05,
4., 6., 6., 2., o.
OUTPUTS - 0111 ••• 51
0211 ••• 51 = -7 •• -3.,-3.,-1.,0.

FYlI
FY21
FY31
FY4)
FY51

001B
0019
0020
0021
0022
0023
0024
0025
0026
0021
0028
0029
0030
0031
0032
0033
0034
0035
0036

O.

0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
005B
0059
0060
0061
0062
0063
0064
0065
0066
0061
0068
0069
0070
0071

FYI
FY2

2.
2•

0072
0073
0014

.••••••••••••••••••••••••
••••••••••••••••••••••••"

••••••••••••••••••••••••

PROGRAM 1I STINGS

DERIVA

(PAGE

"DERIVA

•
•
•..
•
•
"•
".

03(1 •• 2)
04
FV4

=

..

• •••••••••••••••••••••••

21

IPAGE

=-05

4., 4.
FV3 =
= FV5 = -999. (NO OUTPUT CASES)

2.

2. MULTIPLE DIFFERENTIATION WITH OUTPUT REPLACING INPUT
INPUTS
VI1 ••• 6) = 4., 8., 12., 24., 20., 24.
USAGE
DO 10 1=1,3
10 CALL DERIVAI V, 6, 1., V, FVIIII
OUTPUTS - Vl1 ••• 6)
2., 0., -3., 0., 4., 4.
FVIl ••• 3) = 4., 4.. O.

=

" PROGRAM FOLLOWS 8ELOW

""

NO TRANSFER VECTOR
HTR
0
XR4
BCI
1,DERIVA
• ONLY ENTRV. DERIVAIVOFX,LV,DELX,DVDX,VOFX1)
DERIVA SXD
DERIVA-2,4
• CHECK LV (GRTHN= 2) AND DELX (NON-ZERO)
eLA.
2,4
LY
TMI
LEAVE
POX
0,4
TXL
LEAVE,4,1
TXI
"+1,4,-1
LV-l
SXD
TXL,4
LXD
DERIVA-2,4
CLA"
3,4
DELX
HE
LEAVE
" OK, SETUP
STO
REC2DX
CLA
fLP5
FOP
REC2DX
lIZ"OELX
STO
REC20X
1,4
CLA
AIYOfXl
STA
GET
Kl
AIYOFXl-l
SUB
STA
GETl
4,4
AIOYOXI
CLA
STA
STOI
AIOYDX)+l
ADD
Kl
STA
STORE
" FORM DVDX 111 AND VOfX1
CLA.
1,4
STO
OLDSTY
5,4
TO VOFXl
STO·
= AIYOfXl-l
GETl CLA
""
MIDDlY
STO
fSB
OLDSTY
FOP
fLP5
FiliP
REC2DX
•• = AIOVDXl
STDt S TO
" BYPASS LOOP If LV IS 2 IlY-l IS II
LXD
TXL,4
TXL
UPK1,4,1
PROCEED
TO LOOP
" OTHERWISE
AXT
2.4
K IN XR4
• LOOP TO SET DVDXI2,3 ••• K••• LV-ll
.",4
••
AIVOfXl
GET
LOO
OlDSTY
CLS
OLDSTY
STO
OLDSTY
fAD
XCA
FiliP
REC20X
AIDYDXl+l
STORE STO
".,4
"
CLA
MIDDLV
LDO
OLDSTY
STO
OLDSTY
STO
MIDDLY
.+1,4,1
UPKI TXI
TXL
TXL
GET,4,""
" .. = LV-l
XR4 NOW = LY
" NOW SET DYOXILVI.
CLA
MIDDLY
FSB
OLOSTY
FOP
FLP5
fMP
REC20X
STORE
STO"

.It

".

VOfX(lI
VOfXI21
VDfX(2)-VOFX{1)
TIMES 1/DELX
IS DVDX{ 11

=

.

VIK+ll-VIK-ll
TIMES 1I2DELX
IS DVDXIKI

VILV)-VILV-lI
TIMES I/DELX
IS DVDXIL VI

0015
0016
0011
0018
DOn
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149

2)

••••••••••••••••••••••••

•

OERIVA

•

PROGRAM LI STINGS

3)

(PAGE

* EXIT

LEAVE LXO
OERIVA-2,4
6,4
TRA
• CONSTANTS, TEMPORARIES
FLP5 DEC
0.5
1<1
P ZE
1
REC20X PZE
,
MIOOLY PZE
,
OLOSTY PZE
END

··w·*,··
,..... ........

OERIVA

• •••••••••••••••••••••••

••••••••••••••••••••••••
IPAGE

..._...................•.

•

1/12*OElX)
HOLDS YOFXIK)
HOLDS YOFXIK-ll

INITIAL=YOFX(2)
INITIAL=YOFX( 11

0150
0151
0152
0153
0154
0155
0156
0151
0158
0159

31

••••••••••••••••••••••••
DIFPRS
*...................
_ *

....

PROGRAM LISTINGS

*
DIFPRS 'SUBROUTINE)
•
FAP
·DIFPRS
COUNT
100
LBL
DIFPRS
DIFPRS ( x, LX,XPRSDF)
ENTRY
XDFPRS (IX,LIX,IXPRSD)
ENTRY

•

*

••
•

•
.•

..

•
•
•

..

•

•
•
•

*
*

•
..
•

....
..
..

•
..
..
..

...
•.
•"
*
*
*

.

*.

...
..*

..
..

.*

•
*

*

•

..
..
..
..
..
..
..
..
•

.

..

••••••••••••••••••••••••

•

DIFPRS

*

••••••••••••••••••••••••

9/29/64

LAST CARD IN DECK IS NO. 0117
0001
0002
0003
0004
0005
0006
0007
----ABSTRACT---0008
0009
0010
TITLE - DIFPRS WITH SECONDARY ENTRY XDFPRS
0011
DIFFERE~CE FIXED OR FLOATI~G VECTOR ELEMENTS IN PAIRS
0012
DIFPRS FORMS A FLOATING VECTOR WHOSE ELEMENTS ARE THE
0013
DIFFERENCES OF SUCCESSIVE PAIRS OF THE ELEMENTS OF
0014
ANOTHER FLOATING VECTOR, THE FIRST OUTPUT ELEMENT BEING
0015
SET EQUAL TO THE FIRST INPUT ELEMENT. OUTPUT MAY REPLACE
0016
0017
INPUT.
0018
0019
XDFPRS DOES THE SAME THING FOR FIXED VECTORS.
0020
OIFPRS AND XDFPRS ARE THE EXACT INVERSE OPERATORS OF
0021
0022
SUBROUTINES INTSUM AND XNTSUM RESPECTIVELY.
0023
0024
- FAP SUBROUTINES IFORTRAN-II COMPATIBLE)
LANGUAGE
0025
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
0026
- 30
REGISTERS
STORAGE
- DIFPRS 30.6 + 12.4.LX MACHINE CYCLES,
0027
SPEED
XDFPRS 37.0 + 8.0.LX
LX = VECTOR LENGTH
0028
0029
AUTHOR
- S.M. SIMPSON, AUGUST 1963
0030
----USAGE---0031
(J032
TRANSFER VECTOR CONTAINS ROUTINES - INONE)
0033
ANO FORTRAN SYSTEM ROUTINES - (NONE)
0034
0035
0036
FORTRAN USAGE
0017
CALL DIFPRSI X, LX,XPRSDF)
CALL XDFPRSIIX,LIX,IXPRSD)
0038
0039
INPUTS
0040
0041
XII)
0042
l=l ••• LX IS A FLOATING VECTOR INPUT TO DIFPRS
0043
0044
SHOULD EXCEED 0
LX
0045
I=l ••• LX IS A FIXED VECTOR INPUT TO XDFPRS. THE POSITION
0046
I XI I )
0047
OF THE BINARY POINT IS ARBITRARY.
0048
0049
SHOULD EXCEED 0
LIX
0050
OUTPUTS
STRAIGHT RETURN WITH NO OUTPUT IF LX OR LIX LSTHN 1
0051
0052
X(1)
0053
XPRSDFII) I=l ••• LX IS XPRSOFIl)
0054
XI
Il
XII-1)
,
I=2
•••
LX
AND
XPRSDF I I )
0055
0056
IXPRSDIII l=l ••• LX IS IXPRSD(1)
IX(1)
0057
AND
IXPRSOI Il
IXI I) - IXII-ll , I=2 ••• LX
0058
WITH SAME BINARY POINT AS IXII).
0059
0060
EQUIVALENCE IXPRSDF,X),IIXPRSD,IX) IS PERMITTED.
0061
0062
EXAMPLES
0063
0064
1. INPUTS - XIl ••• 4) = 1., 3., 6., 10. IXl1 ••• 4)
1,3,6,10 XDF3=0.
0065
USAGE
CALL DIFPRSI X,4, XDFl)
0066
CALL XDFPRSIIX,4,IXDF1)
0067
CALL DIFPRSI X,4, Xl
CALL DIFPRSI X,l, XDF21
0068
0069
CALL DIFPRSI X,D, XDf3)
0070
OUTPUTS - XDFlIl ••• 4) = 1., 2., 3., 4.
IXDFlIl ••• 4J
1,2,3,4
0071
XI1 ••• 4) = 1., 2., 3., 4.
XDF2 = 1.
C072
XDF3 = O. INO OUTPUT CASE)
0073
0074
2. INPUTS - IXl1 ••• 3) = OCT 000000000001, 000000000003, 000000000006

••••••••••••••••••••••••

DIFPRS
•
*••••••••••••••••••••••••
IPAGE

••••••••••••••••••••••••
*
DIFPRS
*

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

21

*

*

•
•
•

USAGE
CALL XDFPRSIIX,3,IX)
OUTPUTS - IXC1 ••• 3) = OCT 000000000001, 000000000002, 000000000003
PROGRAM FOLLOWS BELOW

• NO TRANSFER VECTOR
HTR
0
XR4
BCI
1,DIFPRS
• PRINCIPAL ENTRY. DIFPRSIX,LX,XPRSDFI
DIFPRS CLA
FSB
SETUP STO
SUBTR
SXD
DIFPRS-2,4
Kl
CLA
1,4
A(X)
STA
GET
ADD
Kl
AIX)+l
STA
SUBTR
CLA
3,4
A(XPRSDF)
STA
STORE
CLA.
2,4
LX
TMI
LEAVE
POX
0,4
TXL
LEAVE,4,0
TXI
.+1,4,-1
LX-1
TXL
LAST,4,0
• LOOP FOR ALL BUT XPRSDFCl)
GET
CLA
•• ,4
•• = AIX)
SUBTR NOP
FSB •• ,4 OR SUB
STORE STO
•• ,4
•• = AIXPRSDF)
TI X
GET ,4,1
• SET XPRSDF 11)
LAST LXD
DIFPRS-2,4
CLA.
1,4
XII)
STO.
3,4
XPRSDFll)
• EXIT
LEAVE LXD
DIFPRS-2,4
TRA
4,4
• SECOND ENTRY. XDFPRSIIX,LIX,IXPRSD)
XDFPRS CLA
SUB
TRA
SETUP
• CONSTANTS
FSB
FSB
•• ,4
SUB
SUB
•• ,4
END

•• ,4

•• = AIX'+l

0075
0076
0077
0078
0079
0080
00B1
0082
0083
0084
0085
0086
0087
0088
00B9
0090
0091
0092
00.93
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117

2)

••••••••••••••••••••••••

•

DISPUI (709)

•

PROGRAM LISTINGS

••••••••••••••••••••••••

•
DISPLA (709) (SUBROUTINE)
•
FAP
.DISPLA (709)
COUNT
400
LBL
DISPLA
ENTRY
DISPLA

....

•

..
•

.

...•

•

.•
•
..
..
..
..

..
.....
..
..
...
•
..
•
•

....
.

•
..
•
..
•

•..

•.
•
•.
•

•
•..
•
•
•..
•.

...
.....
..
...
to

••••••••••••••••••••••••

•

DISPLA (109)

•

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0473
0001
0002
0003
0004
0005
0006
----ABSTRACT---0007
0008
TITLE - DISPLA (709)
0009
0010
WRITE HOLLERITH TEXT ON SCOPE
0011
DISPLA PRODUCES TITLES, LABELS, AND LEGENDS FOR SCOPE
0012
DISPLAYS. IT CAN PLOT 64 CHARACTERS IN EITHER LARGE (36
0013
CHARACTERS ACROSS THE SCOPE) OR SMALL 148 LETTERS ACROSS
0014
THE SCOPE) MODES IN EITHER A HORIZONTAL OR VERTICAL
0015
DIRECTION.
0016
0017
0018
LANGUAGE - FAP SUBROUTINE (FORTRAN II COMPATIBLE)
EQUIPMENT - 709 (MAIN FRAME AND SCOPE)
0019
STORAGE
- 220 REGISTERS
0020
SPEED
0021
AUTHOR
- DISPLA IS A CONVERSION BY THE M.I.T. COMPUTATION CENTER OF
0022
THE SUBPROGRAM WRITE AS DESCRIBED IN M.I.T. LINCOLN LAB •
0023
MEMO. NO. 54-0003. THE VERSION HERE IS SLIGHTLY MODIFIED
0024
BY J. GALBRAITH (TO MAKE IT INVARIANT TO USE OR NON-USE OF
0025
STANDARD ERROR PROCEDURE) •
0026
0027
----USAGE---002S
0029
TRANSFER VECTOR CONTAINS ROUTINES - NONE
0030
AND FORTRAN SYSTEM ROUTINES - (IOHI
0031
0032
0033
FORTRAN USAGE
CALL DISPLA
0034
0035
PRINT 10,(LIST)
0036
10 FORMAT (OISCON,FMT)
0037
0038
INPUTS
0039
0040
PRIMARILY WHAT APPEARS ON THE SCOPE IS WHAT WOULD HAVE BEEN
WRITTEN BY THE PRINT STATEMENT WHICH FOLLOWS THE CALL DISPLA
0041
0042
STATEMENT. HOWEVER, THE BEGINNING CHARACTERS (CALLED DISCON
IN THE ABOVE FORMAT) OF THE FORMAT ARE USED TO CONTROL THE
0043
0044
MODE OF THE DISPLAY.
0045
DISCON
IS A VARIABLE LENGTH HOLLERITH FIELD
0046
1. THE FIRST CHAR~CTER IS A CONTROL CHARACTER AND
0047
MUST BE ONE OF THE FOLLOWING
004S
0049
CHARACTER
ACTION CAUSED
0050
0051
SAME MODE AND ORIGIN.
0052
+
o (ZERO) SAME MODE, DOUBLE SPACE.
0053
(BLANK)
0054
SAME MODE, SINGLE SPACE.
0055
CHANGE FILM FRAME, NEW MODE,
1
0056
NEW ORIGIN •
NEW MODE, NEW ORIGIN
0057
2
005S
WHER£ MODE REFERS TO THE SIZE OF THE CHARACTERS
0059
0060
AND TO THE DIRECTION OF PLOTTING, AND ORIGIN
REFERS TO THE LOCATION OF THE FIRST CHARACTER
0061
0062
OF THE LINE •
0063
IF THIS CHARACTER IS A +,0, OR BLANK, NO OTHER
0064
CHARACTERS ARE USED •
0065
0066
2. THE SECOND CHARACTER CONTROLS THE SIZE OF THE
0067
0068
PLOTTED CHARACTERS •
0069
BIG CHARACTERS (20 BY 28 SCOPE UNITS)
0070
B
SMALL CHARACTERS (15 BY 21 SCOPE UNITS)
0071
S
0072
9/29/64

.........
...............•
•

.
•

••••• ••••••••••••••••• *
~

IPAGE

2)

•
•
•
•
•
•
•

•
•
•
•
•
•
•
•
•
•
•

•
•
•
•
•
••
•
•

•
•
•
•

DISPLA (709)
.••..•..••.......
~

3. THE THIRD CHARACTER CONTROLS THE DIRECTION OF
PLOTTING.

•

H

V

HORIlONTAL
VERTICAL

4. THE LAST SET OF INFORMATION CONSISTS OF TWO 0 TO
4 OIGIT INTEGERS IGRTHN-O, LSTHN 1024) FOLLOWED
BY COMMAS. THE FIRST INTEGER INDICATES THE
X-COORDINATE AND THE SECOND INTEGER THE YCOOROINATE (IN SCOPE UNITS) OF THE LOWER LEFT
CORNER AT WHICH PLOTTING BEGINS.
THERE MUST BE NO BLANKS BETWEEN ANY OF THESE CHARACTERS
FMT

IMMEOIATLY FOLLOWS DISCON
IS THE STANDARD FORMAT FOR THE INFORMATION WHICH IS TO
BE WRITTEN ON THE SCOPE.
SHOULD NOT CALL FOR A LINE LONGER THAN 48 (FOR SMALL) OR
36 (FOR BIG) CHARACTERS. IF A LINE GOES BEYOND THE
EDGE OF THE SCOPE, THE END IS WRITTEN BEGINNING AT THE
OPPOSITE EDGE.

LIST

IS THE APPROPRIATE LIST WHICH CORRESPONDS TO FMT.

THE FOLLOWING IS A LIST OF THE SPECIAL CHARACTERS AND THEIR OCTAL
EQUIVALENTS WHICH OISPLA WILL RECOGNIZE IN ADDITION TO THE
STANDARD CHARACTERS.
APOSTROPHE
INTEGRAL SIGN
SUMMATION SIGN
APOSTROPHE
LOW POINT
MIOOLE POINT
CAP
CUP
ARROW RIGHT

•
•
•

•
•

14
15
16
17

32
35
36
37
52

ARROW LEFT
ALPHA
THETA
PI
SMALL SIGMA
TAU
PHI
PSI

.....

••••••••••••••••••••••••

PROGRAM LI STINGS

'

DISPLA (709)

53
55
56
57
72
75
76
77

•
••
•

EXAMPLES

•
•
•
•
•

2. EXAMPLE OF SMALL, HORIZONTAL WRITING ON SAME FILM FRAME.
USAGE
CALL DISPLA
PRINT 20
20 FORMATII0H2SH120.90,25HSMALL, HORllONTAL WRITING)

• 1. EXAMPLE OF BIG, VERTICAL WRITING AND CHANGING THE FILM FRAME.
CAll DISPLA
• USAGE
PRINT 10
•
10 FORMAT(9HIBVI0,10,21HBIG, VERTICAL WRITING)
•

IPAGE

0073
0074
0075
0076
0011
001B
0019
OOBO
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122

•

2)

** ••••
..••••••••••••••••••
..
01 SPLA
(109)

* •••• **0****.******* ••••
IPAGE

3)

.....
.

PROGRAM LISTINGS

••• *.**** •••
.*.**.*.*****
.
01 SPLA 11091
**************.*.* •• * •••
I PAGE 3)

OUTPUTS -

...
..
....
...
....

....
....
...
.....
....
..
....
..
...
...
.....
....
....
.
...

3. EXAMPLES OF ALL THE CHARACTERS, SINGLE SPACING AND DOUBLE SPACING
IN BOTH BIG AND SMALL •
INPUTS - Al1 ••• 631 = OCT 016b60606060,026060606060, ••• 776060606060
USAGE
CALL DISPlA
PRINT 30, IA( II, 1=1,161
30 FORMAT(10H1BH56,900,16A21
CALL OISPLA
PRINT 40, IA(IJ,I=17,32)
40 FORMAT(lH 16A21
CALL DISPLA
PRINT 50, IAI I ) ' [=33,48)
50 FORMATI1H016A2)
CALL OISPLA
PRINT 60, IA(I),I=49,63)
60 FORMAT I 10H2BH56,600, 16A2)
AND A SIMILAR SEQUENCE TO PLACE SMALL CHARACTERS IN
THE BOTTOM OF THE FRAME •

0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
013B
0139
0140
0141
0142
0143
0144
0145
0146
0147
014B
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171

e._*.e •• _._ •••••••••
.••••
.
•••••••••••••••••• * •••••

............ * •• _ •••• ".• .,_ •

PROGRAM LISTINGS

DISPLA (709)

(PAGE

..

DISPLA (709)

4)

....
...
..
..

IPAGE
OUTPUTS -

..
....
..
.....
..
...
....
..
....
..
.
...
..
.
..

....

..
..
..
..

....
..
...
..
..
.....

4. EXAMPLE OF A LINE EXTENDING BEYOND THE EDGE OF THE SCOPE.
USAGE
CALL DISPLA
PRINT 10, IAI I 1,1=1,24)
10 FORMATII0HIBH56,500,24A2)
OUTPUTS-

!O Cl IE E3 F4 CO 6

7

a

9

:;.

::

l.

J

'

'

,t

it

it

5. EXAMPLE OF DISPLAY SPACING UNDER FORMAT CONTROL
USAGE
CAll DISPLA
PRINTBO, IAI0,1=1,63)
BO FORMATII0HIBH56.500,16A2/1H 16A2/1H 16A2/1H 16A2)
OUTPUTS -

it

..
...
..
it

..

..,

U 1 2 3 4 5 6 ,
+ H B C D E F (i
J K L ~1 N 0 P
"-' T U \\' W

.

PlE
BCI
DISPlA CAL
ANA

TlE

1,DISPlA
1,4
MASK2
NOERR

..

.** ••••• * •••• * •••••••• _-

",.,<

j' ....

d 9

H I
Q R
..,.
y ...

,

?

::

...

., .

.:::r

(

,

f

J.

,:.;

8

T

tt' 'f

CHECK FOR STANDARD ERROR PROCEDURE
MASK2=110371000000
ZERO, NO STANDARD ERROR PROCEDURE

IT

~

0112
0113
0114
0175
0116
0111
0118
0179
01BO
0181
0182
0183
0184
0185
0186
0181
0188
0189
0190
0191
0192
0193
0194
0195
0196
0191
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0211
021B
0219
0220
0221
0222
0223
0224
0225
0226
0221
0228
0229
0230
0231
0232
0233
0234
0235
0236
0231
0238
0239
0240
0241
0242
0243
0244
0245
0246

4)

·......................-

OISPLA (109)
*
*
••••••••••••••••••••••••
(PAGE

51

NOERR

(STVH I

WOS

( SVHI

0
TRACE
E

A5

LP1
LP2

ElP2

A

FETCH
( (SII

PROGRAM LISTINGS

••••••••••••••••••••••••
DISPLA (1091
•
*
••••••••••••••••••••••••

((SII
CAL
NOT ZERO, STANDARD ERROR PRESENT
3,4
STA
1,4
TRA
CAL
II S II
STA
1,4
WTV
1,4
TRA
REM
REM
REM was - WRITE ON SCOPE
LOQ
*+4
CLA
*+2
S(IOHI
TRA*
MZE
.. 3
TRA
WOS
SXO
DISPLA-2,4
SXA
OUT+l,1
DUT+2,2
SXA
FETCH PZE Z"N. FORMAT WORDS ARE IN l BSS N
CLA 1,4
ARS 18
ADO 1,4
STA A
POX WOS,l
LXD MOOE,2
TSX A,4
FETCH FIRST CHARACTER
LXA A5,1
IDENTIFY CONTROL CHARACTER
ADO C,l
HE 0,1
TlX *-2,1,1
TRA
OUT
ILLEGAL CONTROL CHARACTER
REM
TSX
CFF,4
TRANSFER IIECTOR
TRA
NUORG
INCR,2
ACL
ACL
INCR,2
ORGIN
ACL
ANA MASK
STO ORGIN
LXD MODE,2
CAL ORGIN
WRITE RECORD
ACL 6U3L,2
MOVE POINT OF ORIGIN
NEXT CHARACTER, MOVE POINT
ACL 2R.2
ANA MASK
AND STORE
SLW POINT
TSX FETCH,4
FETCH CHARACTER
PAX 5,4
IS IT BLANK
SUB BLANK
TNZ *+4
CAL POINT
ACL 1R,2
TRA E+l
LOQ PAT,4
NO. FETCH PATTERN
LXA A5,1
00 5 COLUMNS
CAL POINT
ACL
1D1R,2
NEXT COLUMN, MOllE POINT
LXA A1,4
00 1 ROWS
ADO
lU,2
NEXT ROW, MOVE POINT
RC/ ..
DO POINT
TQP
ElP2
PLOT POINT
SLW POINT
STQ
T
CPY
POINT
LOQ
T
TlX
LP2,4,l
TlX
LPl,l,l
COLUMN DONE
TRA
CHARACTER DONE
E
REM
Z+N
NEW WORD
LOO •• ,1
**
STQ WORO
SXO WCNT tl
LXA A7,l
SXD CCNT,l
LXO CCNT,l
LOO WORD
(STVHI
STORAGE TO Til HOLLERITH
PXD

(PAGE

0241
0248
0249
0250
0251
0252
0253
0254
0255
0256
0251
0258
0259
0260
0261
0262
0263
0264
0265
0266
0261
0268
0269
0210
0211
0212
0213
0214
0215
0216
0211
021B
0219
02BO
0281
0282
0283
0284
0285
0286
0281
0288
0289
0290
0291
0292
0293
0294
0295
0296
0291
0298
0299
0300
0301
0302
0303
0304
0305
0306
0301
0308
0309
0310
0311
0312
0313
0314
0315
0316
0317
0318
0.319
0320
0321

5)

••••••••••••••••••••••••

DISPLA 1709)
•
•••••••••••••••••••••••••
(PAGE

PROGRAM LISTINGS

61

A6

LGL 6
STQ WORD
TIX B.1.1
LXD WCNT,l
TIX A.1.1
OUT
LXD
DISPLA-2.4
AXT
.·,1
•• ,2
AXT
TRA 2.4
B
SXD CCNT.l
TRA 1.4
REM
COMPUTE MODE
NUORG TSX FETCH.4
STO T
B OR S
TSX FETCH.4
H OR V
ADO T
LRS 1
ARS 4
RND
A7
PAX 7.2
SV:4.BV~3.SH:2.BH:l
SXD MODE.2
LXA A2.2
COMPUTE ORIGIN
R
STZ T.2
TSX FETCH.4
CAS TEN
!\lOP
MODE TXI f, ,-.
STO T
CLA T.2
A2
ALS 2
ADO T.2
ALS 1
ADO T
STO T.2
WCNT TXI
R+1 ... •
TIX R.2.1
F
CLA T-2
ALS 18
ADD T-1
STO ORGIN
CCNT TXI
TRACE" ••
SUBROUTI NE TO CHANGE FILM FRAME
CFF
CFF
1,4
TRA
REM
DEC -1,-1,2,-4B.32
CC IS 1,2,0, ,"
SYN •
C
PZE 6
SV
PZE 8
BV
PZE ,,6
SH
BH
PZE ,,8
SYN •
2R
PZE .. 30
SV
PZE ,,40
BV
994
PZE
SH
BH
PZE 984
INCR SYN •
MZE ,,3
SV
MZE ,,4
BV
PZE 3
SH
BH
PZE 4
SYN •
1U
PZE 3 .. 21
SV
BV
PZE 4,,28
SH
PZE 1003 .. 3
8H
PZE 996,.4
7D1R SYN •
21
SV
BV
28
,,21
SH
,,28
BH
7R
SYN •
PZE 1015" 1006
SV
BV
PZE 1012,,1000
SH
PZE 18,,1015

•

••••••••••••••••••••••••
OISPLA 17091
•
••••••••••••••••••••••••

•

(PAGE

0322
0323
0324
0325
0326
0327
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337
0338
0339
0340
0341
0342
0343
0344
0345
0346
Ol47
0'l4B
0349
0350
U351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
03BO
0381
0382
0383
03B4
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396

61

••••••••••••••••••••••••

•

DISPLA (709)

PROGRAM LISTINGS

*

DISPLA (709)

( PAGE

1)

6U3L

PZE
SYN
REM
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT

24,,1012

BH

*

30207144014
010427150434
020107422010
070424040000
001303400000
141104416010
303214461303
006047401003
306240405143
376401010177
016306006007
177004020077
002011740201
105054464242
100200401002

77 PSI
16 PHI
75 TAU

74 (
73 ,

0199
0200

72 SMALL SIGMA
71 Z
10 Y
61 X
66 W
65 V
64 U
63 T
62 S
61 I

0202
0203
0204
0205
0206
0201
020B
0209
0210

ORGIN
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OC r
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
PAT
OC T
MASK OCT
MASK2 OCT
BLANK BCD
TEN
DEC
WORD ass

ass
ass

T

BSS

•

••••••••••••••••••••••••

••••••••••••••••••••••••
(PAGE

••••••••••••••••••••••••

•

021100436010
115114462216
141104414110
124343701052
54
020342502010
020102501010
376111452306
51
115015050336
50
316110442206
41
175014060216
46
45
376020202117
316020600577
44
311004020100
43
42
316101210501
101004020077
41
020100402010
40
040404010020
200401010100
000000400000
000004050434
34
001406000000
33
4000000
000001740000
31
376100402177
30
115014062311
21
376110440201
26
371114460301
25
203174060216
24
115014060242
23
22
203774462266
370221044514
21
020103702010
20
000130340000
203435242343
201003700201
000130340000
000241205000
13
004015442206
015114452236
11
155114462266
10
003610441203
01
111124462260
06
111054261211
05
060241131620
04
105014462266
03
345114462306
02
001027760000
01
175014060216
00
1177001177
170311000000
100000
10

57 PI
56 THETA
55 ALPHA

*

0215

53 ARROW LEFT
52 ARROW RIGHT
R

Q

P
0

N
M
L
K
J
-

0218
0219
0220
0221
0222
0223
0224
0225
0226
0221

37 CUP
36 CAP
35 MIDDLE POINT

0231
0232

)

•

32 LOW POINT
I
H
G
F

E
D

C
B

A
+

0234
0235
0236
0231
0238
0239
0240
0241
0242
0243

11 APOSTROPHE
16 SUMMATION SIGN
15 INTEGRAL SIGN
14 APOSTROPHE
0248
12 QUESTION MARK
9
8
1
6
5

4
3

2
1
0

0250
0251
0252
0253
0254
0255
0256
0251
0258
0259

0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0401
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0421
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0441
0448
0449
0450
0451
0452
0453
0454
0455
0456
0451
0458
0459
0460
0461
0462
0463
0464
0465
0466
0461
0468
0469
0470
0471

1)

••••••••••••••••••••••••

•

OISPLA (709)

.

••••••••••••••••••••••••
(PAGE

8)
POINT

PROGRAM LISTiNGS

OISPLA (709)

••••••••••••••••••••••••
(PAGE

ass

END

..

••••••••••••••••••••••••

•

0412
0413

81

••••••••••••••••••••••••
-

DtSPLA (7090)

PROGRAM Ll STINGS

••••••••••••••••••••••••
-

LAST CARD IN DECK IS NO. 0480
0001
0002
450
0003
DISPLA
0004
DISPLA
0005
0006
----ABSTRACT---0001
0008
0009
TITLE - DtSPLA (1090)
0010
WRITE HOLLERITH TEXT ON SCOPE
0011
DISPLA PROOUCES TITLES. LABELS. AND LEGENDS FOR SCOPE
0012
DISPLAYS. IT CAN PLOT 64 CHARACTERS IN EITHER LARGE 136
0013
CHARACTERS ACROSS THE SCOPEl OR SMALL 148 LETTERS ACROSS
0014
THE SCOPE) MODES IN EITHER A HORIZONTAL OR VERTICAL
0015
DIRECTION.
0016
0011
001B
LANGUAGE - FAP SUBROUTINE (FORTRAN II COMPATIBLE)
0019
EQUIPMENT - 1090 (MAIN FRAME, DATA CHANNEL 0, AND SCOPEI
0020
- 219 REGISTERS
STORAGE
SPEED
0021
AUTHOR
- DISPLA IS A CONVERSION BY THE MIT COMPUTATION CENTER OF
0022
THE SUBPROGRAM WRITE AS DESCRIBED IN M.I.T. LINCOLN LAB
0023
MEMO. NO. 54-0003.
0024
0025
----USAGE---0026
0021
0028
TRANSFER VECTOR CONTAINS ROUTINES - FRAME
0029
AND FORTRAN SYSTEM ROUTINES - IIOH)
0030
0031
FORTRAN USAGE
CALL DISPLA
0032
0033
PRINT 10.ILIST)
10 fORMAT (DISCON,fMT)
0034
0035
0036
INPUTS
0037
PRIMARILY WHAT APPEARS ON THE SCOPE IS WHAT WOULD HAVE BEEN
0038
0039
WRITTEN BY THE PRINT STATEMENT WHICH FOLLOWS THE CALL DISPLA
0040
STATEMENT. HOWEVER, THE BEGINNING CHARACTERS (CALLED DISCON
IN THE ABOVE fORMAT) OF THE FORMAT ARE USED TO CONTROL THE
0041
0042
MODE OF THE DISPLAY.
0043
IS A VARIABLE LENGTH HOLLERITH fIELD
0044
01 SCON
1. THE FIRST CHARACTER IS A CONTROL CHARACTER AND
0045
MUST BE ONE OF THE fOLLOWING
0046
0041
CHARACTER
ACTION CAUSED
0048
0049
SAME MODE AND ORIGIN.
0050
+
SAME MODE, DOUBLE SPACE.
0051
o
(BLANK)
SAME MODE. SINGLE SPACE.
0052
CHANGE FILM FRAME. NEW MODE.
1
0053
NEW ORIGIN •
0054
NEW MODE, NEW ORIGIN
0055
2
0056
WHERE MODE REFERS TO THE SIZE OF THE CHARACTERS
0057
AND TO THE DIRECTION OF PLOTTING, AND ORIGIN
0058
REFERS TO THE LOCATION OF THE fIRST CHARACTER
0059
0060
OF THE LINE •
0061
IF THIS CHARACTER IS A +,0, OR BLANK, NO OTHER
0062
0063
CONTROL CHARACTERS ARE USED •
0064
2. THE SECOND CHARACTER CONTROLS THE SIZE OF THE
0065
0066
PLOTTED CHARACTERS •
0067
B
BIG CHARACTERS 120 BY 28 SCOPE UNITS)
0068
0069
SMALL CHARACTERS 115 BY 21 SCOPE UNITS)
S
0070

DISPLA
FAP
-01 SPLA (7090)
COUNT
LBL
ENTRY

.

--•..
-

•
•
•

•
•
..
..

•
•

•
•

•

.•

•
..
•
..

•
•

•..
•
•
..
•

•

..•..

•.

....
...
.

...
..
...
...
..
..
...
..

••••••••••••••••••••••••
DISPLA (7090)
..
••••••••••••••••••••••••

..

..

(1090) (SUBROUTINE)

9/4/64

••••••••••••••••••••••••
DISPLA (1090)
*
•................*

......(PAGE

••••••••••••••••••••••••

PROGRAM LISTINGS

*
DISPLA (7090)
*
••••••••••••••••••••••••

2)

(PAGE

3. THE THIRD CHARACTER CONTROLS THE DIRECTION OF
PLOTT ING.

*
*
*

•

H

V

*
*
*

*
*
*

4. THE LAST SET OF INFORMATION CONSISTS OF TWO 0 TO
4 DIGIT INTEGERS (GRTHN=O, LSTHN 1024) FOLLOWED
BY COMMAS. THE FIRST INTEGER INDICATES THE
X-COORDINATE AND THE SECOND INTEGER THE yCOORDINATE lIN SCOPE UNITS) OF THE LOWER LEFT
CORNER AT WHICH PLOTTING BEGINS.

*

*
•
•
•*
*
•
•

THERE MUST BE NO BLANKS BETWEEN ANY OF THESE CHARACTERS
FMT

IMMEOIATLY FOLLOWS DISCDN
IS THE STANDARD FORMAT FOR THE INFORMATION WHICH IS TO
BE WRITTEN ON THE SCOPE.
SHOULD NOT CALL FOR A LINE LONGER THAN 48 (FOR SMALL) OR
36 (FOR BIG) CHARACTERS. IF A LINE GOES BEYOND THE
EOGE OF THE SCOPE, THE END IS WRITTEN BEGINNING AT THE
OPPOS ITE EDGE.

LIST

IS THE APPROPRIATE LIST WHICH CORRESPONDS TO FMT.

*

•*
•
•

*
*

•

**

*
*

HORIZONTAL
VERTICAL
CNOTE - VERTICAL MODE CHARACTERS READ
CORRECTLY WHEN PICTURE IS ROTATED
90 DEGREES CLOCKWISE)

THE FOLLOWING IS A LIST OF THE SPECIAL CHARACTERS AND THEIR OCTAL
EQUIVALENTS WHICH DISPLA WILL RECOGNIZE IN ADDITION TO THE
STANDARD CHARACTERS.

•*

APOSTROPHf
INTEGRAL SIGN
SUMMA TI ON SIGN
APOSTROPHE
LOW POINT
MIDDLE POINT
CAP
CUP
ARROW RIGHT

*

•

*
*

•

•

*
*
*

14
15
16
17

32
35
36
37

ARROW LEFT
ALPHA
THETA
PI
SMALL SIGMA
TAU
PHI
PSI

53
55
56
57
72
75
76
77

52

• EXAMPLES

*

• 1. EXAMPLE OF BIG, VERTICAL WRITING AND CHANGING THE FILM FRAME.

•
•

USAGE

CALL DISPLA

PRINT 10
*
10 FORMATC9HIBV90,10,21HBIG, VERTICAL WRITING)
*
*
* 2. EXAMPLE OF SMALL, HORIZONTAL WRITING ON SAME FILM FRAME.

*

*

•
•

USAGE

CALL DISPLA
PRINT 20
20 FORMATII0H2SHI20,90,25HSMALL, HORIZONTAL WRITING)

0071
0072
0073
0074
0075
0076
0077
007B
0079
OOBO
OOBI
00B2
00B3
00B4
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
009B
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125

2)

••••••••••••••••••••••••

.
DISPLA (7090)
•••••••••••••••••••••••••
(PAGE

PROGRAM LI STINGS

3)

..
..
...
..
....•
.
..

••••••••••••••••••••••••
DISPLA (7090)
..
••••••••••••••••••••••••

..

(PAGE

OUTPUTS -

...
.

....

...
.

•
•.

....
..

..

.. 3. EXAMPLES Of ALL THE CHARACTERS. SINGLE SPACING AND DOUBLE SPACING
..
IN BOTH BIG AND SMALL.

....
..
.

INPUTS

- Al1 ••• 63)

= OCT

016060606060.026060606060 •••• 776060606060

it

..
...
.

USAGE
30

it

...
..

40
50
60
AND A
THE

CALL DISPlA
PRINT 30. IA(I).I:l.16)
fORMATI10HIBH56.900.16A2)
CALL DISPlA
PRINT 40, IAII).1=17.32)
fORMATI1H 16A2)
CALL DISPlA
PRINT 50, (AII).1=33,48)
FORMATI1H016A2)
CALL DISPLA
PRINT 60. (AIII.I=49.63)
FORMATI10H2BH56.600.16A2)
SIMILAR SEQUENCE TO PLACE SMALL CHARACTERS IN
80TTOM OF THE FRAME •

0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
01'59
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177

3)

...................... -...
.••••••••••••••••••••••••

•••••••• * ••••• ** •••••
..
...**
11090)
...__ DISPLA
..........
_........

PROGRAM LISTINGS

DISPLA 11090)

IPAGE

IPAGE

4)

..
..

OUTPUTS -

..
.

.

...
....
...
..
...

...
.

...

.....

..

..
....
...
.

*

.. 4. EXAMPLE OF A LINE EXTENDING BEYOND THE EDGE OF THE SCOPE.
..
USAGE
CALL OISPLA
..
PRINT 10, IAII),1=1,24)
..
10 FORMATI10HIBH56,500,24A2)
..
OUTPUTS -

....
...

IO (1 IE E3 F4 CO .;

7

a

9

-;.

::

:r.

J

,

+

~

•

•.

...

•
..•

5 • EXAMPLE OF DISPLAY SPACING UNDER FORMAT CONTROL
CALL OISPLA
USAGE
PRINT 80, IAII),I=1,63)
BO FORMATIIOHIBH56,500, 16A2/1H 16A2/1H 16A2/1H 16A2)
OUTPUTS -

.

•
•..

....
.
...

I)

+

1 2 3 4 5 6
A B C D E F
J K L ~1 N 0
S T U V W

-;.

::

,

G H I
P Q R ..,.

+-

<:1

•

.

7 d 9

.,.
"/<'," y ....

I,

J

J.

~

.?-'.

f;t:

T

8 TT
rtt 't'

BSS
0
.. FOLLOWING CARD DESIGNATES THE OATA CHANNEL THAT CRT IS ATTACHEO TO.
• TO CHANGE, ALTER THE LETTER DESIGNATIDN ONLY AND REASSEMBLE.
TAPENO D1
X
SCPAD EQU
X-I05
PZE

I-

0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225
0226
0221
0228
0229
0230
0231
0232
0233
0234
0235
0236
0231
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252

4)

••••••••••••••••••••••••
-

DISPlA (7090)

PROGRAM LISTINGS

-

••••••••••••••••••••••••
(PAGE

I,OISPlA
1,4
MASK2
NOERR
liS))
3,4
1,4

TZE

NOERR

(STVH)

WOS

(SVHI

CHECK FOR STANDARD ERROR PROCEDURE
MASK2=770377000000
ZERO. NO STANDARD ERROR PROCEDURE
NOT ZERO. STANDARD ERROR PRESENT

TRACE
E

A5

LP1
LP2

ELP2

A

DISPLA (1090)

CAL
STA
TRA
II S) I
CAL
STA
1,4
1,4
TRA
REM
REM
REM WOS - WRITE ON SCOPE
lDQ
-+4
CLA
*+2
$( IOHI
TRA., t 3MZE
TRA
was
SXO
DISPlA-2.4
SXA
OUT+1.1
SXA
OUT+2,2
CLA 1,4
FETCH PZE Z"N. FORMAT WORDS ARE IN l BSS N
ARS 18
ADO 1.4
STA A
POX WOS.l
LXO MOOE.2
TSX A.4
FETCH FIRST CHARACTER
lXA A5.l
IDENTIFY CONTROL CHARACTER
ADO C.1
TZE 0.1
TIX *-2.1.1
TRA
OUT
ILLEGAL CONTROL CHARACTER
REM
TSX
SFRAME,4
TRA
NUORG
INCR.2
ACl
INCR.2
ACL
ACL
ORGIN
ANA MASK
STO ORGIN
LXO MOOE.2
CAL ORGIN
WRITE RECORD
ACl 6U3L.2
MOVE POINT OF ORIGIN
NEXT CHARACTER, MOVE POINT
ACL 2R,2
ANA MASK
AND STORE
SLW POINT
FETCH CHARACTER
TSX FETCH,4
PAX 5.4
I S IT BLANK
SUB BLANK
TNZ *+4
CAL POINT
ACL 1R,2
TRA E+l
LOQ PAT.4
NO. FETCH PATTERN
LXA A5.1
DO 5 COLUMNS
CAL POINT
ACl
701R,2
NEXT COLUMN, MOVE POINT
LXA A7,4
DO 1 ROWS
NEXT ROW, MOVE POINT
ADO
lU,2
RQL
DO POINT
TQP
ELP2
SLW POINT
PLOT POINT
WRS
SCPAD
RCHX
10C
TCOX
TIX
lP2,4,l
LPl,l,l
TIX
COLUMN DONE
TRA
CHARACTER DONE
E
REM
NEW WORD
l+N
lOO * •• 1
STO WORD
SXD WCNT.l
lXA A7.1
SXO CCNT.l
<

o

-

-

••••••••••••••••••••••••

5)

BCI
DISPLA CAL
ANA

••••••••••••••••••••••••

.

-.

(PAGE

0253
0254
0255
0256
0257
025B
0259
0260
0261
0262
0263
0264
0265
0266
0261
0268
0269
0210
0271
0212
0273
0274
0275
0216
0277
0278
0219
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
Oi98

0299
0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311
0312
0313
0314
0315
0316
0317
0318
0319
0320
C321
0322
0323
0324
0325
0326
0327

5)

••••••••••••••••••••••••
*

PROGRAM LlSTlNGS

•

OrSPLA (7090)

(PAGE

OISPLA (7090)

(PAGE

FETCH LXO
LOQ
( (S) ) PXO
A6
lGl
STQ
TlX
LXD
T1X
OUT
LXD
AXT
AXT
TRA
SXD
B
TRA
REM
NUDRG TSX
S10
TSX
ADD
LRS
ARS
RNO
A7
PAX
SXD
LXA
R
STl
TSX
CAS
NOP
MODE TXI
STO
CLA
A2
ALS
ADD
ALS
ADD
STO
WCNT TXI
F
TIX
CLA
ALS
ADD
S10
CCNT TXI
REM
DEC
C
SYN
PZE
PZE
PZE
PZE
2R
SYN
PZE
PZE
PIE
PZE
INCR SYN
MZE
MZE
PZE
PZE
lU
SYN
PZE
PZE
PZE
PZE
701R SYN

CCNT,l
WORD
(STVH) ,0
6
WORD
B ,1,1
WCNT.l
A,1,1
OISPLA-2,4
*.,1

STORAGE TO TV HOLLERITH

.*,2
2,4
CCNT,1
1,4
FETCH,4
T
FETCH,4
T
1
4

COMPUTE MODE
B OR S
H OR V

7,2
MODE,2
A2,2
T,2
FETCH,4
TEN

SV=4,BV=3,SH=2,BH=1
COMPUTE ORIGIN

F" ••
T
T,2
2
T.2
1
T
T.2
R+l,,**
R,2,l
T-2
18
T-1
ORGIN
TRACE,,*-

-1,-1,2,-48,32

*
6
8

,,6
,,8

CC IS 1,2,0, ,+
SV
BV
SH
BH

*

,,30
,,40
994
984

SV
BV
SH
BH

,,3
,,4
3
4

SV
BV
SH
BH

*

*
3,,21
4,,28
1003,,3
996,,4

SV
BV
SH
BH

*
21
28
,,21
,,28

SYN *
PZE 1015,,1006
PZE 1012" 1000
PIE 18,,1015

*

••••••••••••••••••••••••

6)

7R

••••••••••••••••••••••••
*

••••••••••••••••••••••••

SV
BV
SH
BH
SV
BV
Si-i

0328
0329
0330
0331
0332
0333
0334
0335
0336
0337
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
U387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402

6)

.••••••••••••••••••••••••
.
••••••••••••••••••••••••

PROGRAM LISTINGS

OISPLA 170901

(PAGE

6U3L

24,,1012
..
30207144014
070421750434
020107422010
010424040000
001303400000
141104416010
303214461303
006047401003
306240405143
376401010177
016306006001
177004020017
002017740201
105054464242
100200401002

BH
77 PSI
76 PHI
75 TAU
74 (
73 ,

0199
0200
72 SMALL SIGMA

71
10
67
66
65
64
63
62
61

I

Y
X

W
V
U

T
S
I

ORGIN
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
PAT
OCT
MASK OCT
MASK2 OCT
BLANK BCD
TEN
DEC
WORD BSS
BSS
BSS
RSS
T

.

(PAGE

71

PIE
SYN
REM
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT

.

••••••••••••••••••••••••
DISPLA (7090)
••••••••••••••••••••••••

021100436010
175114462276
141104414110
54
124343707052
020342502010
020102'507010
376111452306
51
50
175015050336
376110442206
47
175014060276
46
376020202171
45
376020600577
44
43
377004020100
376101210501
42
101004020077
41
020100402010
40
040404010020
200401010100
000000400000
000004050434
34
001406000000
33
4000000
000007740000
31
376100402177
30
175014062371
27
376110440201
26
377114460301
75
203774060276
24
175014060242
23
203774462266
22
370221044574
21
02010H02010
20
000130340000
203435242343
201003700201
000130340000
000241205000
13
004015442206
015114452236
11
155114462266
10
003610441203
01
171124462260
06
111054261211
05
060241131620
04
105014462266
03
345114462306
02
001027760000
01
175014060276
00
1717001777
170377000000
100000
10
1
1
1
1

0202
0203
0204
0205
0206
0207
0208
0209
0210

.57 PI
56 THETA
55 ALPHA
..

0215

53 ARROW LEFT
52 ARROW RIGHT
R
Q
P

a

N
M
L
K
J

-

0218
0219
0220
0221
0222
0223
0224
0225
0226
0227

37 CUP
36 CAP
35 MIDDLE POINT
0231
0232

I
•

32 lOW POINT
I

H
G
F
F

0

C
R
A
+

0234
0235
0236
0237
0238
0239
0240
0241
0242
0243

17 APOSTROPHE
16 SUMMATION SIGN
15 INTEGRAL SIGN
14 APOSTROPHE
0248
12 QUESTION MARK
9
8
7
6
5
4
3
2
1
0

0250
0251
0252
0253
0254
0255
0256
0251
0258
0259

0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0421
0428
0429
0430
0431
0432
0433
0434
0435
0436
0431
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447
044B
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470
0471
0412
0473
0414
041'5
0416
0477

1)

••••••••••••••••••••••••

-..

OISPlA (7090)
•.....................
•
(PAGE

81
POINT BSS
IOC
lOCO

END

POINT"l

PROGRAM LISTINGS

• •••••••••••••••••••••••

01 SPlA (7090)
•*_ ••••••••••••••••••••••
•
(PAGE
0418
0419
0480

81

••••••••••••••••••••••••

DIVIDE
•
•••••••••••••••••••••••••

••••••••••••••••••••••••

PROGRAM LISTINGS

•

OIVlOE
-..•.............•...•..

9129/64
•
DIVIDE I SUBROUTI NE)
•
FAP
-DIVIDE
COUNT
150
DIVIDE
LBL
ENTRY
DIVIDE (X,LX,XOVSR,XDVDEDI

LAST CARD IN DECK IS NO. 0087
0001
0002
0003
0004
0005
0006
•
0007
----A8STRACT---•
0008
*
0009
• TITLE - DIVIDE
0010
•
DIVIDE A FLOATING VECTOR BY A CONSTANT
0011
•
0012
DIVIDE FORMS A VECTOR EQUAL TO A GIVEN VECTOR DIVIDED
•
BY A FLTG CONSTANT. OUTPUT MAY REPLACE INPUT.
0013
•
0014
•
0015
- FAP SUBROUTINE I FORTRAN-I I COMPATIBLEI
• LANGUAGE
0016
• EQUI PMENT - 709 OR 7090 IMAIN FRAME ONLY)
0017
- 23 REGISTERS
• STORAGE
7090
709
0018
• SPEED
0019
34 + 119
OR 241*LX MACHINE CYCLES, LX
VECTOR LENGTH
•
0020
•
0021
- S.M. SIMPSON, AUGUST 1963
• AUTHOR
0022
•
0023
----USAGE---*
0024
** TRANSFER VECTOR CONTAINS ROUTINES - INONE)
0025
0026
*
AND FORTRAN SYSTEM ROUTINES - INONE)
0027
*
0028
• FORTRAN USAGE
0029
•
CALL DIVIDEIX,LX,XDVSR,XDVDEDI
0030
0031
• INPUTS
0032
X(JI
0033
I=l ••• LX IS A FLTG VECTOR
0034
•
0035
LX
SHOULD EXCEED ZERO
0036
*
0037
XDVSR
IS A NON-ZERO FLTG QUANTITY. EQUIVALENCECXDVSR,SOME XCI"
*
0038
IS PERMITTED.
•
0039
*
STRAIGHT RETURN WITH NO OUTPUT IF LX LSTHN 1 OR XOVSR=O.
0040
• OUTPUTS
0041
*
0042
*
XDVDEDII) I=I ••• LX HAS VALUES = XCII/XDVSR.
0043
•
EQUIVALENCE IXDVDED,Xl IS PERMITTED.
0044
•
0045
THE DIVISOR USED IS ALWAYS THE INITIAL VALUE OF XDVSR.
0046
•* EXAMPLES
0047
0048
•
0049
• 1. INPUTS - Xll ••• 41=1.,2.,3.,4. U=O.O V=O.O
0050
USAGE
CALL DIVIDEIX,4,2.,YI
0051
CALL DIVIDEIX,l,2.,ZI
0052
•
CALL DIVIOEIX,O,2.,UI
0053
•
CALL DIVIDEIX,I,O.,VI
0054
•
CALL OIVIDEIX,4,X(2),X}
0055
•
OUTPUTS - YIl ••• 41=.5,l.0,1.5,2.0 1=0.5
0056
•
U=V=O.O (NO OUTPUT CASESl XIl ••• 4J=.5,l.0,1.J,2.0
0057
•
0058
• PROGRAM FOLLOWS BELOW
0059
•
0060
- NO TRANSFER VECTOR
0061
o
XR4
HTR
0062
I,DIVIDE
BCI
0063
• ONLY ENTRY. DIVIDE IX,LX,XDVSR,XDVDEDI
0064
DIVIDE-2,4
DIVIDE SXD
0065
Kl
CLA
1.4
0066
Kl
AIXl+l
ADD
0067
STA
GET
0068
4,4
CLA
0069
AIXDVDEDI+l
ADD
KI
0070
STA
STORE
0071
3,4
XDVSR
CLA0072
LEAVE
HE
0073
TEMP
STO
0074
CLA.
2,4
LX

=

--

-

-

• ••••••••• **** ••• ****.**

•

PROGRAM LISTINGS

01 VIDE
*
•• * ••• * •• *.*.****** •• ***

(PAGE

.*.* •• *****.*.-***.*.*.*
(PAGE

21
TMI
LEAVE
POX
0,4
LEAVE,4,O
TXL
* DIVISION LOOP
GET
CLA
**.4
FOP
TEMP
STQ
STORE
*- ,4
GET,4,l
TIX
EXIT
*
LEAVE lXD
DIVIOE-2,4
5,4
TRA
TEMP PZE
--,**,**
END

•• *.* ••• * •• ~* ••• **.**.**
DIVIDE
*
*

**=A(XI+l
**=AIXDVOEOI+l

=OIVISOR

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087

21

·*** •••••• ********* •••• *

"•• *.* OIVK
"
••••• **************
REFER TO
ADDK

PROGRAM LISTINGS

.*****************.*****

OIVK
"***.**.*
"
••• ***** ••• *.***
REFER TO
ADDK

•••••••• * •••• ***.** •••••

.* •• ** •• *** ••••• ** ••••••

"••••••OIVKS
** •••••••• * •••• **.

DIVKS
•
"*** •••••
* •••• ***.*** ••••

REFER TO
ADOK

****.****.*.**.*********

(PSEUDO ENTRY) "
"**** ••DO*************
•••• *
REFER TO
SEVRAL

REFER TO
ADOK

*********************.**

CO (PSEUDO ENTRY) *
*" •• *********************
REFER TO
SEVRAl

••••••••••••••••••••••••

-

DOTJ

-

••••••••••••••••••••••••
-OOTJ

.

-*
•
•

--..
-

-..
.

*

-.
--.-.

..
-....
..

--.
..
..
..

.

"
..

•..•.••..•....•... _.....

..

OOTJ

-

••••••••••••••••••••••••

1012164
DOTJ ISUBROUTINEI
LAST CARD IN DECK IS NO. 0142
0001
FAP
0002
COUNT
100
0003
LBL
DOTJ
0004
ENTRY
DOTJ
ILXY,IDX,X,IDY,Y,DOT,ADD,ORDERI
0005
0006
----ABSTRACT---0001
0008
TITLE - DOTJ
0009
VECTOR DOT PRODUCT WITH ARBITRARY INCREMENTS
0010
0011
DOTJ EVALUATES THE FORMULAE
0012
0013
DOT
XIII.YIII + XII+IDX)-YIl+IDYI
0014
+ XII+2*IDXI-YII+2-IDYI +
0015
III
0016
OR
0017
0018
DOT
XIU·YIl+(LXY-lI-IDYI +' •••
0019
+ X(I+ILXY-11.IDXI-Y(11
( 21
0020
0021
FOR LXY TERMS OF X AND Y. THE INCREMENTS lOX AND lOY
0022
ARE INPUT PARAMETERS.
0023
0024
0025
LANGUAGE - FAP SUBROUTINE (FORTRAN II COMPATIBLE)
EQUIPMENT - 109 OR 7090 IMAIN FRAME ONLYI
0026
- 59 REGISTERS
0021
STORAGE
0028
- ABOUT 18-LXY + 72 MACHINE CYCLES ON THE 1090.
SPEED
R.A.
WIGGINS
3/63
0029
AUTHOR
0030
---USAGE---0031
0032
TRANSFER VECTOR CONTAINS ROUTINES - NONE
0033
AND FORTRAN SYSTEM ROUTINES - NONE
0034
0035
FORTRAN USAGE
0036
0037
CALL DOTJ (LXY,IDX,X,IDY,Y,DOT,ADD,ORDERI
0038
0039
INPUTS
0040
LXY
IS THE NUMBER OF TERMS IN X AND Y THAT ARE TO BE
0041
MULTIPLIED.
0042
MUST BE GRTHN=
0043
0044
lOX
IS THE INCREMENT FOR X AS ILLUSTRATED IN THE ABSTRACT.
0045
MUST BE GRTHN= 0
0046
0041
X(II
I=l, ••• ,(LXY-I)"IDX+I IS THE X VECTOR.
0048
0049
lOY
IS THE INCREMENT FOR Y AS ILLUSTRATED IN THE ABSTRACT.
0050
00')1
MUST BE GRTHN= 1
0052
YIII
1=1, ••• ,(lXY-11"IDY+I IS THE Y VECTOR.
0053
0054
ADD
IS GRTHN ZERO THE INPUT VALUE OF DOT IS ADDED TO THE
00S5
DOT PRODUCT
0056
IF LSTHN=ZERO, DOT IS CLEARED BEFORE THE PRODUCT IS FOUND
0057
0058
ORDER
00')9
IF GRTHN ZERO FORMULA II) OF THE ABSTRACT IS EVALUATED.
IF LSTHN= ZERO FORMULA 121 OF THE ABSTRACT IS EVALUATED.
0060
0061
OUTPUTS
0062
0063
DOT
IS THE DOT PRODUCT OF X AND Y AS DEFINED IN THE
0064
ABSTRACT.
0065
0066
EXAMPLES
0061
0068
1. INPUTS - LXY=2 IDX=l ADD=O X(1 ••• 21=1.,2. IDY=2
0069
Yll ••• 31 = 1.,2.,3. ORDER = 1.
0070
OUTPUTS - DOT = 7.
0071
0072
2. INPUTS - LXY=2 IOX=3 X(1 ••• 41
1.,2.,3.,4. ADD=l. DOT=2.
0073
IOY=l Y(1 ••• 21
1.,2.5 ORDER=l.
0074

--.-..
.
-...
•
-•
-

PROGRAM 1I STINGS

••••••••••••••••••••••••
(PAGE

...•.......•.•.-........

PROGRAM LISTINGS

DOTJ
•
•••••••••••••••••••••••••

*

•
•

= 13.

• 3. INPUTS - SAME AS EXAMPLE 2. EXCEPT ORDER=-l.
OUTPUTS - DOT=8.5
*

•

IDX=4 XIl)=2. IDV=7
- LXV=l
ORDER=l.
OUTPUTS - DOT = 8.

* 4. INPUTS

•

•
•
• PROGRAM FOLLOWS
• XRl PZE
XR2
XR4
DOTJ

A2
A3

A4

A5
A6

X
V
OOT
Tl
T2

LV

lOX
LXV

PZE
PZE
BCI
SXD
SXD
SXD
LDQ
CLATLQ
STZ*
CLA*
TLQ
TRA
SUB
STO
CLA*
TLO
TRA
STD
LOQ*
CAL*
TOP
STO
SUB
STD
LOQ
MPV
ARS
PAX
TRA
STO
AXT
CAL
STA
CAL
STA
CAL
STA
STA
AXT
LXD
TXI
LDQ
FMP
FAO
STO
TXI
TXI
TIX
LXO
LXO
LXD
TRA
PZE
PZE
ENO

VI1I=3.

ADD .. I.

BELOW

l,DOTJ
XR4,4
XRl,l
XR2,2
=0
7,4
A2
6,4
1,4
A3
LV
=lB17
LXV
4,4
A4
LV
T2
8,4
2,4
A5
lOX
=0100000000000

=ADD
=LXV

=ORDER
=IOX

Tl

lOX
LXV
1

,1

A6
Tl

0.1
3,4
X
5,4
V
6,4
DOT
DOT+I
0,2
LXV,4
·+1,4,1
•• ,1
··,2

••

••

*

(PAGE

21

OUTPUTS - DOT

DOTJ

••••••••••••••••••••••••

=AORIXI
=ADRIV)
=ADRIDOTI

•• =ADRIXI
•• =AORIY)
•• =AORf OOTI
**=AORIOOT)

*+1,1,*.
·+1,2,*.
X,4,1
XRl,l
XR2,2
XR4,4
9,4
DECREMENT CONTAINS lOX
DECREMENT CONTAINS LXV-1

00T=2.

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
Ol23
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142

21

••••••••••••••••••••••••

•

DOTP

•

PROGRAM LISTINGS

••••••••••••••••••••••••

•

C
C
C
C

C
C
C
C

C
C
C

C
C
C
C
C
C

C
C
C
C
C

C
C

C
C
C

C
C
C

C
C

C
C
C
C
C
C

C

C
C

C
C
C
C

C
C
C
C
C
C
C

C
C
C
C
C
C
C
C
C

C
C
C
C
C
C

DOTP

•

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0146
0001
0002
SUBROUTINE DOTP INRA.NCA.AA.NRB.NCB.BB.IRB.ICB.DOT.ORDER)
0003
0004
----ABSTRACT---0005
0006
Tl TLE - DOTP
0001
DISPLACED OOT PRODUCT OF 2-0IMENSIONAL ARRAYS
0008
0009
DOTP FINDS THE DISPLACED DOT PRODUCT OF TWO RECTANGULAR
0010
ARRAYS AII,J) l=l, •••• NRA J=l, ••• ,NCA AND BII,J)
0011
l=l ••••• NRB J=l, ••• ,NCB ACCORDING TO THE fORMULAE
0012
0013
M
M
0014
DOT
SUM I SUM ( AII1,J1).BII+IRB,J+ICB) )
0015
0016
I=-M J=-M
0011
WHERE IF
0018
ORDER= 1. 11=1 Jl=J
0019
ORDER= 2. 11=NRA-I+l Jl=J
0020
DRDER=-l. 11=1 J1=NCA-J+1
0021
ORDER=-2. 11=NRA-I+1 Jl=NCA-J+1
0022
AND
0023
M IS GRTHN MAX{NRA,NCA,NRB,NCB) (A AND BARE
0024
CONSIDERED TO BE ZERO WHEN THE SUMMATION IS
0025
OUTSIDE THE RANGE OF DEFINITION)
0026
NRA,NCA.NRB,NCB,IRB.ICB, AND OROER ARE INPUT
0021
PARAMETERS.
0028
0029
DOTP EXITS WITH NO COMPUTATION IF ILLEGAL PARAMETERS
0030
ARE FOUND.
0031
0032
LANGUAGE
- FORTRAN II SUBROUTINE
0033
EQU I PMENT - 109 OR 1090 (MAIN FRAME ONLY)
0034
STORAGE
- 264 REGISTERS
0035
SPEED
- ABOUT .000029*NRA.NCA + .000190*NCA + .00018 SECONDS
0036
ON THE 1094 MOD 1.
0031
AUTHOR
- R.A. WIGGINS
MAY.1963
0038
0039
----USAGE---0040
0041
TRANSFER VECTOR CONTAINS ROUTINES - DOTJ
0042
AND FORTRAN SYSTEM ROUTINES - NONE
0043
0044
fORTRAN USAGE
0045
CALL DOTP INRA,NCA,AA.NRB,NCB.88,IR8.ICB,DOT.ORDER)
0046
0041
INPUTS
0048
0049
NRA
NUMBER ROWS IN A.
0050
MUST EXCEED 0
0051
0052
NCA
NUMBER COLUMNS IN A.
0053
0054
MUST EXCEED 0
0055
AAIL)
L=l ••••• NRA.NCA CONTAINS AII,J) I=l, ••• ,NRA J .. 1 ••••• NCA
0056
STORED CLOSELY PACKED.
0057
0058
0059
NRB
NUMBER ROWS IN B
MUST EXCEED 0
0060
0061
NCB
NUMBER COLUMNS IN B
0062
MUST EXCEED ZERO
0063
0064
BBILI
L=l •••• ,NRB.NCB CONTAINS BII.JI 1=1, ••• ,NR8 J"'l, ••• ,NCB
0065
STORED CLOSELY PACKEO.
0066
0061
IRB
OEFINES THE OISPLACEMENT ALONG THE COLUMNS OF A WITH
0068
0069
RESPECT TO B BEFORE THE PRODUCT IS TAKEN.
MAY BE ANY VALUE.
0010
0071
ICB
DEFINES THE DISPLACEMENT ALONG THE ROWS OF A WITH RESPECT
0012
TO B BEFORE THE PRODUCT IS TAKEN.
0013

•
CDOTP
C
C
C

DOTP ISUBROUTINE)
LABEL

••••••••••••••••••••••••

•

9129/64

••••••••••••••••••••••••
OOTP
*
••••••••••••••••••••••••

•

(PAGE

•..•......•..•.... _.....

PROGRAM LI STINGS

•

OOTP

(PAGE

21

MAY BE ANY VALUE.

C
C
C

ORDER

C
C

C
C

C

DEFINES THE TYPE OF REVERSAL OF A THAT IS MADE BEFORE
THE 9RODUCT IS FOUND ISEE ABSTRACT 1
'" 1. IMPLIES NO REVERSAL
= 2. IMPLIES COLUMN REVERSAL
=-1. IMPLIES ROW REVERSAL
=-2. IMPLIES ROW AND COLUMN REVERSAL

C

C OUTPUTS
C

C
C
C

DOT

CONTAINS THE DOT PRODUCT EVALUATED AS DEFINED IN THE
ABSTRACT.

C EXAMPLES

C

- NRA=4 NCA=4 NRB=4 NCB=4 IRB=O ICB-O ORDER-I.
AA(l ••• 161 = 1.0,1.1,1.2,1.1 BBl1 ••• 161=1.0,0.9,0.9,0.8.
1.2,1.3,1.4.1.3
0.9,0.8.0.7,0.6.
0.7,0.7,0.5,0.4,
1.2.1.5.1.5,1.3
1.1, 1 • .3, 1.2, 1.0
0.6,0.5.0.2.0.3
WHERE AA AND BB ARE STORED BY COLUMNS.
OUTPUTS - DOT = 12.84

C 1. INPUTS

C
C
C
C
C
C
C

C 2.

C
C
C 3.
C

INPUTS - SAME AS EXAMPLE 1. EXCEPT ORDER=2.
OUTPUTS - DOT = 12.95
INPUTS - SAME AS EXAMPLE 1. EXCEPT ORDER:-1.
OUTPUTS - DOT = 12.87

C

C 4. INPUTS - SAME AS EXAMPLE 1. EXCEPT ORDER=-2.
OUTPUTS - DOT = 13.07
C
C
C 5. INPUTS OUTPUTS C
C

SAME AS EXAMPLE 1. EXCEPT IRB=-2
DOT = 4.17

C 6. INPUTS

- SAME AS EXAMPLE 1. EXCEPT IRB=2
OUTPUTS - DOT - 1.57

C

ICB=-2

C

C

C
10
C

20
30
40
50
60
70
90
100

0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
010q

ICB=2

C
C PROGRAM FOLLOWS BELOW

C

•

• •••••••••••••••••••••••

DIMENSION AA(2),BBI21
OOT=O.
J=l
II IS VECTOR INDEX OF THE FIRST POINT IN BB.
Il=XMAXOFll,l+IRB)+XMAXOFIO,ICB*NRBI
t2 IS VECTOR INDEX OF THE LAST POINT IN FIRST COLUMN OF BB.
I2=XMINOFINRA,NRA+IRB.NRB,NRB-IRB)+Il-1
LC IS THE LENGTH OF ROWS TO 8E USED.
LC=XMINOFINCA,NCA+IC8.NCB,NC8-ICB)
IF IXMINOFII2-11+1,LC))
100,100,10
CONTINUE
JA1+JA2+1 IS VECTOR INDEX OF FIRST POINT IN A FOR ORDER
1.
JA1 = XMAXOFIO,-IRBI
JA2 = XMAXOFIO,-ICB*NRA)
K1 - ORDE P+3.
IF (Kl-51 20,20,100
GO TO 130,40,50,50,601,Kl
J1 = (NCA-LC+1)*NRA-JAI-JA2
J--l
GO TO 70
J1 = INCA-LC)*NRA+JA1-JA2+1
GO TO 70
Jl = JAl+JA2+1
GO TO 70
J1 = NRA+JA2-JAl
J=-l
CONTINUE
DO qO 1=11,12
CALL DOTJ (LC,NRA,AAIJ1),NRB,BBII),DOT,1.,ORDER)
J1=Jl+J
RETURN
END

0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146

2)

•••••••••••••••••••• ** ••

•••••• DPRESS
•
*.* •• ***** ••• * •• **.
REFER TO
BOOST

PROGRAM Ll STINGS

••••••••••••••••••••••• *

•.*.** DPRESS
•
••••••••••• *** ••• **
REFER TO
BOOST

.••••••••••••••••••••••••
..
oSPFMT
••••••••••••••••••••••••

PROGRAM LI STINGS

-..•.•.......•...•......
-

DSPFMT

..
oSPFMT 1SUBROUTJ NE I
LAST CARD IN DECK IS NO. 0312
9129/64
..
FAP
0001
0002
·oSPFMT
0003
COUNT
310
0004
LBL
DSPFMT
DSPFMT ICNTHOL,IORGX,IORGY,FMTEND,FMTI
ENTRY
0005
0006
0001
----ABSTRACT---0008
0009
- TITLE - DSPFMT
..
VARIABLE ORIGIN FORMAT GENERATOR FOR SCOPE SUBROUTINE DISPLA
0010
0011
0012
DSPFMT SETS UP A FORMAT FOR THE SUBROUTINE DISPLA WHICH
•
0013
ALLOWS THE USE OF A VARIABLE ORIGIN FOR THE ALPHANUMERIC
CHARACTERS WHICH APPEAR ON THE SCOPE •
0014
0015
0016
.. LANGUAGE - FAP SUBROUTINE IFORTRAN II COMPATIBLE)
.. EQUIPMENT - 109 OR 1090 IMAIN FRAME ONLY)
0011
.. STORAGE
0018
- 194 REGISTERS
0019
.. SPEED
.. AUTHOR
0020
- S.M. SIMPSON. NOVEMBER, 1961
0021
0022
----USAGE---0023
0024
.. TRANSFER VECTOR CONTAINS ROUTINES NONE
0025
..
AND FORTRAN SYSTEM ROUTINES NONE
0026
0021
.. FORTRAN USAGE
..
CALL DSPFMTICNTHOL.IORGX.IORGY.FMTEND.FMTI
0028
0029
•.. INPUTS
0030
0031
0032
IS AN ALPHANUMERIC WORD CONTAINING PRECISELY 3 HOLLERITH
CNTHOL
LEFT ADJUSTED CHARACTERS. THESE ARE THE CHARACTERS
0033
0034
USED TO CONTROL THE PLOTTING MODE OF DISPLA •
0035
0036
IS THE X ORIGIN IN SCOPE UNITS.
10RGX
0031
IS FORTRAN II INTEGER •
003B
MUST BE GRTHN=O, LSTHN 1024
0039
0040
IS THE Y ORIGIN IN SCOPE UNITS.
10RGY
•
0041
IS FORTRAN II INTEGER.
•
0042
MUST BE GRTHN=O. LSTHN 1024
0043
0044
FMTENDIII 1=1.0.-1.... IS AN ARBITRARILY LONG VECTOR OF
HOLLERITH CHARACTERS 16 PER WORD) THAT COMPLETES
0045
0046
THE FORMAT CONTROLLING oISPLA •
0041
DOES NOT INCLUDE THE RIGHT PARENTHESIS •
0048
IS TERMINATED BY A FENCE (OCT 111111111111)
0049
MAY BE MOST EASILY SET UP BY USING A HOLLERITH
ARGUMENT IN THE CALLING SEQUENCE. THEN FORTRAN
0050
0051
TAKES CARE OF THE ORDERING AND THE FENCE •
0052
0053
.. OUTPUTS
0054
•
0055
1=1.2.... IS THE HOLLERITH VECTOR OF THE COMPLETEO
FMTI I I
0056
FORMAT.
•
0051
IS OF LENGTH OF FMTEND PLUS THREE WORDS •
0058
0059
• EXAMPLES
0060
0061
• 1. INPUTS - CNTHOL = 3H2SH IORGX=12B 10RGY=1000
0062
USAGE
CALL DSPFMT (CNTHOL.IORGX.IORGY.1H2I6.3A6,FMTI
•
0063
..
OUTPUTS - FMTll ••• 51 = 6HI12H2SH12B.IOOO.2I6.3A61
0064
.. 2. USAGE
CALL DSPFMT (3H2SH.IO,2.3H4A6,FMT)
0065
0066
..
OUTPUTS - FMTll ••• 3)
6HI8H2SHI0.2.4A61
0061
0068
PZE
0069
BCI
1.oSPFMT
0010
.-2.4
DSPFMT SXD
0011
SXA
SV2.2
0072
SXA
SVl.1
0013
-SET FMTEND
0014
CAL
4.4

...
.

....
..
..

.

..
....
...
.

..

..

....
....
..
..
..
.

.

..

..

••••••••••••••••••••••••

••••••••••••••••••••••••

-

DSPfMT

.

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

21

SUB
=IB35
STA
ST50
.. INITIAL STUff ROUTINE FOR fIRST HoLERITH (LEFT PARENI
CLA
Kl
KAY
STA
STA
EL
CLA
5,4
FMT
STA
SHO
.. PUT IN LEFT PAREN
etA
LPRN
TSX
STUff,2
-GO FIND OUT HOW MANY DIGITS IN IRGX AND IN lRGY
2,4
CLA"
BCI,2
TSX
STD
NOX
3,4
CLATSX
BCI,2
NOY
STo
-THE NUMBER Of DIGITS IN HoLERITH fIELD OF FMT IS
" 3( fOR CONTROL I + NOX + NDY + 21FoR CoMMASI
ADD
NDX
ADO
K5
-SPREAD IT OUT IN HoLERITH AND STUfF INTO fORMAT
ALS
18
TSX
BCI,2
SToRN,1
TSX
-THEN PUT IN H
CLA
AlTCH
STUFF,2
TSX
-NOW SET UP AND INSERT 3 CONTROL HolERITH,STUFF SAVES 1 MQI
1,4
LDQ*
LGL
6
TSX
STUFF.2
LGL
6
STUFF,2
TSX
LGl
6
TSX
STUFF,2
-NEXT SET UP AND PUT IN lRGX
2.4
CLATSX
BCI.2
SToRN,l
TSX
-THEN A COMMA
CLA
COMMA
TSX
STUFF.2
-THEN IRGY
CLA3,4
TSX
BCI,2
TSX
SToRN,1
-THEN ANOTHER COMMA
CLA
COMMA
TSX
STUfF,2
-NOW KEEP PUTTING IN THE fORMAT END TILL HIT FENCE
AXT
-1,1
.... =FMTEND
ST50 CLA
** tl
CAS
fENCE
TRA
-+2
TRA
ST60
FENCE HIT, GO WIND UP
-PUT IN ALL SIX
XCA
LGL
6
TSX
STUFF.2
LGL
6
TSX
STUFF.2
lGL
6
TSX
STUFF.2
LGl
6
TSX
STUFF.2
6
LGL
TSX
STUFF .2
6
LGL
TSX
STUFf.2
ST50,l.1
TlX
-WHEN fENCE HIT FIll IN RIGHT PAREN
ST60 CLA
RPRN
TSX
STUFF.2

-

••••••••••••••••••••••••

-

OSPFMT

_

••••••••••••••••••••••••
(PAGE

0015
0016
0011
0018
0019
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0131
0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
014B
0149

21

••••••••••••••••••••••••
DSPFMT
••••••••••••••••••••••••
(PAGE

PROGRAM LISTINGS

3)

••••••••••••••••••••••••
DSPFMT
*
••••••••••••••••••••••••

*

-NOW FILL IN REMAINDER OF REGISTER WITH BlANKS(UNTIL KAY=l)
KAY
ST70 CLA
Kl
CAS
TRA
-+2
TRA
LV
-(USING BLANK IN COMMA SINCE UNSURE OF BCI 1,(6 BLANKS))
CLA
COMMA
LRS
6
STUFF,2
TSX
TRA
ST10
-EXIT
DSPFMT-2.4
LXD
LV
AXT·
•• ,2
SV2
SVI AXT
·.,1
TRA
6.4
-CONSTANTS
NDX
PZE
NO. DIGITS
NDY
PZE
LPRN BCI
1.
RPRN BCI
I,
I,
,
COMMA BCI
FENCE OCT
711117711777
1,
H
AITCH BCI
K5
PZE
5

-

-INTERNAL SUBROUTINES

•-STORN

STUFFS NO. FROM BCI INTO FMT BLOCK (IGNORE LEADING ZEROESl
TSX STORN.I
- A+l RETURN
STORN CLA
B4
TNZ
S1'400
CLA
B3
TNZ
SHOO
CLA
B2
TNZ
S1'200
TRA
snoo
ST400 CLA
B4
TSX
STUFF.2
SHOO CLA
B3
TSX
STUFF.2
ST200 CLA
B2
TSX
STUFF.2
snoo CLA
B1
TSX
STUFF,2
TRA
1,1
- CALLING SEQUENCE FOR STUFF
•
(INTERNAL SUBROUTINE TO DSPFMT)
• A
TSX
STUFF.2
• A+l RETURN

* A

-

•
•

*

•

•

STUFF STORES BITS 30-35 OF THE AC AS FOLLOWS.
L K=l K=2 K=3 K*4 K=5 K=6
ETC

*

3
•
2
• FMT 1 FMTtl.l1

•-FL

AND KAY MUST BE SET TO 1 BY DSPFMT. AND
• FMT STORED IN ADDRESS OF STIO. BEFORE STUFF
- IS FIRST USEO.

*-

STUFF SHIFTS THE At APPROPRIATELY, AODS FMT(LI.
- AND STORES RESULT AT FMT(LI. [T THEN INCREMENTS
- K. AND IF K GRTR THAN 6. INCREMENTS L AND RESETS K=l.
- FOR Kal IT FIRST CLEARS FMT(L).
STUFF ANA
KANA
GET RID OF ANY OTHER B[TS
STO
TEMP
AND STORE
SXA
STlV.2
STQ
SVMQ
LXA
EL,2
L-I TO XR2
TXI
*+1,2.-1
-IF K=l CLEAR FMTCLI

(PAGE

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
01B6
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
020ft
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224

31

........... __ .......... .

.••••••••••••••••••••••••*

PROGRAM LI STINGS

DSPFMT

CPAGE

•

ST9
STIO

*

I PAGE

ClA
CAS
TRA
TRA
TRA
STZ*
ClA
SUB
XCA
MPY
XCA
STA
lDQ
lGl
lGl
ACl
SlW*
ClA
ADD
STO
CAS
TRA

Nap

KAY
Kl
*+2

sn

STlt
STIO
K6
KAY
K6
ST9
TEMP
36

**
**,2
STl 0
KAY
Kl
KAY
K6
ST12

GET BITS BWS ZEROES
IN MQ
··:616-K)
.*=FMT XR2=l-1

TRA
SHY
ClA
Kl
RESET K TO 1
STO
KAY
AND l TO l+l
AOD
El
STO
El
STlV AXT
**,2
109
SYMQ
TRA
1,2
TEMP PZE
.*=6 8ITS TO 8E STUFFED
.*
KAY
*.=K
PZE
El
**=l
PZE
K6
PZE
6
Kl
PZE
1
KANA OCT
77
SVMQ PZE
INTERNAL SUBROUTINE 8CI
*
TSX
BCI,2
WITH FORTRAN INTEGER IN ACRETURN WITH
*
BCI IN Bl,B2.B3,B4. RIGHT ADJUSTED
*
AC : NO DIGITS ON EXIT (ZERO)=11
BCI SXA
BCIR,2
STl
Bl
STZ
B2
B3
STZ
B4
STZ
ARS
18
AXT
0,2
:1000
SUB
TMI
*+2
TXI
.-2,2.1
:1000
ADD
84,2
SXA
AXT
0,2
:100
SUB
TMI
*+2
.-2,2,1
TXI
:100
ADO
SXA
83,2
AXT
0.2
:10
SUB
TMI
*+2
TXI
*-2.2.1
:10
ADD
SXA
B2.2
STA
Bl
*FIGURE OUT HOW MANY DIGITS
ClA
Kl
B4
NZT
TRA
*+3
ADO
K3
TRA
BCIR
NZT
83
TRA
*+3
STl2

.*
.*

.*

•

DSPFMT

••••••••••••••••••••••••

4)

ST3
ST4

••••••••••••••••••••••••

0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0261
0268
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
02(H
0292
0293
0294
0'-95
0296
0297
0298
0299

4)

••••••••••••••••••••••••

PROGRAM LISTINGS

DSPFMT
"••••••••••••••••••••••••
"
(PAGE

(PAGE

51

BCIR
B4
B3
B2
81
K2
K3

ADO
TRA
lET
ADO
AXT
TRA
PZE
PZE
PZE
PZE
PZE
PZE
ENO

K2
BCIR
B2
Kl
••• 2

1,2

"..

""
".
".

2
3

.••••••••••••••••••••••••
DSPFMT
••• * ••••••••••••••••••••"

MOST SIG OIG
LEAST SIG DIG

0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311
0312

51

.*****.*.**.*.*********.

*

DUBLl

*

.***.*******************
REFER TO

DUBLX

PROGRAM LISTINGS

*.*.**.** •• ***.**.* •• ***

DUBll
*
***********
••••• ** •• *** ••
REFER TO

OUBLX

..••••••••••••••••••••••••
DUBLX
"

PROGRAM LISTINGS

"..

"..

...

".

....

..
".
....
.

..
..
..
"
..

...
..
..

.

..
"
"
..
..

..
...
".
..
..
.
.
......
....
it
it

it

..
..

...
..
..
..
..
..

"..
..

DUBLX

"

••••••••••••••••••••••••

••••••••••••••••••••••••

..
DUBLX (SUBROUTINE)
"
FAP
"DUBLX
COUNT
100
LBL
DUBLX
DUBLX (IX,LX)
ENTRY
DUBll (X,LX)
ENTRY
ENTRY
HALVX (IX.LX)
HALVL (X,LX)
ENTRY

••••••••••••••••••••••••

..

LAST CARD IN DECK IS NO. 0128
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
----ABSTRACT---0011
TITLE - DUBLX • WITH SECONDARY ENTRY POINTS DUBLL, HALVX, HALVl.
0012
FAST DOUBLING OR HALVING OF A VECTOR (FIXED OR FLOATING)
0013
0014
0015
DUBLX DOUBLES THE MAGNITUDES OF THE NUMBERS IN A FIXED
0016
POINT VECTOR. OVERFLOW IS NOT CHECKED.
0017
DUBLL DOUBLES THE MAGNITUDES OF THE NUMBERS IN A FLOATING
0018
0019
POINT VECTOR.
0020
HALVX HALVES THE MAGNITUDES (WITHOUT ROUNDING) OF THE
0021
0022
NUMBERS IN A FIXED POINT VECTOR.
0023
0024
HALVL HALVES THE MAGNITUDES OF THE NUMBERS IN A FLOATING
0025
POINT VECTOR.
0026
0027
LANGUAGE - FAP, SUBROUTINE (FORTRAN II COMPATIBLE)
0028
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
0029
STORAGE
- 45 REGISTERS
0030
SPEED
- ION MACHINE CYCLES IN: LENGTH OF VECTOR)
0031
AUTHOR
- S.M. SIMPSON
0032
OOH
----USAGE---0034
0035
TRANSFER VECTOR CONTAINS ROUTINES NONE
0036
AND FORTRAN SYSTEM ROUTINES NONE
0037
0038
FORTRAN USAGE
0039
CALL DUBLX IIX,LXI
0040
CALL DUBLL I X,LX)
0041
CALL HALVX IIX.LXI
CALL HALVL I X,lX)
0042
0043
0044
INPUTS
0045
I=l ••• LX IS VECTOR OF FLOATING POINT NUMBERS.
0046
XIII
0047
0048
I=l ••• LX IS VECTOR OF FIXED POINT NUMBERS.
I XIII
0049
0050
IS FORTRAN II INTEGER
LX
0051
MUST EXCEED ZERO
0052
ILX=O IS TREATED AS LX-I. LX NEG AS LX POS)
0053
0054
OUTPUTS
0055
0056
I=l ••• LX IS INPUT VECTOR HALVED OR DOUBLED.
XIII
0057
0058
I=l ••• LX IS INPUT VECTOR HALVED OR DOUBLED.
IXI II
0059
0060
EXAMPLES
0061
0062
1. INPUTS - IXII ••• 3)
1,-4.9
LX-3
0063
IXII ••• 3)
2,-8,18
OUTPUTS - DUBLX
IX(l ••• 3)
0,-2,4
0064
HALVX
0065
0066
2. INPUTS - IXI1 ••• 3) - OCT 000001000000.-000004000000,000011000000
0067
LX=3
0068
OUTPUTS - DUBLX
IXII ••• 3)
OCT 000002000000, -000010000000.
000022000000
0069
0070
HAlVX
IXII ••• 3)
OCT 000000400000, -000002000000,
0071
000004400000
0072
0073
3. INPUTS - XJI ••• 31 = 1.,-4.,9. LX-3
0074
OUTPUTS - DUBLL
X(I ••• 3) - 2.,-8.,18.
9129/64

...
OUBLX
•_......................
••••••••••••••••••••••••
(PAGE

PROGRAM LISTINGS

X(1 ••• 31 = .5,-2.,4.5

• 4. INPUTS - XIII = 3.11
LX:l
OUTPUTS - OUBLL
XIII
6.34
HALVL
XII) = 1.585

HALVX
01

OU8LL
HALVL

PIE
8CI
CLA
STO
TRA
CLA
STO
CLA
STO
CLA
STO
TRA
CLA
STO
TRA
CLA
STO

02

05

-•

..

IPAGE

HALVL

OU8LX

DUB LX

••••••••••••••••••••••••

21

-•
-

••••••••••••••••••••••••

..

CLA
STO
eLA
STO
SXO
CLA
ADD
STA
STA
CLA"
POX

LOOP

NOP

06
01

NOP
NOP

K1
K2
K3
K4
K5
K6
K7
KB
K9
K10

LXD
TRA
PZE
CLA
ALS
STO
ARS
CAL
SLW
ACL
SUB
OCT
END

TZE
TlX

I,OU8LX
K3
06
01
K5
06
K2
LOOP
K4
07
05
K8
06
02
K9
06
K6
LOOP
K1
07
DU8LX-2,4
1,4
Kl
LOOP

SET ALS
SET ARS 1
SET CLA .. ,4
AND
STO ... ,4
SET ACL K10
SET SUB KI0
SET CAL.-,4
ANO
SLW "",4
SAVE XR4
SET Y+1

C7
2,4
0,4

SET XR4 FOR N DATA
.... 8ELOW=Y+ 1
OUBLX HALVX OU8LL HALVL
CLA •• ,4 CLA ... ,4 CAL ... ,4 CAL •• ,4

01+1
ALS 1 ARS 1 ACL K10 SUB K10
STO •• ,4 STO •• ,4 SLW".,4 SLW ... ,4
LODP,4,1
DUBLX-2,4
3,4
1

*.,4
1

•• ,4
1

.*,4
*.,4
KID
K10
001000000000

EXIT

0015
0016
0011
0018
0079
0080
0081
0082
0083
0084
00B5
0086
0081
0088
00B9
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128

21

*.* •••
..* •••• ENDFIl

~

•••••••• ** ••

.

• * ••• * ••• ~*.* •••••• *.* ••

PROGRAM LISTINGS

••••••••••••••••••••••••

*

REFER TO
REREAD

.•••••••••••••••••••••••
..*
EOFSET
••••••••••••••••••••••••
REFER TO
REREAD

ENDFll

..

• ••••••••••••• *** •••••••
REFER TO
REREAD

••••••••••••• ****.* •••••
..

EOfSET

..

••••••••••••••••••••••••
REFER TO
REREAD

.
••••••••••••••••••••••••
••••••••••••••••••••••••

-

PROGRAM 1I STINGS

EXCHVS

••••••••••••••••••••••••
eXCHVS
..
••••••••••••••••••••••••

..

LAST CARD IN DECK IS NO. 00B3
0001
0002
0003
0004
0005
0006
----ABSTRACT---0001
•
OOOB
0009
- nTlE - EXCHVS
0010
•
EXCHANGE ANY TWO VECTORS
0011
EXCHVS EXCHANGES ANY TWO VECTORS
0012
It
001.3
0014
It LANGUAGE
- FAP SUBROUTINE IFORTRAN-II COMPATIBLEI
0015
- EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
.. STORAGE
0016
REGISTERS
-22
0011
.. SPEED
LENGTH OF VECTORS
- 31 + LO-LXY MACHINE CYCLES, LXY
001B
.. AUTHOR
- S.M. SIMPSON, AUGUST 1963
0019
•
----USAGE---0020
0021
.. TRANSFER VECTOR CONTAINS ROUTINES - INONE)
0022
0023
AND FORTRAN SYSTEM ROUTINES - (NONEI
0024
.. FORTRAN USAGE
0025
0026
..
CALL EXCHVSILXY,X,Y)
0021
0028
- INPUTS
0029
0030
LXY
IS COMMON LENGTH OF THE TWO VECTORS. SHOULD EXCEED 0
XII)
I=L ••• LXY IS A VECTOR IN ANY MODE
0031
0032
YII!
I=l ••• LXY IS A VECTOR IN ANY MOOE
0033
.. OUTPUTS
0034
STRAIGHT RETURN WITH NO ACTION IF LXY LSTHN 1
0035
l=l ••• LXY IS XI I! = INPUT VALUE OF YI I I
0036
XIII
0031
0038
l:l ••• LXY IS YI II '" INPUT VALUE OF XII)
YIII
•
0039
EQUIVALENCE IX,YI IS PERMITTED (SAME THING AS NO ACTION)
0040
0041
•.. EXAMPLES
0042
0043
0044
.. L. INPUTS - Xl1 ••• 31 = I., 2 •• 3.
IXlI1 ••• 31= 2. 4. 6
..
!X2=4
IX3=5
IX4=0
IX5=1
0045
0046
USAGE
CALL EXCHVSI3, X, IX1)
0041
•
CALL EXCHVSll,IX2,IX3)
0048
..
CALL EXCHVSIO,IX4,IX51
..
CALL EXCHVSI3, X, X)
0049
0050
..
OUTPUTS - Xll ••• 3)
2, 4. 6
[XlI1 ••• 3) '" 1., 2 •• 3.
0051
It
IX2 = 5
IX3
4
IX4 = 0
IX5 = 1
INO OUTPUT CASE)
0052
..
0053
•
0054
• PROGRAM FOLLOWS BELOW
0055
0056
0051
.. NO TRANSFER VECTOR
0058
HTR
XR4
o
0059
I, EXCHVS
BCI
0060
• ONLY ENTRY. EXCHVSILXY,X,YI
EXCHVS-2,4
0061
EXCHVS SXD
0062
CLA
2.4
AIX)+l
0063
Kl
ADO
0064
STA
GETl
0065
STA
STORE!
0066
3,4
CLA
0061
AIYI+1
ADO
Kl
0068
GET2
STA
0069
STORE2
STA
0070
CLA.
1,4
LXY
Kl
0011
TMI
LEAVE
0012
POX
0,4
0073
LEAVE,4,O
TXL
0074
.. EXCHANGE LOOP
EXCHVS (SUBROUTINE I
FAP
-eXCHVS
COUNT
100
LBL
EKCHVS
EXCHVS ILXY,X,YI
ENTRY

-

...

.

-

.
.

..
..
.
..
.

...
.

.

-

9/29/64

..••••••••••••••••••••••••
..
EXCHVS

PROGRAM LI ST INGS

••••••••••••••••••••••••
IPAGE

Z)

GETl
GETZ
STORE2
STORE 1

CLA
LOQ
STO

STQ
TIX

.. EXIT
LEAVE LXD
TRA
END

•• ,4
•• ,4
•• ,4

.·,4
GET 1,4,1
EXCHVS-2,4
4,4

.••••••••••••••••••••••••
.
EXCHVS
• ••••••••••••••••• * •••••
IPAGE

**
**
**
**

A(Xl+l
AIY)+l
AIY)+l
AIX)+l

0075
0076
0077
0078
0079
0080
0081
0082
0083

21

_.•.....................
EXPAND
•
•

••••••••••••••••••••••••

PROGRAM LISTINGS

••••••••••••••••••••••••

•

EXPAND

..
EXPAND (SUBROUTINE)
9/4/64
LAST CARD IN DECK IS NO. 0379
0001
•
FAP
.EXPAND
0002
COUNT
500
0003
LBL
EXPAND
0004
ENTRY
EXPAND IX, LX, MLPLYR, XPNDED, LXPNDD)
0005
0006
•
0007
•
----ABSTRACr---0008
•
0009
•
.. TI TLE - EXPAND
0010
..
HI-SPEED EXPANSION OF A VECTOR UNDER CUBIC INTERPOLATION
0011
0012
•
EXPAND TAKES A VECTOR OF LENGTH LX AND CREATES AN
0013
OUTPUT
VECTOR
OF
LENGTH
M*ILX-l)+l
IN
WHICH
THE
FIRST,
0014
•
THE IM+l)-TH, ••• , THE IM*ILX-l)+l)-TH VALUES ARE
0015
•
THE SAME AS THOSE OF THE INPUT VECTOR, AND IN WHICH THE
0016
REMAINING VALUES ARE INTERPOLATED WITH UNIFORM SPACING
0017
BY EXACT FITTING CUBICS, EXCEPT THAT QUADRATICS ARE USED
0018
AT THE TWO ENDS. THE EXPANSION FACTOR M IS AN INPUT
0019
•
PARAMETER GREATER THAN ZERO. LINEAR INTERPOLATION IS
0020
•
USED IF LX % 2. A PURE COpy OCCURS IF LX % 1 OR IF
0021
•
M
1 •
0022
"•
0023
.. LANGUAGE
- FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
0024
.. EQUIPMENT - 709,7090,7094 IMAIN FRAME ONLY)
0025
.. STORAGE
- 189 REGISTERS
0026
.. SPEED
- ON THE 7090, EXPAND TAKES ABOUT
0027
360+10*lX+800"IM-l)+94"IM-l)"LX MACHINE CYCLES,
0028
"•
PROVIDED LX EXCEEDS 3.
0029
- S.M. SIMPSON, JUNE 1964
0030
• AUTHOR
0031
0032
•
----USAGE---0033
0034
•
• TRANSFER VECTOR tONTAINS ROUTINES - INTOPR
0035
•
AND FORTRAN SYSTEM ROUTINES - NOT ANY
0036
0037
"• FORTRAN USAGE
0038
•
CALL EXPAND IX, LX, MLPLYR, XPNDED, LXPNDD)
0039
0040
0041
0042
• INPUTS
0043
•
XI II
l:l ••• LX IS THE VECTOR TO BE EXPANoeD.
0044
0045
•
LX
SHOULD EXCEED ZERO •
0046
0047
•
IS THE EXPANSION FACTOR, M, DESCRIBED IN ABSTRACT.
MLPLYR
0048
SHOULD
EXCEeD
ZERO.
0049
•
0050
•
0051
•
STRAIGHT RETURN WITH NO OUTPUT IF LX LSTHN% 0, OR IF
0052
• OUTPUTS
LX EXCEeDS 1 BUT MLPLYR IS LSTHN% O. FOR
0053
•
LX % 1 XPNDEDll) IS SET
XII) REGARDLESS OF
0054
•
MLPL YR •
0055
0056
..
XPNDEDII) l%l ••• LXPNDD IS THE EXPANDED VECTOR DESCRIBED IN
0057
0058
•
ABSTRACT. IF MLPLYR" I, XPNDEDII) " XII).
0059
LXPNDD
MLPLYR*ILX-l)+l IF LX EXCEEDS 1 .
0060
0061
" 1
IF LX
1 •
0062
•
0063
.. EXAMPLES
0064
0065
" 1. THIS EXAMPLE EXERCISES ALL PATHS IN EXPAND, EXCLUDING ILLEGAL LX
0066
0061
•
AND MLPLYR VALUES, ON A SIMPLE LINEAR X SERIES.
0068
..
INPUTS - Xll ••• 5) % 0.,6.,12.,18.,24. AND LET XPNDED BE A THREE
0069
..
DIMENSIONAL ARRAY OF DIMENSION XPNDEDI16,5,31, ALL
0070
"
ELEMENTS OF WHICH HAVE 8EEN SET TO THE CONSTANT
0071
..
VALUE % -9.0 •
0072
..
USAGE
DIMENSION LXPNDD(5,3)
0073
0074
•
DO 10 MLPLYR" 1,3

.
..
.

%

.
..
..

..

.
.

..

....
.

..
.

•

••••••••••••••••••••••••

••••••••••••••••••••••••

•

•

EXPAND

••••••••••••••••••••••••

PROGRAM LISTINGS

........................
•

••••••••••••••••••••••••
(PAGE

•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

•

=

00 10 lX
1.5
CALL EXPAND IX. LX. MLPLYR. XPNDEO Cl. LX. MlPlYR).
1
LXPNOOILX. MlPlYRl1
OUTPUTS - XPNDED(1 ••• 16,1.11
0 •• -9 •• -9 •••••• -9.
XPNDEDll ••• 16,2.11
0 •• 6.,-9 •• -9., •••• -9.
XPNDEDll ••• 16.3,11
0 •• 6.,12 •• -9 •• -9., •••• -9.
XPNOEDIl ••• 16,4.11
0 •• 6 •• 12 •• 18.,-9•• -9 •••••• -9.
XPNDEDll ••• 16.5,11
0.,6 •• 12 •• 18 •• 24 •• -9 •• -9 ••••• ,-9.
XPNDED(I ••• 16,1,21
0 •• -9 ••••• ,-9.
XPNDEDll ••• 16.2.21
0 •• 3 •• 6 •• -9 •••••• -9.
XPNDEDll ••• 16.3.2J
0 •• 3 •• 6.,9.,12 •• -9., •••• -9.
XPNDEO(1 ••• 16~4,2) = 0.,3., ••• ,15.,18 •• -9., ••• ,-9.
XPNDEOtl ••• 16,5,2)
0.,3., ••• ,21.,24.,-9 ••••• ,-9.
XPNOEDll ••• 16,1.31
0 •• -9 •••••• -9.
XPNDEDll ••• 16.2.3J
0 •• 2 •• 4 •• 6 •• -9 •••••• -9.
XPNDEDll ••• 16.3,31
0 •• 2 •••••• 10 •• 12 •• -9 •••••• -9.
XPNDEDl1 ••• 16.4,31
0.,2 ••••• ,16.,18 •• -9 •••••• -9.
XPNDEDll ••• 16.5.31
Q •• 2 •••••• 22.,24.,-9 •• -9 •• -9.
LXPNDDll ••• 5.1 ••• 31
1.2,3,4.5,.1,3,5.1.9,.1,4,1,10.13
10

=

=

=

- SAME AS EXAMPLE 1 •• EXCEPT LXPNDD = -9
CAll EXPAND IX.O,3.XPNDEDI1.1.11.lXPNDD)
CAll EXPAND IX.2.0.XPNDEDll.l.ll.lXPNDDJ
CALL EXPAND IX.-3.-1,XPNDEDll,1,11.lXPNDDI

•
•
•
•

INPUTS

•

OUTPUTS - XPNDEDI1 ••• 16.I,11

•
•
•

= -9 •• -9., ••• ,-9.

LXPNDD

• PROGRAM FOLLOWS BELOW

•
•
•
•

TRANSFER VECTOR CONTAINS INTOPRINDATA. YLO, DELY, Y. OPER)
HTR
HTR
HTR
BCI

o
o
o

XRl
XR2
XR4

I,EXPAND

• ONLY ENTRY.

EXPAND(X. LX, MlPLYR. XPNDED, LXPNDDI

EXPAND SXD
SXD
SXD

EXPAND-4.1
EXPAND-3,2
EXPAND-2,4

•

•

• ADDRESS SETTINGS

•

•
•
•

CLA
ADD
STA
STA
SUB
STA
SUB
STA
SUB
STA
CLA
ADD
STA
STA

1,4
Kl
CLAI
LDQl
Kl
LDQ2
Kl
LDQ3
Kl
LDQ4
4,4
Kl
STOI
ST02

A(XI
AIXI+l
AIXI
A(X)-l
AIXI-2
AIXPNDEDI
AIXPNDED)+l

CHECK OUT LX AND MLPLYR
CLA.
STO
STD
CAS
TRA
TRA
TRA
LXGR1 CLA*
STO
STD
STD

2.4
LX
TXLl
KOl
LXGRl
EVEN
LEAVE
3,4
M
TXIl
TXI2

•

IPAGE

• 2. ILLEGAL CAll STATEMENTS

•

EXPAND

-

2.

lX

ILX

= 11

MLPLYR, CALLED M FOR SHORT

= -9

0015
0016
0077
0018
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0131
0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
0148
0149

2)

••••••••••••••••••••••••
EXPAND
•
*
••••••••••••••••••••••••
IPAGE

••••••••••••••••••••••••

PROGRAM LISTINGS

•

31

MGRI

CAS
TRA
TRA
TRA
LRS
ORA
FAD
STO

KDl
MGRI
EVEN
LEAVE

(PAGE

1M

1)

18

OCTK
OCTK
DElY

M FLOATED

*

• INTERPOLATE 8ETWEEN XII) AND X(2), LX GRTHN= 2 •

*

lEFT

CLA
STO
CLA
STO
STD
STO
CtA

SUB
TNZ
ClA
STO
TSXLFT TSX

•
*
•

KD3
NOATA
KOI
IXLO
IF ITlO
NSETS
lX
K02
TSXlFT
KD2
NOATA
IJljTRP.4

NDATA = 3
IXlO = IFIllO

NSETS = 1

RESET NOATA TO 2 FOR LX

=2

INTERPOLATE 8ETWEEN X(2) AND XllX-l,. PROVIDED LX EXCEEDS 3

CENTER ClA
STO
ClA
STO
CLA
SUB
STO
TMI
TZE
TSX

KD4
NOATA
K02
IXlO
lX
KD3
NSETS
RIGHT
RIGHT
INTRP.4

=4

NOAlA
IXLO

=2

NSETS

IIFITlO STILL

11

lX-3

*

• INTERPOLATE BETWEEN XILX-l) AND X(LX), PROVIDED LX EXCEEDS 2

* RIGHT CLA
STO
ClA
STO
CLA
SUB
STO
SUB
STO
TMI
TZE
TSX

•

K03
NDATA
KDI
NSETS
LX
KOI
IXlO
KOI
IF I llO
EVEN
EVEN
INTRP,4

NOATA

3

NSETS

1

IXLO = LX-l
IFIllO

=

LX-2

* FINAllY INSERT X(I.2, •••• LXI INTO XPNOEDll.M+l ••••• M.ILX-ll+1)
*
AND COMPUTE AND SET lXPNOD

•

EVEN
CLAI
STD1
TXIl
TXll

AXT
AXT
ClA
STO
TXI
TXI
TXL
LXD
ClA
SUB

ClAl,l,*.
EXPANO-2,4
LX
K01

TNl

XCAtA

CLA
TRA
XCAIA XCA
MPY
AlS
ADD
SlOtA STO*

*

1,1

1.2
**t1

··,2

*+1,2,*.
·+"1,1,1

I OF XI II
J OF XPNDEDIJ)
*.
Al>d+l
.*
A(XPNDEO)+~
M

*.
**

LX

KOI
STOIA
M

17

KOI
5,4

•

EXPAND

••••••••••••••••••••••••

LXPNDD

ILX=ll •

0150
0151
0152
0153
0154
0155
0156
0151
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0113

0114
0175
0176
0117
0118
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0211
0218
0219
0220
0221
0222
0223

3)

* •••• * •••• *.*.***.
.
..••••••EXPAND

.••••••••••••••••••••••••
.
EXPAND

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE 4)

••••••••••••••••••••••••
IPAGE

4)

EXIT
... lEAVE
LXD

...
...
...
.

EXPAND-4, 1
EXPAND-3,2
EXPAND-2,4
6,4

lXD
lXD
TRA

INTERNAL SUBROUTINE INTRP
LINKAGE XR4, RETURNS TO 1,4
ASSUMES
NOATA
IXLO
IF I no
NSETS

.....

..

IS
IS
IS
IS

SET (= 2, 3, OR 41
SET (= 1, 2, OR lX-l)
SET IIXLO OR IXlO-l)
SET 1= 1 OR LX-31

FORMS AND STORES INTERPOLATIONS (EXCLUDING ENDS) BETWEEN
X(IXLOI
AND XIIXLO+l)
XIIXlO+l1
AND XIIXLO+21
ETC
XtIXLO+NSETS-ll
AND XtIXLO+NSETSI
WHERE THE OPERATORS FOR THE FIRST SET ARE FITTED TO
XIIFITlOI, XtIFITLO+ll, ••• , XIIFITLO+NDATA-ll

...
..

.. INTRP SXA INTSV4,4
.... FOR PURPOSES OF INTOPR,

THE FIRST DATA POINT IS AT ARGUMENT
YLO = 0.0, THE SECOND AT ARGUMENT
DElY
M, THE THIRD AT
2M, ETC. HENCE THE Y FOR WHICH WE WANT AN OPERATOR IS Y = 1.0
lIN THE CASE THAT IFITLO = IXLOI OR Y = M+1 {FOR
IFITlO = IXlO-11. THE TOTAL NUMBER OF OIFFERENT OPERATORS WE WANT
IS M-l.

..
..
..
..
..

...
.

INITIALIZE Y, YCOUNT, OECREMENT AT TXL2, AND FRSXR2

XCA

...
....

LDQ
CLA
SUB
TlE
lDQ
XCA
FAD
STO
CLA
STO
CLA
ADD
SUB
STD
CLA
SUB
XCA
MPY
ALS
ADD
S10

K1L
Y
KOl
YCOUNT
IF ITLO
NSETS
KOI
TXL2
IXLO
KD1

IPREPARE FOR IFITLO

= IXLOI

Y

YCOUNT

DECREMENT AT TXL2

M
17

K02
FRSXR2

FRSXR2

LOOP FOR SUCCESSIVE Y VALUES BEGINS HERE

ACQUIRE
.GETOPR

STl

STZ

SXA
TSX
TSX
TSX
TSX
TSX
TSX
GETSV4 AXT
lXO
LXD

..

YLO
IXLO
IF ITLO
XCA
DELY

OPERATOR, THEN INITIALIZE XR1,XR2
OPER3
OPER4
GETSV4.4
$I NTOPR,4
NDATA,O
YLO,O
OELY,O
Y,O
OPER1,0

(CLEAR FOR CASES
NDATA = 2 OR 31

·*,4

...

IF lTLO,l
FRSXR2,2

XR4 PRIOR TO INTOPR

0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
024B
0249
0250
0251
0252
0253
0254
0255
0256
0257
025B
0259
0260
0261
0262
0263
0264
0265
0266
0267
026B
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
02BO
0281
0282
0283
0284
02B5
0286
02B7
02B8
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298

••••••••••••••••••••••••
•
~.* ••• * •••• *

PROGRAM LISTINGS

EXPAND
•*••••••
* ••••
(PAGE

5)

••••••••••••••••••••••••

•

•••••••••••••••••••••••••
EXPAND

(PAGE

• INNER lOOP OVER THE SETS TO FORM

•
•
•

XII)"OPER1 + X(I+1).OPER2 + XII+2)"OPER3 + X(I+3)"OPER4

•
"

RESULT IS STORED IN XPNDEOIJI
ASSUMES I
IS IN XRl, J
IS IN

•
•

JUMPS BY

•

EVAl
lOOl

l002

l003

l004
ST02
TXI2
TXL2

"•
•

STZ
lOO
FMP
FAD
STO
LOO
FMP
FAD
STO
lOO
FMP
FAD
STO
LDO
FMP
FAD
STO
TXI
TXI
TXl

1,

J

JUMPS BY

SUM

·.,1
OPERI
SUM
SUM
*.,1
OPER2
SUM
SUM

•• ,1

OPER3
SUM
SUM

•• ,1

OPER4
SUM
**,2
*+1,2 .. **
.+1,1,1
EVAl,l,".

XR2

M

••

AIXl+l

""

A()O

""

A(Xl-l

••

A(XI-2

."

A(XPNOEO)+l

."

M

."

IFITlO+NSETS-1

RESET FOR ANOTHER Y VALUE AND CHECK COMPLETION

•
•INTSV4

CLA
ADO
STO
CLA
FAD
STO
ClA
ADD
STO
CAS
HPR
TRA
TRA

FRSXR2
KD1
FRSXR2

INCREASE INITIAL OUTPUT STORAGE BY 1

Y

INCREMENT Y BY 1.0

Kll
Y

YCOUNT
KD1
YCOUNT

INCREMENT AND CHECK Y COUNTER
11 ••• M-ll

M

•INTSV4
GETDPR

(IMPOSSIBLE)
DONE
MORE Y VALUES

• EXIT FROM INTERNAL SUBROUTINE

"•

AXT
TRA

."

XR4 AT START OF INTRP

CONSTANTS

•Kl

KOI
K02
KD3
K04
KIL
YlO
OCTK

PZE
PZE
PZE
PZE
PZE
DEC
DEC
OCT

IFITLO
NSETS
M
lX
NDATA
OELY
Y

PIE
PZE
PZE
PZE
PZE
PZE
PZE

•
• TEMPORARIES
• IXLO PZE

•

*.,4
1,4

YCOUNT PZE
FRSXR2 PZE

0,0,1
0,0,2
0,0,3
0,0,4
1.0
0.0
233000000000

0,0,".
0,0,."
0,0,."
0,0,""

0,0,.-

..**,_.,
,_.,--••

0,0,.·

••
••
..
."
."
."

1, 2, OR lX-l
IXlO OR IXlO-l
1 OR lX-3
M" MLPLYR
LX
2, 3, OR 4
**
FlOATF(M)
•• " DELY·(IXLO-IFITlO)+l,
(+2,+3, ••• ,+M-1)
1,2, ••• ,M-l
""
M"(IXLO-11+2 (+3.+4 •••• ,+Ml

.*

0299
0300
0301
0302
0303
0304
0305
0306
0301
0308
0309
0310
0311
0312
0313
0314
0315
0316
0311
0318
0319
0320
0321
0322
0323
0324
0325
0326
0321
0328
0329
0330
0331
0332
0333
0334
0335
0336
0331
0338
0339
0340
0341
0342
0343
0344
0345
0346
0341
0348
0349
0350
0351
0352
0353
0354
0355
0356
0351
0358
0359
0360
0361
0362
0363
0364
0365
0366
0361
0368
0369
0310
0311
0312
0373

5)

••••••••••••••••••••••••

•

PROGRAM LI STINGS

•

EXPAND

••••••••••••••••••••••••
(PAGE

6)

OPER4
OPER3
OPER2
OPERI
SUM

PIE
PIE
PZE
PIE
PZE
END

••••••••••••••••••••••••
EXPAND
•
*
• •••••••••••••••••••••••
(PAGE

.... ,._,-, .. , ..
.", .. ,-.
.. , .... ,, ....

0374
0375
0376
0377
0378
0379

.",

\

6)

••••••••••••••••••••••••

-

FACTOR
•••••••••••••••••••••••••

PROGRAM LI STINGS

9/8/64
FACTOR (SUBROUTINEI
FAP
-FACTOR
COUNT
450
FACTOR
LBL
FACTOR (SPECT,N,L,WAVE,SPACEI
ENTRY

.

--..

..•
.

••
•
•
•
•
•
•
•

.

•
..•

..
•
•..
..•
•

-•••
•
•

•
•
•
•
•
•
•

•

•
•
•
•

---•
•

-••
•

•
•
•
•
•
•
•
•
•
•

-

...........................
•
FACTOR
••••••••••••••••••••••••

LAST CARO IN OECK IS NO. 0488
0001
0002
0003
0004
0005
0006
0001
---ABSTRACT---OOOB
0009
TITLE - FACTOR
0010
FACTOR POWER SPECTRUM TO FIND MINIMUM PHASE WAVELET
0011
0012
FACTOR USES THE METHOD OF KOLMOGOROV (REF.- 1. ROBINSON,E_
0013
A., M.I.T. PH.D. THESIS,GEOPHYSICAL ANALYSIS GROUP REPORT
0014
1,1954. 2. SIMPSON ET AL., SCIENTIFIC REPORT NO.2 OF
0015
CONTRACT AF 19160411318.) TO FACTOR THE POWER SPECTRUM
0016
AND THUS PRODUCE THE MINIMUM PHASE WAVELET.
0011
THE RESTRICTIONS ON APPLICABILITY OF THE METHOD REQUIRE
0018
THAT THE INPUT SPECTRUM BE NON-NEGATIVE AND NON-ZERO.
0019
HENCE SPECTII), THE INPUT SPECTRUM, [S CHECKED AND ANY
0020
VALUES WHICH ARE LESS THAN 10 •• 1-6) OF THE MAXIMUM VALUE
0021
OF SPECHI) ARE SET EQUAL TO 10"'(-6) OF THE MAXIMUM.CTHU
0022
FEATURE MAY EASILY BE REMOVED FROM THE SYMBOLIC DICK).
0023
0024
ONE HALF OF THE NATURAL LOG OF THE SPECTRUM IS COMPUTED
0025
AND EXPANDED IN A COSINE SERIES. THE COEFFICIENTS OF THE
0026
EXPANSION ARE COMPUTED BY TRAPEZOIDAL RULE INTEGRATION
0021
ISAME AS TRIGONOMETRIC INTERPOLATION. HENCE THE FIRST AND
0028
LAST TERMS IN THE SPECTRUM ARE WEIGHTED BY 1/2 ANO THE
0029
SUMMATION AND COSINE WEIGHTING ARE DONE SIMULTANEOUSLY
0030
BY SUBROUTINE COSP. THE COEFFICIENTS OF THE COSINE
0031
EXPANSION ARE TRANI II, Ial,L. THE EXPONENTIAL
0032
0033
0034
L
EXP •• CTRAN(1)+ SUMITRANII).CZ •• CI-l))))
0035
0036
1=2
0031
MUST BE EXPANDED IN A CONTINUED PRODUCT OF POLYNOMIALS IN
0038
Z. THE POLYNOMIALS ARE THEN MULTIPLIED OUT AND 6ROUPED IN
0039
THE FORM
0040
0041
L
0042
P " SUM IWII).IZ •• CI-ll))
0043
0044
I" 1
0045
WHERE L IS THE LENGTH OF THE WAVELET, AND WIll IS THE
0046
DESIRED WAVELET.
0041
0048
0049
PROGRAM NOTES THE EXPANSION OF THE EXPONENTIAL AND MULTIPLICATION OF
0050
0051
THE RESULTING POLYNOMIALS MAY BE SIMPLIFIED BY THE
0052
FOLLOWING CONSIDERATIONS - THE EXPONENTIAL MAY BE
0053
REPRESENTED AS A CONTINUED PRODUCT OF POLYNOMIALS
0054
WHERE THE ITH POLYNOMIAL IS OF THE FORM
0055
L-I
0056
P(II-(SUM( CII,JI.IZ •• III+ 11.EXP •• (TRANllll
0051
0058
1=1
WHERE
0059
CII,Jl= ITRANI11/I).(TRANI2)/21 ••••••• CTRANIII/IJ/IIJ
0060
0061
FOR J"K-I
CII,JI= 0 FOR J NOT =K.I
0062
THE CII,OI TERMS ARE 1 FOR ALL I.
0063
0064
WE ARE ONLY INTERESTED IN THE FIRST L TERMS OF THE WAVELET. 0065
SO WE NEEO ONLY CONSIOER TERMS IN THE POLYNOMIALS WITH
0066
EXPONENTS LESS THAN OR -M,MaL-I. WE CAN THEN COMPUTE THE
0061
WAVELET COEFFICIENTS BY PARTIAL CONVOLUTION OF THE
0068
POLYNOMIAL COEFFICIENTS. THAT IS,
0069
0010
0011
0012
WHERE WAVEII) IS THE WAVELET, M=L-l, AND THE. SYMBOL
0013
DENOTES CONVOLUTION.
0014

.••••••••••••••••••••••••
..
FACTOR
...................... _*
(PAGE

PROGRAM LISTINGS

..

IT WILL BE NOTED THAT IF THE CONVOLUTION IS REPRESENTED
IN STEPS BY
B(M-ll= C(M-1,J).CIM,J), B(K)=CIK,J)-BIK+ll
BY CAREFUL INSPECTION OF THE FORM OF THE CII,J) ONE CAN
WRITE DOWN THE BIN) BY INSPECTION FOR N=L/2 (ROUNDED DOWN)
+1. THIS CUTS DOWN THE TOTAL LABOR BY NEARLY 1/2.
BIN)= 1,0,0, ••••• ,0,CIN,N),C{N+l,N+1), ••••• C(M,M)
FACTOR SETS UP BIN) AND THEN USES AN INTERNAL SUBROUTINE
TO SET UP CIN-l,J) FOR J=O,M. THE INTERNAL SUBROUTINE
PARCON COMPUTES THE PARTIAL CONVOLUTION WHICH IS BIN-I).
THE NEXT CII.J) IS SET UP BY CCOM AND THE NEXT Btl-II
COMPUTED BY PARCON. THIS IS REPEATED UNTIL ALL THE PARTIAL
CONVOLUTIONS HAVE BEEN DONE. THE RESULTING WAVELET IS THEN
SCALED BY EXP •• (TRANl1).
THE OUTPUT OF PARCON FOR ONE STAGE IS THE INPUT FOR THE
NEXT STAGE SO THAT THE ADDRESSES B1 AND B2 IN THE PARCON
ROUTINE ARE REVERSED BETWEEN STAGES.

-..
--•

-••.
•

..
..
..
.
..
..
.

.....

..
.....
....
..
.....
...
..

.
•
..•..
..
•
•

•

LANGUAGE
EQUIPMENT
STORAGE
SPEED
AUTHOR

-

FAP, SUBROUTINE IFORTRAN II COMPATIBLE)
109,1090 IMAIN FRAME ONLY)
30B DECIMAL REGISTERS
2200+94L+16L*-2+3L--3+210N+31L-N MACHINE CYCLES
J.N. GALBRAITH
NOV. 1, 1961
----USAGE----

TRANSFER VECTOR CONTAINS ROUTINES - MAXAB, COSTBL, COSP
AND FORTRAN SYSTEM ROUTINES - LOG, EXP
FORTRAN USAGE
CALL FACTORISPECT,N,L,WAVE,SPACE)
INPUTS
SPECTII)

l=l,N

N

NUMBER OF POINTS IN SPECTRUM
MUST BE GRTHN O.

L

LENGTH OF DESIRED WAVELET.
MUST BE GRTHN 0, LSTHN= N.

SPACE I I)

SPECTRUM FROM ZERO TO PI

I=l,NSPACE. NSPACE=3-L+N+1. WORK SPACE FOR COMPUTATIONS.
THE QUANTITIES B21I1,CIIl,TRANII),WORKIII, AND COST(!)
WHICH ARE MENTIONED IN THE ABOVE ABSTRACT ARE IN SPACEII)
IN THE FOLLOWING MANNER- (SEE OUTPUTS FOR LOCATION OF B1)
B2(1),1=1,L IS SPACEll) TO SPACEIL). SPACE FOR PARTIAL
CONVOLUTION.
COSTII),I=l,L+l IS SPACEll) TO SPACEIL+l). SPACE FOR
COSINE TABLE FOR COSINE SERIES EXPANSION.
CII),I=1,L IS SPACEIL+2) TO SPACEI2L+11. SPACE FOR COLUMN
OF CII,J) MATRIX •
WORKII),I=l,N IS SPACEI2L+2) TO SPACEI2L+N+l). WORK SPACE
FOR SPECTRUM •
TRANIII,I=l,L IS SPACEI2L+N+2) TO SPACEI3L+N+1). SPACE
FOR COSINE TRANSFORM.

NOTENO CHECKS ARE MAOE ON THE VALUES OF N ANO L. BOTH MUST BE GREATER
THAN 0, AND L MUST BE LESS THAN OR =N. ILLEGAL VALUES MAY RESULT
IN INCORRECT WAVELETS OR PROGRAM LOOPS.

.. OUTPUTS

..

•
•
•
.•

.•

WAVEII)

I=I,L OUTPUT MINIMUM PHASE WAVELET. SAME SPACE IS USED
FOR Blll),I=I,L. IF THE INPUT SPECTRUM CAN BE DESTROYED,
SPECT AND WAVE CAN BE THE SAME. WE NOTE THAT N IS GRTHN
OR EQUAL TO L SO THAT THERE IS NO SPACE DIFFICULTY
INVOLVED IN THIS EQUIVALENCE.

EXAMPLES

.. 1. INPUTS

•

..
(PAGE

..
.

•
•
..
..
..

FACTOR

••••••••••••••••••••••••

21

..
•
.•

• •••• * ••• _••••••••••••••

FOR A CONTINUOUS SPECTRUM

0015
0016
0011
001B
0019
0080
OOBI
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0131
0138
0139
0140
0141
0142
0143
0144
0145
0146
0141
014B
0149

2)

••••••••••••••••••••••••

•

fACTOR

•

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

31

•
•
•
•.
•

.

•
•
•
•
•
•
•
•
•
•
•

••••••••••••••••••••••••
fACTOR
•
••••••••••••••••••••••••

•

(PAGE

SPECT= 1.25+COS(WI, W~O,PI
THE WAVelET IS
WAVE= 1.,.5,0.,0., •••••• ,0.
fOR THE DISCRETE CASE THE NUM8ERS WILL NOT COME OUT
EXACTLY THE SAME OUE TO ROUND Off AND APPROXIMATION.
FOR A TEST CASE THE INPUT SPECTRUM CAN BE SET UP WITH A
FORTRAN LOOP.
SPECTlll=1.25 +COSFIFLOATF(I-l).W) ,I=l,N
W =PI/FLOATFIN-1)
WHERE N IS THE LENGTH OF THE SPECTRUM.
RESULTS ARE GIVEN BELOW FOR N=500
OUTPUTS - WAVEl1 ••• 5)=

1.000EOO,0.5000EOO,-O.4899E-06~-0.1327E-Ol

THE HIGHER TERMS ARE EVEN SMALLER WITH WAVE(20) lESS THAN
10··1-8)
PROGRAM FOLLOWS BelOW

PZE
BCI
l,FACTOR
FACTOR SXA
RETURN,I
SAVE IR1
SXA
RETURN+1,2
SAVE IR2
SXA
RETURN+2,4
SAVE IR4
SXD
FACTOR-2,4
1,4
CLA
SPECTRUM ADDRESS
STA
MAX+2
ADO
ONE
STA
LOOP 1
ClA.
2.,4
GET N IN DECREMENT
STO
ENOl
STO
N
CALL FACTOR,SPECT,N,L,WAVE,SPACEI
•
SUB
DONE
N-1
STO
NN
ADO
DONE
LRS
1B
N IN ADDRESS
STO
NA
SUB
ONE
ORA
CONST
FAD
CONST
NF
STO
Nf=FLOATlNG IN-1I
3,4
ClA.
GET L IN DECREMENT
STO
L
STD
END3
ARS
18
L IN ADDRESS
STO
LA
CLA
4,4
GET B1 AND WAVELET ADDRESS
STA
WAVAD
STA
PAR+1
STA
BFST
STA
LOOP2
STA
LOOP3+l
STA
LOOP4+2
5,4
CLA
GET B2 AND COST ADDRESS
STA
B2AD
STA
PAR+2
STA
CST+2
STA
CSP+4
SUB
LA
SUB
ONE
ADDRESS OF C
PAR+3
STA
STA
COM+ 1
SUB
ADDRESS OF WORK
LA
STA
WGT+3
STA
WGT+5
STA
CSP+l
STA
CSP+2
ADO
ONE
ADDRESS OF WORK+1
STA
ENDl-2
STA
WGT
STA
WGT+2
SUB
NA
SUB
ONE
ADDRESS OF TRAN
CSP+9
STA
STA
LOOP3

0150
0151
0152
0153
0154
0155
0156
0151
0158
0159
0160
0161
0162
0163
0164
0165
0166
0161
0168
0169
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0180
0181
0182
0183
0184
0185
0186
0181
0188
0189
0190
0191
0192
0193
0194
0195
0196
0191
0198
0199
0200
0201
0202
0203
0204
0205
0206
0201
0208
0209
0210
0211
0212
0213
0214
0215
0216
0211
0218
0219
0220
0221
0222
0223
0224

3)

••••••••••••••••••••••••

FACTOR
•
•••••••••••••••••••••••••
(PAGE

41

MAX

LOOPI

ENOl
WGT

CST
" COSP

"CSP

• TRAN
• MUST

BFST

LOOP2
END2
LOOP3
END3

CONV

PROGRAM LISTINGS

••••••••••••••••••••••••

• FACTOR
•
••••••••••••••••••••••••

STA
COM+2
STA
SCALE
TSX
SMAXA8,4
FIND MAXIMUM OF SPECTUM
PIE
N
PIE
LOCATION OF SPECTUM
••
PIE
BIGSP
PZE
INDEX
LOQ
BIGSP
MAX. OF SPECTUM
FMP
DEC
10"'1-61 OF MAX
STO
BIGSP
AXT
1,1
CLA
.uSPECT + 1
··,1
CAS
BIGSP
.+3
TRA
SPECT LARGER
.+2
TRA
SPECT EQUAL
CLA
BIGSP
SPECT LESS
$LOG,4
TSX
LOGI SPECTI
FOP
NF
LOG( SPECT III N-I)
•• ,1
STQ
·."WORK+1
TXI
·+1,1,1
TXl
LOOPl,I,.·
.·=N
.+1,1,-1
TXI
•• ,1
•• =WORK+I. WEIGHT LAST
CLA
FOP
TWOO
TERM IN SPECTRUM BY 1/2
.... WORK+I
STQ
·.,1
CLA
•• =WORK. WEIGHT FIRST
••
FOP
TWOD
TERM IN SPECTRUM BY 1/2
STQ
."=WORK
••
CLA
L
SUB
DONE
STO
LL
TSX
SCOSTBl.4
GO TO COSINE TABLE
NN
PIE
PZE
COST
GIVES HALF OF COSINE TRANSFORM OF LOGISPECTI EXCEPT FOR
TRANU) WHICH IS 2 TIMES NEEDED VALUE.
TSX
SCOSP,4
GO TO COSINE TRANSFORM
PZE
WORK SPACE FOR SPECTRUM
••
PZE
WORK
SPACE FOR SPECTRUM
••
PZE
NN
N-l
PZE
COST
••
PZE
NN
N-1
PZE
ZERO
JMIN=O
PZE
LL
JMAX=L-l
PZE
ONED
1.0
PZE
TRANCCOSTR)
••
CONTAINS COSINE TRANSFORM OF 1/2 LOG(SPECT). FIRST TERM
BE WEIGHTED BY 1/2. (SEE SYMBOLIC ADDRESS ·.SCALE .... )
CLA
L
ARS
1
LIZ
ANA
MASK
ADD
Ll2+1
DONE
M
M=L/2+1
STO
CLA
ONED
1.0
•• s8l.
STO
B1I0)=1.0
••
AXT
1,1
CLA
M
M
SUB
DONE
M-l
END2
STD
••• 1
CLEAR Bl
STZ
TXI
·+1,1,1
"-2.1, ••
TXL
."=M-I
LXD
M.l
IR1=M
CLA
TRAN
.",1
•• ,1
STO
81
TXI
"+1.1,1
LOOP3,I, ••
TXL
L IN DECREMENT
AXT
1,2
M
CLA
STO
P
DONE
SUB
STD
END23
AXT
1,1
CLA
P
DONE
SUB

...

(PAGE

0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
026B
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299

41

.
••••••••••••••••••••••••
••••••••••••••••••••••••

•

PROGRAM I f STINGS

FACTOR

(PAGE

51

COM
PAR

END23

SCALE

LOOP4

END4
RETURN

L
LL

STO
SXO
TSX
PZE
PZE
TSX
PZE
PZE
PZE
CLA
LOQ
STO
STQ
TXI
TXI
TXL
CLA
ARS
L8T
TRA
CLA
STA
TRA
CLA
STA
CLA
FOP
XCA
TSX
STO
CLA
STO
AXT
LOQ
FMP
STO
TXI
TXL
AXT
AXT
AU
TRA
PZE
PZE
PZE
PZE
PZE
PZE
PZE
PZE

(PAGE

P
K,2
CCOM,4

...••
.......
...

0300
0301

TRAN

C

PARCON,4

PAR+l
PAR+2
PAR+2
PAR+l
,,+1,2,1
"+1,1,1
CONV,I, ...
M
18
"+4
WAVAD
LOOP4
.+3
B2AD
LOOP4

LOCATION OF Bl
LOCATION OF B2
LOCATION OF C
EXCHANGE
LOCATIONS
OF Bl
AND B2

0302
0303
0304
0305
0306

0307
0308
0309
0310
0311
0312

0313
0314
" .. =M-l

0315

GET M
M IN ADDRESS
LOW BIT TEST
M EVEN, B2 CONTAINS WAVELET
MODO, B1=WAVELET

0316
0317
0318
0319

0320
0321

82 ADDRESS. B2 .. WAVELET.

0322
0323

."
TWOD

- .. =TRAN(11

0324
0325
0326

SEXP,4
NORM

SCALE FOR WAVELET

LL

EN04
0.1

.... ,I
NORM
"",I
"+1,101
LOOP4,1,".
··,1
• .. ,2

B2 OR Bl
SCALE FOR WAVELET
WAVELET
"·=L-l

•• ,4

6,4
0
0
0
0
0
0
0
0

L-l

RESTORE IRl
RESTORE IR2
RESTORE IR4

K
N
NN
N-l
M
P
NF
NA
N IN ADDRESS
LA
L IN ADDRESS
WAVAD
WAVELET AND Bl ADDRESS
BlAO
B2 ADDRESS
NORM PZE
0
BIGSP PZE
0
INDEX PZE
0
+23)000000000
CONST OCT
MASK ocr
777777000000
ZERO PZE
0
1,0,0
ONE
PZE
0,0,1
DONE PZE
ONED DEC
1.0
TWOO DEC
2.0
DEC
DEC
.000001
-CCOM -COMPUTES CCP.JI FOR J=O TO L-l
.CALLING SEQUENCE
TSX
CCOM,4
PZE
LOCATION OF C(P,OI
•
PZE
LOCATION OF TRAN
•
RETURN
CCDM SXA
BACK,l
SAVE IRI
SXA
BACK+l,2
SAVE IR2
SXA
BACK+l,4
SAVE IR4
CLA
L
GET L

-

••••••••••••••••••••••••
FACTOR
•
••••••••••••••••••••••••

•

0327
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337

0338
0339

0340
0341
0342

0343
0344
0345
0346
0347
034B
0349
0350
0351
0352
0353
0354
0355
0356
0357
035B
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374

51

••••••••••••••••••••••••

•

.

fACTOR

f'ROGRAM LISTINGS

••••••••••••••••••••••••

••••••••••••••••••••••••

6)

IPAGE

STD
ADDR2+2
CLA
P
ARS
18
CHS
1,4
ADO
STA
ADDR3
ADDR4
STA
CLA
1,4
STA
ADDRI
ADD
ONE
STA
ADDR2
P
CLS
ARS
18
ADD
2,4
STA
ST01
CLA
ONED
ADDR1 STO
2,1
AXT
ADDR2 STZ
··,1
.+1,1,1
TXI
ADDR2,1,·"
TXl
STOI CLA
ADDR3 STO
."
STO
TEMPI
STO
TEMP2
CLA
LL
35
lRS
DVP
P
51
LLS
SU8
DONE
BACK
HE
STD
END
CLA
P
,2
POX
SXD
END-2.2
AXT
1,1
CLA
TWOO
STO
R
TEMPI
LOOP LOQ
FMP
TEMP2
FOP
R
•• ,2
ADDR4 STQ
STQ
TEMPt
R
CLA
FAD
ONEO
R
STO
.. +1,2, ....
TXI
,,+1,1,1
TXI
END
TXL
LOOPd.""
.*,1
BACK AXT
AXT
*.,2
AXT
.·,4
TRA
3,4
TEMPI PZE
0,0,0
0,0,0
TEMP2 PIE
R
PZE
"PARCON COMPUTES A PARTIAL
"CALLING SEQUENCE
TSX
PARCON,4
"
PIE
LOCAT ION OF
PZE
LOCATION OF
PIE
LOCATION OF
PARCON SXA
EXT,1
EXT+1,2
SXA
EXT+2,4
SXA
2,4
CLA
STA
REG1
STA
REG3
REG3+1
STA
ADD
ONE
STA
REG2
CLA
3.4
REG')
STA
CLA
ONED
REG1 STO

...
...

--

,,-

.••••••••••••••••••••••••
FACTOR
•
IPAGE

GET P
L IN ADDRESS
ADDRESS OF CIP,P)
LOCATION OF CIO)

TRAN
1.0
CIO)
CLEAR
Clll TO
CI Ll

··=l

TRANIP)
CIP,P)

INTO MQ
Il-I)/P
INTO AC
Il-ll/P-1
IF ZERO,NO MORE TO DO
NOT ZERO, SET TO DO I L-II1P-l TIMES
P IN IR2
GET 2.0
INIT IAliZE R
TRANI 11
""=C. CIR+1) COMPUTED.
SAVE FOR NEXT C
GET R
INCREMENT BY 1.0
RE-SET R
*.=P. INCREMENT C STORAGE INDEX
INCREMENT lOOP COUNTER
.... =L-I/P-l. END LOOP CHECK.
RESTORE IR 1
RESTORE IR2
RESTORE IR4
RETURN
WILL CONTAIN PARTIAL SUM FOR CIP)
WILL CONTAIN TR·ANI P)
CONVOLUTION OF C AND Bl
81
82
CIX,O)
SAVE IR1
SAVE IR2
SAVE IR4
GET LOCA T ION OF B2

LOCATION OF C
1.0
B2101=1.0

0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447
0448
0449

6)

• •••••••••••••••••••••••
it

-

FACTOR

PROGRAM LISTINGS

••••••••••••••••••••••••
IPAGE

71

REG2

REG7

REG5
REG4
REG3

REG6
REG8
EXT

S

AXT
CLA
STO
SUB
STO
STZ
TXI
TXL
CLA
SUB
POX
SXO
PDC
SXD
SXD
AXT
LXA
CLA
STD
CLS
ARS
ADD
STA
AXT
LOQ
FMP
FAD
STO
TXI
TXI
TXL
TXI
TXL
AXT
AXT
AXT
TRA
PZE
END

2,1
L
REG2+2
DONE
REGB
-",1
-+1,1,1
REG2,l,-M
K

,1
REG3+2,1
,2
REG3+3,2
S,I
0,2
EXT+2,4
S
REG6
S
18
1,4
REG4
0,4
•• ,4

.·,2

--,I
--,I

*+1,4, ••

.+ 1,2, ••
REG5,4,-.
.+1,1,1
REG7-1,l,--

.·,1

•• ,2
••• 4

4,4
0

••••••••••••••••••••••••

-

•

FACTOR

••••••••••••••••••••••••

GET L

CLEAR B2111 TO B21Ll
OECREMENT=L
K GOES FROM 1 TO M-l. SET BY CALLING LOOP.
IRl=M-K

S=IRl=M-K
ZERO IR2
RESET IR4
GET S

LOCATION OF BlIS)
CIO)
BlI S)
B2
82
IM-K) IN DECREMENT
-IM-KI IN DECREMENT

··=5

--=L-l
RESTORE IRI
RESTORE IR2
RESTORE IR4
RETURN

IPAGE

0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487
0488

7}

••••••••••••••••••••••••

-

FAPSUM

-

PROGRAM LISTINGS

...,.....•.••...........
•

FAPSUM

LAST CARD IN DECK IS NO. 0065
0001
0002
-FAPSUM
0003
COUNT
50
0004
FAPSUM
LBL
0005
FAPSUM ILD,DATA,SUMCKI
ENTRY
0006
0007
----ABSTRACT---0008
•
0009
-TITLE - FAPSUM
0010
COMPUTES A LOGICAL SUMCHECK
0011
FAPSUM COMPUTES A SUMCHECK BY SUMMING THE CONTENTS OF A
0012
0013
VECTOR WITH THE -ADO AND CARRY LOGICAL WORD- INStRUCTION.
0014
•""LANGUAGE - FAP, SUBROUTINE IFORTRAN 11 COMPATIBLEI
0015
0016
- EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLYI
0011
"STORAGE
- 14 REGISTE~S
0018
- SPEED
- LENGTH OF VECTOR TIMES 4 MACHINE CYCLES
0019
"AUTHOR
- J.F. CLAERBOUT,
JUNE, 1962
0020
0021
---USAGE---•
0022
•• TRANSFER VECTOR CONTAINS ROUTINES - NONE
0023
0024
"
AND FORTRAN SYSTEM ROUTINES NONE
0025
0026
• FORTRAN USAGE
0027
•
CALL FAPSUMILD,OATA,SUMCKI
0028
•
0029
• INPUTS
0030
•
0031
I=l ••• LD IS A DATA VECTOR.
DATAIII
•
0032
(NEED NOT HAVE FLOATING NAMEI.
•
0033
• LD
0034
IS FORTRAN II INTEGER.
0035
•"• OUTPUTS
0036
0037
•
IS LOGICAL SUMCHECK FOR THE DATA.
0038
SUMCK
•
0039
INEED NOT HAVE FLOATING POINT NAMEI
•
0040
•
0041
" EXAMPLES
0042
"• 1. INPUTS - DATAIl ••• 31 = 1. ,-2. ,-3. LD=3
0043
0044
60660000001
OUTPUTS
SUMCK
=
OCT
•
0045
• INPUTS - DATAll ••• 41 1,-2,-3,4 lD=4
0046
=
• 2.
0041
OUTPUTS - SUMCK = OCT 000012000001
•
0048
"• 3. INPUTS - DATAIl ••• 21 = 6HAB
, 6H 45
0049
LD=2
0050
OUTPUTS - SUMCK = OCT 020264664141
0051
•
0052
1,FAPSUM
BCI
0053
SV4,4
FAPSUM SXA
0054
2,4
eLA
0055
ADD
=1
0056
STA
A
0051
CLA.
1,4
0058
,4
POX
0059
CLM
0060
•• ,4
A
ACL
0061
A,4,1
TlX
•• ,4
0062
AXT
SV4
0063
SlW.
3,4
0064
4,4
TRA
0065
EIIID
FAPSUM ISUBROUTINEI
FAP

---

-

-

-

••••••••••••••••••••••••

••••••••••••••••••••••••

9/29/64

••••••••••••••••••••••••

•

FASCNI

•

••••••••••••••••••••••••

PROGRAM LISTINGS

••••••••••••••••••••••••
FASCNI
•
••••••••••••••••••••••••

•

9/29/64
LAST CARD IN DECK IS NO. 0198
•
FASCNI (SUBROUTINE)
0001
•
FAP
.FASCN1
0002
COUNT
200
0003
0004
LBL
FASCNI
ENTRY
FASCN1 IVECT,ILO,IHI,VALUE,IFIND.IANSI
0005
0006
•
0007
----ABSTRACT---•
0008
•
0009
• TITLE - FASCN1
•
FAST SCAN VECTOR FOR ELEMENT EQUAL OR GREATER THAN GIVEN VALUE
0010
0011
•
FASCN1 SCANS A VECTOR RANGE AT HIGH SPEED TO FIND THE
0012
•
FIRST ELEMENT IIF ANY) EQUAL TO OR GREATER THAN A GIVEN
0013
•
VALUE.
VECTOR
MAY
BE
FIXED
POINT
OR
FLOATING
POINT.
0014
•
PROGRAM
IS
MOST
EFFICIENT
FOR
LONG
VECTORS.
0015
•
0016
•
0017
• LANGUAGE - FAP SUBROUTINE IFORTRAN II COMPATIBLEI
0018
• EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
- 107 REGISTERS
0019
• STORAGE
- 100 + 5.2 N MACHINE CYCLES WHERE N = NO. ELEMENTS SCANNED
0020
• SPEED
- S.M. SIMPSON JR, JUNE 1962
0021
• AUTHOR
0022
•
----USAGE---0023
•
0024
•
0025
• TRANSFER VECTOR CONTAINS ROUTINES - NONE
0026
•
ANO FORTRAN SYSTEM ROUTINES - NONE
0027
•
0028
• FORTRAN USAGE
0029
•
CALL FASCN1IVECT.ILO.IHI,VALUE,IFIND,IANSI
0030
•
0031
• INPUTS
0032
•
VEC TI I I
I=ILO, ••• ,IHI IS THE FORTRAN-TYPE VECTOR TO BE SCANNED
0033
•
VECTII) MAY BE FIXED POINT OR FLOATING POINT
0034
•
0035
• ILO
MUST BE GRTHN=
0036
•
0037
•
IHI
MUST
BE
GRTHN=
IlO
0038
•
0039
•
IS TO BE COMPARED IBY A CAS INSTRUCTION) AGAINST
0040
• VALUE
VECTIILO, ••• ,IHI). VALUE SHOULD BE FIxeD POINT OR
0041
•
FLOATING POINT MODE ACCORDING TO MODE OF VECTII).
0042
•
0043
•
0044
• OUTPUTS
0045
•
IS NOT DISTURBED IF VECTIILO, ••• ,IHI) ALL LESS THAN VALUE
IFIND
0046
•
IS FIRST INDEX GRTHN=ILO SUCH THAT VECTIIFIND)
0047
•
GRTHN= VALUE IF ONE IS FOUND.
0048
•
0049
•
IANS
o MEANS VECTIILO, ••• ,IHI) ALL LESS THAN VALUE
0050
•
1 MEANS VECTIIFINO) WAS FOUND TO BE GRTHN= VALUE
0051
•
-2 MEANS ILLEGAL ILO
0052
•
= -3 MEANS ILLEGAL IHI
0053
•
0054
•
0055
• EXAMPLES
0056
•
0057
• 1. SHOWING USE ON BOTH FIXED AND FLOATING DATA
0058
•
INPUTS - XII ••• 7) = 9.,8.,7 •• 6.,7.,8.,9.
VAL =8.
0059
•
IXli ••• 7) - 9,8.7,6,7,8,9
IVAL -8
0060
•
USAGE
CALL FASCN1IX,3,7,VAL,IFIND1,IANSI)
0061
•
CALL FASCN11IX,3,7,IVAL,IFIND2,IANS21
0062
OUTPUTS - IANSl = IANS2 = 1
IFINDI = IFIN02 = 6
•
0063
•• 2. SHOWING CASE WHEN VALUE NEVER FOUND
0064
00-65
•
INPUTS - SAME AS EXAMPLE 1. EXCEPT VAL = 10.
•
USAGE
CALL FASCNIIX,3,7,VAl,IFIND,IANS)
0066
0067
•
OUTPUTS - IANS = 0
0068
•
0069
• 3. ILLEGAL REQUESTS
0070
•
USAGE
CALL FASCNlIX,O,3,VAL,IFIND,IANSli
0071
CALL FASCNIIX,5,4,VAl,IFIND,IANS2)
•
0072
OUTPUTS - IANS1 = -2 IILLEGAL ILO)
IANS2 = -3 (ILLEGAL {HI)
•
0073
•
0074
HTR
0

..••••••••••••••••••••••••
.
FASCNI

PROGRAM LISTINGS

••••••••••••••••••••••••
IPAGE

2)

HTR
o
HTR
o
BCI
1,FASCN1
FASCNI-4,1
FASCNI SXD
SXD
FASCNl-3,2
FASCNl-2,4
SXD
"SET ADDRESSES
1,4
CLA
AIAIVECTI)
ADD
K1
+l
STA
C1
STA
C2
STA
C3
C4
STA
STA
C5
STA
C6
STA
C1
STA
C8
STA
C9
STA
CI0
AIAIILO))
CLA
2.4
STA
GET2
CLA
3,4
AIAIIHIlI
STA
GETJ
5,4
CLA
STA
PUT5
CLA
6,4
STA
PUT6
.. CHECK ILO, IHI AND MAKE SETT I NGS
K2
CLS
STO
IANS
GET2 CLA
A( I LO I
STO
ILO
TMI
LEAVE
TZE
LEAVE
.. I SET TO COUNT ON XRl FROM ILO TO IHII
POX
0.1
K3
CLS
STO
IANS
GET3 CLA
A( IH I l
••
CAS
ILO
NOP
TRA
IHIOK
TRA
LEAVE
GOBAK
IHIOK STD
MAYBE
STD
.. MAKE TRIAL SETTING OF IANS=O
IANS
STZ
"PUT VALUE IN AC
4,4
CLA
AlAlVALUEll
Sf A
GET4
....
AIVALUEl
GET4 CLA
"COMPARE IN BLOCKS OF LENGTH 10
CAS
.*,1
AIVECTl+l
CI
C2,1,1
TXI
NOP
TRA
MAYBE
CAS
DITTO
C2
··,1
C3,1,1
TXI
NOP
TRA
MAYBE
C3
CAS
.*,1
DITTO
TXI
C4,1'1
NOP
TRA
C4
DITTO
CAS
TXI
NOP
TRA
MAYBE
•• ,1
CAS
C5
DITTO
C6,l,1
TXI
NOP
TRA
MAYBE
.... , 1
CAS
C6
DITTO
TXI
C1,1,l
NOP

...

.••••••••••••••••••••••••
.
FASCNI
••••••••••••••••••••••••
IPAGE

0075
0076
0011
0018
0019
0080
0081
0082
0083
0084
0085
0086
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104
0105
0106
0101
0108
0109
0110
0111
0112
0113
0114
0115
0116
0111
0118
0119
0120
0121
0122
0123
0124
0125
0126
0121
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149

2)

••••••••• * ••••••••••••••

PROGRAM LISTINGS

fASCNl
*
••••••
* •••••••••••••••••*
IPAGE

3)
TRA
MAYBE
CAS
**,1
DITTO
TXI
C8.1,1
NOP
TRA
MAYBE
CB
CAS
•• ,1
DITTO
TXI
C9,ld
NOP
TRA
MAY8E
C9
CAS
.-,1
DITTO
TXI
CI0,1,1
NOP
TRA
MAYBE
cto
CAS
*-,1
DITTO
TXI
GOBAK,I,l
NOP
TRA
MAYBE
*GO BACK AND COMPARE NEXT 10 ELEMENTS
*IF WE HAVENT RUN OFF END
GOBAK TXL
C1,l,***~IHI
-NONE FOUND IF WE INDEXED OFF END
TRA
LEAVE
.IN CASE OF JU~P FROM LOOP TO MAYBE, ELEMENT IN IV
*HAS BEEN FOUND;OR GREATER THAN VALUE, PROVIDED
*THAT WE HAVE NOT INDEXED BEYOND VEeTIIHII
MAYBE TXL
FIND,l,..
**;IHI
TRA
LEAVE
*ELEMENT DEFINITELY FOUND;OR GREATER THAN LEVEL
-SET IFIND,IANS,AND EXIT
FIND PXD
0,1
PUTS S T O . *
A(IFINDI
CLA
Kl
STO
lANS
.LEAVE,STORING tANS
LEAVE eLA
IANS
ALS
18
PUT6 STO
**
AIIANSI
LXD
FASeNl-4,l
LXD
FASCNl-3,2
LXD
FASeNl-2,4
TRA
7.4
-CONSTANTS
Kl
PZE
1
K2
PZE
2
K3
PZF
3
.VARIABLES
IANS PZE
_.
-2,-3,0,1
ILO
PZE
0,0, ••
END
C7

••••••••••••••••••••••••
fASCNl
*
••••••••••••••••••••••••*
(PAGE

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0114
0175
0116
0117
0178
0179
0180
0181
0182
0183
0184
0185
0186
01B7
01B8
01B9
0190
0191
0192
0193
0194
0195
0196
0197
0198

3)

........... _.......•....

--

••••••••••••••••••••••••

•.•......••..........•
FASCOR
•
•..•.....•...•...
_......

••••••••••••••••••••••••

•............ _......... .

••••••••••••••••••••••••

••••••••••••••••••••••••

*

FASCOR

•

REFER TO
PROCOR

•

FASCRI

REFER TO
PROCOR

•

PROGRA'" LISTINGS

•

R£:FER TO
PROCOR

•

FASCRI

REFER TO
PROCOR

•

••••••••••••••••••••••••

*

FASCUB

PROGRAM LISTINGS

•

••••••••••••••••••••••••

*

FASCUB

*

••••••••••••••••••••••••

••••••••••••••••••••••••
9/4/64
*
FASCUB ISUBROUTINE)
*
FAP
*FASCUB
COUNT
250
LBL
FASCUB
ENTRY
FASCUB ICOEFS,XLO.DELX.NF.FOFX)

LAST CARD IN DECK IS NO. 0259
0001
0002
0003
0004
0005
0006
*
0007
*
0008
----ABSTRACT---*•
0009
* TITLE - FASCUB
0010
*
FAST EVALUATE CUBIC FOR EVENLY SPACED ARGUMENTS
0011
0012
•
FASCUB PRODUCES N EVENLY SPACED VALUES OF THE THIRD
0013
•
ORDER POLYNOMIAL
0014
•
3
2
0015
*
FIX) = A + A X + A X + A X
0016
*

•
•
•

•
•

*
•
•
•

•

o

LANGUAGE
EQUIPMENT
STORAGE
SPEED

*

**

•
•
•
•

1

2

3

X '" XLO. XLO+OELX, ••• , XLO+IN-l)DElX, BY HIGH-SPEED
ITERATIVE TECHNIQUES, WHERE XlO AND DElX ARE PARAMETERS.

AUTHOR

-

FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
709 OR 7090 (MAIN FRAME ONLY)
141 REGISTERS
Kl + K2 + 27.2.N MACHINE CYCLES
WHERE
Kl = 120 M.C. IF DElX=I.0
250 M.C. OTHERWISE
K2 '" 10 M.C. IF XlO =0.0
140 M.C. OTHERWISE
- S.M.SIMPSON, MARCH 1964
----USAGE----

* TRANSFER VECTOR CONTAINS ROUTINES - (NOT ANY)
•
AND FORTRAN SYSTEM ROUTINES - (NOT ANY)

..* FORTRAN USAGE

*

*

•
•
•
•
•
•
•
•
•
*
•
*

•

CALL FASCUB(COEFS,XlO.DELX,NF,FOFX)
INPUTS
COEFS( I)

1=1,2.3,4 CONTAIN AO,Al,A2,A3. RESPECTIVELY. THE
COEFFICIENTS OF FIX) IN THE ABSTRACT.

XlO

IS FIRST VALUE OF ARGUMENT OF F(X) IN THE ABSTRACT.

DELX

IS ARGUMENT INCREMENT.

NF

IS NUMBER OF SUCCESSIVE EVALUATIONS OF FIX) DESIRED.
MUST EXCEED ZERO.

SHOULD BE NON-ZERO.

OO~O

•

*
• OUTPUTS
*
• FOFXII)

•
•
•

STRAIGHT RETURN WITH NO OUTPUT IF NF IllEGAL.
I=I ••••• NF CONTAIN THE N VALUES OF FIX) AS DESCRIBED IN
THE ABSTRACT.

* EXAMPLES

*

• 1. INPUTS - COEFSIl ••• 4}=1.0,2.0.-1.0,3.0
•.
USAGE
CALL FASCUBICOEFS.0.0,2.0,4.FOFXl)
•
OUTPUTS - FOFXl(1 ••• 4'=1.0,25.0,18~.0,62~.0

•

• 2. INPUTS - COEFSIl ••• 4)=0.O,3.0.1.0,-4.0
•
USAGE
CALL FASCUB(COEFS,-2.0, 1.0.3,FOFX2)
•
OUTPUTS - FOFX211 ••• 3) = 30.0.2.0.0.0

••
•
•
•

0017

0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049

3. INPUTS
USAGE

- SAME AS EXAMPLE 2., EXCEPT FOFX5Il ••• 4) = -99.
CAll FASCU8(COEFS,1.0.-1.0,2.FOFX3)
CAll FASCUBICOEFS.-2.0.-1.0.1,FOFX4)
CALL FASCUB(COEFS,-2.0,-1.0.0,FOFX5)

0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074

**** •••••••
.•••••••••••••
FASCUB
*

••••••••••••••••••••••••
FASCUB
*••••••••••••••••
** ••• ** •

.

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

21

...
.

OUTPUTS - FOFX3(1 ••• 21
FOFX4 (1)
FOF X51l ••• 41

.

.....
..

IPAGE
0.0,0.0
30.0
-99 •

PROGRAM FOLLOWS BELOW
NO TRANSFER VECTOR
HTR
HTR
BCI

.* ONLY ENTRY.
..
FASCUB SXD
SXD
CLA
STA
AXT
CLACO CLA
STO
TIX
ClA-

TMI

TZE
STO
STD
STO
CUI

.-

ADD
STA
ADD
STA
CLA ..
STO
CLA*
STO
CAS
TRA
TRA
TRA

o
o

XRl
XR4

l,FASCU8
FASCUBICOEFS,XLO,DELX,NF,FOFXI
FASCUB-2,4
FASCUB-3,1
1,4
CLACO
3,1
•• ,1

IXRl COUNTS OUTPUTS)
AICOEFS)
-uAICOEFS)

A1+1'!
CLACO,ltl
4,4
LEAVE
LEAVE
CKF2
CKF3
TXL
5,4
K1
STOF
Kl
FA OF
2,4
XLO
3,4
DELX

AIFOFXI

KlL

IS IT

(NOTE XRl IS LEFT
NF

XLO
DElX
z

1.0

NOll
OEll
NOll

.. HI-SPEED SETTING OF CONSTANTS IF DELX=1.0
DEll

CLA
FA.D
FAD
STO
LDO
FMP
STO
FAD
FAD
STO
FAD
STO
CLA
FAD
STD
STO
TRA

Al
A2
A3
BI
A3
K3L
B2
A2
A2
BI
B2
CZ
B2
B2
C1
DZ
CKXLO

.* SLOWER CONSTANT
. Non LDO A3
FMP
FAD
XCA
FMP
FAD
XCA
FMP
STO
CLA

IT IS ONE, HI-SPEED
Bl=A 1 +A2+A3
B2=)*A3
Bl=2*A2+3*A3
CZ=B1+B2
Cl=2*82
DZ=Cl

SETTINGS IN GENERAL

DELX
A2
DELX
Al
DELX
BZ
DELX

8Z=J*IAl+JIA2+J*A311

LOOP TO GET
A1,A2,A3
11

0075
0076
0071
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
Ol06
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
on8
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149

2)

••••••••••••••••••••••••

•

PROGRAM LISTINGS

•

FASCUB

••••••••••••••••••••••••
(PAGE

3)

STO

LOO
FMP
STO

DELX
TWODEL
DELX
A3
B2
A2
A2
DELX
Bl
B2
DELX
Bl
DELX
CZ
B2
TWODEl
Cl
Cl
DELX
DZ

CZ
Cl
DZ

• CHECK XLO AND SET fl IN THE CASE XLO=O.
• liN THIS CASE HI AND Gl ARE ALREADY OK BY SYNONYMS)

•CKXLD
•

lET
TRA
CLA.
STO"
TRA

XLO
GENXL
1,4
STOf
TXIl

COEFSllI=AZ

• SET Fl.Gl.Hl IN GENERAL

•

•

GENXL LOO
FMP
FAD
XCA
FMP
FAD
XCA
FMP
FAD·
STO"
LOO
fIolP
FAD
XCA
FMP
FAD
STO
LOO
FMP
fAD
STO

A3
XLO
A2
XLO
Al
XLO
1,4
STOF
B2
XLO
B1

COEFS( lI=Al
Fl=AZ+XLOIAl+XLO(A2+XLO-A31)

XLO
B1
G

Gl STORED

Cl
XLO

Cl
H

HI STORED

• SET FOfXI2) If Nf GRTHN

* TXIl
CKF2

CKF3

-

TXI
TXH
CLA
fAD"
STO"
TXI
TXH

*+1,1,1
LEAVE,l,*"

··=Nf

G

fADF
STOF
*+1,1,1
LEAVE,l.".

(XRl = 2 NOW)
"·=NF

• ENTER LOOP SO AS TO COMPUTE G2 FROM HI.
THEN F.3 FROM G2, THEN CYCLE (H2.G3,f4),

..•

•
•
•

FASCUB
•
•* •••••••••••••••••••••••
I PAGE

FAD
STO
FAD
XCA
FMP
STO
FAD
FAD
XCA
FMP
STO
LDO
FMP
FAD
XCA
FMP
STO
LDO
FMP

•

••••••••••••••••••••••••

CLA

H

TRA

FADG

LOOP TO PRODUCE fOfX(3.4, •••• NF)

(H3,G4,F5), •••

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224

3)

............................
*

FASCUB

PROGRAM LISTINGS

*

..........................
(PAGE

FASCUB

*

••••••••••••••••••••••••

41
CLADI CLA
FAD
STO
FADG FAD
STO
FADF FAD
STOF STO
TX!
TXL
TXL

••••••••••••••••••••••••
*

(PAGE

01
H
H

G
G
*.,1
**,1
*+1,1,1
CLADI,I,**

*
* EXIT
*
LEAVE LXD
FASCUB-J, 1
6,4
TRA
*
* CONSTANTS, TEMPORARIES
*
K1
PZE
1
KIL
OEC
1.0
3.0
K3L
DEC
, ,
PZE
XLO
, ,
TWODEL PZE
, ,
DELX PZE
, ,
DZ
PZE
,
PZE
Cl
, ,
PZE
CI
H
SYN
CZ
B2
PZE
.*,** •••
, ,
PZE
B1
PZE
8Z
SYN
8Z
G
A3
PZE
,.",
A2
PIE
, ,
Al
PZE
END

....•. ...... ......
.... .... ,.-..
.. •. ..
•. .. ..
._,.",."
....
....•. ,_.,
.. ..

**=A(FOFX)+2
**=A(FOFX)+l

··:NF

2*DELX
CALLEO J IN EQUATIONS BELOW
J*C 1
2*J*B2
J*(B1+J*B21
3*J*A3
J*(2*A2+3*J*A31
J*IA1+J*IA2+J*A311

0225
0226
0227
022B
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0.151
0252
0253
0254
0255
0256
0257
0258
0259

4)

..••••••••••••••••••••••••
FA SEPt
to

••••••••••••••••••••••••
REFER TO
PROtoR

.
..••••••••••••••••••••••••
FASEPl
••••••••••••••••••••••••
REFER TO
PROCOR

PROGRAM LISTINGS

-..•.....••..•..........
FASEPt
•

..

••••••••••••••••••••••••
REFER TO
PROtOR

••••••••••••••••••••••••

•

FASEPl

..

••••••••••••••••••••••••
REFER TO
PROtOR

.. -..................... ..
FASTRK

••••••••••••••••••••••••

PROGRAM LI STINGS

.
.••••••••••••••••••••••••
FASTRK
••••••••••••••••••••••••

9/8/64
LAST CA~D IN DECK IS NO. 0118
..
FASTRK (SUBROUTINE)
0001
FAP
0002
-FASTRK
0003
COUNT
100
0004
FASTRK
LBL
FASTRK IIXVEC,[XSTRT,IXLDDK,MXTRAK,IANS)
0005
ENTRY
0006
0007
0008
----ABSTRACT---0009
0010
• TITLE - FASTRK
0011
•
FAST TRACK THROUGH A VECTOR OF INDICES
0012
•
0013
FASTRK TRACKS THROUGH A fORTRAN FIXED POINT VECTOR EACH
0014
OF WHOSE ELEMENTS REPRESENTS THE INDEX OF ANOTHER ELEMENT
•
0015
OR ELSE HAS VALUE ZERO, SEARCHING FOR A GIVEN INDEX
0016
AND STARTING FROM A GIVEN ELEMENT, SUBJECT TO A LIMIT
•
0011
ON THE NO. OF SEARCHES, AND WHERE SEARCHING STOPS WHEN
•
0018
A ZERO ELEMENT IS FOUND.
"
0019
"
THUS FASTRK LOOKS DOWNSTREAM IN A BRANCHING PROCESS LIKE
0020
A RIVER COMPLEX TO SEE IF RIVER A FLOWS INTO RIVER B.
0021
0022
"" LANGUAGE - FAP SUBROUTINE (FORTRAN II COMPATIBLE)
0023
0024
" EQUIPMENT - 109 OR 1090 (MAIN FRAME ONLY)
0025
.. STORAGE
- 26
REG I STERS
0026
- 38 + 12.(N-ll
MACHINE CYCLES
• SPEEO
0027
WHERE N = NO. OF SEARCHES MADE
"• AUTHOR
0028
- S.M. SIMPSON, JULY 1963
0029
•
0030
0031
----USAGE---•
0032
0033
• TRANSFER VECTOR CONTAINS ROUTINES - INOT ANY)
0034
..
AND FORTRAN SYSTEM ROUTINES - INOT ANY)
0035
•
0036
• FORTRAN USAGE
0037
"
CALL FASTRKIIXVEC,IXSTRT,IXLOOK,MXTRAK,IANS)
0038
0039
".. INPUTS
0040
0041
"•
0042
IXVEC(I) 1=1,2,... IS INOEX VECTOR OF ARBITRARY LENGTH. EACH
0043
•
ELEMENT MUST BE GREATER THAN OR = ZERO
0044
(1045
SPECIFIES THAT IXVEC(IXSTRT) IS THE FIRST ELEMENT
IXSTRT
0046
TO BE COMPARED AGAINST IXLOOK
"
0047
MUST EXCEED ZERO
0048
0049
IS THE INDEX SEARCHED FOR
IXLOOK
"
0050
MUST EXCEED ZERO
"
0051
It
0052
IS
THE
MAXIMUM
NO.
OF
TRIES
TO
BE
MADE
MXTRAK
0053
MUST EXCEED ZERO
"
0054
0055
• OUTPUTS
0056
(NO LEGALITY CHECKS ARE MADE ON THE INPUTS)
0051
0058
It
IANS
0 MEANS TRAIL STOPPED AT A ZERO ELEMENT
0059
-'I MEANS TRAIL STOPPED BECAUSE MAX NO. OF TRIES
•
0060
WAS ABOUT TO BE EXCEeDED
0061
+K, WHERE K POSITIVE, MEANS SEARCH WAS SUCCESSFUL,
•
0062
AND THAT IXVECIK) = IXlOOK •
0063
0064
0065
• EXAMPLES
0066
• 1. INPUTS - IXVECl1 ••• 12) = 7, 9, 0, 5, 4, 3, 6, 8, 3, 1,12, 4
0061
0068
CAll FASTRKIIXVEC,10, 3,10,IANSl)
USAGE
0069
CAll FASTRKIIXVEC,10, 3, 4,IANS2)
0010
CAll FASTRKIIXVEC,10, 3, 3,IANS3)
0071
CAll FASTRKIIXVEC, 8, 8,10,IANS4)
0012
CALL FASTRKIIXVEC, 4, 4,10,IANS5)
•
0013
CAll FASTRKIIXVEC,12, 3,10,IANS6)
0074
CALL FASTRKIIXVEC, 7,12,10,IANS7)

...
...
.

.

..

.

.

..

....
...

.
.
...

.
...

....
...
...

•••••••••••••••• * •••••••

PROGRAM LISTINGS

FASTRK
*••••••••••••••••••
* •••••*
IPAGE

2)

*
*

*
*
*
*
*
*
*
*
*
*

••••••••••••••••••••••••
FASTRK
*
*
••••••••••••••••••••••••
IPAGE

OUTPUTS - I ANSI
IANS2
IANS3
IANS4
IANS5
IANS6
IANS7
IANS8
IANS9

CAll
CAll
'" 6
'" 6
:-1
'" 8
'" 5
=-1
"' 0
0
2

=

** PROGRAM FOLLOWS BELOW
*
HTR
0
BCI
1,FASTRK
FASTRK SXD
FASTRK-2,4
SXA
LEAVE,L
SXA
lEAVE+l,l
ClA
1,4
ADD
*-1
STA
ClA
4,4
ClA*
POX
0,2
ClA*
2,4
* BEGIN TRACKING lOOP
NEXT POX
0,1
ClA
ClA
**,1
HE
SETANS
CAS*
3,4
TRA
*+2
TRA
ARRIVE
TI X
NE X T , 2 , 1
* SET IANS AND LEAVE
ENOUGH CLS
KDl
TRA
SETANS
ARRIVE PXD
0,1
SETANS STO*
5,4
lEAVE AXT
**,2
AXT
.*,1
TRA
6,4
KD1
PlE
0,0,1
ENO

FASTRKIIXVEC. 3,12.l0,IANS8)
FASTRKIIXVEC, 2, 9,10.IANS91
liE IXVECI6) ,. 3)
ITOO MANY TRACKS. TAKES 4 TO GO FROM 10 TO 6)
INOTE lOOP AT 4-5-4-5 ETC)
(STOPS AT IXVEC1311
DITTO

XR4

AIIXVECI+1
SET FOR MAX NO.
OF LOOKS
SET TO lOOK AT IXVECIIXSTRTI FIRST
**=AIIXVEC )+1

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118

21

.••••••••••••••••••••••••
.
FOOT
••••••••••••••••••••••••
•
•

.••••••••••••••••••••••••
.
FOOT
••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0100
0001
0002
0003
COUNT
BO
FOOT
0004
LBL
FOOT (LXY,X,Y,ANS)
0005
ENTRY
FOOTR (LXY,X,Y,ANS)
0006
ENTRY
0007
•
0008
----ABSTRACT---•
0009
•• TITLE - FOOT ,WITH SECONDARY ENTRY POINT FOOTR
0010
0011
•
FAST ~OT PRODUCT OF TWO VECTORS
0012
FOOT COMPUTES THE DOT PRODUCT OF TWO VECTORS •
0013
0014
FOOTR COMPUTES THE DOT PRODUCT OF A VECTOR WITH THE
0015
REVERSE OF ANOTHER VECTOR.
0016
•
0011
0018
THUS FOOT CORRESPONDS TO ONE LAG OF A CROSSCORRElATION,
0019
FOOTR TO ONE LAG OF A CONVOLUTION.
•
0020
.. LANGUAGE - FAP, SUBROUTINE (FORTRAN II COMPATIBLE)
0021
.. EQUIPMENT - 709 OR 7090 (MAIN FRAME ONLY)
0022
0023
.. STORAGE
- 40 REGISTERS
0024
.. SPEED
- LENGTH OF VECTOR TIMES 25.4 MACHINE CYCLES - 7090
2B.6 MACHINE CYCLES - 70Q
0025
.. AUTHOR
0026
- R.A. WIGGINS,
4/10/62
0021
0028
----USAGE---0029
0030
.. TRANSFER VECTOR CONTAINS ROUTINES NONE
0031
•
AND FORTRAN SYSTEM ROUTINES NONE
0032
.. FORTRAN USAGE
0033
0034
•
CALL FOOT (LXY,X,Y,ANS)
0035
CALL FOOTR ILXY,X,Y,ANS)
•
0036
• INPUTS
0037
0038
•
0039
XIII
l=l ••• LXY IS FLOATING POINT VECTOR
0040
*
0041
YII)
1=1 ••• LXY IS FLOATING POINT VECTOR
*
0042
*
0043
LXY
IS fORTRAN II INTEGER
0044
MUST BE GRTHN=1
0045
0046
.. OUTPUTS
0047
0048
ANS
IS FLOATING POINT DOT PRODUCT OF X AND Y.
0049
*.. EXAMPLES
00'50
00'51
.. 1. INPUTS - Xl1 ••• 3)=1.,2.,3. Y(1 ••• 3)=I.,2.,3. LXY=3
0052
00'53
*
OUTPUTS - FOOT ANS=14.
FOOTR ANS=10.
0054
0055
* 2. INPUTS - XII)=I. Y(1)=2. LXY=l
0056
..
OUTPUTS - FOOT ANS=2.
FOOTR ANS=2.
0057
*
0058
•
0059
* PROGRAM FOLLOWS 8ELOW
0060
0061
PZE
0062
l,FOOT
8CI
0063
FOOT SXO
*-2,4
SAVE
0064
RET, 1
SXA
INOECES.
0065
1,4
AILXY)
CLA.
0066
POX
,1
SET IR 1 FOR FOOT.
0061
TIX
SET FOOT
CLA
0068
SWITCH.
STP
SW
0069
A
TRA
0010
FOOTR SXO
FOOT-2,4
SAVE
0011
SXA
RET ,I
INOECES.
OU72
1,1
SET
IR
1
FOR
FOOTR.
AXT
0013
SET FDOTR
TXI
CLA
0014
SW ITCH.
STP
SW

...
...
..
.
.

..
.
.
.
.

...
.
...
.

.
.

FOOT (SUBROUTINE)
FAP

PROGRAM LI STINGS

9/4/64

••••••••••••••••••••••••
*

FOOT

PROGRAM LISTINGS

*

21

A

X
Y

SW

RET
TIX
TXI
ANS

FOOT

*

• •••••••••••••••••••••••

••••••••••••••••••••••••
(PAGE

••••••••••••••••••••••••

*

IPAGE

CAL
ADO
STA
CAL
ADD
STA
STZ
CLA*
TlE
TMI
PDX
LDQ
FMP
FAD
STO
PZE
TIX
LXD
CLA
STD*
AXT
TRA
TIX
TXI
PZE
END

2,4
=1835

AIA(X))

X

3,4
=1835
Y
ANS
1,4
RET-2
RET-2
,4
.... ,1

•• ,4

ANS
ANS
*+1,1,1
X,4,1
FDOT-2.4
ANS
4,4
• •• 1

5,4
0,,0
0,,0

AlAIY))

AILXYI
SET IR 4.
AIXI
A(y1
EITHER TXI *+1,1,1 OR TIX *+1,1,1
RESET IR4.
A(ANSI
RESET IR 1.
RETURN.

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100

21

••••••••••••••••••••••••
FOOTR
*•• * •••••••••••••••••••••
*
REFER TO

FOOT

PROGRAM LISTINGS

••••••••••••••••••••••••
FOOTR
*• •••••••••••••••••••••••
*
REFER TO
FOOT

••••••••••••••••••••••••
FIRE2
*
*
••••••••••••••••••••••••

PROGRAM LISTINGS

••••••••••••••••••••••••
FIRE2
*
*
••••••••••••••••••••••••

•
FIRE2 (SUBROUTINEI
9/8/64
LAST CARD IN DECK IS NO. 0151
0001
*
LABEL
0002
CFIRE2
SUBROUTINE FIRE2 INRA,NCAT,NCAN,AA.NRR,NCR.RR,NRG.GG.FF,C)
0003
C
0004
0005
----ABSTRACT---C
0006
C
0001
C TITlE - FIRE2
C
TWO-DIMENSIONAL FILTER BY RECURSION
0008
0009
C
0010
FIRE2 INCREASES THE LENGTH OF ONE DIMENSION OF A 2C
DIMENSIONAL LEAST-SQUARE FILTER BY ONE. THUS, GIVEN
0011
C
THE FILTER FII,JI l=l, ••• ,NRA J=l, •••• NCAN-l THAT IS THE
C
0012
SOLUTION TO THE EQUATION
0013
C
0014
C
NRA NCAN-l
0015
C
C
SUM I SUM I FI I,JI*RI I-K,J+L-21 I I = GIK,lI
0016
1=1
J=1
0011
C
0018
C
0019
FOR
K = 1, ••• ,NRA
C
L = 1, ••• ~NCAN-l
C
0020
0021
C
THEN FlRE2 INCREASES THE J DIMENSION BY ONE SO THAT
0022
C
THE EQUATIONS ARE SATISFIED FOR L = 1, ••• ,NCAN.
0023
C
0024
C
TO PERFORM THE RECURSION, FIRE2 MAKES USE OF THE
0025
C
PREOICTION ERROR OPERATORS AA AND THE ERROR MATRIX STORED
0026
C
0021
IN COMPUTATION SPACE C AS GIVEN BY RLSPR2.
C
C
0028
- FORTRAN 11 SUBROUTINE
0029
C LANGUAGE
0030
C EQUIPMENT - 109, 1090, 1094 IMAIN FRAME ONLY)
- 211 REG I STERS
0031
C STORAGE
0032
- ABOUT .00015*M*N**2 SECONDS ON THE 1094 MOD 1
C SPEED
FOR ~ GRTHN 1 AND M GRTHN 25 •
0033
C
0034
GEOSCIENCE, INC.
C AUTHOR
- R.A. WIGGINS 8/63
0035
C
----USAGE--0036
C
0031
C
0038
C TRANSFER VECTOR CONTAINS ROUTINES - DOTJ,DOTP,IXCARG,MATML3,STZ
AND FORTRAN SYSTEM ROUTINES - NONE
0039
C
0040
C
0041
C FORTRAN USAGE
CALL FIRE2 INRA,NCAT,NCAN,AA,NRR,NCR,RR,NRG,GG.FF,C)
0042
C
0043
C
0044
C INPUTS
0045
C
0046
NRA
NUMBER
ROWS
IN
AA
AND
F.
C
MUST BE GRTHN= 1
0041
C
0048
C
NCAT
NUMBER OF COLUMNS OF AA ANO F TOTAL. I.E. THIS IS THE
0049
C
UPPER LIMIT ON THE NUMBER OF COLUMNS TO WHICH F CAN
0050
C
BE EXTENDED.
0051
C
MUST BE GRTHN= 1
0052
C
0053
C
NUMBER OF COLUMNS OF AA AND F NOW. I.E. THIS IS THE
0054
NCAN
C
PRESENT LENGTH OF THE PREDICTORS, THE FUTURE LENGTH OF
0055
C
0056
THE FILTER.
C
MUST BE GRTHN= 0 LSTHN= NCAT
0051
C
0058
C
L=l, ••• ,NRA*NCAT*NRA CONTAINS THE PREDICTION ERROR
0059
AAI 1I
C
OPERATORS AII,J,KI OF LENGTH NCAN AS GIVEN BY RLSPR2.
0060
C
0061
C
0062
NUMBER ROWS OF R.
NRR
C
0063
MUST BE GRTHN= 1 AND ODD.
C
0064
C
0065
NUMBER COLUMNS OF R.
C
NCR
0066
MUST BE GRTHN= 1
C
0061
C
0068
RRIII
I=I, ••• ,NRR*NCR CONTAINS RIJ,Kl J=-NRR/2, ••• ,-1,0,1 ••••
C
0069
NRR/2 K=O, •••• NCR-l. AN AUTOCORRELATION ARRAY.
C
0070
C
0011
NRG
NUMBER ROWS OF G.
C
MUST HE GRTHN= 1
0012
C
0013
C
0014
I=l, ••• ,NRG CONTAINS GIK,l) K=-NRG/2, ••• ,NRG/~
GGII)
C

••••••••••••••••••••••••

-

FIRE2
•••••••••••••••••••••••••
IPAGE

2)

C
C
C
C
C

PROGRAM LISTINGS

•..•.•.......•.

•

FIRE2

C
CII)
C
C
C OUTPUTS
C
FFIl)
C
C
C
C
C EXAMPLES

•

IPAGE

l=1 ••••• NRA.INCAN-1) CONTAINS FII.J) l=l ••••• NRA
.NCAN-1 AS DESCRI8ED IN THE A8STRACT.

J=l....

I=1 ••••• 4.NRA.NRA CONTAINS DATA FROM RlSPR2 THAT IS
NEEDED 8Y FIRE2.

l=l ••••• NRA.NCAN CONTAINS FII.JI l=l ••••• NRA
NCAN AS DESCRIBED IN THE ABSTRACT.

........

••••••••••••••••••••••••

IS ASSUMED TO 8E ZERO OUTSIDE THE liMITS OF DEFINITION.
FFIl)

~

J·l.....

0075
0016
0011
0078
00"

0080
0081
0082
0083
0084
0085
0086
0087
0088
0089

C

0090

C 1. EXTENSION OF A ONE-DIMENSIONAL PREDICTOR
INPUTS - NRA = 1 NCAT: 5 NCAN - 5
C
1.001
C
AAll •• ~5) - 1.000.-0.499.0.246.-0.117.0.041 Cllt
NRR = 1 NCR = 2 RRl1 ••• 21" 1.25 •• 50
C
C
NRG a 1 Gil)" O.
C
FFI1 ••• 41 = 0.997.-0.493.0.235.-0.094
C
USAGE
CAll FIRE2INRA.NCAT,NCAN.AA.NRR.NCR.RR,NRG.GG.FF,Ct
OUTPUTS - FFl1 ••• 51 .. 0.999.-0.498,0.246.-0.111.0.041
C
C
C 2. CONSTRUCTION OF A GENERAL FILTER USING RLSPR2.
INPUTS - NRA .. 3 NCAT = 5 NCAN = 0
C
C
NRR
3 NCR" 3 RRl1 ••• 91
0.302, 0.105. 0.010,
C
1.340. 0.621. 0.020,
0.302. 0.105. 0.010
C
NRG
1 NCG" 5 GGll ••• 5)" 0 •• 0•• 1•• 0 •• 0.
C
C
USAGE
DO 10 l-l,NCAT
CALL RLSPR2INRA.NCAT,NCAN.AA.NRR,NCR,RR.C.IANSI
C
IG .. l+ll-ll.NRG
C
CALL FIRE2INRA,NCAT,NCAN.AA.NRR,NCR.RR,NRG.GG.FF.Cl
C
C
10
CDNTINUE
OUTPUTS - IANS ,. 0 FFI1 ••• 151 = 0.002. 0.181.-0.393, 0.181, 0.002.
C
C
0.045,-0.609, 1.417,-0.6109. 0.045.
C
0.002, 0.181.-0.393. 0.181, 0.002

0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149

=

C

C

C PROGRAM FOLLOWS 8ElOW
C
C

10
20

30
40
50

60

DIMENSION AA(2),RRI2).GGI2).FFI2),CI21.CMI21
COMMON CM
laNRA
MaNCAN-l
MT=NCAT
Ll=L.L
LMT=l*MT
CALL IXCARG IC.ICll
IC2-IC1+LL
IC3=IC2+LL
IC4=IC3+l
IF 1MI 10.10.20
CALL STZ IlMT.FFI
CONTINUE
M1=INRR+U/2
JC1:1C)
IG1=NRG-INRG-LI/2
DO 50 l=l,L
CALL DOTP IL.M.FF.NRR.NCR.RR.MI-I,l.CMIJCll.-2.)
IF IXMINOFIIG1.NRG-IGl+11) 40.40.30
CONTINUE
CMIJC11=CMIJCII-GGIIGl)
IG1aIGl-1
JCl=JCl+l
CALL MATMl3 IL.l.l,CMIIC21.CMIIC3I,O.CHIIC41.01
HaM+l
LM-L-H
IA-lH
DO 60 ll=l.LH
CALL DOTJ IL,l,CHIIC4),LMT,AAIIA).FFI111.1,11
IA=IA-1

2)

..................... -..
FIRE2

*
••••••••••••••••••••••••

*

(PAGE

3)

RETURN
END

PROGRAM LISTINGS

••••••••••••••••••••••••
FIRE2
*••• * ••••••••••••••••••••
*
(PAGE
0150
0151

31

••••••••••••••••••••••••

•

•

FI XV

PROGRAM LI STINGS

'

•

FIXV

LAST CARO IN OECK IS NO. 0104
0001
0002
0003
COUNT
100
0004
LBL
FIXV
ENTRY
FIXV (X,LX.IXFIXDI
0005
0006
ENTRY
FIXVR (X,LX,IXFIXOI
0001
•
0008
----ABSTRACT---0009
"• TITLE - FIXV WITH SECONDARY ENTRY FIXVR
0010
FIX A FLOATING VECTOR WITH OR WITHOUT ROUNDING
0011
0012
0013
FIXV FIXES A FLOATING VECTOR TO A FORTRAN-II FIXED POINT
•
INTEGER VECTOR WITH TRUNCATION OF THE fRACTIONAL PART.
0014
•
0015
FIXVR ROUNDS THE fRACTIONAL PART.
0016
0017
.. LANGAUGE
- FAP SUBROUTINES (FORTRAN-II COMPATIBLE)
0018
• EQUI PMENT - 709 OR 7090 IMAIN fRAME ONLY)
0019
- ~S REGISTERS
• STORAGE
7090 709
0020
" SPEED
FIXV
31 + 127 OR 281"LX MACHINE CYCLES,
0021
FIXVR 33 + 133 OR 34)"LX
LX • VECTOR LENGTH
0022
"" AUTHOR
0023
- S.M. SIMPSON, AUGUST 1963
0024
"
----USAGE---0025
"
0026
0021
• TRANSFER VECTOR CONTAINS ROUTINES - INONE)
AND FORTRAN SYSTEM ROUTINES - (NONE)
"
0028
0029
".,fORTRAN USAGE
0030
0031
•
CALL FIXV IX,LX,IXFIXO)
0032
"
CALL FIXVR IX,LX,IXFIXDI
0033
0034
"" INPUTS
0035
I=l ••• LX IS THE FLOATING VECTOR
0036
XCII
•
0031
0036
LX
SHOULD EXCEED 0
"
0039
STRAIGHT RETURN WITH NO OUTPUTS IF LX LSTHN 1
0040
.. OUTPUTS
0041
0042
•
IXFIXDIII 1:1 ••• LX IS THE FIXED FORM OF Xl1 ••• LXI
0043
WITH TRUNCATION IF FIXV IS USED
"
0044
"
WITH ROUNOING
IF FIXVR IS USED
..
EQUIVALENCE IX, IXFIXDI IS PERMITTED
0045
0046
0047
• EXAMPLES
0048
"" 1. INPUTS - Xl1 ••• 5) : 1.2.1.5,1.9.2.0.-3.5
0049
..
EQUIVALENCE IX, IX3)
IX4=0
0050
0051
"USAGE
CALL FIXV IX,5,IX1)
0052
"
CALL FIXVRIX,5,IX2)
0053
..
CALL FIXV (X,l. Xl
0054
•
CALL FIXV eX,0,IX4)
0055
•
OUTPUTS - IX111 ••• 5) = 1,1.1,2,-3
0056
..
IX211 ••• 5) = 1.2.2,2,-4
0057
•
IX3Il) = XII) = 1 IX4
0 INO OUTPUT CASE)
0058
0059
.. PROGRAM FOLLOWS BELOW
0060
"
0061
0062
• NO TRANSFER VECTOR
0063
HTR
0
XR4
0064
BCI
1.FIXV
0065
.. PRINCIPAL ENTRY. FIXVIX,LX,IXFIXD)
0066
FIXV CLA
NORND
0067
SETUP STA
TRA
0068
SXD
FIXV-2,4
0069
K1
CLA
1,4
ADD
K1
AIX)+l
0070
0071
STA
GET
0072
CLA
3,4
0073
ADD
K1
0074
STA
STORE
FIXV
FAP

ISUBROUTINE)

9/29/64

•

•
•

•
•

•

•

..

•

..

•
•

•

•

•

••••••••••••••••••••••••

••••••••••••••••••••••••

•
•.FIXV

.........................

=

••••••••••••••••••••••••
it

..

FI XV

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE

21

ClA.
2,4
TMI
lEAVE
POX
0,4
TXl
lEAVE,4,0
• FIXING lOOP
•• ,4
•• =A(X)+l
ClA
GET
UFA
OCTKI
lRS
0
ANA
OCTK2
llS
0
TRA
TRA
•• =AlS OR ROUND
AlS
AlS
18
STORE STO
.*,4
".=A( IXFXD)+l
GET,4,1
TIX
.. EXIT
FIXV-2,4
lEAVE lXD
4,4
TRA
• ROUNDING INSERT I ON
ROUND ROl
8
RND
TRA
AlS
• SECOND ENTRY. FIXVRIX,lX,IXFIXD)
RND
FIXVR ClA
TRA
SETUP
.. CONSTANTS
NORND TRA
AlS
RND
TRA
ROUND
OCTK1 OCT
233000000000
OCTK2 OCT
000000377777
END

...

..••••••••••••••••••••••••
..
FIXV
• •••••••••••••••• * ••••••
(PAGE
0075
0076
0017
0018
0019
OOBO
OOBI
00B2
00B3
0084
00B5
00B6
0081
0088
0089
0090
0091
0092
0093
0094
0095
0096
0091
0098
0099
0100
0101
0102
0103
0104

21

• •••••••••••••••••••••••
FIXVR
•
*
••••••••••••••••••••••••
REFER TO
FIXV

••••••••••••••••••••••••
*
FlDATA
•
••••••••••••••••••••••••
REFER TO
FXDATA

PROGRAM lISTINGS

••••••••••••••••••••••••
*
FIXVR
*
••••••••••••••••••••••••
REFER TO
FIXV

••••••••••••••••••••••••
*
FlDATA
•
••••••••••••••••••••••••
REFER TO
FXDATA

..••••••••••••••••••••••••
.
FLOATH

PROGRAM LISTINGS

••••••••••••••••••••••••

••••••••••••••••••••••••

..
FLOATM (FUNCTION)
..
FAP
"FLOATM
COUNT
BO
LBL
FLOATM
ENTRY
FLOATH (INTEGR)

.••••••••••••••••••••••••
.
FLOATH

LAST CARO IN DECK IS NO. 0090
0001
0002
0003
0004
0005
0006
----ABSTRACT---0007
0008
.. TITLE - FLOATM
0009
..
FLOAT ANY MACHINE LANGUAGE INTEGER
0010
0011
FLOATM ASSUMES ITS ARGUMENT IS A 35 BIT PLUS SIGN
0012
INTEGER (BINARY POINT TO RIGHT OF BIT 351 AND CONVERTS
0013
IT TO EQUIVALENT FLOATING POINT FORM. THERE ARE NO
0014
RESTRICTIONS ON THE ARGUMENT.
0015
0016
.. LANGUAGE - FAP SUBROUTINE (FORTRAN II FUNCT I ON)
0017
.. EQUIPMENT - 709 OR 7090 (MAIN FRAME ONLY)
001B
.. STORAGE
- 25 REGISTERS
0019
.. SPEED
- ABOUT 17 MACHINE CYCLES IF INTEGER LSTHN 2".27
0020
..
ABOUT 46 MACHINE CYCLES IF INTEGER GRTHN& 2 ... 27
0021
.. AUTHOR
- S.M. SIMPSON JR, NOV/1962
0022
0023
----USAGE---0024
0025
.. TRANSFER VECTOR CONTAINS ROUTINES NONE
0026
..
AND FORTRAN SYSTEM ROUTINES NONE
0027
0028
.. FORTRAN USAGE
0029
..
FLTG = FLOATMF(INTEGR)
0030
0031
.. INPUTS
0032
0033
INTEGR
IS ANY 35 BIT PLUS SIGN INTEGER
0034
0035
0036
• OUTPUTS
0031
FLTG
IS THE EQUIVALENT FLOATING POINT FORM OF INTEGR
003B
0039
0040
• EXAMPLES
0041
INPUTS
1.
- INTEGR
OCT 000000000004
0042
OUTPUTS - FLTG
4•
0043
0044
•
.. 2. INPUTS - INTEGR
OCT 400000000004
0045
OUTPUTS - FLTG
-4 •
0046
0047
.. 3. INPUTS - INTEGR
OCT 377777777777
0048
OUTPUTS - FLTG
34359738367.0
(GOOD TO 8 PLACES)
0049
0050
.. 4. INPUTS - INTEGR
OC T 777777777777
0051
OUTPUTS - FLTG
-3435973B367.0
0052
0053
.. 5. INPUTS - INTEGR
0'054
OCT 000000000000
OUTPUTS - FL TG
0.0
0055
0056
•.. 6. INPUTS
OCT 400000000000
- INTEGR
0057
OUTPUTS - FLTG
-0.0
0058
•
0059
•
OCT 001000000000
0060
• 7. INPUTS - INTEGR
OUTPUTS - FLTG
134217728.0
0061
0062
HTR
01)63
o
I,FLOATM
BCI
0064
HOATM SXD
FlOATM-2,4
0065
.. CHECK FOR SPEC tAL CASE OF MAGNITUDES EXCEEDING 2 .... 27-1
0066
LAS
KOOI
0067
TRA
BIG
0068
TRA
0069
BIG
ORA
0070
K233
FAD
K233
0071
LEAVE TRA
1,4
0072
0073
• HANDLE BIG NUM~ERS
BIG
LRS
0074
27

..
.

..
..
.

..
...
.

.
..
..
..
.

.....

...
...

...
.

...

9129/64

••••••••••••••••••••••••

•

•

FLOATM

••••••••••••••••••••••••
(PAGE

2)

STQ
ORA
FAD
STO
CLA
ARS
ORA
FAD
FAD
TRA
KOOI OCT
K233 OCT
K266 OCT
TEMP PZE
TEMP2 PZE
END

TEMP
K266
K233
TEMP2
TEMP
8
K233
K233
TEMP2
LEAVE
001000000000
233000000000
266000000000

...

••

PROGRAM LISTINGS

••••••••••••••••••••••••

•

•
••••••••••••••••••••••••
(PAGE 2)
FLOATM

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090

••••••••••••••••••••••••

-

••••••••••••••••••••••••FlOATV

PROGRAM LISTINGS

FlOATV (SUBROUTINE)
FAP
-FlOATV
COUNT
100
lBL
FLOATV
ENTRY
FLOAT V (IX.LIX.XFLOTD)

••••••••••••••••••••••••
-

FlOATV

LAST CARD IN DECK IS NO. 0080
0001
0002
0003
0004
0005
0006
----ABSTRACT---0007
•
0008
"- TITLE - FLOATV
0009
"
FLOAT A VECTOR
0010
0011
FLOATV CONVERTS A FORTRAN-II FIXED VECTOR TO FLOATING PT.
0012
•
0013
•
- FAP SUBROUTINE, FORTRAN-II COMPATIBLE
0014
- LANGUAGE
" EQUIPMENT - 709 OR 1090 (MAIN FRAME ONLY)
0015
- 22 REGISTERS
0016
• STORAGE
- 21 + 11.4-LX MACHINE CYCLES WHERE LX s VECTOR LENGTH
0017
• SPEED
- S.M. SIMPSON, AUGUST 1963
- AUTHOR
0018
0019
"
----USAGE---0020
"
0021
" TRANSFER VECTOR CONTAINS ROUTINES - INONE)
0022
AND FORTRAN SYSTEM ROUTINES - (NONE)
0023
0024
• FORTRAN USAGE
0025
•
CALL FLOATV(IX,lIX,XFLOTD)
0026
0027
•
0028
• INPUTS
0029
"
I XI I )
1=1 ••• LIX IS THE FIXED POINT VECTOR
0030
0031
L1X
MUST
EXCEED
ZERO
0032
•
0033
"" OUTPUTS
STRAIGHT RETURN WITH NO OUTPUT IF LIX lSTHN 1
0034
0035
•
•
XFLOTDII) I=I ••• LIX IS THE FLOATED FORM OF IXll ••• LIX)
0036
0031
•
EQUIVALENCE (IX, XFlOTD) IS PERMITTED
0038
•
0039
•
0040
• EXAMPLES
0041
•
• 1. INPUTS - IXll ••• 3) = 1.-3.1 EQUIVAlENCE IIX,X2) X3-0.0
0042
0043
•
•
USAGE
CALL FLOATVIIX.3,XI)
0044
CALL FLOATV(IX,I,IX)
0045
•
"
CALL FLOATVIIX,-I,X3)
0046
OUTPUTS - XlI1 ••• 3) = 1.0.-3.0,1.0 X2(1). IXll) = 1.0
0047
•
X3 = 0.0 INO OUTPUT CASE)
004B
0049
•
" PROGRAM FOLLOWS BELOW
0050
0051
•
0052
•
VECTOR
" NO TRANSFER
0053
HTR
o
XR4
0054
BCI
1,FLOATV
0055
0056
• ONLY ENTRY. FLOATVIIX,LIX,XFLOTD)
FLOATV SXD
FLOATV-2,4
0057
1,4
Kl
CLA
005B
ADD
Kl
AIIX)+1
0059
STA
GET
0060
3,4
CLA
0061
ADD
Kl
AIXFLOTO)+1
0062
STA
STORE
0063
2,4
L1X
CLA"
0064
TMI
LEAVE
0065
0,4
POX
0066
TXL
LEAVE,4,0
0061
0068
• FLOATING LOOP
•• ,4
GET
CLA
.-=AIIX)+1
0069
LRS
IB
0010
ORA
OCTK
0011
FAD
OCTK
0012
•• ,4
STORE STO
•• =AIXFLTD)+1
0073
GET,4,l
TlX
0014

-

-

--

-

••••••••••••••••••••••••
9/29/64

••••••••••••••••••••••••

*
FLOATV
*
••••••••••••••••••••••••
(PAGE

21

* EXIT

LEAVE LXD
TRA
* CONSTANTS
OCTK OCT
END

FLOATV-2,4
4,4
233000000000

PROGRAM II STINGS

••••••••••••••••••••••••
*
FLOATV
•
••••••••••••••••••••••••
(PAGE

0075
0076
0077
0078
0079
0080

21

••••••••••••••••••••••••
.•••••••••••••••••••
.
FMTOUT
** •••

PROGRAM LI STINGS

..
FMTOUT ISUBROUTINE)
..
LABEL
CFMTOUT
SUBROUTINE FMTOUTIITAPE,FMT)

•••••••••-** •••••••
.•••• **FMTOUT
..

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0070
0001
0002
0003
0004
C
----ABSTRACT---0005
C
C
0006
C TITLE - FMTOUT
0007
C
WRITE OUTPUT TAPE WITH NORMAL OR LITERAL FORMAT VECTOR
OOOB
0009
C
FMTOUT HAS TWO ARGUMENTS, ITAPE AND FMT, WHERE FMT IS
0010
C
A NORMAL OR LITERAL FORMAT VECTOR. THE FUNCTION OF
0011
C
0012
FMTOUT IS THAT OF THE FORTRAN STATEMENT
C
0013
C
WRITE OUTPUT TAPE ITAPE,FMT
0014
C
0015
C
0016
C
- FORTRAN-II SUBROUTINE
0017
C LANGUAGE
001B
C EQUIPMENT - 709 OR 7090 IMAIN FRAME PLUS ONE TAPE UNIT)
0019
C STORAGE
- 51 REGISTERS
0020
SPEED
C
- S.M. SIMPSON JR.,
SEPTEMBER 1963
0021
C AUTHOR
C
0022
----USAGE---0023
C
0024
C
0025
C TRANSFER VECTOR CONTAINS ROUTINES - FNDFMT,RPLFMT
AND FORTRAN SYSTEM ROUTINES - ISTH),IFILI
0026
C
0027
C
0028
C FORTRAN USAGE
0029
C
CALL FMTOUTIITAPE,FMT)
C
0030
0031
C
DEFINE A NORMLIT FORMAT VECTOR AS EITHER
0032
C INPUTS
AI A NORMAL FORMAT VECTOR,
0033
C
OR BI LITERAL HOLLERITH IN A CALLING SEQUENCE WHOSE
0034
C
CHARACTERS IREADING CONTINUOUSLY FROM LEFT TO RIGHT)
0035
C
ARE THE DESIRED FORMAT STRIPPED OF THE ENCLOSING
0036
C
PARENTHESES. THE FIRST AND SECOND CHARACTERS MUST
0037
C
NOT RE QUOTE ( UNQUOTE OR QUOTE I UNQUOTE
0038
C
RESPECTIVELY. ITWO BLANKS FOLLOWED BY I WOULD BE OK.)
0039
C
0040
C
ITAPE
IS LOGICAL NUMBER OF DESIRED OUTPUT TAPE.
0041
C
0042
C
1;1,2, ••• DR 1;1,0,-1, ••• IS THE NORMLIT FORMAT VECTOR
FMTlI I
0043
C
TO BE WRITTEN OUI ON TAPE ITAPE.
0044
C
0045
C
THE FORMAT IS WRITTEN OUT AS ILLUSTRATED BELOW.
0046
C OUTPUTS
0047
C
0048
C EXAMPLES
0049
C
0050
C 1. INPUTS - FMTIl ••• 4J ; 21HI16H ORDINARY FORMAT)
USAGE
CALL FMTOUTI2.fMTI
0051
C
CALL FMTOUTI2,18H15H LITERAL fORMAT
0052
C
0053
THE
FOLLOWING
TWO
LINES
C
OUTPUT'S ORDINARY FORMAT
0054
C
1I TERAL FORMAT
0055
C
0056
WILL BE PRINTED OFF-LINE fROM LOGICAL TAPE 2.
C
0057
C
0058
C PROGRAM fOLLOWS BELOW
0059
C
0060
01 MENS ION COM I 2 I
0061
COMMON COM
CALL fNDFMTIFMT,IXCFMTI
0062
0063
CALL RPLfMTICOM.COMIIXCFMTII
0064
GO TO 20
CALL RPLFMTICOMIIXCFMTI.COMI
0065
10
0066
GO TO 9999
0067
20
WRITE OUTPUT TAPE ITAPE,COM
006B
GO TO 10
0069
9999 RETURN
0070
END
9/29/64

_ •••••• **
.•••••••••••••••
FNDFMT
•• -.••..••••••• -•••.. *_...

PROGRAM LISTINGS

..
FNDFMT ISUBROUTINE)
..
FAP
-FNDFMT
COUNT
150
FNDFMT
LBL
FNDFMT IFMT,IXCFMT)
ENTRY

...
..
..

...
.....

.....
..
..
...
..
...
..
..
..
..

....

..
..

...
......
...

..
....
..
....
....
.
..
....
....
..
...
..
..

••••• ***- •••••••••••••••

-

FNOFMT

.

• •••••• * •••••••••••••• _-

LAST CARD IN DECK IS NO. 0202
0001
0002
0003
0004
0005
0006
0007
----ABSTRACT---0008
0009
TITLE - FNDFMT
ACCESS TO LITERAL OR ORDINARY FORMAT
0010
0011
FNOFMT SUPPLIES THE INDEX WITH RESPECT TO THE COMMON
0012
BLOCK OF A FORMAT STATEMENT. THE FORMAT IS SUPPLIED
0013
AS AN ARGUMENT WHICH IS EITHER OF THE ORDINARY FORM
0014
IA HOLLERITH VECTOR WHOSE FIRST CHARACTER IS A LEFT
0015
PARENTHESIS) OR IS A LITERAL HOLLERITH VECrOR ARGUMENT
0016
0017
REPRESENTING THE FORMAT MINUS ITS ENCLOSING PARENTHESES
AND TERMINATED BY AN ALL-ONES FENCE. IN THE LATTER
0018
CASE FNDFMT REVERSES THE LITERAL HOLLERITH AND ADDS
0019
THE NECESSARY PARENTHESES. SUBSEQUENT CALLS OF FNDFMT
0020
WITH THE REVERSED HOLLERITH WILL NOT LEAD TO RE-REVERSAl •
0021
0022
AN ORDINARY TYPE FORMAT MUST NOT CONTAIN A ) AS THE
0023
FIRST CHARACTER AFTER ITS (, I ILLEGAL ANYWAY) •
0024
0025
A LITERAL TYPE FORMAT MUST NOT CONTAIN A ) AS ITS
0026
SECOND CHARACTER, OR A I AS ITS FIRST CHARACTER •
0027
0028
LANGUAGE
- FAP SUBROUTINE (FORTRAN-II COMPATIBLE)
0029
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
0030
STORAGE
0031
- 88 REGISTERS
SPEED
0032
0033
AUTHOE
- S.M. SIMPSON, SEPTEMBER 1963
0034
----USAGE---0035
0036
0037
TRANSFER VECTOR CONTAINS ROUTINES - REVER
AND FORTRAN SYSTEM ROUTINES - INONE)
0038
0039
FORTRAN USAGE
0040
CALL FNDFMTIFMT,IXCfMTI
0041
0042
INPUTS
0043
0044
0045
FMTII)
IS A REVERSED OR UNREVERSED LITERAL HOLLERITH VECTOR, OR
AN ORDINARY FORMAT VECTOR, AS DESCRI8EO IN ABSTRACT •
0046
0047
0048
OUTPUTS
0049
0050
IS THE INDEX WITH RESPECT TO COMMON OF THE FORMAT
I XCFMT
77461 10CTALI - XLOCFIFORMAT) + 1
0051
0052
WHERE XLOCFIFORMATI
XLOCF(FMTI IF FMTII) ORDINARY
0053
= XLOCFIFENCEI OTHERWISE
0054
(THE FENCE IS WIPED OUT)
0055
0056
IS UNDISTURBED IF, ON INPUT, IT WAS EITHER A NORMAL
FMTI I I
FORMAT VECTOR OR A PREVIOUSLY REVERSED LITERAL FORMAT
0057
VECTOR. IF, ON INPUT, FMTII) WAS A LITERAL FORMAT
0058
THE FOLLOWING REVERSAL TRANSFORMATION OCCURS.
0059
IINPUT)
10UTPUT)
0060
FMTl11 =
6HABCDEF
6HZIOOOM
0061
FMTIO) =
6HGHIJKL
6HTUVWXY
0062
0063
ETC
0064
FMTI-N+l1 = 6HUVWXYZ
6HFGHIJK
0065
FMTI-N) =
OCT7777777777 6HIABCDE
WHERE M = N+l
0066
0067
0068
EXAMPLES
0069
0070
1. WITH ORDINARY FORMATS
0071
INPUTS - FMT111 ••• 2) = 12HI I5,3X, F9.5)
0072
USAGE
CALL FNDFMTIFMT1,IXCF1)
9129/64

••••••••••••••••••••••••
FNDFMT
••••••••••••••••••••••••*

PROGRAM LI STINGS

•

IPAGE

21

*
*

••
*
•

*
*

•
•
•
•
•
•
•

••

OUTPUTS - IXCFl

I PAGE

a

7746110CTALI-XLOCFIFMTll+l, AND
FMTlll ••• 21 IS UNCHANGED.

2. WITH LITERAL FORMATS AND REPEATED USAGE
INPUTS
FMT2131 = 6HI5,12X
FMT2121 = 6H,5F9.5
FMT211) • OCT777777777777
FMT312). 3H515
FMT3(11 = OCT777777777777
USAGE
00 10 1=1.2
CALL FNDFMTIFMT213),IXCF2111)
10 CALL FNDFMTIFMT312),IXCF3III)
OUTPUTS - FMT2111 = 6HI15,12
FMT2121 = 6HX,5F9.
FMT213)
6H510002
lXCF2111 = IXCF2121
77461-XLOCFIFMT211)I+l
FMT3111
4HI515
FMT3(21 = 6H 10001
IXCF3111
IXCF3121. 77461-XLOCFIFMT31111+1

=
=

=

PROGRAM FOLLOWS BELOW

•*
*

TRANSFER VECTOR CONTAINS REVER
HTR
o
XRl
HTR
XR4
o
1,FNDFMT
8CI
FNOFMTIFMT,IXCFMTI
• ONLY ENTRY.
FNDFMT SXD
FNDFMT-2,4
FNOFMT-3,1
SXD
• GET FIRST TWO CHARACTERS OF FMT(1)
CLA.
1,4
FMT 111
STA
LFMT
IPUT ASIDE POSSIBLE LENGTH I
XCA
PXA
0,0
LGL
6
81TS S,1 ••• 5
STO
Cl
PXA
0.0
LGL
6
BITS 6 ••• 11
STO
C2
* CHECK FOR C2
I.
IF SO, MUST 8E A REVERSED FORMAT.
CLA
C2
CAS
RPAREN
TRA
*+2
NO
TRA
CASE2
YES
IF SO, MUST BE ORDINARY FORMAT.
* IF NOT, CHECK FOR Cl
I.
CLA
Cl
CAS
LPAREN
TRA
.+2
NO
TRA
CASE1
YES
• IF NOT WE HAVE CASE OF UNREVERSED LITERAL HOLLERITH

=

=

•

••••••••••••••••••••••••

FNDFMT
•••••••••••••••••••••••••
•

• FIRST FIND ITS LENGTH, LFMT 100ESNT INCLUDE THE FENCE)
AXT
0,1
XRl IS COUNTER
CLA
1,4
TSX AIFMT),O
0,4
PAC
-AIFMTI TO XR4
0,4
CAll CAL
LAS
FENCE
NOP
IIMPOSSIBLE)
TRA
COVER
TXI
.+1,1,1
TXI
CALl,4,-1
• MAKE SETTINGS DEPENDING ON LFMT.
COVER LXO
FNDFMT-2,4
SXD
TXL2,1
SXD
CARRY,1
ITEMPI
SXA
LFMT,l
PXA
0,1
ADO
1,4
AIFMTI+LFMT
STA
LDQ2
AIFMTI+LFMT+l
ADD
Kl
STA
SLW2
SUB
Kl
AIFMTI+LFMT-l
SUB
Kl
STA
TSXl
STA
TSX3
• REVERSE FMTlll ••• FMTll-LFMT+ll
TSX
SREVER,4
TSX1 TSX
•• ,0
**=AIFMTI+LFMT-l

0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
00B5
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147

2)

.
..••••••••••••••••••••••••
FNDFMT
••••••••••••••••••••••••
IPAGE

PROGRAM LISTINGS

••••••••••••••••••••••••

..

TSX
CARRY,O
TSX
•• ,0
.":AIFMT)+LfMT-l
LXD
FNDFMT-2,4
.. INITIALIZE CARRY REGISTER TO LPAREN
CLA
LPAREN
STO
CARRY
• fORM fMT(-LFMT+l.-LfMT+2 ••••• 01
TSX3

.

SLII2

AXT
LDO
CAL
LGL
SLW
PXA

1.1
... ,1
CARRY
30

lGL

6

.... ,1

.... :AffMTl+LFMT
.... "'AlfMT)+LFMT+l

0,0

CARRY
SLW
"+1,1,1
TXI
TXL2 TXL
LD02,1,."
"·=LfMT
.. THEN fORM AND SET fMTl1I
CAL
CARRY
30
lGl
ACL
RPADJ
ACL
LFMT
1,4
SlW"
.. fINALLY FORM ADDRESS OF FORMAT AS IN CASE 2

....

CASE 2.
FORMAT HAS BEEN PREVIOUSLY REVERSED.
LENGTH IS GIVEN BY C4.C5.C6 lIN LFMT)
CASE2 eLA
LFMT
TSX A(FMTl+L,O
ADD
1,4
TRA
LEAVE
• CASE 1.
FORMAT IS ALREADY CORRECT IN FMT
CASEI CLA
1,4
TSX AIFMTl,O
.. EXIT ROUTINE.
SETS IXCFMT GIVEN MACHINE LOCATION OF fMT IN
..
ADDRESS OF AC
.. IxeFMT = 77461+1~ADDRESS
LEAVE LXD
fNDFMT-3.1
STA
LFMT
ISET ADDRESS ASIDE)
CLA
KCOMON
SUB
LFMT
ALS
18
STO"
2.4
TRA
3,4
" CONSTANTS, TEMPORARIES
Kl
PZE
1
RPADJ BCI
1,0)0000
LPAREN BCI
1.000001
RPAREN BCI
1,000001
KCOMON OCT
000000017462
fENCE OCT
111711111117
"*=FMT LENGTH (ALSO TEMP fOR ADDRESS)
LFMT PZE
....
Cl
PZE
*"
C2
PZE
....
CARRY PZE
....
(ALSO USEO AS TEMP FOR LFMT IN DECRI
END

..

•

I PAGE

3)

LD02

FNDFMT

••••••••••••••••••••••••
0148
0149
0150
0151
0152
0153
0154
0155
0156
0151
0158
0159
0160
0161
0162
0163
0164
0165
0166
0161
0168
0169
0110
0111
0112
0173
0114
0115
0116
0171
0118
0119
0180
0181
0182
0183
0184
0185
0186
0181
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202

3)

•• *•••••••••••••• ••••••
fRAME (709'
••••••••••••••••••••••••'"
~

•

..
FRAME (709) (SUBROUTINE)
..
FAP
-FRAME (709)
COUNT
30
LBL
FRAME
ENTRY
FRAME

PROGRAM LISTINGS

.••••••••••••••••••••••••
fRAME (709)
'"

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0033
0001
0002
0003
0004
0005
0006
'"
----A8STRACT---0007
0008
it TITLE FRAME
0009
•
ADVANCE FILM FRAME ON SCOPE
0010
it
FRAME ADVANCES THE FILM IN THE SCOPE CAMERA ONE FRAME.
0011
0012
''"" LANGUAGE - FAP, SUBROUTINE (FORTRAN COMPATIBLE'
0013
• EQUIPMENT - 709 (MAIN FRAME AND SCOPEI
0014
0015
'" STORAGE
- 4 REGISTERS
0016
'" SPEED
- 500 MS FOR FRAME TO ADVANCE.
.. AUTHOR
- R.A. WIGGINS DEC, 1962
0017
001B
'"
----USAGE---0019
'"
it
0020
0021
'" TRANSfER VECTOR CONTAINS ROUTINES - NONE
it
AND FORTRAN SYSTEM ROUTINES - NONE
0022
it
0023
0024
it FORTRAN USAGE
0025
'"
CALL fRAME
it
0026
THE FILM IS AOVANCED ONE FRAME
0027
'"
002B
1,FRAME
8CI
0029
FRAME WRS
24
0030
CFF
0031
1,4
TRA
0032
0033
END

-..

..

9/29/64

...........................
.
FRAME (7090)

•

PROGRAM LISTINGS

..
FRAME 17090) ISUBROUTINE)
..
FAP
.FRAME (7090)
COUNT
40
LBL
FRAME
ENTRY
FRAME

••••••••••••••••••••••••
•

FRAME 17090)

LAST CARO IN DECK IS NO. 0046
0001
0002
ob03
0004
0005
0006
----ABSTRACT---0007
OOOB
.. TITLE - FRAME (70901
0009
0010
..
ADVANCE FILM FRAME ON SCOPE
0011
FRAME AOVANCES THE FILM IN THE SCOPE CAMERA ONE FRAME •
0012
0013
0014
• LANGUAGE - FAP, SUBROUTINE (FORTRAN II COMPATIBLE)
.. EQUIPMENT - 7090 (MAIN FRAME, OATA CHANNEL 0, AND SCOPE)
0015
.. STORAGE
- 9 REGISTERS
0016
0017
- 500 MS FOR FRAME TO ADVANCE.
• SPEED
001B
.. AUTHOR
- MIT COMPUTATION CENTER STAFF
0019
----USAGE---0020
0021
0022
.. TRANSFER VECTOR CONTAINS ROUTINES - NONE
0023
•
AND FORTRAN SYSTEM ROUTINES - NONE
0024
.. FORTRAN USAGE
0025
..
CALL FRAME
0026
0027
0028
..
THE FILM IS ADVANCED ONE FRAME.
0029
0030
0031
.. PROGRAM FOLLOWS BELOW
0032
.. FOLLOWING CARD DESIGNATES THE DATA CHANNEL THAT CRT IS ATTACHED TO.
0033
0034
• TO CHANGE, ALTER THE LETTER DESIGNATION ONLY AND REASSEMBLE.
X
UPENO 01
0035
SCPAD EQU
X-lOS
0036
BCI
1,FRAME
0037
003B
FRAME PSE
SCPAD
0039
WRS
SCPAD
RCHX
lOCO
0040
WRS
SCPAD
0041
RCHX
lOCO
0042
PSE
SCPAD
OCTAL FOR CFFX
0043
TRA
1,4
0044
0045
lOCO
lOCO
0,0,0
0046
END

..

•

•.

..
....

•

.
.
..

•

•

••••••••••••••••••••••••

••••••••••••••••••••••••

9/4/64

••••••••••••••••••••••••
•
FRQCTl
•
••••••••••••••••••••••••

PROGRAM LISTINGS

••••••••••••••••••••••••
FRQCTl
•
••••••••••••••••••••••••

•

••••••••••••••••••••••••
FRQCTl
*
*
••••••••••••••••••••••••
IPAGE

2)

PROGRAM 1I STINGS

••••••••••••••••••••••••
*
FRQCTl
*
••••••••••••••••••••••••

IANS=O
NC T=I XHI -IXlO+ 1
NSHIFT=IXlO-l
IF (NX) 9991,9991,10
10 IF INCTI 9992,9992,15
15 00 20 I=l,NCT
20 ICTIII=O
C SCAN IXIII TO MAKE COUNTS IPUT EACH IX IN RANGE 1 TO NCT FIRST).
DO 35 1=1,NX
IXI=IXIII-NSHIFT
IF IIXII 9992,9992,30
30 IF IIXI-NCTI 35,35,9992
35 ICTIIXII=ICTIIXII+1
GO TO 9999
9999 RETURN
9991 IANS=1
GO TO 9999
9992 I ANS=2
GO TO 9999
END

IPAGE

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094

2)

••••••••••••••••••••••••

•

FRQCT2

•

PROGRAM II STINGS

••••••••••••••••••••••••

9/29/64
•
FRQCT2 I SUBROUTINE I
•
FAP
.FRQCT2
COUNT
200
FRQCT2
LBL
ENTRY
FRQCT2 IX,LX,B,LB,ICOUNT,IANS)

•••••• ~ •• 4 • • • • • • • • • •

•

FRQCT2

* •••

•

• •••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0211
0001
0002
0003
0004
0005
0006
"•
0007
----ABSTRACT---0008
•
0009
• TITLE - FRQCT2
"
FREQUENCY COUNT OF NUMBER OF VALUES OF A SERIES IN GIVEN RANGES.
0010
0011
"
FRQCT2 MAKES A FREQUENCY COUNT OF A FLOATING POINT,
0012
"
FORTRAN INTEGER, OR MACHINE LANGUAGE INTERGER SERIES FOR
0013
"
0014
THE NUMBER OF VALUES LYING IN SPECIFIED RANGES. IT IS
USEFUL IN COMPUTING EMPIRICAL PROBABILITY DENSITIES.
0015
•"
0016
•
THERE ARE LB RANGE LIMITS, BIl" 1=1, LB. AND HENCE LB+1
0017
"
RANGES. A NUMBER, XIJ), IS SAID TO BE IN THE I-TH RANGE
001B
"
IF Bll-l1 LSTHN OR EQUAL XIJI LSTHN BIll. A NUMBER IS IN
0019
"
THE FIRST RANGE IF IT IS LSTHN BIll, AND IN THE LB+1
0020
"
RANGE IF GRTHN OR EQUAL BILB). THE INPUT SERIES XII) MUST
0021
"
BE THE SAME MODE IFLOATlNG, INTEGER, ETC.) AS THE RANGE
0022
"
LIMITS BECAUSE THE METHOD USES CAS INSTRUCTIONS.
0023
"
0024
""LANGUAGE - FAP SUBROUTINE IFORTRAN II COMPATIBLE)
0025
" EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLY)
0026
"STORAGE
- 117 REGISTERS
0027
0028
" SPEED
"AUTHOR
- J. N. GALBRAITH
0029
0030
"
----USAGE---0031
"
0032
"" TRANSFER VECTOR CONTAINS ROUTINES - NONE
0033
"
AND FORTRAN SYSTEM ROUTINES - NONE
0034
0035
"" FORTRAN USAGE
0036
"
CALL FRQCT2IX,LX,B,LB,ICOUNT.IANS)
0037
003B
"" INPUTS
0039
0040
" X(II
l=l ••• LX IS THE GIVEN SERIES.
0041
"
MAY BE FLOATING, FORTRAN INTEGER, OR MACHINE INTEGER.
0042
"
0043
"
LX
IS THE LENGTH OF THE X SERIES.
0044
"
MUST BE GRTHN O.
0045
"
0046
"
0047
Bill
l=l
•••
LB
IS
VECTOR
OF
RANGE
LIMITS.
BII)
LSTHN
BII+11.
"
RANGES INTO WHICH THE SERIES IS DIVIDED ARE (-INFINITY,
004B
"
LSTHN B(1)1,IGRTHN DR =Bll',LSTHN B(2)) ETC.
0049
"
MAY BE FLOATING, FORTRAN INTEGER, OR MACHINE INTEGER,
0050
"
BUT MUST BE THE SAME AS XII)
0051
"
0052
"
LB
NUMBER OF RANGE LIMITS.
0053
"•
MUST BE GRTHN O.
0054
NOTE - NUMBER OF RANGES =1+ NUMBER OF RANGE LIMITS.
0055
"
0056
"" OUTPUTS
0057
0058
""
0059
ICOUNTII) I=I ••• LB+l=NUMBER OF X VALUES IN EACH RANGE OF B.
"
ICOUNT(1)=NO. X LSTHN B(1). ICOUNT(2)=NO. X LSTHN B(2),
0060
0061
"
GRTHN OR =B(1).
0062
"
ICOUNTILB)=NO. X LSTHN BILB),GRTHN OR=BILB-1).
0063
"
ICOUNTILB+I)=NO. X GRTHN OR =BILB).
0064
"
IANS
IANS=O, NORMAL
0065
"
IANS=I, ILLEGAL LX
0066
"
IANS=2, ILLEGAL LB
0067
"
IANS=3, WEIRD ERROR
0068
"
0069
"" EXAMPLES
0070
0071
"" 1. INPUTS - Xl1 ••• 15) = -21.,-20 •• -15.,-14 •• -12 •• -11 •• -B •• -7.,0.,1 ••
0072
"
2.1,3.,4.,5.,6.
LX=15 Bll ••• 5)= -20.,-16.,-7.5,0.,.9
0073
0074
"
LB=5

••••••••••••••••••••••••

FRQCT2
•••••••••••••••••••••••••
•
IPAGE

••••••••••••••••••••••••

PROGRAM LISTINGS

it

21

IPAGE

OUTPUTS - ICOUNTll ••• 61 = 1,1,5,1,1,6.

it

•

IANS=O

• 2. INPUTS - SAME AS EXAMPLE 1. EXCEPT 811 ••• 51=-21.,-11.5,0.,'.5,6.
..
OUTPUTS - ICOUNTf1 ••• 6) =0,5,3,5.1,1
IANS=O

... 3.
..

....

....
...
"
....

INPUTS - SAME AS EXAMPLE 1. EXCEPT 811 ••• 51'"-21.,-11.5,0,4.,5,6.1
OUTPUTS - ICOUNTll ••• 61 =0,5.3,5.2,0
IANS=O

4. INPUTS

- SAME AS EXAMPLE 1. EXCEPT 8(1)=0. 8121=.5
IANS=O
OUTPUTS - ICOUNTl1 ••• 3) =8,1,6

lB=2

5. INPUTS

- SAME AS EXAMPLE 4. EXCEPT LB=O
OUTPUTS - ERROR IANS =2

6. INPUTS

- SAME AS EXAMPLE 4. EXCEPT
OUTPUTS - ERROR IANS " 1

•

FRQCT2

••••••••••••••••••••••••

LX=O

lB=2

SAVE IRS AND CHECK FOR ILLEGAL PARAMETERS
PZE
0
I,FRQCT2
BCI
fRQCT2 SXA
RETURN,l
SXA
RETURN+1,2
SXA
RETURN+2,4
SXO
FRQCT2-2,4
srz ..
6,4
IANS=O
CLA.
2,4
GET LX
TZE
ERR1
TMI
ERR1
STO
END
4,4
ClA"
GET lB
TZE
ERR2
TMI
ERR2
ARS
18
LB IN ADDRESS
STO
LB
ARS
1
LB/2 lIN ADDRESSI
STO
LBHAlF
1,4
CLA
ADDRESS OF X
ADO
K1MLI
AIX+lI
STA
XAOO
TES TLO
STA
3,4
ADDRESS OF B
CLA
ADO
K1MLI
AI B+lI
STA
BTESTl
STA
8ADO
SUB
LB
STA
TESTHI
5,4
CLA
ADDRESS Of ICOUNT
ADO
AIICOUNT+ll
K1MLI
STA
STZCNT
STA
EQUAL
STA
STOCNT
LXA
L8d
TXI
"+1,1,1
SXO
END1.1
1,4
AXT
AXT
1,1
...
,I
STZCNT STZ
ZERO ICQUNTIII,I"1,L8+1
TXI
"+1,1,1
ENOl TXL
STZCNT.1,".
AXT
1,1
LOOP CLA
K1MLI
STO
L8l0
INITIAL L8LO=1
CUI
lR
STO
lBHI
INlTlAL L8HI=L8
LRHALF
CLA
STO
LBCOH
INITIAL L8COH"LB/2
1,2
AXT
.·,1
TESTlO CLA
GET X. 1""=AIX+lI1
BTESTl CAS
.·,4
8111 SEE IF IN LOWEST RANGE
TRA
TESTHI
NEXINO
TRA
TRA
EQUAL
TESTHI CAS
•• =AIBIL811. SEE IF IN HIGHEST RANGE
"it
TRA
HIEST
TRA
HIEST

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144

0145
0146
0147
0148
0149

2)

••••••••••••••••••••••••

FRQCT2
•••••••••••••••••••••••••
•
(PAGE

PROGRAM LISTINGS

31

SEARCH lXA
l8COM,2
•• ,1
XAOO CLA
•• ,2
801100 CAS
TRoll
GRATER
TRoll
NEXINO
0,2
lESS PXA
SU8
l8l0
CAS
K1HlI
.+3
TRoll
TRoll
EQUAL
TRoll
ERROR
ARS
1
ADD
L8LO
lOQ
L8COH
STQ
L8HI
STO
L8COH
TRoll
SEARCH
GRATER PXA
0,2
SU8
L8HI
SSP
CAS
K1HlI
.+3
TRoll
TRoll
NEXIND
TRoll
ERROR
ARS
1
ADD
LBCOH
LDQ
LBCOH
STO
LBCOH
STQ
LBLO
TRoll
SEARCH
NEXINO TXI
.+1,2,1
•• ,2
EQUAL CLA
ADD
K1FX
•• ,2
STOCNT STO
TXI
·+1,1,1
END
TXL
LOOP,l,··
•• ,1
RETURN AXT
•• ,2
AXT
•• ,4
AXT
TRoll
7,4
LB,2
HIEST LXA
TRoll
NEXIND
ERR1 CLA
K1FX
6,4
STD·
7,4
TRoll
ERR2 CLA
K2FX
STO.
6,4
7,4
TRoll
ERROR CLA
K3FX
STD.
6,4
TRoll
7.4
• CONSTANTS AND TEMPORARIES
KlFX PZE
0.0.1
0,0,2
K2FX PZE
0,0,3
K3FX PZE
1,0,0
K1MLI PZE
L8
PZE
0
lBHAlF PZE
0
lBlO
PIE
0
LBCOH PZE
0
LBHI
PZE
0
END

••••••••••••••••••••••••
FRQCT2
•
••••••••••••••••••••••••

•

(PAGE

GET XIIR11
COHPARE WITH 8(L8COHI
X GREATER, NEW L8l0 (~L8COHI
GOT IT, INDEX ICOUNTIIR2+1)
X LESS, NEW L8HI I~L8COHI
L8COH-L8LO=0IF
OIF GREATER THAN ONE
OIF=l, GOT IT, INDEX ICOUNTlIR21
IMPOSSI8LE
OIFI2
NEW L8COH

L8COH-L8HI=-0IF
Dlf
GOT IT, INDEX ICOUNTlIR2+1)
IHPOSSI8LE

u=AIICOUNT+11
.-=0111 ICOUNT+11
··"'LX

0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
020B
0209
0210
0211

31

••••••••••••••••••••••••

•

FSKIP

•

PROGRAM 1I STINGS

••••••••••••••••••••••••

••••••••••••••••••••••••

• FSKIP
•
• •••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0103
0001
0002
*FSKIP
0003
COUNT
15
0004
LBL
FSKIP
0005
ENTRY
FSKIP IITAPE.NFILES)
0006
0007
•
0008
----ABSTRACT---0009
•
0010
• TITLE - FSKI P
0011
•
SKIP FORWARD OR BACKWARD OVER FILES ON TAPE
0012
0013
FSKIP
SKIPS
AN
ARBITRARY
NUMBER
OF
FILES
FORWARD
DR
•
0014
BACKWARD ON A TAPE. THE END POSITION OF THE TAPE IS
0015
AT THAT EDGE OF THE FILE MARK WHICH IS FURTHEST FROM
0016
THE BEGINNING OF THE TAPE •
0011
•.. LANGUAGE - FAP. SUBROUTINE (FORTRAN II COMPATIBLE)
0018
0019
.. EQUIPMENT - 109 OR 1090 (MAIN FRAME, DATA CHANNEL AND TAPE UNIT)
0020
• STORAGE
- 50 REGISTERS
0021
• SPEED
0022
• AUTHOR
- J.F. CLAERBOUT. AUGUST, 1962
0023
•
0024
•
0025
----USAGE---0026
•.. TRANSFER VECTOR CONTAINS ROUTINES - NONE
0021
lIDS), (RDS), (BSR), (TCO),
0028
"
AND FORTRAN SYSTEM ROUTINES I TEF), ITRCl
0029
"" FORTRAN USAGE
0030
0031
"
CALL FSKIP IITAPE,NFILES)
0032
0033
"• INPUTS
0034
0035
ITAPE
0036
IS LOGICAL TAPE NUMBER
"•
0031
IS FORTRAN II INTEGER
0038
NFILES
IS NUMBER OF FILES TO BE SKIPPED.
0039
0040
IF GRTHN 0 SKIPS AHEAD.
•
0041
IF LSTHN 0 BACKS UP NFILES lOR TO LOAD POINT, WHICHEVER
•
COMES FIRST). IF THE TAPE IS PRESENTLY PART WAY THROUGH
0042
•
A FILE, IT COUNTS AS ONE FILE •
0043
0044
A FILE IS DEFINED TO BE ARBITRARY NUMBER OF BCD OR
0045
BINARY RECOROS FOLLOWED BY AN END OF FILE.
•
0046
IF =0 DOES NOT MOVE THE TAPE
IS FORTRAN II INTEGER
0041
•
0048
0049
•
THE TAPE IS MOVED
0050
OUTPUTS
0051
•
0052
0053
• PROGRAM FOLLOWS BELOW
0054
0055
1,FSKIP
BCI
0056
FSKIP SXA
SKIP9,4
0051
CLA.
1,4
0058
STD
SKI P3
0059
SKIP3
CAL
$( IDS) ,4
0060
TSX
0061
LXA
SKIP9,4
0062
SIRDS)
SET UP
CAL"
0063
:01000
ANA
0064
FOR BTl
STA
SKPBTl
0065
$IBSR)
CLA0066
SSM
0061
FILE
INSTRUCTION.
STO
SKPBSF
SET UP BACKSPACE
0068
SITCO)
SET UP
LDO·
0069
SLQ
SKIP4
CHANNel DELAY.
0070
SKIP5
SLO
$ITEF)
0011
LDQ0012
SLQ
SKPTEF
0013
SLQ
A
0014
$ITRC)
LOO-

"•

..

.

•

....
..

.
.

.
..

...
.
..
..

.
..

FSKIP (SUBROUTINE)
FAP

9/4/64

• •••••••••••••••••••••••

•

FSKIP

PROGRAM LISTINGS

••••••••••••••••••••••••
IPAGE

-

TRC1
2,4
3,4
,4
SKIPI

$IBSRI
XEC*
*
SKPBSF BSFA
TIX
--1,4,1
SIRDSI
XEC*
SKIP4 TCOA
TEFA
SKIP9
A
$IBSRI
XECSKPBTl BTT
SKIP9
TRA
* DONE BACK SKIP
*
- DONE FORWARD SKIP
SKIPI XEC*
SIRDSI
SKIP5 TCOA
SKPTEF TEFA
SKI P2
TRA
SKIPI
SKIPl,4,1
SKIP2 TIX
SKIP9 AXT
*-,4
TRCI TRCA
-+1
TRA
3,4
SKIP3 PZE
16
END

--

-

FSKIP

•

••••••••••••••••••••••••
IPAGE

21

SLQ
CLATlE
POX
TPL

-..•.•....•.............

*

*

NO SKIPPING WANTED.
SET FOR N FILE JUMPS
SKIP AHEAD ON TAPE.
SKIP 8ACK.
GET OVER EOF MARK WHICH IS JUST BEFORE
PRESENT POSITION.
GO BACK
OVER N FILES.
PASS OVER EOF

--

MUST BE AT BEGINNING OF TAPE
TURN OFF BEGINNING OF TAPE LIGHT.
AT BEGINNING OF TAPE

-

PASS A RECORD
OELAY.
GO TO EOF COUNTER.
NO EOF, KEEP PASSING RECORDS.
COUNT EOF-S.

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103

21

••••••••••••••••••••••••
FT24
..
••••••••••••••••••••••••

•

--

FT24
FAP

ISUBROUTINE)

PROGRAM LISTINGS

••••••••••••••••••••••••
FT24
..
• •••••••••••••••••••••••

•

LAST CARD IN DECK IS NO. 0847
0001
-FT24
0002
COUNT
750
0003
LBL
FT24
0004
ENTRY
FT24 ID.A,B)
0005
0006
•
----ABSTRACT---0007
•
0008
0009
- TITLE - FT24
•
HIGH SPEED 24 POINT SPECTRUM
0010
0011
•
FT24 COMPUTES THE SINE AND COSINE TRANSFORMS OF 24 DATA
0012
0013
POINTS. THE TRANSFORMS ARE EVALUATED AT FREQUENCIES
0014
•
FREQ : II-ll.PI/12
1=1 ••• 13
0015
•
0016
•
WHERE PI
3.14159265
0017
AND FREQ = PI IS EQUIVALENT TO THE FOLDING FREQUENCY
0018
•
0019
FOR THE DATA SERIES
•
OOZO
•
FTZ4
GAINS
ITS
SPEED
FROM
0021
•
0022
•
1. STRAIGHT LINE PROGRAMMING RATHER THAN IN LOOPS
0023
•
Z. GROUPING TERMS TO MINIMIZE THE NUMBER OF MULTIPLIES
0024
•
NECESSARY
0025
•
3. SUBGROUPING ADDITIONS TO TAKE ADVANTAGE OF VARIOUS
0026
•
SYMMETRIES
0027
•
4. SELECTION OF THE NUMBER OF FREQUENCIES SO AS TO
0028
•
MAXIMIZE THE NUMBER OF SYMMETRIES GENERATED
0029
•
5. USING FIXED POINT ARITHMETIC
0030
•
0031
•
THE
EQUATIONS
USED
WERE
DEVELOPED
IN
SCIENTIFIC
REPORT
0032
•
NO.1
OF
AIR
FORCE
CONTRACT
AF
19(604)737B.
APPENDIX
J.
0033
•
0034
• LANGUAGE - FAP SUBROUTINE IFORTRAN II COMPATIBLE)
0035
• EQUIPMENT - IBM 709 OR 7090 IMAIN FRAME ONLY)
0036
• STORAGE
- 777 REGISTERS
0037
• SPEED
- ABOUT 4750 MACHINE CYCLES.
0038
0039
• AUTHOR
- CHEH PAN
0040
•
---USAGE---0041
0042
•- TRANSFER VECTOR CONTAINS ROUTINES - FXDATA, FLDATA
0043
..
AND FORTRAN SYSTEM ROUTINES - NONE
0044
0045
•
0046
- FORTRAN USAGE
•
CALL FT24 ID,A,B)
0047
0048
•
0049
- INPUTS
1=1 ••• 24 IS THE DATA VECTOR THE TRANSFORM IS TO BE
0050
•
DIll
It
MADE OF.
0051
0052
- OUTPUTS
1=1 ••• 13 IS THE COSINE TRANSFORM
0053
•
AlII
All) = (1/24) .. ISUM IFROM 1=1 TO 241 OF Dill)
0054
IFROM
1=1
TO
24)
OF
0055
A1131=
11/241
(SUM
•
DII)-COSIII-I).PII)
0056
AIJI
111121. ISUM (FROM 1=1 TO 24) OF
0057
DIII-COSIIJ-1).II-II-PIJ)
005'8
FOR J = Z.3 •••• ,12
0059
0060
BU)
1=1 ••• 13 IS THE SINE TRANSFORM
Q061
Bill
BI131 = 0.0
0062
BIJI = 11/121 • ISUM IFROM 1=1 TO 24) OF
0063
0064
DIII·SINIIJ-11-11-1)·PIJ)
•
FOR J = Z.3, ••• ,12
0065
0066
•
0067
• EXAMPLES
0068
•.. 1. INPUTS - 011 ••• 241 = 12.,12.,0.,0 •••••• 0.
0069
0070
•
OUTPUTS - All ••• 13)
1 •• 1.966.1.866.1.707.1.500.1.259,1.000.
0071
. 0.741.0.500.0.Z93.0.134.0.034.0.000
0072

.

..
.

..

.

-.

....
...
..

...

9129/64

***** •••••••••• ** •••••••
Ff24
*

PROGRAM LISTINGS

*

(PAGE

*

2)

B( 1 ••• 131

•*
*

sua

SUB
ADD

X9

X15

X21

XCA

MPY
ADO
S10
CLA
SUB
SUB
ADO
ARS
ADD
SID
ClA

sua
sue

ADO
XCA
MPY
ADO

C3
At
Al
X4

X8
X16
X20

1
Al
At
X5
X7

X17
Xl9
C5

Al

F124

(PAGE

0.,0.259,0.500,0.707,0.866,0.966,1.000,
0.966,0.866,0.707,0.500,0.259,0.000

HTR
o
BCI
1,fT24
SXD
*-2,4
CLA
1,4
ADD
=-1
STA
MOVED
CLA
2,4
ADO
=1
STA
MDVEA
ClA
3,4
ADD
=1
SIA
MOVEB
MOVE DATA INTO PROGRAM
*
AXT
24,4
MOVED ClA
.*,4
S10
XO+1,4
T1X
*-2,4.1
CALL
FXDATA.KD24,XO,MXOATA,SCAlE
INSERI INDIVIDUAL fORMULAE
* CAO
ClM
AXI
24,4
XO+1,4
ADD
TIX
*-1,4,1
AO
STO
CA12 ClM
AXI
1,4
ADD
XO+1,4
XO,4
SUB
TXI
*+1,4,2
TXl
*-3,4,24
510
A12
CAl
xo
CLA
SUB
X12
510
Al
ClA
XI
SUB
Xli
SUB
Xl3
ADD
X23
XCA
MPY
CI
ADD
Al
S10
Al
X2
ClA
sue
XIO
SUII
X14
ADO
X12
XCA
MPY
C2
ADO
Al
STO
Al
CLA
X3
FT24

••••••••••••••••••••••••
••••••••••••••••••••••••*

••••••••••••••••••••••••

0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0096
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110

0111
0112
0113
0114
0115
0116
0117
0116
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131

0132
0133
0134
0135
0136
0137
0136
0139
0140
0141
0142
0143
0144
0145
0146
0147

21

•••••••••••••••••• * •••••
.•••••••••••••••••••
.
FT24
** •••
(PAGE

31
CSI

CA2

CB2

PROGRAM LISTINGS

.* •••• ** ••••••••••••••••

.

..

FT24

••••• ** •••••••• ***.* ••••
(PAGE

STO
CLA
SUB
STO
CLA
ADO
SUB
SUB
XCA
MPY
AOO
STO
CLA
ADD
SUB
SUB
ARS
ADD
STO
CLA
ADO
SUB
SUB
XCA
MPY
ADO
STO
CLA
ADD
SUB
SUB
XCA
MPY
ADD
STO
CLA
ADO
SUB
SUB
XCA
MPY
ADO
STO
CLA
SUB
ADD
SUB
STO
CLA
SUB
SUB
ADD
ADD
SUB
SUB
ADD
XCA
MPY
ADO
STO
CLA
SUB
SUB
ADD
ADD
SUB
SUB
ADD
ARS
ADD
STO
CLA
SUB
ADO
SUB

Al
X6
X18
61
Xl
XU
X13
X23
Sl
B1
Bl
X2
XI0
X14
X22
1
B1
B1
X3
X9
X15
X21
S3
Bl
61
X4
X8
X16
X20
54
Bl
B1
X5
X7
X17
X19
55

Bl
81
XO
X6
X12
X18
A2
Xl
X5
X7
Xli
X13
X17
X19
X23
C2
A2
A2
X2
X4

XB
XI0
X14
X16
X20
X22
1
A2
A2
X3
X9
X15
X21

0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
01B4
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
019B
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222

31

** •••••• * •••• * •••••••
.•••
.
* •••••••••••••••••••••••
FT24

(PAGE

4)

CA3

C83

CA4

PROGRAM LISTINGS

*** ••• * •••••••••••
.••••••FT24
..

•••••••• ** ••••••••• * ••••
(PAGE

STO
ClA
ADD
SUB
SUB
ADD
ADD
SUB
SUB
ARS
ADD
S10
ClA
ADD
SUB
SUB
ADD
ADD
SUB
SUB
XCA
MPY
ADD
STO
ClA
SUB
ADD
SU8
ADD
SU8
S10
CtA
SUB
SUB
ADD
ADD
SUB
SUB
ADD
ADD
SUB
SUB
ADD
XCA
MPY
ADD
S10
ClA
SUB
ADD
SUfi
ADD
SUB
STO
ClA
ADD
SUB
SUB
ADD
ADO
SUB
SU8
ADD
ADD
SU8
SU8
XCA
MPY
ADD
STO
CLA
SUB
ADD
SUfi
ADD

B2
Xl
X5
X7
XU
X13
X17
X19
X23
1
B2
B2
X2
X4
X8
X10
X14
X16
X20
X22
S4
82
82
XO
X4
X8
X12
X16
X20
A3
Xl
X3
X5
X7
X9

Xli
Xl3
X15
X17
X19
X21
X23
C3
A3
A3
X2
X6
XIO
X14
XI8
X22
B3
Xl
X3
X5
X7
X9
Xll
X13
XI5
X17
X19
X21
X23
S3
B3
83
XO
X3
X6
X9
X12

0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
026B
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297

4)

• •••••••••••••••••••••••

•

FT24

*
••••••••••••••••••••••••
IPAGE

51

CB4

CA5

SUB
ADD
SUB
STO
ClA
SUB
SUB
ADD
ADD
SUB
SUB
ADO
AOD
SUB
SUB
ADD
ADD
SUB
SUB
AOD
ARS
ADD
STO
ClA
AOD
SUB
SUB
ADD
ADD
SUB
SUB
ADO
ADO
SUB
SUB
ADD
ADD
SUB
SUB
XCA
MPY
STO
ClA
SUB
STO
ClA
SUB
SUB
ADO
XCA
MPY
ADD
STO
ClS
ADD
ADO
SUB
XCA
MPY
ADD
STO
ClS
ADO
ADD
SUB
XCA
MPY
ADD
STO
ClA
SUB

sue

AOD
ARS
ADD

X15
X18
X21
A4
Xl
X2
X4
X5
X7
X8
Xl0
X11
X13
X14
X16
X17
X19
X20
X22
X23
1
A4
A4
Xl
X2
X4
X5
X7
X8
X10

XU
X13
X14
X16
Xl1
X19
X20
X22
X23
S4
B4
XO
X12
A5
X5
X7
X17
X19
C1
A5
AI)
X2
Xl0
X14
X22
C2
A5
A5
X3
X9
X15
X21
C3
A5
A5
X4
X8
X16
X20
1
A5

PROG~AM

1I STINGS

• •••••••••••••••••••••••
FT24
*• •••••••••••••••••••••••
*
IPAGE

029B
0299
0300
0301
0302
0303
0304
0305
0306
0301
0308
0309
0310
0311
0312
0313
0314
0315
0316
0317
031B
0319
0320
0321
0322
0323
0324
0325
0326
0327
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372

51

.••••••••••••••••••••••••
.
••••••••••••••••••••••••
FT21t

(PAGE

6)

C85

CA6

C86

STO
ClA
SUB
SUB
ADD
XCA
MPY
ADD
STO
ClA
SUB
STO
CLA
ADD
SU8
SUB
XCA
MPY
ADD
SrD
ClA
ADD
SUB
SUB
ARS
ADD
STO
ClS
SUB
AOD
ADD
XCA
MPY
ADD
sro
ClS
SUB
ADD
ADO
XCA
MPY
ADO
STO
ClA
ADD
SUB
SUB
XCA
MPY
ADO
STO
ClA
SUB
ADO
SU8
ADO
SUB
ADO
SUB
ADD
SUB
AnD
SUB
srD
ClA
SUB
ADD
SUB
ADD
SUB
ADD
SUB
ADD
SUB
ADD

A5
Xl
Xli
X13
X23
C5
A5
AS
X6
X18
B5
X5
X7
X17
X19
SI
B5
B5
X2
XI0
X14
X22
1
B5
B5
X3
X9
X15
X21
53
B~

B5
X4
X8
X16
X20
S4
B5
85
Xl
XU
X13
X23
55
B5
B5
XO
X2
X4
X6
X8
XI0
X12
X14
X16
X18
X20
X22
A6
Xl
X3
X5
X7
X9

XU
X13
XIS
X17
X19
X21

PROGRAM Ll STINGS

.••••••••••••••••••••••••
.
FT24
• •••••••••••••••••••••••
(PAGE

0313
0314
0315
0376
0377
0318
0319
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436
0431
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447

6)

.
..••••••••••••••••••••••••
FT24
••••••••••••••••••••••••
IPAGE

11

CA7

CB7

SUB
STO
CLA
SUB
S10
CLS
ADD
AOD
SUB
XCA
MPY
ADD
STO
CLS
ADD
ADD
SUB
XCA
MPY
ADD
STO
CLA
SU8
SUB
ADD
XCA
MPY
ADD
STO
CLA
SUB
SUB
ADO
ARS
ADD
STO
CLS
AOD
ADD
SU8
XCA
MPY
ADD
STO
CLS
ADD
STO
CLA
ADO
SUB
SUB
XCA
MPY
ADD
STO
CLS
SUB
ADD
ADD
ARS
ADD
STO
ClS
SUB
ADD
ADD
XCA
MPY
ADD
STO
CLA
I\DD
SUB
SUB
XCI\

X23
B6
XO
X12
A7
X5
X7
Xl7
X19
Cl
A7
A7
X2
X10
Xl4
X22
C2
A7
A7
X3
X9
X15
X21
Cl

A7
A7
X4
X8
X16
X20
I
A7
A7
Xl
Xl!
X13
XV
C5
A7
A7
X6
X18
B7
X5
X7
XI7
X19
Sl
87
87
X2
X10
XI4
X22
1
B7
B7
X3
X9
X15
X21
S3
B1
B7
X4
X8
X16
X20

PROGRAM LISTINGS

.••••••••••••••••••••••••
..
FT24
••••••••••••••••••••••••
IPAGE

0448
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487
0488
0489
0490
0491
0492
0493
0494
0495
0496
0497
0498
0499
0500
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517
0518
0519
0520
0521
0522

7)

........
-.......-_......•
•
FT24

••••••••••••••••••••••••
(PAGE

8)

CA8

CBB

CA9

PROGRAM LISTINGS

••••••••••••••••••••••••

.• -......................•
FT24

(PAGE

MPY
ADD
STO
CLA
ADD
SUB
SUB
XCA
MPY
ADD
STO
CLA
ADD
ADD
ADD
ADD
ADD
ADD
ADD
STO
CLS
SUB
SUB
SUB
SUB
SUB
SUB
SUB
SUB
SUB
SUB
SU8
SUB
SU8
SUB
SUB
ARS
ADD
STO
CLA
SU8
ADD
SUB
ADD
SUB
ADD
SUB
ADD
SUB
ADD
SUB
ADD
SUB
ADD
SUB
XCA
MPY
STO
CLA
SUB
ADD
SUB
ADD
SUB
STO
ClS
ADD
ADD
SUB
SUB
ADD
ADO
SUB
SU8
ADD

S4
B7
B7
Xl
XU
X13
X23
S5
B7
B7
XO
X3
X6
X9
X12
X15
X18
X21
A8
Xl
X2
X4
X5
X1
X8
XIO
Xll
Xl3
X14
XL6
X17
X19
X20
X22
X23
1
A8
A8
Xl
X2
X4
X5
X7
Xii
XIO
XU
X13
X14
X16
Xl7
X19
X2D
X22
Xl3

S4
B8
XD
X4
X8
X12
X16
X20
A9
Xl
X3
X5
X1
X9
Xll
X13
XI5
Xl7
XL9

0523
0524
0525
0526
0527
0528
0529
0530
0531
0532
0533
0534
0535
0536
0537
0538
0539
0540
0541
0542
0543
0544
0545
0546
0541
0548
0549
0550
0551
0552
0553
0554
0555
0556
0557
0558
0559
0560
0561
0562
0563
0564
0565
0566
0567
0568
0569
0570
0571
0572
0573
0574
0575
0576
0577
0578
0579
0580
0581
0582
0583
0584
0585
0586
0587
0588
0589
0590
0591
0592
0593
0594
0595
0596
0597

8)

*** ••• * •••
.••••••••••••••
FT24

if

••••••••••••••••••••••••
(PAGE

91

C89

ADD
SU8
XCA
MPY
ADD
STO
CLS
ADD
SU8
ADD

SUB

CAIO

AOD
STO
CLA
ADD
SUB
SUB
ADD
ADD
SUB
SUB
ADD
AOO
SUB
SUB
XCA
MPY
ADD
STO
CLA
SUB
ADD
SUB
STO
CLS
ADD
ADD
SUB
SUB
ADD
ADD
SUB
XCA
MPY
ADD
STO
CLA
SUB

SUB
ADO
ADD

SUB

CBIO

SUB
ADD
ARS
ADD
STO
CLA
SU8
ADD
SUB
STO
CLA
ADD
SUB
SUB
ADD
ADD
SU8
SUB
ARS
ADD
STO
CLS
SUB

X21
X23
C3
A9
A9
X2
X6
XI0
X14
Xi8
X22
89
Xl
X3
X5
X7
X9
Xll
X13
X15
X17
X19
X21
X23
S3
B9
B9
XO
X6
X12
X18
AID
Xl
X5
X1
XlI
XU
Xl1
X19
X23
C2
AI0
AIO
X2
X4
Xll
XIO
X14
X16
X20
X22
I
AID
AID
X3
X9
X15
X21
BID
Xl
X5
X1
XU
X13
X17
X19
X23
I
BID
810
X2
X4

PROGRAM LISTINGS

.••••••••••••••••••••••••
.
FT24
••••••••••••••••• * ••••••
(PAGE
0598
0599
0600
0601
0602
0603
0604
0605
0606
0607
0608
0609
0610
0611
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622
0623
0624
0625
0626
0627
0628
0629
0630
0631
0632
0633
0634
0635
0636
0637
0638
0639
0640
0641
0642
0643
0644
0645
0646
0641
0648
0649
0650
0651
0652
0653
0654
0655
0656
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669
0610
0611
0612

9)

• •••••••••••••••••••••••
FT24
*
••••••••••••••••••••••••*
(PAGE 10)

CAll

ADD
ADO
SUB
SUB
ADD
ADO
XCA
MPY
ADD
STO
CLA
SUB
STO
CLS
ADD
ADD
SUB
XCA
MPY
ADD

sro

CLA
SUB
SUB
ADD
XCA
MPY
ADD
STO
ClS
ADD
ADD
SUB
XCA
MPY
ADD

sro

CBll

CLA
SUB
SUB
ADD
ARS
ADD
SID
ClS
ADD
ADD
SUB
XCA
MPY
ADD
SID
CLS
ADD
STO
CLA
ADD
SUB
SUB
XCA
MPY
AOD
STO
CLS
SUB
ADO
ADD
ARS
ADD
STO
CLA
ADO
SUB
SUB
XCA

X8
X10
X14
X16
X20
X22
S4
BIO
B10
XO
X12
All
Xl
XlI
Xl3
X23
CI
All
All
X2
XI0
X14
X22
C2
All
All
X3
X9
X15
X21
C3

All
All
X4
X8
X16
X20
1
All
All
X5
X7
Xl1
X19
C5
All
All
X6
X18
Bll
Xl
Xll
X13
X23
SI
Bll
Bll
Xl
XIO
X14
X22
1
Bll
Bll
X3
X9
XIS

XlI

PROGRAM LISTINGS

••••••••••••••••••••••••
FT24
•
*••••••••••••••••••••••••
(PAGE 10)

0613
0674
0615
0616
0617
0618
0619
0680
0681
0682
06B3
0684
0685
0686
0687
0688
0689
0690
0691
0692
0693
0694
0695
0696
0691
0698
0699
0100
0701
0102
0103
0104
0105
0706
0701
0708
0109
0110
0111
0712
0113
0114
0715
0716
0117
0118
0719
0720
0721
0722
0723
0124
0725
0126
0721
0728
0729
0130
0131
0132
0733
0134
0735
0736
0137
0738
0739
0740
0141
0142
0743
0744
0745
0746
0747

••••••••••••••••••••••••

-

-

FT24

PROGRAM LISTINGS

••••••••••••••••••••••••
(PAGE 111

MPY
ADD
STO
CLS
SUB
ADD
ADD
XCA
MPY
ADD
STO
CLA
ADD
SUB
SUB
XCA
MPY
ADD
STO
LDQ
FMP
STO
CALL
LDQ
FMP
STO
LDQ
FMP
STO
AXT
CLA
MOVEA STO
CLA
MOVES STO
TlX
SV4
LXD
TRA
MXDATA PZE
SCALE PZE
KD26 PZE
KD24 PZE
SI
OCT
OCT
S3
OCT
S4
S5
OCT
EQU
Cl
EQU
C2
(;3
EQU
EQU
C5
Al2
PZE
All
PZE
AIO
PZE
A9
PZE
pze
A8
A7
PZE
A6
PZE
A5
PZE
A4
PZE
A3
PZE
A2
PZE
Al
PZE
AO
PZE
PZE
812
811
PZE
810
PZE
PIE
89
88
PZE
87
PIE
PZE
8&
85
PZE
84
PlE
83
PIE
PZE
82
PIE
81
PZE
80

-

-

FT24

••••••••••••••••••••••••

S3
Bll
Bll
X4
X8
X16
X20
S4
Bll
Bll
X5
X7
X17
X19
S5
Bll
Bll
SCALE
=12.
SCALE
FLOATA,KD26,BO,SCALE
AO
:.5

AO
A12
=.5
A12
13,4
AO+ 1 ,4

••••••••••••••••••••••••

MOVE COEFS
BACK TO MAIN

•• ,4 .

BO+1,4
•• ,4

MOVEA-1,4,l
FT24-2,4
4,4
0,0,100000
0,0,26
0,0,24
SIN(PII121
102203734074
SIN(PII41
265011714631
335547535014
SIN( PIn I
367215650717
SINIS"PI/12)
COS (P III I
S5
COS(PII6)
S4
COSIPI/41
S3
SI
cose5-P1I121

ALWAYS ZERO

ALWAYS ZERO

(PAGE 1U

0748
0749
0750
0751
0752
0753
0754
0755
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765
0766
0767
0768
0769
0770
0771
0772
0773
0774
0775
0776
0777
0778
0779
0780
0781
0782
0783
0784
0785
0786
0787
0788
0789
0790
0791
0792
0793
0794
0795
0796
0797
0798
0799
0800
0801
0802
0803
0804
0805
0806
0807
0808
0809
0810
0811
0812
0813
0814
0815
0816
0817
0818
0819
0820
0821
082l

••••••••••••••••••••••••

•

•

FT24

••••••••••••••••••••••••
(PAGE 12)

X23
X22
X2i
X20
Xl9
Xl8
X17
X16
Xl5
Xl4
Xl3
X12
XU
X10
X9
X8
X1
X6
X5
X4
X3
X2
Xl
XO

PIE
PZE
PZE
PIE
PZE
PZE
PZE
PZE
PZE
PZE
PZE
PIE
PIE
PZE
PZE
PZE
PZE
PIE
PZE
PZE
PZE
PZE
PIE
PZE
END

PROGRAM LISTINGS

••••••••••••••••••••••••
FT24
•
•
••••••••••••••••••••••••
( PAGE 121

0823
0824
0825
0826
0821
0828
0829
0830
0831
0832
0833
0834
0835
0836
0831
0838
0839
0840
0841
0842
0843
0844
0845
0846
0841

.••••••••••••••••••••••••
FT24 -II
*

PROGRAM LISTINGS

-II

••••••••••••••••••••••••
..
-

FT24

C
C

C
C
C
C

C
C
C
C

C

C
C

C
C

C
C

C
C
C
C

C
C
C
C
C

C
C
C
C
C
C
C
C
C
C
C

C
C

C
C

C
C
C
C
C

C
C
C
C

C
C
C
C
C

C
C
C

C

C
C

C
C
C
C

C
C
C

C
C

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0146
0001
0002
SUBROUTINE FT24 (DD.AA.BBI
0003
0004
----ABSTRACT---0005
0006
TITLE - FT24 -II
0001
HIGH SPEED 24 POINT SPECTRUM
0008
0009
FT24 COMPUTES THE SINE AND COSINE TRANSFORMS OF 24 DATA
0010
POINTS. THE TRANSFORMS ARE EVALUATED AT FREQUENCIES
0011
0012
FREQ = (1-1I"PI/12
1=1 ••• 13
0013
0014
WHERE PI
3.14159265
0015
AND FREQ = PI IS EQUIVALENT TO THE FOLDING FREQUENCY
0016
FOR THE DATA SERIES
0011
0018
FT24 GAINS ITS SPEED FROM
0019
0020
1. STRAIGHT LINE PROGRAMMING RATHER THAN IN LOOPS
0021
2. GROUPING TERMS TO MINIMIZE THE NUMBER OF MULTIPLIES
0022
NECESSARY
0023
3. SUBGROUPING ADDITIONS TO TAKE ADVANTAGE OF VARIOUS
0024
SYMMETRIES.
0025
4. SELECTION OF THE NUMBER OF FREQUENCIES SO AS TO
0026
MAXIMIZE THE NUMBER OF SYMMETRIES GENERA TEO
0021
0028
THE EQUATIONS USED WERE DEVELOPED IN SCIENTIFIC REPORT
0029
NO.1 OF AIR FORCE CONTRACT AF 19(6041131B, APPENDIX J.
0030
0031
LANGUAGE - FORTRAN II SUBROUTINE
0032
EQUIPMENT - IBM 109 OR 1090 (MAIN FRAME ONLYI
0033
0034
STORAGE
- 818 REGISTERS
SPEED
- ABOUT 4100 MACHINE CYCLES.
0035
AUTHOR
- R.A. WIGGINS JUNE, 1963
0036
0031
----USAGE---0038
0039
TRANSFER VECTOR CONTAINS ROUTINES - NONE
0040
AND FORTRAN SYSTEM ROUTINES - NONE
0041
0042
FORTRAN USAGE
0043
0044
CALL FT24 CDD,AA, BBI
0045
INPUTS
0046
OO( I I
0041
1=1 ••• 24 IS THE DATA VECTOR THE TRANSFORM IS TO BE
MADE OF.
0048
0049
OUTPUTS
AA( I I
1=1 ••• 13 IS THE COSINE TRANSFORM
0050
AAl11 = (1/241 * (SUM (FROM 1=1 TO 241 OF 0(111
0051
AA1131= (1/241 * (SUM (FROM 1=1 TO 241 OF
0052
O( II-COSI (I-ll*PIII
0053
0054
AAIJI = 11/121 " ISUM (FROM 1=1 TO 241 OF
0055
D( I I"COS( IJ-U*I I-ll"PIlI
FOR J = 2,3, ••• ,12
0056
0051
0058
1=1 ••• 13 IS THE SINE TRANSFORM
BBI I I
BBl11 = BBI131 = 0.0
0059
BBIJI = 11/121 .. ISUM IFROM 1=1 TO 241 OF
0060
o ( II .S I NI I J-11. I l-ll.P I I )
0061
0062
FOR J = 2,3, ••• ,12
0063
EXAMPLES
0064
0065
12.,12.,0.,0., ••• ,0.
0066
1. INPUTS - 0011 ••• 24)
0061
1.,1.966,1.B66,1.101,1.500,1.259,1.000,
0068
OUTPUTS - AAll ••• 131
0.141,0.500,0.293,0.134,0.034,0.000
0069
0010
BB ( 1 ••• 13)
0.,0.259,0.500,0.701,0.866,0.966,1.000
0.966.0.866.0.701,0.500,0.259,0.000
0011
0012
0013
PROGRAM FOLLOWS BELOW
0014

LABEL
CFT24 -II
C

-II (SUBROUTINEI

.••••••••••••••••••••••••
FT24
"

9/29/64

••••••••••••••••••••••••
FT24 -II
*
*
••••••••••••••••••••••••
(PAGE

2)

8
8
8
8

10

20

30

PROGRAM ll5TING5

•••••••••••••• * ••• * •••••
FT24 -ll
*
*

••••••••••••••••••••••••
IPAGE

DIMEN510N DD(24),AAI13),88113),X(241,AI131,8(131
EQUIVALENCE lXIII, XOI,IX(2),Xl),(XI3),X2),(X(4I,X3I,(X(5"X4)
EQUIVALENCE IX(61 ,X51, (X(1) ,X61, (XI8l,X71, (X(91,X8), (X(10),X91
EQUIVALENCE (XIll),XI0),(X(12),XI1),(X(13),XI2),(XI14),X13)
EQUIVALENCE (X(15I,XI4),(X(16),XI5),(X(17),X161,IX(18),XI7)
EQUIVALENCE IX(19),XI81,(XI20),X19),IXI21),X20),IX(22),X21)
EQUIVALENCE IX(23),X22),IXI24),X23)
EQUIVALENCE IAll),AO),IAI2),Al),IAI3),A2I,IAI4),A3),IAI51,A4)
EQUIVALENCE IA(6),A5),IAI7),A6),IAI8),A7),IAI9),A8),IAII0I,A9)
EQUIVALENCE IAI 11) ,AIO), I AI 12), Al11, I AI 13), A12)
EQUIVALENCE 18(1),80),1812),81),1813),82),1814),83),1815),84)
EQUIVALENCE 18(6),85),1817),86),1818),87),1819),88).18(10),89)
EQUIVALENCE 181111,810),181121,811),18(13),812)
EQUIVALENCE ICl,55),IC2,541,IC3,53).(C5,51)
SI=177411017560
53=200552023632
54=200673317272
55=200756433522
AO=O.
DO 10 1=1,24
XII I=DDII 1/12.
AO=AO+XII)
AO"AOI2.
A12=0.
00 20 1=1,24,2
AI2=AI2+X(I)-X(I+l)
A12=A12l2.
Al=(XO-X12)+(XI-Xll-XI3+X23)*Cl+(X2-XlO-XI4+X22)*C2+
1
(X3-X9-X15+X21)*C3+(X4-X8-XI6+X20J*.5+(X5-X7-XI7+X19J*C5
81=(X6-XI8J+(X1+XIl-XI3-X23)*SI+{X2+XlO-X14-X221*.5+
1
IX3+X9-XI5-X21)*S3+(X4+X8-X16-X201*S4+(X5+X7-X17-XI9)*S5
A2=(XO-X6+X12-X18)+(XI-X5-X7+Xll+X13-X17-XI9+X23)*C2+
1
(X2-X4-X8+X10+XI4-XI6-X20+X22)*.5
82=(X3-X9+XI5-X21)+(Xl+X5-X7-X11+X13+XI7-XI9-X23)*.5+
1
(X2+X4-X8-XIO+X14+XI6-X20-X22)*S4
A3=(XO-X4+X8-XI2+XI6-X20)+IXl-X3-X5+X7+X9-XII-X13+X15+X17-X19-X21+
1
X23)*C3
83=(X2-X6+X10-X14+XI8-X22)+(X1+X3-X5-X7+X9+Xll-X13-X15+X17+XI9-X21
1
-X23)*S3
A4=(XO-X3+X6-X9+XI2-XI5+XI8-X21)+(XI-X2-X4+X5+X7-XB-Xl0+Xl1+X131
X14-X16+X17+XI9-X20-X22+X23)*.5
84=(Xl+X2-X4-X5+X7+X8-XlO-Xll+XI3+X14-XI6-X17+X19+X2Q-X22-X231*S4
A5=(XO-XI2)+(X5-X7-XI7+X191*Cl+I-X2+XI0+X14-X22)*C2+
1
(-X3+X9+XI5-X211*C3+(X4-X8-XI6+X20)*.5+(XI-XII-X13+X23)*C5
85=(X6-XIBI+(X5+X7-XI7-XI91*SI+(X2+XIO-X14-X22)*.5+
1
(-X3-X9+X15+X21)*S3+(-X4-X8+X16+X20)*S4+(Xl+X11-X13-X23)*S5
A6=IXO-x2+X4-X6+X8-XI0+X12-X14+X16-X18+X20-X22)
86=(XI-X3+X5-X7+X9-Xll+XI3-XI5+XI7-XI9+X21-X231
A7=(XO-X121+(-X5+X7+XI7-XI91*Cl+(-X2+XI0+XI4-X22)*C2+
1
(X3-X9-X15+X211*C3+(X4-X8-X16+X20)*.5+(-Xl+X11+X13-X23I*C5
87=(-X6+XI8)+(X5+X7-X17-XI91*SI+(-X2-XIO+X14+X221*.5+
1
(-X3-X9+XI5+X211*S3+(X4+X8-X16-X201*S4+(Xl+Xll-X13-X23)*S5
A8=(XO+X3+X6+X9+X12+XI5+XIB+X21)-IXl+X2+X4+X5+X7+X8+XI0+Xll+X13+
I
x14+X16+X17+X19+X20+X22+X23)*.5
88=IXI-X2+X4-X5+X7-X8+XIO-Xll+X13-X14+X16-X17+X19-X20+X22-X23)*S4
A9=(XO-X4+X8-X12+XI6-X20)+(-Xl+X3+X5-X7-X9+Xl1+X13-X15-XI7+X19+
1
X21-X231*C3
89=I-X2+X6-XIO+XI4-X18+X221+IX1+X3-X5-X7+X9+XII-X13-XI5+X17+X191
x21-X23)*S3
AIO=(XO-X6+X12-X18)+I-Xl+X5+X7-Xll-X13+X17+XI9-X23)*C2+
1
IX2-X4-XB+XIO+X14-XI6-X20+X221*.5
810 =(X3-X9+X15-X21)+(X1+X5-X7-Xll+XI3+X17-X19-X231*.5+
1
(-X2-X4+X8+XIO-X14-X16+X20+X22)*S4
A11=(XO-X12)+(-Xl+Xll+X13-X23)*Cl+(X2-XlO-X14+X221*C2+
1
(-X3+X9+X15-X21)*C3+(X4-XB-X16+X20)*.5+(-X5+X7+XI7-XI9I*C5
811=I-X6+X181+(X1+XII-XI3-X231*Sl+(-X2-X10+XI4+X221*.5+
1
(X3+X9-X15-X211*53+(-X4-X8+XI6+X201*54+(X5+X7-X17-X191*55
DO 30 1=1,13
AAIII=A(I)
SS(II=8(l)
RETURN
END

0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
009B
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146

21

••••••••••••••••••••••••
FXDATA
*
*
••••••••••••••••••••••••

PROGRAM LISTINGS

10/1/64
•
FXDATA ISUBRDUTINEI
*
FAP
*FXDATA
COUNT
230
LBL
FXDATA
ENTRY
FXDATA ILX,X,MXDATA,SCALEI
ENTRY
FLDATA ILX,X,SCALEI

•
•
•
•
•

*
•*

•
•

*

•

•
•
•
•
•
•
•
•
•
-

•
•
•
•
•

•
•
•

•
•
•
•
•
•

•
•
•
•
••

-••
•
•
•

•
•
•
•
•
•
•
•
•
*
•
•

•
•
•
•
•
•
•

••••••••••••••••••••••••

•

FXDATA

•

••••••••••••••••••••••••

LAST CARD IN DECK IS NO. 0247
0001
0002
0003
0004
0005
0006
0007
----ABSTRACT---0008
0009
TITLE - FXDATA WITH SECONDARY ENTRY FLDATA
0010
SCALE, CONVERT FLTG. VECTOR TO MACHINE INTEGERS OR CONVERSELY
0011
0012
FXDATA CONVERTS A FLOATING POINT VECTOR XIII I=l ••• LX
0013
TO A MACHINE LANGUAGE INTEGER VECTOR (WITH BINARY POINT
0014
TO RIGHT OF BIT 351 IXIII I=I ••• LX , SUCH THAT THE
0015
GREATEST MAGNITUDE OF IX = MXDATA IAN INPUT PARAMETER).
0016
ROUNDING RATHER THAN TRUNCATION OCCURS IN THE CONVERSION.
0017
THE OUTPUT INTEGERS ARE NECESSARILY LESS THAN 2EXPI7
001S
IN MAGNITUDE SINCE MXDATA IS A FORTRAN INTEGER.
0019
0020
FLDATA PERFORMS THE INVERSE OF FXDATA. IT WILL HANDLE
0021
INTEGERS UP TO 2EXP35 - 1, HO~EVER.
0022
0023
0024
LANGUAGE - FAP SUBROUTINE IWITH FORTRAN II TYPE CALLING SEQUENCE)
0025
EQUIPMENT - 709 OR 7090 IMAIN FRAME ONLYI
- 102 REGISTERS
0026
STORAGE
FXOATA
TAKES
ABOUT
3S.LX
MACHINE
CYCLES
0027
SPEED
FLDATA TAKES ABOUT 3S-LX MACHINE CYCLES
0028
- S.M. SIMPSON
0029
AUTHOR
0030
----USAGE OF FXDATA---0031
0032
TRANSFER VECTOR CONTAINS ROUTINES NONE
0033
0034
AND FORTRAN SYSTEM ROUTINES NONE
0035
FORTRAN USAGE OF FXDATA
0036
CALL FXDATAILX,X,MXDATA,SCALEI
0037
0038
0039
INPUTS TO FXDATA
0040
LX
IS LENGTH Of X SERIES
0041
IS A FORTRAN INTEGER WHICH MUST EXCEED ZERO
0042
0043
XI II
I"I,2, ••• ,LX IS A FLOATING POINT VECTOR
0044
0045
MXDATA
IS DESIRED MAXIMUM MAGNITUDE OF FIXED SERIES.
0046
0047
IS A FORTRAN INTEGER WHICH MUST EXCEED ZERO
0048
0049
OUTPUTS FROM FXDATA
0050
XIII
I=I,2, •••• LX CONTAINS THE MACHINE LANGUAGE INTEGER
0051
VERSION OF THE INPUT SERIES, DEFINED BY
0052
XIII" XFIXFIXIII*SCALEI
0053
WHERE
0054
SCALE = FLOATFIMXDATAI/XMAX
0055
XMAX = GREATEST MAGNITUDE OF ORIGINAL XII)
0056
AND THE FUNCTION XFIXFIYI IS EQUIVALENT TO
0057
1. ROUND Y TO THE NEAREST FORTRAN INTEGER
005B
2. SHIFT Y RIGHT ARITHMETICALLY IS PLACES
0059
XIII IS LEFT=O.O IF XMAX IS FOUND = 0.0
0060
0061
0062
SCALE
" FLOATFIMXDATAI/XMAX NORMALLY
= -1.0 IF LX OR MXDATA IS ILLEGAL IXIII LEFT AS IS)
0063
0064
" -2.0 IF XMAX IS FOUND = 0.0
0065
0066
FORTRAN USAGE OF FLDATA
0067
CALL FLDATAILX,X,SCALEI
0068
0069
INPUTS TO FLDATA
0070
LX
IS LENGTH OF X SERIES
0071
IS A FORTRAN INTEGER WHICH MUST EXCEED ZERO
0072
0073
Xli)
I"I ••• LX IS A SERIES CONSIDERED TO BE 35-BIT INTEGERS
0074

.•••• *** •••••••••••••• .

***
FXOATA
*.*** ••••• * ••• **********
IPAGE 21

..
...
......
..
...
..

..
.

...

•••••••••••••••• **** ••••

PROGRAM LISTINGS

..
FXOATA
..
• ••••• ****.**.*****.*.**
IPAGE 21

PLUS SIGN IBINARY POINT TO RIGHT OF BIT 351
SCALE

IS A FLOATING POINT SCALE FACTOR USED IN FLOATING XIII
MUST EXCEED 0.0

OUTPUTS FROM FLDATA
XI II

I=l ••• LX IS THE FLOATED, SCALED FORM OF THE INPUT XIII,
XIII = FLOATFIXII))/SCALE
WHERE
FLOATFI I IS AN OPERATION WHICH CONVERTS ANY
36-BIT CONFIGURATION ICONSIOEREO AS A 35-BIT
PLUS SIGN INTEGER) To A FLOATING POINT NUMBER
HOWEVER XIII IS LEFT UNDISTURBED IF EITHER
1. LX IS ZERO OR NEGATIVE
OR 2. SCALE IS ZERO OR NEGATIVE

EXAMPLES OF FXOATA

• 1. INPUTS - LX=5 XIl ••• 5)= 230.,-400.,51 •• -170.,99.8
MXOATA=10
•
OUTPUTS - Xll ••• 5) = OCT 000000000006,400000000012,000000000001,
..
400000000004,000000000002
SCALE = 0.0250

....
..
•

..

2. INPUTS - SAME AS EXAMPLE 1. EXCEPT LX-3 MXOATA=100
OUTPUTS - Xll ••• 3) = OCT 000000000012,400000000144,000000000016
SCALE = 0.250

.. 3. INPUTS - SAME AS EXAMPLE 1. EXCEPT LX = 1
•
OUTPUTS - XII) = OCT 000000000012
SCALE = 0.04341826

"•
..

•

4. INPUTS - SAME AS EXAMPLE 1. EXCEPT Xll ••• 51= 0.,0., •••
OUTPUTS - XIl ••• 51= 0.,0.,...
SCALE = -2.0

• 5. INPUTS - SAME AS EXAMPLE 1. EXCEPT MXDATA
..
OUTPUTS - Xl1 ••• 51 = SAME AS INPUT
SCALE

•..

.
..

-2
-1.0

6. INPUTS - SAME AS EXAMPLE 1. EXCEPT LX = 0
OUTPUTS - SAME AS EXAMPLE 5.

• EXAMPLES OF FLOATA
..

•

ITHE FIRST 4 BELOW ARC THC INVERSES OF THE FIRST
FOUR EXAMPLES OF FXDATAI

.. 1. INPUTS - LX=5 XIl ••• 5) = OCT 000000000006,400000000012,
..
000000000001,400000000004,000000000002 SCALEs.025
..
OUTPUTS - XIl ••• 5) = 240.,-400.,40.,-160.,80.

...
..
•

.

2. INPUTS

- LX:3

Xll ••• 3) = OCT 000000000012,400000000144,
000000000016
SCALE = 0.250
OUTPUTS - Xl1 ••• 31 = 232.,-400.,56.

.. 3. INPUTS - LX:l XIII = OCT 000000000012
..
OUTPUTS - XII) :