Numerical Recipes C Code Free Download

Buy Numerical Recipes with Source Code CD-ROM 3rd Edition: The Art of Scientific Computing on Amazon.com FREE SHIPPING on qualified orders. In the past, the Numerical Recipes book was considered the gold standard reference for numerical algorithms. The earliest Fortran Edition was followed by editions in C and C and others, bringing it then more up-to-date. Through these, it provided reference code for the state-of-the-art algorithms of the day.

Search
Code Directory
ASP
ASP.NET
C/C++
CFML
CGI/PERL
Delphi
Development
Flash
HTML
Java
JavaScript
Pascal
PHP
Python
SQL
Tools
Visual Basic & VB.NET
XML
New Code
Spire.PDF for Java 2.7.8
Database Workbench Pro 5.6.10.0
The C# PDF Library 2020.1.5
CAD-Viewer 3DVBVIEW V4
dotConnect for SQLite 5.15
LuaStudio 9.92
EntityDAC 2.3
Devart ODBC Driver for QuickBooks 2.0
phpEnter 5.1.
Udemy Clone script 2.01
VisualNEO Web 19.11.7
VisualNEO for Windows 19.4.29.0
SentiVeillance SDK Trial 7.3
Devart ODBC Driver for PostgreSQL 3.2
SecureBridge 9.2
Top Code
phpEnter 5.1.
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Top Search
Code To Add Url
Photo Add Comment Php
Flat File Php Guestbook
Dirty Word
Guestbooks Aspnetindex
Gallery Comment
Html Guestbook Codes
Topics Of Mini Projects In Operating System In C
Guestbook Nuke
Wml To Xhtml
Mini Project In Operating System Concepts
Online Art Gallery Project Documentation
Delphi Rfid Source
How To Get Free Bling Credits On Fubar
Twitter Update Script Php
Related Search
Numerical Recipes On C
Numerical Recipes 3rd
Numerical Recipes In C
Numerical Recipes f90 Code
Numerical Recipes Fortran
Numerical Recipes Source Code
Numerical Recipes In C Source Code
Numerical Recipes Txt
Numerical Recipes In C Codes
Numerical Recipes C
Fortran Numerical Recipes
World Recipes
Recipes Module
Adding Recipes To Website
Numerical Computation Using C
Numerical Recipes

Code 1-20 of 60 Pages: Go to 1 23Next >> page

Numerical Recipes in C++: The Art of... - William H. Press (Editor), Saul A. Teukolsky (Editor), William T. Vetterling, Brian P. Flannery (Editor)

The product of a unique collaboration among four leading scientists in academic research and industry, [I]Numerical Recipes[/I] is a comprehensive text and reference work on scientific computing. Thoroughly self-contained, it proceeds from mathematical and theoretical considerations to actual, practical computer routines.

CRC64 - Calculate the cyclic... - gian paolo ciceri


The algorithm to compute the CRC is described in the ISO 3309 standard. The generator polynomial is x64 + x4 + x3 + x + 1.
Reference: W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, 'Numerical recipes in C', 2nd...

Generalized Nonlinear Non-analytic... - Nathaniel Brahms


fitChiSquare is a generalized chi-square fitting routine for any model function when data measurement errors are known; it returns the model parameters and their uncertainties at the delta chi-square = 1 boundary (68% confidence interval). It also...

Spearman Rank Correlation 1.0 - Alexandros Leontitsis


