RECIPES(LOCAL) NAME _N_u_m_e_r_i_c_a_l _R_e_c_i_p_e_s SYNOPSIS librecipes_f.a - Numerical recipes in Fortran librecipes_c.a - Numerical recipes in C (ANSI version) librecipes_ckr.a - Numerical recipes in C (K&R version) DESCRIPTION The _N_u_m_e_r_i_c_a_l _R_e_c_i_p_e_s is a collection of numerical routines which are useful for many scientific and engineering applications. Ver- sions exist for both the C and Fortran languages. The book _N_u_m_e_r_- _i_c_a_l _R_e_c_i_p_e_s will tell you everything you want to know. The routines are called from the user's program. At compilation, the "-lrecipes_f" or "-lrecipes_c -lm" or "-lrecipes_ckr -lm" option is added. Thus a program _m_y_p_r_o_g._f, which contains calls to the recipes, is compiled with: _f_7_7 _m_y_p_r_o_g._f -_l_r_e_c_i_p_e_s__f Note that the C compiler does not automatically include the math library the way the Fortran compiler does, so -lm is often required. FILES /usr/local/lib/librecipes_f.a /usr/local/lib/librecipes_c.a /usr/local/lib/librecipes_ckr.a /usr/local/src/recipes /usr/local/src/recipes/recipes_f /usr/local/src/recipes/recipes_c-ansi /usr/local/src/recipes/recipes_c-kr The directories /usr/local/src and /usr/local/lib are generic examples. The actual locations may vary on your system. RECIPES Numerical Recipes in the recipes directory (all .c) (main book section numbers are in parentheses) _A_D_D_I_N_T interpolate and add, used by _M_G_L_I_N (19.6) _A_I_R_Y Airy functions (6.7) _A_M_E_B_S_A simulated annealing in continuous spaces (10.9) _A_M_O_E_B_A minimize in N-dimensions by downhill simplex method (10.4) _A_M_O_T_R_Y evaluate a trial point, used by _A_M_O_E_B_A (10.4) _A_M_O_T_S_A evaluate a trial point, used by _A_M_E_B_S_A (10.9) _A_N_N_E_A_L traveling salesman problem by simulated annealing (10.9) 1 RECIPES(LOCAL) _A_N_O_R_M_2 utility used by _M_G_F_A_S (19.6) _A_R_C_M_A_K construct an arithmetic code (20.5) _A_R_C_O_D_E encode or decode a character using arithmetic coding (20.5) _A_R_C_S_U_M add integer to byte string, used by _A_R_C_O_D_E (20.5) _A_S_O_L_V_E used by _L_I_N_B_C_G for preconditioner (2.7) _A_T_I_M_E_S used by _L_I_N_B_C_G for sparse multiplication (2.7) _A_V_E_V_A_R calculate mean and variance of a data set (14.2) _B_A_D_L_U_K Friday the 13th when the moon is full (1.1) _B_A_L_A_N_C balance a nonsymmetric matrix (11.5) _B_A_N_B_K_S band diagonal systems, backsubstitution (2.4) _B_A_N_D_E_C band diagonal systems, decomposition (2.4) _B_A_N_M_U_L multiply vector by band diagonal matrix (2.4) _B_C_U_C_O_F construct two-dimensional bicubic (3.6) _B_C_U_I_N_T two-dimensional bicubic interpolation (3.6) _B_E_S_C_H_B Chebyshev expansion used by _B_E_S_S_J_Y (6.7) _B_E_S_S_I modified Bessel function I of integer order (6.6) _B_E_S_S_I_0 modified Bessel function I_0 (6.6) _B_E_S_S_I_1 modified Bessel function I_1 (6.6) _B_E_S_S_I_K modified Bessel functions of fractional order (6.7) _B_E_S_S_J Bessel function J of general integer order (6.5) _B_E_S_S_J_0 Bessel function J_0 (6.5) _B_E_S_S_J_1 Bessel function J_1 (6.5) _B_E_S_S_J_Y Bessel functions of fractional order (6.7) _B_E_S_S_K modified Bessel function K of integer order (6.6) _B_E_S_S_K_0 modified Bessel function K_0 (6.6) _B_E_S_S_K_1 modified Bessel function K_1 (6.6) _B_E_S_S_Y Bessel function Y of general integer order (6.5) 2 RECIPES(LOCAL) _B_E_S_S_Y_0 Bessel function Y_0 (6.5) _B_E_S_S_Y_1 Bessel function Y_1 (6.5) _B_E_T_A beta function (6.1) _B_E_T_A_C_F continued fraction used by _B_E_T_A_I (6.4) _B_E_T_A_I incomplete beta function (6.4) _B_I_C_O binomial coefficients function (6.1) _B_K_S_U_B backsubstitution, used by _S_O_L_V_D_E (17.3) _B_N_L_D_E_V binomial distributed random deviates (7.3) _B_R_E_N_T find minimum of a function by Brent's method (10.2) _B_R_O_Y_D_N secant method for systems of equations (9.7) _B_S_S_T_E_P integrate ODEs, Bulirsch-Stoer step (16.4) _C_A_L_D_A_T calendar date from Julian day number (1.1) _C_H_D_E_R derivative of a function already Chebyshev fitted (5.9) _C_H_E_B_E_V Chebyshev polynomial evaluation (5.8) _C_H_E_B_F_T fit a Chebyshev polynomial to a function (5.8) _C_H_E_B_P_C polynomial coefficients from a Chebyshev fit (5.10) _C_H_I_N_T integrate a function already Chebyshev fitted (5.9) _C_H_I_X_Y used by _F_I_T_E_X_Y to calculate a chi^2 (15.3) _C_H_O_L_D_C Cholesky decomposition (2.9) _C_H_O_L_S_L Cholesky backsubstitution (2.9) _C_H_S_O_N_E chi-square test for difference between data and model (14.3) _C_H_S_T_W_O chi-square test for difference between two data sets (14.3) _C_I_S_I cosine and sine integrals Ci and Si (6.9) _C_N_T_A_B_1 contingency table analysis using chi-square (14.4) _C_N_T_A_B_2 contingency table analysis using entropy measure (14.4) _C_O_M_P_L_E_X utility routine provided for complex arithmetic 3 RECIPES(LOCAL) _C_O_N_V_L_V convolution or deconvolution of data using FFT (13.1) _C_O_P_Y utility used by _M_G_L_I_N, _M_G_F_A_S (19.6) _C_O_R_R_E_L correlation or autocorrelation of data using FFT (13.2) _C_O_S_F_T_1 fast cosine transform with endpoints (12.3) _C_O_S_F_T_2 ``staggered'' fast cosine transform (12.3) _C_O_V_S_R_T rearrange covariance matrix, used by _L_F_I_T (15.4) _C_R_A_N_K replaces array elements by their rank (14.6) _C_Y_C_L_I_C solution of cyclic tridiagonal systems (2.7) _D_A_U_B_4 Daubechies 4-coefficient wavelet filter (13.10) _D_A_W_S_O_N Dawson's integral (6.10) _D_B_R_E_N_T find minimum of a function using derivative information (10.3) _D_D_P_O_L_Y evaluate a polynomial and its derivatives (5.3) _D_E_C_C_H_K decimal check digit calculation or verification (20.3) _D_E_R_I_V_S sample derivatives routine for _S_T_I_F_F (16.6) _D_F_1_D_I_M alternative function used by _L_I_N_M_I_N (10.6) _D_F_P_M_I_N minimize in N-dimensions by variable metric method (10.7) _D_F_R_I_D_R numerical derivative by Ridders' method (5.7) _D_F_T_C_O_R compute endpoint corrections for Fourier integrals (13.9) _D_F_T_I_N_T high-accuracy Fourier integrals (13.9) _D_I_F_E_Q spheroidal matrix coefficients, used by _S_F_R_O_I_D (17.4) _D_P_Y_T_H_A_G, _D_R_E_A_L_F_T, _D_S_P_R_S_A_X, _D_S_P_R_S_T_X, _D_S_V_B_K_S_B, _D_S_V_D_C_M_P double precision versions of routines minus initial D _E_C_L_A_S_S determine equivalence classes from list (8.6) _E_C_L_A_Z_Z determine equivalence classes from procedure (8.6) _E_I exponential integral Ei (6.3) _E_I_G_S_R_T eigenvectors, sorts into order by eigenvalue (11.1) _E_L_L_E Legendre elliptic integral of the second kind (6.11) 4 RECIPES(LOCAL) _E_L_L_F Legendre elliptic integral of the first kind (6.11) _E_L_L_P_I Legendre elliptic integral of the third kind (6.11) _E_L_M_H_E_S reduce a general matrix to Hessenberg form (11.5) _E_R_F_F error function (6.2) _E_R_F_F_C complementary error function (6.2) _E_R_F_C_C complementary error function, concise routine (6.2) _E_U_L_S_U_M sum a series by Euler-van Wijngaarden algorithm (5.1) _E_V_L_M_E_M power spectral estimation from MEM coefficients (13.7) _E_X_P_D_E_V exponential random deviates (7.2) _E_X_P_I_N_T exponential integral E_n (6.3) _F_1_D_I_M function used by _L_I_N_M_I_N (10.5) _F_A_C_T_L_N logarithm of factorial function (6.1) _F_A_C_T_R_L factorial function (6.1) _F_A_S_P_E_R power spectrum of unevenly sampled larger data sets (13.8) _F_D_J_A_C finite-difference Jacobian, used by _N_E_W_T (9.7) _F_G_A_U_S_S fit a sum of Gaussians using _M_R_Q_M_I_N (15.5) _F_I_L_L_0 utility used by _M_G_L_I_N (19.6) _F_I_T least-squares fit data to a straight line (15.2) _F_I_T_E_X_Y fit data to a straight line, errors in both x and y (15.3) _F_I_X_R_T_S reflect roots of a polynomial into unit circle (13.6) _F_L_E_G fit a Legendre polynomial using _L_F_I_T or _S_V_D_F_I_T (15.4) _F_L_M_O_O_N calculate phases of the moon by date (1.0) _F_M_I_N norm of a vector function, used by _N_E_W_T (9.7) _F_O_U_R_1 fast Fourier transform (FFT) in one dimension (12.2) _F_O_U_R_E_W rewind and permute files, used by _F_O_U_R_F_S (12.6) _F_O_U_R_F_S FFT for huge data sets on external media (12.6) 5 RECIPES(LOCAL) _F_O_U_R_N fast Fourier transform in multidimensions (12.4) _F_P_O_L_Y fit a polynomial using _L_F_I_T or _S_V_D_F_I_T (15.4) _F_R_E_D_2 solve linear Fredholm equations of the second kind (18.1) _F_R_E_D_E_X example of solving a singular Fredholm equation (18.3) _F_R_E_D_I_N interpolate solutions obtained with _f_r_e_d_2 (18.1) _F_R_E_N_E_L Fresnel integrals S(x) and C(x) (6.9) _F_R_P_R_M_N minimize in N-dimensions by conjugate gradient (10.6) _F_T_E_S_T F-test for difference of variances (14.2) _G_A_M_D_E_V gamma-law distribution random deviates (7.3) _G_A_M_M_L_N logarithm of gamma function (6.1) _G_A_M_M_P incomplete gamma function (6.2) _G_A_M_M_Q complement of incomplete gamma function (6.2) _G_A_S_D_E_V normally distributed random deviates (7.2) _G_A_U_C_O_F quadrature weights from orthogonal polynomials (4.5) _G_A_U_H_E_R Gauss-Hermite weights and abscissas (4.5) _G_A_U_J_A_C Gauss-Jacobi weights and abscissas (4.5) _G_A_U_L_A_G Gauss-Laguerre weights and abscissas (4.5) _G_A_U_L_E_G Gauss-Legendre weights and abscissas (4.5) _G_A_U_S_S_J Gauss-Jordan matrix inversion and linear equation solu- tion (2.1) _G_C_F continued fraction used by _G_A_M_M_P and _G_A_M_M_Q (6.2) _G_O_L_D_E_N find minimum of a function by golden section search (10.1) _G_S_E_R series used by _G_A_M_M_P and _G_A_M_M_Q (6.2) _H_P_S_E_L find M largest values, without altering an array (8.5) _H_P_S_O_R_T sort an array by heapsort method (8.3) _H_Q_R eigenvalues of a Hessenberg matrix (11.6) _H_U_F_A_P_P append bits to a Huffman code, used by _H_U_F_M_A_K (20.4) 6 RECIPES(LOCAL) _H_U_F_D_E_C use Huffman code to decode and decompress a character (20.4) _H_U_F_E_N_C use Huffman code to encode and compress a character (20.4) _H_U_F_M_A_K construct a Huffman code (20.4) _H_U_N_T search a table when calls are correlated (3.4) _H_Y_P_D_R_V complex hypergeometric function, derivative of (6.12) _H_Y_P_G_E_O complex hypergeometric function (6.12) _H_Y_P_S_E_R complex hypergeometric function, series evaluation (6.12) _I_C_R_C cyclic redundancy checksum (20.3) _I_C_R_C_1 cyclic redundancy checksum, used by _I_C_R_C (20.3) _I_G_R_A_Y Gray code and its inverse (20.2) _I_I_N_D_E_X_X integer array version of _I_N_D_E_X_X (8.4) _I_N_D_E_X_X construct an index for an array (8.4) _I_N_T_E_R_P bilinear prolongation, used by _M_G_L_I_N, _M_G_F_A_S (19.6) _I_R_B_I_T_1 random bit sequence (7.4) _I_R_B_I_T_2 random bit sequence (7.4) _J_A_C_O_B_I eigenvalues and eigenvectors of a symmetric matrix (11.1) _J_A_C_O_B_N sample Jacobian routine for _S_T_I_F_F (16.6) _J_U_L_D_A_Y Julian Day number from calendar date (1.1) _K_E_N_D_L_1 correlation between two data sets, Kendall's tau (14.6) _K_E_N_D_L_2 contingency table analysis using Kendall's tau (14.6) _K_E_R_M_O_M sample routine for moments of a singular kernel (18.3) _K_S_2_D_1_S K-S test in two dimensions, data vs. model (14.7) _K_S_2_D_2_S K-S test in two dimensions, data vs. data (14.7) _K_S_O_N_E Kolmogorov-Smirnov test of data against model (14.3) _K_S_T_W_O Kolmogorov-Smirnov test between two data sets (14.3) _L_A_G_U_E_R find a root of a polynomial by Laguerre's method (9.5) 7 RECIPES(LOCAL) _L_F_I_T general linear least-squares fit by normal equations (15.4) _L_I_N_B_C_G biconjugate gradient solution of sparse systems (2.7) _L_I_N_M_I_N minimum of a function along a ray in N-dimensions (10.5) _L_N_S_R_C_H search along a line, used by _N_E_W_T (9.7) _L_O_C_A_T_E search an ordered table by bisection (3.4) _L_O_P applies nonlinear operator, used by _M_G_F_A_S (19.6) _L_U_B_K_S_B linear equation solution, backsubstitution (2.3) _L_U_D_C_M_P linear equation solution, LU decomposition (2.3) _M_A_C_H_A_R diagnose computer's floating arithmetic (20.1) _M_A_L_O_C memory allocation utility used by _M_G_L_I_N, _M_G_F_A_S (19.6) _M_A_T_A_D_D utility used by _M_G_F_A_S (19.6) _M_A_T_S_U_B utility used by _M_G_F_A_S (19.6) _M_E_D_F_I_T fit data to a straight line robustly, least absolute deviation (15.7) _M_E_M_C_O_F evaluate maximum entropy (MEM) coefficients (13.6) _M_E_T_R_O_P Metropolis algorithm, used by _A_N_N_E_A_L (10.9) _M_G_F_A_S nonlinear elliptic PDE solved by multigrid method (19.6) _M_G_L_I_N linear elliptic PDE solved by multigrid method (19.6) _M_I_D_E_X_P integrate a function that decreases exponentially (4.4) _M_I_D_I_N_F integrate a function on a semi-infinite interval (4.4) _M_I_D_P_N_T extended midpoint rule (4.4) _M_I_D_S_Q_L integrate a function with lower square-root singularity (4.4) _M_I_D_S_Q_U integrate a function with upper square-root singularity (4.4) _M_I_S_E_R recursive multidimensional Monte Carlo integration (7.8) _M_M_I_D integrate ODEs by modified midpoint method (16.3) _M_N_B_R_A_K bracket the minimum of a function (10.1) 8 RECIPES(LOCAL) _M_N_E_W_T Newton's method for systems of equations (9.6) _M_O_M_E_N_T calculate moments of a data set (14.1) _M_P_2_D_F_R multiple precision conversion to decimal base (20.6) _M_P_D_I_V multiple precision divide and remainder (20.6) _M_P_I_N_V multiple precision reciprocal (20.6) _M_P_M_U_L multiple precision multiply, using FFT methods (20.6) _M_P_O_P_S multiple precision arithmetic, simpler operations (20.6) _M_P_P_I multiple precision example, compute many digits of pi (20.6) _M_P_R_O_V_E linear equation solution, iterative improvement (2.5) _M_P_S_Q_R_T multiple precision square root (20.6) _M_R_Q_C_O_F used by _M_R_Q_M_I_N to evaluate coefficients (15.5) _M_R_Q_M_I_N nonlinear least-squares fit, Marquardt's method (15.5) _N_E_W_T globally convergent multi-dimensional Newton's method (9.7) _N_R_U_T_I_L file containing utility routines for memory allocation, etc. _O_D_E_I_N_T integrate ODEs with accuracy monitoring (16.2) _O_R_T_H_O_G construct nonclassical orthogonal polynomials (4.5) _P_A_D_E Pade approximant from power series coefficients (5.12) _P_C_C_H_E_B inverse of _C_H_E_B_P_C; use to economize power series (5.11) _P_C_S_H_F_T polynomial coefficients of a shifted polynomial (5.10) _P_E_A_R_S_N Pearson's correlation between two data sets (14.5) _P_E_R_I_O_D power spectrum of unevenly sampled data (13.8) _P_I_K_S_R_2 sort two arrays by straight insertion (8.1) _P_I_K_S_R_T sort an array by straight insertion (8.1) _P_I_N_V_S diagonalize a sub-block, used by _S_O_L_V_D_E (17.3) _P_L_G_N_D_R Legendre polynomials, associated (spherical harmonics) (6.8) 9 RECIPES(LOCAL) _P_O_I_D_E_V Poisson distributed random deviates (7.3) _P_O_L_C_O_E polynomial coefficients from table of values (3.5) _P_O_L_C_O_F polynomial coefficients from table of values (3.5) _P_O_L_D_I_V divide one polynomial by another (5.3) _P_O_L_I_N_2 two-dimensional polynomial interpolation (3.6) _P_O_L_I_N_T polynomial interpolation (3.1) _P_O_W_E_L_L minimize in N-dimensions by Powell's method (10.5) _P_R_E_D_I_C linear prediction using MEM coefficients (13.6) _P_R_O_B_K_S Kolmogorov-Smirnov probability function (14.3) _P_S_D_E_S pseudo-DES hashing of 64 bits (7.5) _P_W_T partial wavelet transform (13.10) _P_W_T_S_E_T initialize coefficients for _P_W_T (13.10) _P_Y_T_H_A_G calculate (a^2+b^2)^1/2 without overflow (2.6) _P_Z_E_X_T_R polynomial extrapolation, used by _B_S_S_T_E_P (16.4) _Q_G_A_U_S integrate a function by Gaussian quadratures (4.5) _Q_R_D_C_M_P QR decomposition (2.10) _Q_R_O_M_B integrate using Romberg adaptive method (4.3) _Q_R_O_M_O integrate using open Romberg adaptive method (4.4) _Q_R_O_O_T complex or double root of a polynomial, Bairstow (9.5) _Q_R_S_O_L_V QR backsubstitution (2.10) _Q_R_U_P_D_T update a QR decomposition (2.10) _Q_S_I_M_P integrate using Simpson's rule (4.2) _Q_T_R_A_P integrate using trapezoidal rule (4.2) _Q_U_A_D_3_D integrate a function over a three-dimensional space (4.6) _Q_U_A_D_C_T count points by quadrants, used by _k_s_2_d_1_s (14.7) _Q_U_A_D_M_X sample routine for a quadrature matrix (18.3) _Q_U_A_D_V_L quadrant probabilities, used by _k_s_2_d_1_s (14.7) 10 RECIPES(LOCAL) _R_A_N_0 random deviate by Park and Miller minimal standard (7.1) _R_A_N_1 random deviate, minimal standard plus shuffle (7.1) _R_A_N_2 random deviate by L'Ecuyer long period plus shuffle (7.1) _R_A_N_3 random deviate by Knuth subtractive method (7.1) _R_A_N_4 random deviates from DES-like hashing (7.5) _R_A_N_K construct a rank table for an array (8.4) _R_A_N_P_T get random point, used by _M_I_S_E_R (7.8) _R_A_T_I_N_T rational function interpolation (3.2) _R_A_T_L_S_Q rational fit by least-squares method (5.13) _R_A_T_V_A_L evaluate a rational function (5.3) _R_C Carlson's degenerate elliptic integral (6.11) _R_D Carlson's elliptic integral of the second kind (6.11) _R_E_A_L_F_T fast Fourier transform of a single real function (12.3) _R_E_B_I_N sample rebinning used by _V_E_G_A_S (7.8) _R_E_D reduce columns of a matrix, used by _S_O_L_V_D_E (17.3) _R_E_L_A_X Gauss-Seidel relaxation, used by _M_G_L_I_N (19.6) _R_E_L_A_X_2 Gauss-Seidel relaxation, used by _M_G_F_A_S (19.6) _R_E_S_I_D calculate residual, used by _M_G_L_I_N (19.6) _R_E_V_C_S_T cost of a reversal, used by _A_N_N_E_A_L (10.9) _R_E_V_E_R_S_E do a reversal, used by _A_N_N_E_A_L (10.9) _R_F Carlson's elliptic integral of the first kind (6.11) _R_J Carlson's elliptic integral of the third kind (6.11) _R_K_4 integrate one step of ODEs, fourth-order Runge-Kutta (16.1) _R_K_C_K Cash-Karp-Runge-Kutta step used by _R_K_Q_S (16.2) _R_K_D_U_M_B integrate ODEs by fourth-order Runge-Kutta (16.1) _R_K_Q_S integrate one step of ODEs with accuracy monitoring (16.2) 11 RECIPES(LOCAL) _R_L_F_T_3 FFT of real data in two or three dimensions (12.5) _R_O_F_U_N_C fit data robustly, used by _M_E_D_F_I_T (15.7) _R_O_T_A_T_E Jacobi rotation used by _Q_R_U_P_D_T (2.10) _R_S_O_L_V right triangular backsubstitution (2.10) _R_S_T_R_C_T half-weighting restriction, used by _M_G_L_I_N, _M_G_F_A_S (19.6) _R_T_B_I_S find root of a function by bisection (9.1) _R_T_F_L_S_P find root of a function by false-position (9.2) _R_T_N_E_W_T find root of a function by Newton-Raphson (9.4) _R_T_S_A_F_E find root of a function by Newton-Raphson and bisection (9.4) _R_T_S_E_C find root of a function by secant method (9.2) _R_Z_E_X_T_R rational function extrapolation, used by _B_S_S_T_E_P (16.4) _S_A_V_G_O_L Savitzky-Golay smoothing coefficients (14.8) _S_C_R_S_H_O graph a function to search for roots (9.0) _S_E_L_E_C_T find the Nth largest in an array (8.5) _S_E_L_I_P find the Nth largest, without altering an array (8.5) _S_F_R_O_I_D spheroidal functions by method of _S_O_L_V_D_E (17.4) _S_H_E_L_L sort an array by Shell's method (8.1) _S_H_O_O_T solve two point boundary value problem by shooting (17.1) _S_H_O_O_T_F ditto, by shooting to a fitting point (17.2) _S_I_M_P_1 linear programming, used by _S_I_M_P_L_X (10.8) _S_I_M_P_2 linear programming, used by _S_I_M_P_L_X (10.8) _S_I_M_P_3 linear programming, used by _S_I_M_P_L_X (10.8) _S_I_M_P_L_X linear programming maximization of a linear function (10.8) _S_I_M_P_R integrate stiff ODEs by semi-implicit midpoint rule (16.6) _S_I_N_F_T fast sine transform (12.3) 12 RECIPES(LOCAL) _S_L_V_S_M_2 solve on coarsest grid, used by _M_G_F_A_S (19.6) _S_L_V_S_M_L solve on coarsest grid, used by _M_G_L_I_N (19.6) _S_N_C_N_D_N Jacobian elliptic functions (6.11) _S_N_R_M used by _L_I_N_B_C_G for vector norm (2.7) _S_O_B_S_E_Q Sobol's quasi-random sequence (7.7) _S_O_L_V_D_E two point boundary value problem, solve by relaxation (17.3) _S_O_R elliptic PDE solved by successive overrelaxation method (19.5) _S_O_R_T sort an array by quicksort method (8.2) _S_O_R_T_2 sort two arrays by quicksort method (8.2) _S_O_R_T_3 sort, use an index to sort 3 or more arrays (8.4) _S_P_C_T_R_M power spectrum estimation using FFT (13.4) _S_P_E_A_R Spearman's rank correlation between two data sets (14.6) _S_P_H_B_E_S spherical Bessel functions j_n and y_n (6.7) _S_P_H_F_P_T spheroidal functions by method of _S_H_O_O_T_F (17.4) _S_P_H_O_O_T spheroidal functions by method of _S_H_O_O_T (17.4) _S_P_L_I_E_2 construct two-dimensional spline (3.6) _S_P_L_I_N_2 two-dimensional spline interpolation (3.6) _S_P_L_I_N_E construct a cubic spline (3.3) _S_P_L_I_N_T cubic spline interpolation (3.3) _S_P_R_E_A_D extirpolate value into array, used by _F_A_S_P_E_R (13.8) _S_P_R_S_A_X product of sparse matrix and vector (2.7) _S_P_R_S_I_N convert matrix to sparse format (2.7) _S_P_R_S_P_M pattern multiply two sparse matrices (2.7) _S_P_R_S_T_M threshold multiply two sparse matrices (2.7) _S_P_R_S_T_P transpose of sparse matix (2.7) _S_P_R_S_T_X product of transpose sparse matrix and vector (2.7) 13 RECIPES(LOCAL) _S_T_I_F_B_S integrate stiff ODEs, Bulirsch-Stoer step (16.6) _S_T_I_F_F integrate stiff ODEs by fourth-order Rosenbrock (16.6) _S_T_O_E_R_M integrate conservative second-order ODEs (16.5) _S_V_B_K_S_B singular value backsubstitution (2.6) _S_V_D_C_M_P singular value decomposition of a matrix (2.6) _S_V_D_F_I_T linear least-squares fit by singular value decomposition (15.4) _S_V_D_V_A_R variances from singular value decomposition (15.4) _T_O_E_P_L_Z solve Toeplitz systems (2.8) _T_P_T_E_S_T Student's t-test for means, case of paired data (14.2) _T_Q_L_I eigensolution of a symmetric tridiagonal matrix (11.3) _T_R_A_P_Z_D trapezoidal rule (4.2) _T_R_E_D_2 Householder reduction of a real, symmetric matrix (11.2) _T_R_I_D_A_G solution of tridiagonal systems (2.4) _T_R_N_C_S_T cost of a transposition, used by _A_N_N_E_A_L (10.9) _T_R_N_S_P_T do a transposition, used by _A_N_N_E_A_L (10.9) _T_T_E_S_T Student's t-test for difference of means (14.2) _T_U_T_E_S_T Student's t-test for means, case of unequal variances (14.2) _T_W_O_F_F_T fast Fourier transform of two real functions (12.3) _V_A_N_D_E_R solve Vandermonde systems (2.8) _V_E_G_A_S adaptive multidimensional Monte Carlo integration (7.8) _V_O_L_T_R_A linear Volterra equations of the second kind (18.2) _W_T_1 one-dimensional discrete wavelet transform (13.10) _W_T_N multidimensional discrete wavelet transform (13.10) _W_W_G_H_T_S quadrature weights for an arbitrarily singular kernel (18.3) _Z_B_R_A_C outward search for brackets on roots (9.1) _Z_B_R_A_K inward search for brackets on roots (9.1) 14 RECIPES(LOCAL) _Z_B_R_E_N_T find root of a function by Brent's method (9.3) _Z_R_H_Q_R roots of a polynomial by eigenvalue methods (9.5) _Z_R_I_D_D_R find root of a function by Ridders' method (9.2) _Z_R_O_O_T_S roots of a polynomial by Laguerre's method with deflation (9.5) SEE ALSO _N_u_m_e_r_i_c_a_l _R_e_c_i_p_e_s _i_n _C, _T_h_e _A_r_t _o_f _S_c_i_e_n_t_i_f_i_c _C_o_m_p_u_t_i_n_g (_S_e_c_o_n_d _E_d_i_t_i_o_n), W.H. Press, B.P. Flannery, S.A. Teukolsky, W.T. Vetter- ling, Cambridge University Press, 1992 _N_u_m_e_r_i_c_a_l _R_e_c_i_p_e_s _i_n _F_o_r_t_r_a_n, _T_h_e _A_r_t _o_f _S_c_i_e_n_t_i_f_i_c _C_o_m_p_u_t_i_n_g (_S_e_c_o_n_d _E_d_i_t_i_o_n), W.H. Press, B.P. Flannery, S.A. Teukolsky, W.T. Vetterling, Cambridge University Press, 1992 BUGS See associated documentation. 15 99