Главная » Все файлы » Просмотр файлов из архивов » PDF-файлы » Press, Teukolsly, Vetterling, Flannery - Numerical Recipes in C

Press, Teukolsly, Vetterling, Flannery - Numerical Recipes in C, страница 6

PDF-файл Press, Teukolsly, Vetterling, Flannery - Numerical Recipes in C, страница 6 Численные методы (773): Книга - 6 семестрPress, Teukolsly, Vetterling, Flannery - Numerical Recipes in C: Численные методы - PDF, страница 6 (773) - СтудИзба2013-09-15СтудИзба

Описание файла

PDF-файл из архива "Press, Teukolsly, Vetterling, Flannery - Numerical Recipes in C", который расположен в категории "". Всё это находится в предмете "численные методы" из 6 семестр, которые можно найти в файловом архиве . Не смотря на прямую связь этого архива с , его также можно найти и в других разделах. Архив можно найти в разделе "книги и методические указания", в предмете "численные методы и алгоритмы" в общих файлах.

Просмотр PDF-файла онлайн

Текст 6 страницы из PDF

C was designed with this type of portability inmind. Nevertheless, we have found that there is no substitute for actually checkingall programs on a variety of compilers, in the process uncovering differences inlibrary structure or contents, and even occasional differences in allowed syntax. Assurrogates for the large number of possible combinations, we have tested all theprograms in this book on the combinations of machines, operating systems, andcompilers shown on the accompanying table.

More generally, the programs shouldrun without modification on any compiler that implements the ANSI C standard,as described for example in Harbison and Steele’s excellent book [1]. With smallmodifications, our programs should run on any compiler that implements the older,de facto K&R standard [2]. An example of the kind of trivial incompatibility towatch out for is that ANSI C requires the memory allocation functions malloc()31.0 IntroductionTested Machines and CompilersHardwareO/S VersionCompiler VersionIBM PC compatible 486/33MS-DOS 5.0/Windows 3.1Microsoft C/C++ 7.0IBM PC compatible 486/33MS-DOS 5.0Borland C/C++ 2.0IBM RS/6000AIX 3.2IBM xlc 1.02DECstation 5000/25ULTRIX 4.2ACodeCenter (Saber) C 3.1.1DECsystem 5400ULTRIX 4.1GNU C Compiler 2.1Sun SPARCstation 2SunOS 4.1GNU C Compiler 1.40DECstation 5000/200ULTRIX 4.2DEC RISC C 2.1*Sun SPARCstation 2SunOS 4.1Sun cc 1.1**compiler version does not fully implement ANSI C; only K&R validatedand free() to be declared via the header stdlib.h; some older compilers requirethem to be declared with the header file malloc.h, while others regard them asinherent in the language and require no header file at all.In validating the programs, we have taken the program source code directlyfrom the machine-readable form of the book’s manuscript, to decrease the chanceof propagating typographical errors.

“Driver” or demonstration programs that weused as part of our validations are available separately as the Numerical RecipesExample Book (C), as well as in machine-readable form. If you plan to use morethan a few of the programs in this book, or if you plan to use programs in this bookon more than one different computer, then you may find it useful to obtain a copyof these demonstration programs.Of course we would be foolish to claim that there are no bugs in our programs,and we do not make such a claim.

We have been very careful, and have benefittedfrom the experience of the many readers who have written to us. If you find a newbug, please document it and tell us!Compatibility with the First EditionIf you are accustomed to the Numerical Recipes routines of the First Edition, restassured: almost all of them are still here, with the same names and functionalities,often with major improvements in the code itself. In addition, we hope that youwill soon become equally familiar with the added capabilities of the more than 100routines that are new to this edition.We have retired a small number of First Edition routines, those that we believeto be clearly dominated by better methods implemented in this edition.

A table,following, lists the retired routines and suggests replacements.First Edition users should also be aware that some routines common toboth editions have alterations in their calling interfaces, so are not directly “plugcompatible.” A fairly complete list is: chsone, chstwo, covsrt, dfpmin, laguer,lfit, memcof, mrqcof, mrqmin, pzextr, ran4, realft, rzextr, shoot, shootf.There may be others (depending in part on which printing of the First Edition is takenfor the comparison).

