GNU Scientific Library

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
GNU Scientific Library
Original author(s)Mark Galassi, James Theiler, Brian Gough, Gerard Jungman and many others
Developer(s)GNU Project
Initial releaseMay 1996; 22 years ago (1996-05)
Stable release
GSL-2.5 / 14 June 2018; 7 months ago (2018-06-14)
Repository Edit this at Wikidata
Written inC
TypeNumerical library
LicenseGNU General Public License
Websitewww.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.

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.[2] Other major contributors were Jim Davies, Reid Priedhorsky, M. Booth, and F. Rossi.[2]

Version 1.0 was released in 2001. In the following, the library expanded only slowly; as the documentation stated, the maintainers were more interested in stability than in additional functionality. Major version 1 ended with release 1.16 of July 2013; this was the only public activity in the three years 2012-2014.

Vigorous development resumed with publication of version 2.0 in October 2015. The latest version 2.5 was released on 14 June 2018.

Example[edit]

The following example program calculates the value of the Bessel function for 5:[4]

#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:

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.[17] Instead, pointers to static functions have to be used. Another common work around is using a functor. C++ wrappers for GSL are available,[6] although many are not regularly maintained.

See also[edit]

References[edit]

External links[edit]