c1-3 (779457), страница 2
Текст из файла (страница 2)
A calculation can be imagined as having, first, the truncation errorthat it would have if run on an infinite-precision computer, “plus” the roundoff errorassociated with the number of operations performed.Sometimes, however, an otherwise attractive method can be unstable. Thismeans that any roundoff error that becomes “mixed into” the calculation at an earlystage is successively magnified until it comes to swamp the true answer. An unstablemethod would be useful on a hypothetical, perfect computer; but in this imperfectworld it is necessary for us to require that algorithms be stable — or if unstablethat we use them with great caution.Here is a simple, if somewhat artificial, example of an unstable algorithm:Suppose that it is desired to calculate all integer powers of the so-called “GoldenMean,” the number given by√5−1φ≡≈ 0.61803398(1.3.3)21.3 Error, Accuracy, and Stability31to give completely wrong answers by about n = 16, at which point φn is down to only10−4 .
The recurrence (1.3.4) is unstable, and cannot be used for the purpose stated.We will encounter the question of stability in many more sophisticated guises,later in this book.Stoer, J., and Bulirsch, R. 1980, Introduction to Numerical Analysis (New York: Springer-Verlag),Chapter 1.Kahaner, D., Moler, C., and Nash, S. 1989, Numerical Methods and Software (Englewood Cliffs,NJ: Prentice Hall), Chapter 2.Johnson, L.W., and Riess, R.D. 1982, Numerical Analysis, 2nd ed. (Reading, MA: AddisonWesley), §1.3.Wilkinson, J.H.
1964, Rounding Errors in Algebraic Processes (Englewood Cliffs, NJ: PrenticeHall).Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-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 copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited.
To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).CITED REFERENCES AND FURTHER READING:.