Numerical Recipes in the recipes directory (all .c) (main book section numbers are in parentheses) ADDINT interpolate and add, used by {MGLIN} (19.6) AIRY Airy functions (6.7) AMEBSA simulated annealing in continuous spaces (10.9) AMOEBA minimize in N-dimensions by downhill simplex method (10.4) AMOTRY evaluate a trial point, used by {AMOEBA} (10.4) AMOTSA evaluate a trial point, used by {AMEBSA} (10.9) ANNEAL traveling salesman problem by simulated annealing (10.9) ANORM2 utility used by {MGFAS} (19.6) ARCMAK construct an arithmetic code (20.5) ARCODE encode or decode a character using arithmetic coding (20.5) ARCSUM add integer to byte string, used by {ARCODE} (20.5) ASOLVE used by {LINBCG} for preconditioner (2.7) ATIMES used by {LINBCG} for sparse multiplication (2.7) AVEVAR calculate mean and variance of a data set (14.2) BADLUK Friday the 13th when the moon is full (1.1) BALANC balance a nonsymmetric matrix (11.5) BANBKS band diagonal systems, backsubstitution (2.4) BANDEC band diagonal systems, decomposition (2.4) BANMUL multiply vector by band diagonal matrix (2.4) BCUCOF construct two-dimensional bicubic (3.6) BCUINT two-dimensional bicubic interpolation (3.6) BESCHB Chebyshev expansion used by {BESSJY} (6.7) BESSI modified Bessel function I of integer order (6.6) BESSI0 modified Bessel function I_0 (6.6) BESSI1 modified Bessel function I_1 (6.6) BESSIK modified Bessel functions of fractional order (6.7) BESSJ Bessel function J of general integer order (6.5) BESSJ0 Bessel function J_0 (6.5) BESSJ1 Bessel function J_1 (6.5) BESSJY Bessel functions of fractional order (6.7) BESSK modified Bessel function K of integer order (6.6) BESSK0 modified Bessel function K_0 (6.6) BESSK1 modified Bessel function K_1 (6.6) BESSY Bessel function Y of general integer order (6.5) BESSY0 Bessel function Y_0 (6.5) BESSY1 Bessel function Y_1 (6.5) BETA beta function (6.1) BETACF continued fraction used by {BETAI} (6.4) BETAI incomplete beta function (6.4) BICO binomial coefficients function (6.1) BKSUB backsubstitution, used by {SOLVDE} (17.3) BNLDEV binomial distributed random deviates (7.3) BRENT find minimum of a function by Brent's method (10.2) BROYDN secant method for systems of equations (9.7) BSSTEP integrate ODEs, Bulirsch-Stoer step (16.4) CALDAT calendar date from Julian day number (1.1) CHDER derivative of a function already Chebyshev fitted (5.9) CHEBEV Chebyshev polynomial evaluation (5.8) CHEBFT fit a Chebyshev polynomial to a function (5.8) CHEBPC polynomial coefficients from a Chebyshev fit (5.10) CHINT integrate a function already Chebyshev fitted (5.9) CHIXY used by {FITEXY} to calculate a chi^2 (15.3) CHOLDC Cholesky decomposition (2.9) CHOLSL Cholesky backsubstitution (2.9) CHSONE chi-square test for difference between data and model (14.3) CHSTWO chi-square test for difference between two data sets (14.3) CISI cosine and sine integrals Ci and Si (6.9) CNTAB1 contingency table analysis using chi-square (14.4) CNTAB2 contingency table analysis using entropy measure (14.4) COMPLEX utility routine provided for complex arithmetic CONVLV convolution or deconvolution of data using FFT (13.1) COPY utility used by {MGLIN}, {MGFAS} (19.6) CORREL correlation or autocorrelation of data using FFT (13.2) COSFT1 fast cosine transform with endpoints (12.3) COSFT2 ``staggered'' fast cosine transform (12.3) COVSRT rearrange covariance matrix, used by {LFIT} (15.4) CRANK replaces array elements by their rank (14.6) CYCLIC solution of cyclic tridiagonal systems (2.7) DAUB4 Daubechies 4-coefficient wavelet filter (13.10) DAWSON Dawson's integral (6.10) DBRENT find minimum of a function using derivative information (10.3) DDPOLY evaluate a polynomial and its derivatives (5.3) DECCHK decimal check digit calculation or verification (20.3) DERIVS sample derivatives routine for {STIFF} (16.6) DF1DIM alternative function used by {LINMIN} (10.6) DFPMIN minimize in N-dimensions by variable metric method (10.7) DFRIDR numerical derivative by Ridders' method (5.7) DFTCOR compute endpoint corrections for Fourier integrals (13.9) DFTINT high-accuracy Fourier integrals (13.9) DIFEQ spheroidal matrix coefficients, used by {SFROID} (17.4) DPYTHAG, DREALFT, DSPRSAX, DSPRSTX, DSVBKSB, DSVDCMP double precision versions of routines minus initial D ECLASS determine equivalence classes from list (8.6) ECLAZZ determine equivalence classes from procedure (8.6) EI exponential integral Ei (6.3) EIGSRT eigenvectors, sorts into order by eigenvalue (11.1) ELLE Legendre elliptic integral of the second kind (6.11) ELLF Legendre elliptic integral of the first kind (6.11) ELLPI Legendre elliptic integral of the third kind (6.11) ELMHES reduce a general matrix to Hessenberg form (11.5) ERFF error function (6.2) ERFFC complementary error function (6.2) ERFCC complementary error function, concise routine (6.2) EULSUM sum a series by Euler-van Wijngaarden algorithm (5.1) EVLMEM power spectral estimation from MEM coefficients (13.7) EXPDEV exponential random deviates (7.2) EXPINT exponential integral E_n (6.3) F1DIM function used by {LINMIN} (10.5) FACTLN logarithm of factorial function (6.1) FACTRL factorial function (6.1) FASPER power spectrum of unevenly sampled larger data sets (13.8) FDJAC finite-difference Jacobian, used by {NEWT} (9.7) FGAUSS fit a sum of Gaussians using {MRQMIN} (15.5) FILL0 utility used by {MGLIN} (19.6) FIT least-squares fit data to a straight line (15.2) FITEXY fit data to a straight line, errors in both x and y (15.3) FIXRTS reflect roots of a polynomial into unit circle (13.6) FLEG fit a Legendre polynomial using {LFIT} or {SVDFIT} (15.4) FLMOON calculate phases of the moon by date (1.0) FMIN norm of a vector function, used by {NEWT} (9.7) FOUR1 fast Fourier transform (FFT) in one dimension (12.2) FOUREW rewind and permute files, used by {FOURFS} (12.6) FOURFS FFT for huge data sets on external media (12.6) FOURN fast Fourier transform in multidimensions (12.4) FPOLY fit a polynomial using {LFIT} or {SVDFIT} (15.4) FRED2 solve linear Fredholm equations of the second kind (18.1) FREDEX example of solving a singular Fredholm equation (18.3) FREDIN interpolate solutions obtained with {fred2} (18.1) FRENEL Fresnel integrals S(x) and C(x) (6.9) FRPRMN minimize in N-dimensions by conjugate gradient (10.6) FTEST F-test for difference of variances (14.2) GAMDEV gamma-law distribution random deviates (7.3) GAMMLN logarithm of gamma function (6.1) GAMMP incomplete gamma function (6.2) GAMMQ complement of incomplete gamma function (6.2) GASDEV normally distributed random deviates (7.2) GAUCOF quadrature weights from orthogonal polynomials (4.5) GAUHER Gauss-Hermite weights and abscissas (4.5) GAUJAC Gauss-Jacobi weights and abscissas (4.5) GAULAG Gauss-Laguerre weights and abscissas (4.5) GAULEG Gauss-Legendre weights and abscissas (4.5) GAUSSJ Gauss-Jordan matrix inversion and linear equation solution (2.1) GCF continued fraction used by {GAMMP} and {GAMMQ} (6.2) GOLDEN find minimum of a function by golden section search (10.1) GSER series used by {GAMMP} and {GAMMQ} (6.2) HPSEL find M largest values, without altering an array (8.5) HPSORT sort an array by heapsort method (8.3) HQR eigenvalues of a Hessenberg matrix (11.6) HUFAPP append bits to a Huffman code, used by {HUFMAK} (20.4) HUFDEC use Huffman code to decode and decompress a character (20.4) HUFENC use Huffman code to encode and compress a character (20.4) HUFMAK construct a Huffman code (20.4) HUNT search a table when calls are correlated (3.4) HYPDRV complex hypergeometric function, derivative of (6.12) HYPGEO complex hypergeometric function (6.12) HYPSER complex hypergeometric function, series evaluation (6.12) ICRC cyclic redundancy checksum (20.3) ICRC1 cyclic redundancy checksum, used by {ICRC} (20.3) IGRAY Gray code and its inverse (20.2) IINDEXX integer array version of {INDEXX} (8.4) INDEXX construct an index for an array (8.4) INTERP bilinear prolongation, used by {MGLIN}, {MGFAS} (19.6) IRBIT1 random bit sequence (7.4) IRBIT2 random bit sequence (7.4) JACOBI eigenvalues and eigenvectors of a symmetric matrix (11.1) JACOBN sample Jacobian routine for {STIFF} (16.6) JULDAY Julian Day number from calendar date (1.1) KENDL1 correlation between two data sets, Kendall's tau (14.6) KENDL2 contingency table analysis using Kendall's tau (14.6) KERMOM sample routine for moments of a singular kernel (18.3) KS2D1S K-S test in two dimensions, data vs. model (14.7) KS2D2S K-S test in two dimensions, data vs. data (14.7) KSONE Kolmogorov-Smirnov test of data against model (14.3) KSTWO Kolmogorov-Smirnov test between two data sets (14.3) LAGUER find a root of a polynomial by Laguerre's method (9.5) LFIT general linear least-squares fit by normal equations (15.4) LINBCG biconjugate gradient solution of sparse systems (2.7) LINMIN minimum of a function along a ray in N-dimensions (10.5) LNSRCH search along a line, used by {NEWT} (9.7) LOCATE search an ordered table by bisection (3.4) LOP applies nonlinear operator, used by {MGFAS} (19.6) LUBKSB linear equation solution, backsubstitution (2.3) LUDCMP linear equation solution, LU decomposition (2.3) MACHAR diagnose computer's floating arithmetic (20.1) MALOC memory allocation utility used by {MGLIN}, {MGFAS} (19.6) MATADD utility used by {MGFAS} (19.6) MATSUB utility used by {MGFAS} (19.6) MEDFIT fit data to a straight line robustly, least absolute deviation (15.7) MEMCOF evaluate maximum entropy (MEM) coefficients (13.6) METROP Metropolis algorithm, used by {ANNEAL} (10.9) MGFAS nonlinear elliptic PDE solved by multigrid method (19.6) MGLIN linear elliptic PDE solved by multigrid method (19.6) MIDEXP integrate a function that decreases exponentially (4.4) MIDINF integrate a function on a semi-infinite interval (4.4) MIDPNT extended midpoint rule (4.4) MIDSQL integrate a function with lower square-root singularity (4.4) MIDSQU integrate a function with upper square-root singularity (4.4) MISER recursive multidimensional Monte Carlo integration (7.8) MMID integrate ODEs by modified midpoint method (16.3) MNBRAK bracket the minimum of a function (10.1) MNEWT Newton's method for systems of equations (9.6) MOMENT calculate moments of a data set (14.1) MP2DFR multiple precision conversion to decimal base (20.6) MPDIV multiple precision divide and remainder (20.6) MPINV multiple precision reciprocal (20.6) MPMUL multiple precision multiply, using FFT methods (20.6) MPOPS multiple precision arithmetic, simpler operations (20.6) MPPI multiple precision example, compute many digits of pi (20.6) MPROVE linear equation solution, iterative improvement (2.5) MPSQRT multiple precision square root (20.6) MRQCOF used by {MRQMIN} to evaluate coefficients (15.5) MRQMIN nonlinear least-squares fit, Marquardt's method (15.5) NEWT globally convergent multi-dimensional Newton's method (9.7) NRUTIL file containing utility routines for memory allocation, etc. ODEINT integrate ODEs with accuracy monitoring (16.2) ORTHOG construct nonclassical orthogonal polynomials (4.5) PADE Pade approximant from power series coefficients (5.12) PCCHEB inverse of {CHEBPC}; use to economize power series (5.11) PCSHFT polynomial coefficients of a shifted polynomial (5.10) PEARSN Pearson's correlation between two data sets (14.5) PERIOD power spectrum of unevenly sampled data (13.8) PIKSR2 sort two arrays by straight insertion (8.1) PIKSRT sort an array by straight insertion (8.1) PINVS diagonalize a sub-block, used by {SOLVDE} (17.3) PLGNDR Legendre polynomials, associated (spherical harmonics) (6.8) POIDEV Poisson distributed random deviates (7.3) POLCOE polynomial coefficients from table of values (3.5) POLCOF polynomial coefficients from table of values (3.5) POLDIV divide one polynomial by another (5.3) POLIN2 two-dimensional polynomial interpolation (3.6) POLINT polynomial interpolation (3.1) POWELL minimize in N-dimensions by Powell's method (10.5) PREDIC linear prediction using MEM coefficients (13.6) PROBKS Kolmogorov-Smirnov probability function (14.3) PSDES pseudo-DES hashing of 64 bits (7.5) PWT partial wavelet transform (13.10) PWTSET initialize coefficients for {PWT} (13.10) PYTHAG calculate (a^2+b^2)^{1/2} without overflow (2.6) PZEXTR polynomial extrapolation, used by {BSSTEP} (16.4) QGAUS integrate a function by Gaussian quadratures (4.5) QRDCMP QR decomposition (2.10) QROMB integrate using Romberg adaptive method (4.3) QROMO integrate using open Romberg adaptive method (4.4) QROOT complex or double root of a polynomial, Bairstow (9.5) QRSOLV QR backsubstitution (2.10) QRUPDT update a QR decomposition (2.10) QSIMP integrate using Simpson's rule (4.2) QTRAP integrate using trapezoidal rule (4.2) QUAD3D integrate a function over a three-dimensional space (4.6) QUADCT count points by quadrants, used by {ks2d1s} (14.7) QUADMX sample routine for a quadrature matrix (18.3) QUADVL quadrant probabilities, used by {ks2d1s} (14.7) RAN0 random deviate by Park and Miller minimal standard (7.1) RAN1 random deviate, minimal standard plus shuffle (7.1) RAN2 random deviate by L'Ecuyer long period plus shuffle (7.1) RAN3 random deviate by Knuth subtractive method (7.1) RAN4 random deviates from DES-like hashing (7.5) RANK construct a rank table for an array (8.4) RANPT get random point, used by {MISER} (7.8) RATINT rational function interpolation (3.2) RATLSQ rational fit by least-squares method (5.13) RATVAL evaluate a rational function (5.3) RC Carlson's degenerate elliptic integral (6.11) RD Carlson's elliptic integral of the second kind (6.11) REALFT fast Fourier transform of a single real function (12.3) REBIN sample rebinning used by {VEGAS} (7.8) RED reduce columns of a matrix, used by {SOLVDE} (17.3) RELAX Gauss-Seidel relaxation, used by {MGLIN} (19.6) RELAX2 Gauss-Seidel relaxation, used by {MGFAS} (19.6) RESID calculate residual, used by {MGLIN} (19.6) REVCST cost of a reversal, used by {ANNEAL} (10.9) REVERSE do a reversal, used by {ANNEAL} (10.9) RF Carlson's elliptic integral of the first kind (6.11) RJ Carlson's elliptic integral of the third kind (6.11) RK4 integrate one step of ODEs, fourth-order Runge-Kutta (16.1) RKCK Cash-Karp-Runge-Kutta step used by {RKQS} (16.2) RKDUMB integrate ODEs by fourth-order Runge-Kutta (16.1) RKQS integrate one step of ODEs with accuracy monitoring (16.2) RLFT3 FFT of real data in two or three dimensions (12.5) ROFUNC fit data robustly, used by {MEDFIT} (15.7) ROTATE Jacobi rotation used by {QRUPDT} (2.10) RSOLV right triangular backsubstitution (2.10) RSTRCT half-weighting restriction, used by {MGLIN}, {MGFAS} (19.6) RTBIS find root of a function by bisection (9.1) RTFLSP find root of a function by false-position (9.2) RTNEWT find root of a function by Newton-Raphson (9.4) RTSAFE find root of a function by Newton-Raphson and bisection (9.4) RTSEC find root of a function by secant method (9.2) RZEXTR rational function extrapolation, used by {BSSTEP} (16.4) SAVGOL Savitzky-Golay smoothing coefficients (14.8) SCRSHO graph a function to search for roots (9.0) SELECT find the Nth largest in an array (8.5) SELIP find the Nth largest, without altering an array (8.5) SFROID spheroidal functions by method of {SOLVDE} (17.4) SHELL sort an array by Shell's method (8.1) SHOOT solve two point boundary value problem by shooting (17.1) SHOOTF ditto, by shooting to a fitting point (17.2) SIMP1 linear programming, used by {SIMPLX} (10.8) SIMP2 linear programming, used by {SIMPLX} (10.8) SIMP3 linear programming, used by {SIMPLX} (10.8) SIMPLX linear programming maximization of a linear function (10.8) SIMPR integrate stiff ODEs by semi-implicit midpoint rule (16.6) SINFT fast sine transform (12.3) SLVSM2 solve on coarsest grid, used by {MGFAS} (19.6) SLVSML solve on coarsest grid, used by {MGLIN} (19.6) SNCNDN Jacobian elliptic functions (6.11) SNRM used by {LINBCG} for vector norm (2.7) SOBSEQ Sobol's quasi-random sequence (7.7) SOLVDE two point boundary value problem, solve by relaxation (17.3) SOR elliptic PDE solved by successive overrelaxation method (19.5) SORT sort an array by quicksort method (8.2) SORT2 sort two arrays by quicksort method (8.2) SORT3 sort, use an index to sort 3 or more arrays (8.4) SPCTRM power spectrum estimation using FFT (13.4) SPEAR Spearman's rank correlation between two data sets (14.6) SPHBES spherical Bessel functions j_n and y_n (6.7) SPHFPT spheroidal functions by method of {SHOOTF} (17.4) SPHOOT spheroidal functions by method of {SHOOT} (17.4) SPLIE2 construct two-dimensional spline (3.6) SPLIN2 two-dimensional spline interpolation (3.6) SPLINE construct a cubic spline (3.3) SPLINT cubic spline interpolation (3.3) SPREAD extirpolate value into array, used by {FASPER} (13.8) SPRSAX product of sparse matrix and vector (2.7) SPRSIN convert matrix to sparse format (2.7) SPRSPM pattern multiply two sparse matrices (2.7) SPRSTM threshold multiply two sparse matrices (2.7) SPRSTP transpose of sparse matix (2.7) SPRSTX product of transpose sparse matrix and vector (2.7) STIFBS integrate stiff ODEs, Bulirsch-Stoer step (16.6) STIFF integrate stiff ODEs by fourth-order Rosenbrock (16.6) STOERM integrate conservative second-order ODEs (16.5) SVBKSB singular value backsubstitution (2.6) SVDCMP singular value decomposition of a matrix (2.6) SVDFIT linear least-squares fit by singular value decomposition (15.4) SVDVAR variances from singular value decomposition (15.4) TOEPLZ solve Toeplitz systems (2.8) TPTEST Student's t-test for means, case of paired data (14.2) TQLI eigensolution of a symmetric tridiagonal matrix (11.3) TRAPZD trapezoidal rule (4.2) TRED2 Householder reduction of a real, symmetric matrix (11.2) TRIDAG solution of tridiagonal systems (2.4) TRNCST cost of a transposition, used by {ANNEAL} (10.9) TRNSPT do a transposition, used by {ANNEAL} (10.9) TTEST Student's t-test for difference of means (14.2) TUTEST Student's t-test for means, case of unequal variances (14.2) TWOFFT fast Fourier transform of two real functions (12.3) VANDER solve Vandermonde systems (2.8) VEGAS adaptive multidimensional Monte Carlo integration (7.8) VOLTRA linear Volterra equations of the second kind (18.2) WT1 one-dimensional discrete wavelet transform (13.10) WTN multidimensional discrete wavelet transform (13.10) WWGHTS quadrature weights for an arbitrarily singular kernel (18.3) ZBRAC outward search for brackets on roots (9.1) ZBRAK inward search for brackets on roots (9.1) ZBRENT find root of a function by Brent's method (9.3) ZRHQR roots of a polynomial by eigenvalue methods (9.5) ZRIDDR find root of a function by Ridders' method (9.2) ZROOTS roots of a polynomial by Laguerre's method with deflation (9.5)