If you have written software of any appreciable complexity4Chapter 1.PreliminariesPrevious Routines Omitted from This EditionName(s)Replacement(s)Commentadimglin or mgfasbetter methodcosftcosft1 or cosft2choice of boundary conditionscel, el2rf, rd, rj, rcbetter algorithmsdes, desksran4 now uses psdeswas too slowmdian1, mdian2select, selipmore generalqcksrtsortname change (sort is now hpsort)rkqcrkqsbetter methodsmooftuse convlv with coefficients from savgolsparselinbcgmore generalthat is dependent on First Edition routines, we do not recommend blindly replacingthem by the corresponding routines in this book. We do recommend that any newprogramming efforts use the new routines.About ReferencesYou will find references, and suggestions for further reading, listed at theend of most sections of this book.

References are cited in the text by bracketednumbers like this [3].Because computer algorithms often circulate informally for quite some timebefore appearing in a published form, the task of uncovering “primary literature”is sometimes quite difficult. We have not attempted this, and we do not pretendto any degree of bibliographical completeness in this book. For topics where asubstantial secondary literature exists (discussion in textbooks, reviews, etc.) wehave consciously limited our references to a few of the more useful secondarysources, especially those with good references to the primary literature. Where theexisting secondary literature is insufficient, we give references to a few primarysources that are intended to serve as starting points for further reading, not ascomplete bibliographies for the field.The order in which references are listed is not necessarily significant.

It reflects acompromise between listing cited references in the order cited, and listing suggestionsfor further reading in a roughly prioritized order, with the most useful ones first.The remaining three sections of this chapter review some basic concepts ofprogramming (control structures, etc.), discuss a set of conventions specific to Cthat we have adopted in this book, and introduce some fundamental concepts innumerical analysis (roundoff error, etc.). Thereafter, we plunge into the substantivematerial of the book.CITED REFERENCES AND FURTHER READING:Harbison, S.P., and Steele, G.L., Jr. 1991, C: A Reference Manual, 3rd ed.

(Englewood Cliffs,NJ: Prentice-Hall). [1]1.1 Program Organization and Control Structures5Kernighan, B., and Ritchie, D. 1978, The C Programming Language (Englewood Cliffs, NJ:Prentice-Hall). [2] [Reference for K&R “traditional” C. Later editions of this book conformto the ANSI C standard.]Meeus, J. 1982, Astronomical Formulae for Calculators, 2nd ed., revised and enlarged (Richmond, VA: Willmann-Bell). [3]1.1 Program Organization and ControlStructuresWe sometimes like to point out the close analogies between computer programs,on the one hand, and written poetry or written musical scores, on the other.

Allthree present themselves as visual media, symbols on a two-dimensional page orcomputer screen. Yet, in all three cases, the visual, two-dimensional, frozen-in-timerepresentation communicates (or is supposed to communicate) something ratherdifferent, namely a process that unfolds in time. A poem is meant to be read; music,played; a program, executed as a sequential series of computer instructions.In all three cases, the target of the communication, in its visual form, is a humanbeing. The goal is to transfer to him/her, as efficiently as can be accomplished,the greatest degree of understanding, in advance, of how the process will unfold intime. In poetry, this human target is the reader. In music, it is the performer.

Inprogramming, it is the program user.Now, you may object that the target of communication of a program is nota human but a computer, that the program user is only an irrelevant intermediary,a lackey who feeds the machine. This is perhaps the case in the situation wherethe business executive pops a diskette into a desktop computer and feeds thatcomputer a black-box program in binary executable form. The computer, in thiscase, doesn’t much care whether that program was written with “good programmingpractice” or not.We envision, however, that you, the readers of this book, are in quite a differentsituation.

You need, or want, to know not just what a program does, but also howit does it, so that you can tinker with it and modify it to your particular application.You need others to be able to see what you have done, so that they can criticize oradmire. In such cases, where the desired goal is maintainable or reusable code, thetargets of a program’s communication are surely human, not machine.One key to achieving good programming practice is to recognize that programming, music, and poetry — all three being symbolic constructs of the humanbrain — are naturally structured into hierarchies that have many different nestedlevels.

Sounds (phonemes) form small meaningful units (morphemes) which in turnform words; words group into phrases, which group into sentences; sentences makeparagraphs, and these are organized into higher levels of meaning. Notes formmusical phrases, which form themes, counterpoints, harmonies, etc.; which formmovements, which form concertos, symphonies, and so on.The structure in programs is equally hierarchical. Appropriately, good programming practice brings different techniques to bear on the different levels [1-3].At a low level is the ascii character set. Then, constants, identifiers, operands,6Chapter 1.Preliminariesoperators.

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5192
Авторов
на СтудИзбе
433
Средний доход
с одного платного файла
Обучение Подробнее