c20-0 (779622)
Текст из файла
20.0 IntroductionYou can stop reading now. You are done with Numerical Recipes, as such. Thisfinal chapter is an idiosyncratic collection of “less-numerical recipes” which, for onereason or another, we have decided to include between the covers of an otherwisemore-numerically oriented book. Authors of computer science texts, we’ve noticed,like to throw in a token numerical subject (usually quite a dull one — quadrature,for example).
We find that we are not free of the reverse tendency.Our selection of material is not completely arbitrary. One topic, Gray codes, wasalready used in the construction of quasi-random sequences (§7.7), and here needsonly some additional explication. Two other topics, on diagnosing a computer’sfloating-point parameters, and on arbitrary precision arithmetic, give additionalinsight into the machinery behind the casual assumption that computers are usefulfor doing things with numbers (as opposed to bits or characters).
The latter of thesetopics also shows a very different use for Chapter 12’s fast Fourier transform.The three other topics (checksums, Huffman and arithmetic coding) involvedifferent aspects of data coding, compression, and validation. If you handle a largeamount of data — numerical data, even — then a passing familiarity with thesesubjects might at some point come in handy. In §13.6, for example, we alreadyencountered a good use for Huffman coding.But again, you don’t have to read this chapter. (And you should learn aboutquadrature from Chapters 4 and 16, not from a computer science text!)20.1 Diagnosing Machine ParametersA convenient fiction is that a computer’s floating-point arithmetic is “accurateenough.” If you believe this fiction, then numerical analysis becomes a very cleansubject. Roundoff error disappears from view; many finite algorithms become“exact”; only docile truncation error (§1.3) stands between you and a perfectcalculation.
Sounds rather naive, doesn’t it?Yes, it is naive. Notwithstanding, it is a fiction necessarily adopted throughoutmost of this book. To do a good job of answering the question of how roundoff error889Sample 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).Chapter 20. Less-NumericalAlgorithms.
Характеристики
Тип файла PDF
PDF-формат наиболее широко используется для просмотра любого типа файлов на любом устройстве. В него можно сохранить документ, таблицы, презентацию, текст, чертежи, вычисления, графики и всё остальное, что можно показать на экране любого устройства. Именно его лучше всего использовать для печати.
Например, если Вам нужно распечатать чертёж из автокада, Вы сохраните чертёж на флешку, но будет ли автокад в пункте печати? А если будет, то нужная версия с нужными библиотеками? Именно для этого и нужен формат PDF - в нём точно будет показано верно вне зависимости от того, в какой программе создали PDF-файл и есть ли нужная программа для его просмотра.















