GNU Scientific Library Reference ManualThird edition, for GSL Version 1.12January 2009Mark Galassi Jim Davies James Theiler Brian Gough Gerard Jungman Patrick Alken Michael Booth Fabrice Rossi |
This file documents the GNU Scientific Library (GSL), a collection of numerical routines for scientific computing. It corresponds to release 1.12 of the library. Please report any errors in this manual to bug-gsl at gnu.org.
More information about GSL can be found at the project homepage, http://www.gnu.org/software/gsl/.
Printed copies of this manual can be purchased from Network Theory Ltd at http://www.network-theory.co.uk/gsl/manual/. The money raised from sales of the manual helps support the development of GSL.
A Japanese translation of this manual is available from the GSL project homepage thanks to Daisuke Tominaga.
- 1 Introduction
- 2 Using the library
- 2.1 An Example Program
- 2.2 Compiling and Linking
- 2.3 Shared Libraries
- 2.4 ANSI C Compliance
- 2.5 Inline functions
- 2.6 Long double
- 2.7 Portability functions
- 2.8 Alternative optimized functions
- 2.9 Support for different numeric types
- 2.10 Compatibility with C++
- 2.11 Aliasing of arrays
- 2.12 Thread-safety
- 2.13 Deprecated Functions
- 2.14 Code Reuse
- 3 Error Handling
- 4 Mathematical Functions
- 5 Complex Numbers
- 5.1 Representation of complex numbers
- 5.2 Properties of complex numbers
- 5.3 Complex arithmetic operators
- 5.4 Elementary Complex Functions
- 5.5 Complex Trigonometric Functions
- 5.6 Inverse Complex Trigonometric Functions
- 5.7 Complex Hyperbolic Functions
- 5.8 Inverse Complex Hyperbolic Functions
- 5.9 References and Further Reading
- 6 Polynomials
- 7 Special Functions
- 7.1 Usage
- 7.2 The gsl_sf_result struct
- 7.3 Modes
- 7.4 Airy Functions and Derivatives
- 7.5 Bessel Functions
- 7.5.1 Regular Cylindrical Bessel Functions
- 7.5.2 Irregular Cylindrical Bessel Functions
- 7.5.3 Regular Modified Cylindrical Bessel Functions
- 7.5.4 Irregular Modified Cylindrical Bessel Functions
- 7.5.5 Regular Spherical Bessel Functions
- 7.5.6 Irregular Spherical Bessel Functions
- 7.5.7 Regular Modified Spherical Bessel Functions
- 7.5.8 Irregular Modified Spherical Bessel Functions
- 7.5.9 Regular Bessel Function--Fractional Order
- 7.5.10 Irregular Bessel Functions--Fractional Order
- 7.5.11 Regular Modified Bessel Functions--Fractional Order
- 7.5.12 Irregular Modified Bessel Functions--Fractional Order
- 7.5.13 Zeros of Regular Bessel Functions
- 7.6 Clausen Functions
- 7.7 Coulomb Functions
- 7.8 Coupling Coefficients
- 7.9 Dawson Function
- 7.10 Debye Functions
- 7.11 Dilogarithm
- 7.12 Elementary Operations
- 7.13 Elliptic Integrals
- 7.14 Elliptic Functions (Jacobi)
- 7.15 Error Functions
- 7.16 Exponential Functions
- 7.17 Exponential Integrals
- 7.18 Fermi-Dirac Function
- 7.19 Gamma and Beta Functions
- 7.20 Gegenbauer Functions
- 7.21 Hypergeometric Functions
- 7.22 Laguerre Functions
- 7.23 Lambert W Functions
- 7.24 Legendre Functions and Spherical Harmonics
- 7.25 Logarithm and Related Functions
- 7.26 Mathieu Functions
- 7.27 Power Function
- 7.28 Psi (Digamma) Function
- 7.29 Synchrotron Functions
- 7.30 Transport Functions
- 7.31 Trigonometric Functions
- 7.32 Zeta Functions
- 7.33 Examples
- 7.34 References and Further Reading
- 8 Vectors and Matrices
- 8.1 Data types
- 8.2 Blocks
- 8.3 Vectors
- 8.3.1 Vector allocation
- 8.3.2 Accessing vector elements
- 8.3.3 Initializing vector elements
- 8.3.4 Reading and writing vectors
- 8.3.5 Vector views
- 8.3.6 Copying vectors
- 8.3.7 Exchanging elements
- 8.3.8 Vector operations
- 8.3.9 Finding maximum and minimum elements of vectors
- 8.3.10 Vector properties
- 8.3.11 Example programs for vectors
- 8.4 Matrices
- 8.4.1 Matrix allocation
- 8.4.2 Accessing matrix elements
- 8.4.3 Initializing matrix elements
- 8.4.4 Reading and writing matrices
- 8.4.5 Matrix views
- 8.4.6 Creating row and column views
- 8.4.7 Copying matrices
- 8.4.8 Copying rows and columns
- 8.4.9 Exchanging rows and columns
- 8.4.10 Matrix operations
- 8.4.11 Finding maximum and minimum elements of matrices
- 8.4.12 Matrix properties
- 8.4.13 Example programs for matrices
- 8.5 References and Further Reading
- 9 Permutations
- 10 Combinations
- 11 Sorting
- 12 BLAS Support
- 13 Linear Algebra
- 13.1 LU Decomposition
- 13.2 QR Decomposition
- 13.3 QR Decomposition with Column Pivoting
- 13.4 Singular Value Decomposition
- 13.5 Cholesky Decomposition
- 13.6 Tridiagonal Decomposition of Real Symmetric Matrices
- 13.7 Tridiagonal Decomposition of Hermitian Matrices
- 13.8 Hessenberg Decomposition of Real Matrices
- 13.9 Hessenberg-Triangular Decomposition of Real Matrices
- 13.10 Bidiagonalization
- 13.11 Householder Transformations
- 13.12 Householder solver for linear systems
- 13.13 Tridiagonal Systems
- 13.14 Balancing
- 13.15 Examples
- 13.16 References and Further Reading
- 14 Eigensystems
- 14.1 Real Symmetric Matrices
- 14.2 Complex Hermitian Matrices
- 14.3 Real Nonsymmetric Matrices
- 14.4 Real Generalized Symmetric-Definite Eigensystems
- 14.5 Complex Generalized Hermitian-Definite Eigensystems
- 14.6 Real Generalized Nonsymmetric Eigensystems
- 14.7 Sorting Eigenvalues and Eigenvectors
- 14.8 Examples
- 14.9 References and Further Reading
- 15 Fast Fourier Transforms (FFTs)
- 15.1 Mathematical Definitions
- 15.2 Overview of complex data FFTs
- 15.3 Radix-2 FFT routines for complex data
- 15.4 Mixed-radix FFT routines for complex data
- 15.5 Overview of real data FFTs
- 15.6 Radix-2 FFT routines for real data
- 15.7 Mixed-radix FFT routines for real data
- 15.8 References and Further Reading
- 16 Numerical Integration
- 16.1 Introduction
- 16.2 QNG non-adaptive Gauss-Kronrod integration
- 16.3 QAG adaptive integration
- 16.4 QAGS adaptive integration with singularities
- 16.5 QAGP adaptive integration with known singular points
- 16.6 QAGI adaptive integration on infinite intervals
- 16.7 QAWC adaptive integration for Cauchy principal values
- 16.8 QAWS adaptive integration for singular functions
- 16.9 QAWO adaptive integration for oscillatory functions
- 16.10 QAWF adaptive integration for Fourier integrals
- 16.11 Error codes
- 16.12 Examples
- 16.13 References and Further Reading
- 17 Random Number Generation
- 17.1 General comments on random numbers
- 17.2 The Random Number Generator Interface
- 17.3 Random number generator initialization
- 17.4 Sampling from a random number generator
- 17.5 Auxiliary random number generator functions
- 17.6 Random number environment variables
- 17.7 Copying random number generator state
- 17.8 Reading and writing random number generator state
- 17.9 Random number generator algorithms
- 17.10 Unix random number generators
- 17.11 Other random number generators
- 17.12 Performance
- 17.13 Examples
- 17.14 References and Further Reading
- 17.15 Acknowledgements
- 18 Quasi-Random Sequences
- 19 Random Number Distributions
- 19.1 Introduction
- 19.2 The Gaussian Distribution
- 19.3 The Gaussian Tail Distribution
- 19.4 The Bivariate Gaussian Distribution
- 19.5 The Exponential Distribution
- 19.6 The Laplace Distribution
- 19.7 The Exponential Power Distribution
- 19.8 The Cauchy Distribution
- 19.9 The Rayleigh Distribution
- 19.10 The Rayleigh Tail Distribution
- 19.11 The Landau Distribution
- 19.12 The Levy alpha-Stable Distributions
- 19.13 The Levy skew alpha-Stable Distribution
- 19.14 The Gamma Distribution
- 19.15 The Flat (Uniform) Distribution
- 19.16 The Lognormal Distribution
- 19.17 The Chi-squared Distribution
- 19.18 The F-distribution
- 19.19 The t-distribution
- 19.20 The Beta Distribution
- 19.21 The Logistic Distribution
- 19.22 The Pareto Distribution
- 19.23 Spherical Vector Distributions
- 19.24 The Weibull Distribution
- 19.25 The Type-1 Gumbel Distribution
- 19.26 The Type-2 Gumbel Distribution
- 19.27 The Dirichlet Distribution
- 19.28 General Discrete Distributions
- 19.29 The Poisson Distribution
- 19.30 The Bernoulli Distribution
- 19.31 The Binomial Distribution
- 19.32 The Multinomial Distribution
- 19.33 The Negative Binomial Distribution
- 19.34 The Pascal Distribution
- 19.35 The Geometric Distribution
- 19.36 The Hypergeometric Distribution
- 19.37 The Logarithmic Distribution
- 19.38 Shuffling and Sampling
- 19.39 Examples
- 19.40 References and Further Reading
- 20 Statistics
- 21 Histograms
- 21.1 The histogram struct
- 21.2 Histogram allocation
- 21.3 Copying Histograms
- 21.4 Updating and accessing histogram elements
- 21.5 Searching histogram ranges
- 21.6 Histogram Statistics
- 21.7 Histogram Operations
- 21.8 Reading and writing histograms
- 21.9 Resampling from histograms
- 21.10 The histogram probability distribution struct
- 21.11 Example programs for histograms
- 21.12 Two dimensional histograms
- 21.13 The 2D histogram struct
- 21.14 2D Histogram allocation
- 21.15 Copying 2D Histograms
- 21.16 Updating and accessing 2D histogram elements
- 21.17 Searching 2D histogram ranges
- 21.18 2D Histogram Statistics
- 21.19 2D Histogram Operations
- 21.20 Reading and writing 2D histograms
- 21.21 Resampling from 2D histograms
- 21.22 Example programs for 2D histograms
- 22 N-tuples
- 23 Monte Carlo Integration
- 24 Simulated Annealing
- 25 Ordinary Differential Equations
- 26 Interpolation
- 27 Numerical Differentiation
- 28 Chebyshev Approximations
- 29 Series Acceleration
- 30 Wavelet Transforms
- 31 Discrete Hankel Transforms
- 32 One dimensional Root-Finding
- 32.1 Overview
- 32.2 Caveats
- 32.3 Initializing the Solver
- 32.4 Providing the function to solve
- 32.5 Search Bounds and Guesses
- 32.6 Iteration
- 32.7 Search Stopping Parameters
- 32.8 Root Bracketing Algorithms
- 32.9 Root Finding Algorithms using Derivatives
- 32.10 Examples
- 32.11 References and Further Reading
- 33 One dimensional Minimization
- 34 Multidimensional Root-Finding
- 35 Multidimensional Minimization
- 36 Least-Squares Fitting
- 37 Nonlinear Least-Squares Fitting
- 37.1 Overview
- 37.2 Initializing the Solver
- 37.3 Providing the Function to be Minimized
- 37.4 Iteration
- 37.5 Search Stopping Parameters
- 37.6 Minimization Algorithms using Derivatives
- 37.7 Minimization Algorithms without Derivatives
- 37.8 Computing the covariance matrix of best fit parameters
- 37.9 Examples
- 37.10 References and Further Reading
- 38 Basis Splines
- 39 Physical Constants
- 39.1 Fundamental Constants
- 39.2 Astronomy and Astrophysics
- 39.3 Atomic and Nuclear Physics
- 39.4 Measurement of Time
- 39.5 Imperial Units
- 39.6 Speed and Nautical Units
- 39.7 Printers Units
- 39.8 Volume, Area and Length
- 39.9 Mass and Weight
- 39.10 Thermal Energy and Power
- 39.11 Pressure
- 39.12 Viscosity
- 39.13 Light and Illumination
- 39.14 Radioactivity
- 39.15 Force and Energy
- 39.16 Prefixes
- 39.17 Examples
- 39.18 References and Further Reading
- 40 IEEE floating-point arithmetic
- A Debugging Numerical Programs
- B Contributors to GSL
- C Autoconf Macros
- D GSL CBLAS Library
- E GPG verification
- Free Software Needs Free Documentation
- Other books from the publisher
- GNU General Public License
- GNU Free Documentation License
- History
- Function Index
- Type and Variable Index
- Concept Index
| ISBN 0954612078 | GNU Scientific Library Reference Manual - Third Edition (v1.12) | See the print edition |