GNU SCIENTIFIC LIBRARY
In computing, 'GNU Scientific Library' (or 'GSL') is a software library written in the C programming language for numerical calculations in applied mathematics and science. The GSL is part of the GNU project and is distributed under the GNU General Public License.
The GSL can be used in C++, but not using pointers to member functions. C++ programmers have to use static functions redirecting to the correct member function, since the address used for static member functions in C++ is compatible with the GSL.
The following example program calculates the value of the Bessel function for 5 [1]:
The example program has to be linked to the GSL library
upon compilation:
The output is shown below, and should be correct to double-precision accuracy:
The software library provides facilities for:
★ Basic mathematical functions
★ Complex numbers
★ Polynomials
★ Special functions
★ Vectors and matrices
★ Permutations
★ Combinations
★ Sorting
★ BLAS
★ Linear algebra
★ Eigensystems
★ Fast Fourier transforms
★ Numerical integration
★ 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
★ netlib
★ ''Numerical Recipes''
★ list of numerical analysis software
★ GNU Scientific Library project page
The GSL can be used in C++, but not using pointers to member functions. C++ programmers have to use static functions redirecting to the correct member function, since the address used for static member functions in C++ is compatible with the GSL.
| Contents |
| Example |
| Features |
| See also |
| External links |
Example
The following example program calculates the value of the Bessel function for 5 [1]:
#include
#include
int
main (void)
{
double x = 5.0;
double y = gsl_sf_bessel_J0 (x);
printf ("J0(%g) = %.18e
", x, y);
return 0;
}
The example program has to be linked to the GSL library
upon compilation:
g++ -L/usr/local/lib example.c -lgsl -lgslcblas -lm
The output is shown below, and should be correct to double-precision accuracy:
J0(5) = -1.775967713143382920e-01
Features
The software library provides facilities for:
★ Basic mathematical functions
★ Complex numbers
★ Polynomials
★ Special functions
★ Vectors and matrices
★ Permutations
★ Combinations
★ Sorting
★ BLAS
★ Linear algebra
★ Eigensystems
★ Fast Fourier transforms
★ Numerical integration
★ 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
See also
★ netlib
★ ''Numerical Recipes''
★ list of numerical analysis software
External links
★ GNU Scientific Library project page
This article provided by Wikipedia. To edit the contents of this article, click here for original source.
psst.. try this: add to faves

العربية
中国
Français
Deutsch
Ελληνική
हिन्दी
Italiano
日本語
Português
Русский
Español