GNU Scientific Library
| Original author(s) | Mark Galassi, James Theiler, Brian Gough, Gerard Jungman and many others |
|---|---|
| Developer(s) | GNU Project |
| Initial release | May 1996 |
| Stable release | 1.15 / May 6, 2011 |
| Written in | C |
| Type | Numerical library |
| License | GNU General Public License |
| Website | www.gnu.org/software/gsl/ |
The GNU Scientific Library (or GSL) is a software library for numerical computations in applied mathematics and science. The GSL is written in C; wrappers are available for other programming languages. The GSL is part of the GNU Project[1] and is distributed under the GNU General Public License.
Contents |
Project history [edit]
The GSL project was initiated in 1996 by physicists Mark Galassi and James Theiler of Los Alamos National Laboratory.[2] They aimed at writing a modern replacement for widely used but somewhat outdated Fortran libraries such as Netlib.[3] They carried out the overall design and wrote early modules; with that ready they recruited other scientists to contribute.
The "overall development of the library and the design and implementation of the major modules" was carried out by Brian Gough and Gerard Jungman.[4] Other major contributors were Jim Davies, Reid Priedhorsky, M. Booth, and F. Rossi.[5]
Version 1.0 was released in 2001. In 2004 it was declared "feature complete";[6] the maintainers concentrated on bug fixes. New modules are accepted reluctantly if at all.
Currently the project seems to be orphaned. B. Gough stepped down as maintainer in 2012;[7] In 2012, only 17 changes were committed to the source code.[8]
Example [edit]
The following example program calculates the value of the Bessel function for 5:[9]
#include <stdio.h> #include <gsl/gsl_sf_bessel.h> int main(void) { double x = 5.0; double y = gsl_sf_bessel_J0(x); printf("J0(%g) = %.18e\n", x, y); return 0; }
The example program has to be linked to the GSL library upon compilation:
gcc $(gsl-config --cflags) example.c $(gsl-config --libs)
The output is shown below, and should be correct to double-precision accuracy:
J0(5) = -1.775967713143382920e-01
Features [edit]
The software library provides facilities for:
- Basic mathematical functions
- Complex numbers
- Polynomials
- Special functions
- Vectors and matrices
- Permutations
- Combinations
- Multisets
- Sorting
- BLAS
- Linear algebra
- Eigensystems
- Fast Fourier transforms
- Numerical integration (based on QUADPACK)
- Random number generation
- Quasi-random sequences
- Random number distributions
- Statistics
- Histograms
- N-tuples
- Monte Carlo integration
- Simulated annealing
- Ordinary differential equations
- Interpolation
- Numerical differentiation
- Chebyshev approximations
- Series acceleration
- Discrete Hankel transform
- Root-finding in one and multiple dimensions
- Minimization in one and multiple dimensions
- Least-squares fitting
- Nonlinear least-squares fitting
- Physical constants
- IEEE floating-point arithmetic
- Discrete wavelet transform
Programming language bindings [edit]
Since the GSL is written in C, it is straightforward to provide wrappers for other programming languages. Such wrappers currently exist for
C++ support [edit]
The GSL can be used in C++ classes, but not using pointers to member functions, because the type of pointer to member function is different from pointer to function.[14] Instead, pointers to static functions have to be used. Another common work around is using a functor. C++ wrappers for GSL are available,[11] although many are not regularly maintained.
See also [edit]
References [edit]
- ^ http://directory.fsf.org/GNU/
- ^ GSL homepage as of oct 2012.
- ^ GSL design document http://www.gnu.org/software/gsl/design/gsl-design.html#SEC1 as of oct 2012.
- ^ GSL homepage as of oct 2012.
- ^ GSL homepage as of oct 2012.
- ^ GSL design document as of oct 2012.
- ^ Mail of Fri, 03 Feb 2012, archived in http://sourceware.org/ml/gsl-discuss/2012-q1/msg00003.html.
- ^ Source code repository.
- ^ http://www.gnu.org/software/gsl/manual/html_node/Using-the-library.html
- ^ AMPL bindings for the GNU Scientific Library
- ^ a b C++ wrappers for GSL
- ^ Python interface for GNU Scientific Library
- ^ gsl: wrapper for the Gnu Scientific Library
- ^ pointer to member function
External links [edit]
- Official website
- The gsl package for R (programming language), an R wrapper for the special functions and quasi random number generators.
|
|||||||||||||||||||