It calculates the Spearman rank correlation coefficient from 2 or more data sets, and the associated t-test and p-values. The code is adapted with major changes from the Numerical Recipes book (http://www.nr.com/)
Example:
>>...

Lomb normalized periodogram 1.0 - Christos Saragiotis


Both functions caculate the Lomb normalized periodogram (aka Lomb-Scargle, Gauss-Vanicek or Least-Squares spectrum) of a vector x with coordinates in t, which is essentially a generalization of the DFT for unevenly sampled data.
The...

Tools / Development Tools


This code fits makes a linear fit to a data set (using y =bx+a) where each data point
% has a different or constant standard deviation. Your data should have three or two columns.
% The first column should be the independent variable(x)...

Python / Multimedia


Rigid body 2-D image co-registration (translation and rotation) is performed using maximization of mutual information.
Function is implemented in c-code and compiled using the Matlab compiler to minimize computation time. Current...

Numerical Inversion of the Laplace... - Dieter Kadelka


This Recipe is a variant of recipe 576934: Numerical Inversion of the Laplace Transform using the Talbot method by Fernando Damian Nieuwveldt adapted to high precision mpmath

Numerical Inversion of the Laplace... - Fernando Nieuwveldt


This is a fast and highly accurate numerical method for the inversion of the Laplace transform

C/C++ / Development Tools


This is a templated library of numerical base classes which implement basic data structures like complex numbers, dynamic vectors, static vectors, different types of matrices like full matrices, band matrices, sparse matrices, etc. and also...

Numerical Methods for Physics 1.0 - Alejandro Garcia


Designed for physicists, this book covers a variety of numerical and analytical techniques used in physics that are applied to solving realistic problems.

Numerical Methods for Physics, 2e 1.0 - Alejandro Garcia


Designed for physicists, this book covers a variety of numerical and analytical techniques used in physics that are applied to solving realistic problems.
For a full book description and ordering information, please refer to...

Exact Numerical Simulation of the... - Daniel Charlebois


This code implements and plots the exact numerical solution of the Ornstein-Uhlenbeck process and its time integral. The numerical method here used was published by D.T. Gillespie in 1996 in the journal Physical Review E.
The...

Numerical Analysis and Graphic... - Shoichiro Nakamura


Written for courses in numerical methods, this text introduces the use of MATLAB in numerical analysis.

Tools / Development Tools


Gauss numerical integration of univariate funcitons by 7-point Gaussian quadrature. Very accuracy and fast.

Tools / Development Tools


Archive containing numerical function files.

PHP / Miscellaneous


This script allows users to browse recipes in categories. Users can rate recipes and leave comments. It includes a powerful control panel.

Numerical input, formatting,... - Slobodan Dmitrovic


Create numerical input edit box. Learn how to deal with currency, formatting , dates . Create 'Access like' fields. Move through controls using 'Enter, up down' and more... You want your users to move through controls in more natural way, using...

Python / Miscellaneous


Numerical Integration using random sampling.

Python / Miscellaneous


Numerical Integration using Monte Carlo method.

Fafsa
Home|Submit Code|Top Code Search|Last Code Search|Privacy Policy|Link to Us|Contact

Introduction to Numerical Recipes in C

R. Sureshkumar and Gregory J. McRae

Department of Chemical Engineering
Massachusetts Institute of Technology
Cambridge, MA 02139

Table of Contents

[ 10.001 Home Page | MIT Home Page ]

What are Numerical Recipes in C?

Numerical Recipes in C is a collection (or a library) of C functions written by Press et al. (1992) which can be used for standard numerical applications. These applications include solution of systems of linear equations, matrix manipulations, evaluation of functions, solution of non-linear algebraic equations, solution of differential and integral equations and statistical analysis. The book by Press et al. has a listing and a short description of each one of the C functions.

The motivation in using libraries such as Numerical Recipes in C is the following. As a result of modeling a process/system of our interest, we typically arrive at a mathematical description of the process or system. If we can break up the mathematical problem into a set of standard mathematical problems whose numerical solution can be obtained through the use of functions available in libraries, we can save the substantial time and effort which go into the coding and debugging. Typically, for standard applications, the scientific computing libraries are robust enough to allow for their use in design/research work.

This document describes how to find the Numerical Recipes in C routines on Athena, how to compile them, and then link them into your own codes for use in solving practical problems.

Return to the Table of Contents.

Where are the sources files on Athena?

The source files for Numerical Recipes in C are located in an Athena locker. The following sequence of commands show you how to:

  1. Attach the NRC recipes locker to your account
  2. Change directory to the source files for NRC
  3. List the contents of the directory
  4. Display the C code for the Gauss Jordan program

(Please note that the characters 'athena%' signifies the Athena prompt.)

A partial listing of the routines from the command ls * is As a specific example the file gaussj.c provides a C function for solving systems of linear algebra problems of the form A x = b using Gauss-Jordan reduction with pivoting. Further details of the use of the algorithm itself and a listing can be seen in Chapter 2, p. 36 of Press et al. (1992). The first few lines of the file obtained with more gaussj.c is: gaussj.cPress et al.more gaussj.c

Return to the Table of Contents.

How do we use Numerical Recipes in C on Athena?

In order to use a NRC function we need to write a driver program. A driver program is typically one in which we read the relevant data for the problems (in this case, matrix a, number of equations n, the number of right hand side vectors m, and the r.h.s. data for each right hand side in a matrix of dimension n*m), call the appropriate Numerical Recipes in C function (in this case gaussj) and do any post processing and printing of the results. In this case, the function gaussj can be called by reference, and if you refer to book, Press et al. (1992) you will find that after the call to the function, the matrix a has the inverse of the original (input) matrix and b contains the solution vectors.

Note: You may choose to get the source code and modify it, but the driver program route is more elegant, prone to less difficulties in debugging and more systematic, in my opinion. The next section of this document contains secveral examples of the use of driver programs.

Code

Return to the Table of Contents.

Sample Driver Programs for Numerical Recipies in C

This section of the document shows two examples of the use of Numerical Recipes in C functions called from user written driver programs. The web links for the examples are:

The first example shows how to use the gaussj.c program to solve a system of linear equations of the form A x = b. A test file gauss.dat is also available to test the program.

The second example use the function trapzd.c to compute integrals. This example also illustrates how to pass functions as arguements to other functions.

Code

Return to the Table of Contents.

How can we compile and run gauss_driver.c ?

We need to let the compiler know where the function gaussj can be found and how it can be linked. The UNIX consultants recommend the following, rather long, command.

Once the compilation is succesful, type a.out to run. Because of the length of the command to compile and link the program it is easier to copy the above command into a file, say compile_gauss_driver, and assign it an executable status (chmod +x filename).

The different options in the very long command are explained as follows. The character sequence 'machtype' is used to match the machine types, i.e., to identify the correct version of the Numerical Recipes in C library for the machine you are working on. If you simply type machtype at the athena prompt, it returns info on the machine type, for example:

In this particular case the command machtype indicated that the computer was a Sun machine i.e. 'sun4'.

The remaining flags are as folows:

  • -D to define a macro (in this case the directive is to use ANSI C.
  • -I where to look for include files in this case in the directory /mit/recipes/src/recipes_c-ansi/include.
  • -L where to look for libraries.
  • -l to link a library.
  • $* to get all the command line arguements.
  • |& pipes the warning messages through the grep command.
  • grep -v nrutil finds warnings referring to nrutil and deletes them.

The compiler tries to be helpful by pointing out that we are not usingmost of the lines in the nrutil programs, the grep suppresses these messages.

To avoid typing in the whole long command, use gcnr in /mit/10.001/Examples.

Return to the Table of Contents.

References

Numerical Recipes In C++ Download

Press, W.H., Teukolsky, S.A., Vetterling, W.T. and Flannerty, B.P. (1992), Numerical Recipes in C: The Art of Scientific Computing, (2nd Edition), Cambridge University Press, New York.

This book is a recommended text for 10.001. In addition to the C codes themselves the book contains a wealth of very practical information about how to use the algorithms and interpret the results. The book should be a part of your professional library if you are involved in numerical modeling of any sort.

Numerical Recipes Code Download

Return to the Table of Contents.

Restrictions

Users shall at all times protect the programs and all related technical information, data and materials supplied by licensor from transfer to non-Athena users. Users have the right to modify and enhance the program, however, any embedded portion of the Numerical Recipes software is subject to these restrictions.

Return to the Table of Contents.

[Table of Contents | 10.001 Home Page | MIT Home Page ]

This web page was generated on November 1, 1997 by Gregory J. McRae who can be contacted via mcrae@mit.edu. Copyright © 1997, Massachusetts Institute of Technology. All rights reserved.