Child pages
  • GNU Scientific Library
Skip to end of metadata
Go to start of metadata

Using the GNU Scientific Library

The GNU Scientific Library is a numerical library for C and C++ programmers. A simple matrix multiplication program, and an associated submit script are as follows:


Categories for this softwareMath Libraries
What is GSLThe 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.
How to useGSL is free to use. The GSL is part of the GNU Project[1] and is distributed under the GNU General Public License.

Sample Code

#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;
module load gsl
gcc -o gsl.exe $CFLAGS $LDFLAGS -lgsl -lgslcblas -lm gsl.c



#$ -S /bin/sh
#$ -cwd
module load gsl
  • No labels