ebook img

Numerical Recipes in Pascal PDF

792 Pages·1989·34.193 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Numerical Recipes in Pascal

NUNC COCNOSCO EX PARTE THOMAS J. BATA LIBRARY TRENT UNIVERSITY V V Numerical Recipes in Pascal Digitized by the Internet Archive in 2019 with funding from Kahle/Austin Foundation https://archive.org/details/numericalrecipesOOOOunse Numerical Recipes in Pascal The Art of Scientific Computing William H. Press Harvard-Smithsonian Center for Astrophysics Brian P. Flannery EXXON Research and Engineering Company Saul A. Teukolsky Department of Physics, Cornell University William T. Vetterling Polaroid Corporation The right of the University of Cambridge to print and sell all manner of books was granted by Henry PHI in 1534. The University has printed and published continuously since 1584. CAMBRIDGE UNIVERSITY PRESS Cambridge New York Port Chester Melbourne Sydney v^vJ&T TQn'i . Published by the Press Syndicate of the University of Cambridge The Pitt Building, Trumpington Street, Cambridge CB2 IBP 40 West 20th Street, New York, NY 10011, USA 10 Stamford Road, Oakleigh, Melbourne 3166, Australia Copyright © Cambridge University Press 1986, 1989, except for computer programs and procedures, which are Copyright © Numerical Recipes Software 1986, 1989. All Rights Reserved. First published 1989 Printed in the United States of America Typeset in TjrX The computer programs in this book are available in several machine- readable formats. To purchase diskettes in IBM-compatible personal com¬ puter format, use the order form at the back of the book or write to Cambridge University Press, 110 Midland Avenue, Port Chester, NY 10573. Also avail¬ able from Cambridge University Press is the Numerical Recipes Example Book (Pascal), Revised Edition which provides demonstration programs that illustrate the use of each program in this book. This book, the Example Book, and the diskettes are also available in editions in the FORTRAN and C languages. Technical questions, corrections, and requests for information on other available formats and additional software products should be directed to Nu¬ merical Recipes Software, P.O. Box 243, Cambridge, MA 02238. Inquiries regarding OEM and site licenses should also be directed to this address. Library of Congress Cataloging-in-Publication Data Numerical recipes in Pascal. Bibliography: p. Includes index. 1. Pascal (Computer program language) I. Press, William H. QA76.73.P2N87 1989 005.13'3 89-15841 British Library Cataloguing in Publication Data Numerical recipes in Pascal. 1. Numerical analysis. Applications of computer systems I. Press, William H. 519.4 ISBN 0-521-37516-9 hard covers ISBN 0-521-37516-9 book ISBN 0-521-37532-0 Pascal diskette (IBM) ISBN 0-521-38766-3 Pascal diskette (Macintosh) ISBN 0-521-37675-0 Example book ISBN 0-521-37533-9 Example diskette (IBM) ISBN 0-521-38767-1 Example diskette (Macintosh) Contents Preface to the Pascal Edition xi Preface xiii List of Computer Programs xvii 1 PRELIMINARIES l 1.0 Introduction 1 1.1 Program Organization and Control Structures 4 1.2 Conventions for Scientific Computing in Pascal 14 1.3 Error, Accuracy, and Stability 23 2 SOLUTION OF LINEAR ALGEBRAIC EQUATIONS 27 2.0 Introduction 27 2.1 Gauss-Jordan Elimination 31 2.2 Gaussian Elimination with Backsubstitution 37 2.3 LU Decomposition 39 2.4 Inverse of a Matrix 46 2.5 Determinant of a Matrix 47 2.6 Tridiagonal Systems of Equations 48 2.7 Iterative Improvement of a Solution to Linear Equations 49 2.8 Vandermonde Matrices and Toeplitz Matrices 52 2.9 Singular Value Decomposition 61 2.10 Sparse Linear Systems 74 2.11 Is Matrix Inversion an N3 Process? 84 3 INTERPOLATION AND EXTRAPOLATION 87 3.0 Introduction 87 3.1 Polynomial Interpolation and Extrapolation 90 3.2 Rational Function Interpolation and Extrapolation 3.3 Cubic Spline Interpolation 97 3.4 How to Search an Ordered Table 101 3.5 Coefficients of the Interpolating Polynomial 104 3.6 Interpolation in Two or More Dimensions 107 4 INTEGRATION OF FUNCTIONS 116 4.0 Introduction 116 4.1 Classical Formulas for Equally-Spaced Abscissas 4.2 Elementary Algorithms 124 4.3 Romberg Integration 129 4.4 Improper Integrals 130 4.5 Gaussian Quadratures 138 4.6 Multidimensional Integrals 144 v vi Contents 5 EVALUATION OF FUNCTIONS 149 V. ‘ 5.0 Introduction 149 5.1 Series and Their Convergence 150 5.2 Evaluation of Continued Fractions 153 5.3 Polynomials and Rational Functions 155 5.4 Recurrence Relations and Clenshaw’s Recurrence Formula 159 5.5 Quadratic and Cubic Equations 163 5.6 Chebyshev Approximation 165 5.7 Derivatives or Integrals of a Chebyshev-approximated Function 170 5.8 Polynomial Approximation from Chebyshev Coefficients 172 6 SPECIAL FUNCTIONS 175 6.0 Introduction 175 6.1 Gamma Function, Beta Function, Factorials, Binomial Coefficients 176 6.2 Incomplete Gamma Function, Error Function, Chi-Square Probability Function, Cumulative Poisson Distribution 180 6.3 Incomplete Beta Function, Student’s Distribution, jF-Distribution, Cumulative Binomial Distribution 186 6.4 Bessel Functions of Integer Order 191 6.5 Modified Bessel Functions of Integer Order 197 6.6 Spherical Harmonics 202 6.7 Elliptic Integrals and Jacobian Elliptic Functions 205 7 RANDOM NUMBERS 212 7.0 Introduction 212 7.1 Uniform Deviates 213 7.2 Transformation Method: Exponential and Normal Deviates 222 7.3 Rejection Method: Gamma, Poisson, Binomial Deviates 226 7.4 Generation of Random Bits 233 7.5 The Data Encryption Standard 239 7.6 Monte Carlo Integration 249 8 SORTING 8.0 Introduction 254 8.1 Straight Insertion and Shell’s Method 255 8.2 Heapsort 258 8.3 Indexing and Ranking 261 8.4 Quicksort 264 8.5 Determination of Equivalence Classes 267 9 ROOT FINDING AND NONLINEAR SETS OF EQUATIONS 9.0 Introduction 270 9.1 Bracketing and Bisection 274 9.2 Secant Method and False Position Method 279

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.