f5-0
PDF · 1 pages · 16.3 KB
Open PDF file
Excerpt from the published textbook Numerical Recipes in Fortran 77 (Cambridge University Press, 1986-1992), not Phil's own writing. It contains the Chapter 5 'Evaluation of Functions' introduction, with its references to Fike and Lanczos, and the opening of section 5.1 on power series and their convergence, including efficient term-by-term updating of powers and factorials.
AI-written summary; may contain errors.
Extracted text (machine-read; may contain errors)
Sample page from NUMERICAL RECIPES IN FORTRAN 77: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43064-X)
Copyright (C) 1986-1992 by Cambridge University Press.Programs Copyright (C) 1986-1992 by Numerical Recipes Software. Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin g of machine-
readable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes booksor CDROMs, v isit website
http://www.nr.com or call 1-800-872-7423 (North America only),or send email to [email protected] (outside North Amer ica).Chapter 5. Evaluation of Functions
5.0 Introduction
Thepurposeofthischapteristoacquaintyouwithaselectionofthetechniques
that are frequently used in evaluating functions. In Chapter 6, we will apply and
illustrate these techniques by giving routines for a variety of specific functions.
The purposes of this chapter and the next are thus mostly in harmony, but thereis nevertheless some tension between them: Routines that are clearest and most
illustrative of the general techniques of this chapter are not always the methods of
choice for a particular special function. By comparing this chapter to the next one,
you should get some idea of the balance between “general” and “special” methods
that occurs in practice.
Insofar as that balance favors general methods, this chapter should give you
ideas about how to write your own routine for the evaluation of a function which,
while “special” to you, is not so special as to be included in Chapter 6 or thestandard program libraries.
CITED REFERENCES AND FURTHER READING:
Fike,C.T.1968, ComputerEvaluationofMathematicalFunctions (EnglewoodCliffs,NJ:Prentice-
Hall).
Lanczos, C. 1956, Applied Analysis ; reprinted 1988 (New York: Dover), Chapter 7.
5.1 Series and Their Convergence
Everybodyknowsthatananalyticfunctioncanbeexpandedintheneighborhood
of a point x0in a power series,
f(x)=∞/summationdisplay
k=0ak(x−x0)k(5.1.1 )
Such series are straightforward to evaluate. You don’t, of course, evaluate the kth
powerof x−x0abinitioforeachterm;ratheryoukeepthe k−1stpowerandupdate
it with a multiply. Similarly, the form of the coefficients ais often such as to make
use of previouswork: Terms like k!or(2k)!can be updatedin a multiplyor two.
159