Page 26 - Compact Numerical Methods For Computers
P. 26

16               Compact numerical methods for computer

                           and specialisation to one programming language would have inhibited users of these
                           special machines. Now, however, computer users are unlikely to be willing to type in
                           code if a machine-readable form of an algorithm exists. Even if the programming
                           language must be translated. having a workable form is useful as a starting point.
                             The original codes for the first edition were in BASIC  for a Data General NOVA.
                           Later these codes were made to run on a North Star Horizon. Some were made to
                           work on a Hewlett-Packard 9830A. Present BASIC versions run on various common
                           microcomputers under the Microsoft BASIC dialect; however, since I have used very
                           conservative coding practices, apart from occasional syntactic deviations, they
                           conform to IS0 Minimal BASIC  (IS0 6373-1984).
                              Rather than proof-reading the algorithms for the first edition, I re-coded them in
                           FORTRAN. These codes exist as NASHLIB, and were and are commercially available
                           from the author. I have not, however, been particularly satisfied that the FORTRAN
                           implementation shows the methods to advantage, since the structure of the algor-
                           ithms seems to get lost in the detail of FORTRAN code. Also, the working parts of the
                           codes are overshadowed by the variable definitions and subroutine calls. Compact
                           methods are often best placed in-line rather than called as standard subprograms as I
                           have already indicated.
                              In the current edition, I want to stay close to the original step-and-description
                           form of the algorithms, but nevertheless wish to offer working codes which could be
                           distributed in machine-readable form. I have chosen to present the algorithms in
                            Borland Turbo Pascal. This has the following justification.
                               (i) Pascal allows comments to be placed anywhere in the code, so that the
                           original style for the algorithms, except for the typographic conventions, could be
                           kept.
                               (ii) Turbo Pascal is available for many machines and is relatively inexpensive. It
                           is used as a teaching tool at many universities and colleges, including the University
                           of Ottawa. Version 3.01a of the Turbo Pascal system was used in developing the
                           codes which appear here. I intend to prepare versions of the codes to run under later
                           versions of this programming environment.
                               (iii) The differences between Turbo and Standard Pascal are unlikely to be
                           important for the methods, so that users of other Pascal compilers can also use these
                           codes.
                               (iv) Pascal is ‘close enough’ to many other programming languages to allow for
                           straightforward translation of the codes.
                              A particular disadvantage of Turbo Pascal for my development work is that I have
                           yet to find a convenient mechanism allowing automatic compilation and execution of
                           codes, which would permit me to check a complete set of code via batch execution.
                            From the perspective of the physical length of the listings, the present algorithms are
                           also longer than I would like because Pascal requires program headings and
                           declarations. In the procedural parts of the codes, ‘begin’ and ‘end’ statements also
                           add to the line count to some extent.
                              From the user perspective, the requirement that matrix sizes be explicitly specified
                           can be a nuisance. For problems with varying matrix sizes it may be necessary to
                           compile separate versions of programs.
   21   22   23   24   25   26   27   28   29   30   31