Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Numerical recipes
Sprott J., Cambridge University Press, New York, NY, 1991. Type: Book (9780521406895)
Date Reviewed: Dec 1 1992

In recent years, the computer media have made a continuous attempt to denigrate BASIC. First, there was the attempt to inflict Pascal on generations of students and then, more recently, the hype for C. Those of us who remember the early days of automatic computers and of programming in machine language will recall that the cry was for a high-level language that took most of the burden off the programmer. FORTRAN thus came as a blessing, and its continued popularity despite its difficulties with strings (until FORTRAN 77) indicates the validity of that point of view.

The original BASIC, although sadly deficient in the area of subroutines, was of immense help in student education, for which it was designed. The claim made for Pascal,  MODULA,  and C that they alone allow structured programming is nonsense: structure can be introduced into any program in any language if the will is there. What the above languages do is to force discipline on the user, since they will not compile otherwise. In effect, this means that the program has to be written and all variables and structures defined before presentation to the machine. Another claim is that long names can be used for variables to improve readability: does this not defeat the whole purpose of algebra, where symbols represent variables? The fact is that modern BASIC allows, but does not insist on, all structural concepts.

In Sprott’s addition to the numerical recipes saga, he has translated all of the numerical recipes (FORTRAN) programs into modern BASIC. This work is divided into chapters that exactly follow those of the FORTRAN volume, and each of the software listings bears the same name as its progenitor in the FORTRAN book.

For those unfamiliar with the first book in the series [1], it is worth mentioning that that monumental work contains a survey of practically the whole of modern numerical analysis with comments and recommendations drawn from the experience of the original authors. In addition, each recommendation is accompanied by a suggested subroutine written in FORTRAN. Since the original book, versions in Pascal and C have appeared, as have two addenda that give example calling routines.

The chapters cover linear algebra, interpolation, numerical integration, function evaluation, the special functions, random numbers, sorting, root finding, maximization and minimization, the Fourier transform, statistics, and finally ordinary and partial differential equations. The only real omission is integral equations.

This BASIC version explains that it is a companion to the FORTRAN volume which, as mentioned above, must be consulted for the mathematical bases of the various programs. The BASIC volume also contains the substance of the auxiliary volumes of calling procedures.

It is perhaps unfortunate that, although Sprott states that the material was prepared using Borland Turbo Basic 1.1, it has been revised to use Microsoft Quick Basic 4.5. This change is a pity because the documentation for the latter is woefully inadequate, and the “Quick” feature uses threaded code and runs at about half the speed of Turbo. It could be argued that Borland no longer supports Turbo Basic, but the original developer, Robert Zale, supported by Borland, now supplies an upgraded version, POWER BASIC 2.1 (from Spectra Publishing). This system is considerably better than either Turbo Basic or QuickBASIC and is roughly four times faster than the latter.

In the absence of the program disk, which is available separately, it was not possible to test any large number of the BASIC routines, but some current work enabled me to test most of the FFT routines as well as some of the functional minimizations. All worked faultlessly. I tested a few other things, for example simulated annealing and the matrix inversion material, and found no faults. It may be of interest to note some comparative operation times: using LAHEY FORTRAN (FTN77-EM/32), POWER Basic, and Microsoft QuickBASIC 4.5, the solution times for 64×64 sets of simultaneous linear equations on a 25MHz 486-type computer were 0.22 seconds, 3.0 seconds, and 19.7 seconds, respectively. The figure for QuickBASIC 4.5 (19.7 seconds) was obtained using fully compiled code. The method of solution in each case was GAUSSJ from page 9 of the BASIC book and page 28 from the FORTRAN book for the equivalent version. These figures show clearly the necessity of choosing the best compiler and language for a given application.

I recommend this valuable book without reservation.

Reviewer:  A. D. Booth Review #: CR115517
1) Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. Numerical recipes: the art of scientific computing. Cambridge University Press, New York, 1986.
Bookmark and Share
 
Algorithm Design And Analysis (G.4 ... )
 
 
BASIC (D.3.2 ... )
 
 
Numerical Linear Algebra (G.1.3 )
 
Would you recommend this review?
yes
no
Other reviews under "Algorithm Design And Analysis": Date
An interactive calculus theorem-prover for continuity properties
Suppes P., Takahashi S. Journal of Symbolic Computation 7(6): 573-590, 1989. Type: Article
Aug 1 1990
The numerical methods programming projects book
Grandine T., Oxford University Press, Inc., New York, NY, 1990. Type: Book (9789780198533870)
Mar 1 1991
More efficient computation of the complex error function
Poppe G., Wijers C. ACM Transactions on Mathematical Software 16(1): 38-46, 1990. Type: Article
Oct 1 1990
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy