GSL is a numerial library for C and C++ programmers. It covers a very wide range of standard numerical computations.

GSL includes functions for:

  • Basis splines;
  • BLAS (Basic Linear Algebra Subprogram) support;
  • Chebyshev Approximation;
  • Complex numbers;
  • Differential Equations;
  • Discrete Hankel Transforms;
  • Discrete Wavelet Transforms;
  • Eigenvalues and Eigenvectors;
  • Fast Fourier Transforms;
  • Histograms;
  • IEEE Floating Point Calculations;
  • Interpolation;
  • Least Squares Fitting;
  • Linear Algebra;
  • Minimization;
  • Monte Carlo Integration;
  • N-Tuples;
  • Numerical Differentiation;
  • Permutations;
  • Physical Constants;
  • Quadrature (Numerical Integration);
  • Quasi-Random sequences;
  • Random Distributions;
  • Random Numbers;
  • Root finding of general nonlinear equations;
  • Roots of Polynomials;
  • Running Statistics;
  • Series Acceleration;
  • Simulated Annealing;
  • Sorting;
  • Sparse Matrices and Linear Algebra;
  • Special Functions;
  • Statistics;
  • Vectors and matrices;

The project site is: .


  1. Mark Gelassi, Jim Davies, James Tyler, Bryan Gough, Gerard Jungman, Patrick Alken, Michael Booth, Fabrice Rossi,
    GNU Scientific Library Reference Manual,
    Network Theory Ltd, Third Edition, 2009,
    ISBN: 0954612078.
  2. The online GSL reference in HTML: .


Version 2.1 is available on Cascades; version 1.15 is on BlueRidge, HokieOne and HokieSpeed; version 1.9 is on DragonsTooth and NewRiver. To verify the version available on any ARC cluster, type "module spider gsl".


GSL requires that several modules be loaded before it can be run. One version of the appropriate commands is:

      module purge
      module load gcc/5.2.0
      module load gsl/1.9


Here is an example batch script which compiles a user program with the GSL library and computes an FFT, an eigenvalue decomposition, an integral estimate, and several other operations.

#! /bin/bash
#PBS -l walltime=00:05:00
#PBS -l nodes=1:ppn=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe


module purge
module load gcc/5.2.0
module load gsl/1.9

g++ -c -I$GSL_INC gsl_test.cpp
g++ gsl_test.o -L$GSL_LIB -lgsl -lgslcblas -lm

A complete set of files to carry out a similar example calculation are available in a tar file