Free Numerical Libraries, Mathematical Libraries, Statistical Libraries

Free statistics (stats), numerical, maths/math functions, libraries and source code

Free Numerical Libraries, Mathematical Libraries, Statistics Libraries

This page contains libraries and source code for numerical, mathematical, and statistical (stats) functions and other routines that will (hopefully) make programming applications that require such computations easier. Note: if what you want is only to draw graphs, you might also want to check the Free Image Drawing Source Code, Graphics Libraries, 3D Engines/2D Engines, Image Drawing, Animation Libraries page as well.

Related Pages

Free Numerical Libraries, Mathematical Libraries, Statistics Libraries


MAGMA is a dense linear algebra library that takes advantage of the power of CPUs with multiple cores and GPUs. It uses a similar programming interface to LAPACK (see elsewhere on this page), except that it uses a hybrid CPU/GPU algorithm to produce its results. (I'm simplifying here; please read their documentation for the actual details.)


MathGL is a library for writing high-quality scientific graphics under Linux and Windows. It supports large arrays, plotting of one, two and three dimensional plots, and can export graphics to bitmap (PNG, JPEG, TIFF) and vector (EPS or SVG) files. It can be used from console programs, has functions for data handling and script MGL language for simplifying data plotting, supports several types of transparency and smoothed lighting, vector fonts and TeX-like symbol parsing, arbitrary curvilinear coordinate systems, has an OpenGL interface, etc. It is licensed under the GNU General Public License.

LAPACK - Linear Algebra PACKage

LAPACK is a package of routines written in Fortran 77 intended for "solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems" (quoted from the website). Included are matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur), facilities for the reordering of the Schur factorizations and estimating condition numbers. The routines can also handle dense and banded matrices, real and complex matrices, in single and double precision.

GSL - The GNU Scientific Library

GSL is a numerical library that may be used in C and C++ programs. Functions available include complex numbers, roots of polynomials, vectors and matrices, permutations and combinations, sorting, linear algebra, BLAS support, fast fourier transforms, random numbers, histograms and statistics, Monte Carlo integration, N-Tubes, differential equations, simulated annealing, numerical differentiation, interpolation, series acceleration, Chebyshev approximations, root finding, discrete hankel transforms, least-squares fitting, minimization, IEEE floating point, physical constants, etc. It is released under the GNU General Public License. It has been ported to SunOS, Linux (x86 and Alpha), HP-UX, IRIX, NeXTSTEP, Tru64 Unix, FreeBSD, OpenBSD, NetBSD, Windows, Mac OS X, etc.

IML++ Iterative Methods Library

IML++ is a C++ template library containing iterative methods for solving symmetric and non-symmetric linear systems of equations. You can use the same routines for dense, sparse and distributed matrices.

TurboPower SysTools

TurboPower SysTools contain numerous utility functions and classes for Borland Delphi/Kylix and Borland C++ Builder as well as programming environments that support COM objects (like Microsoft Visual Basic, Microsoft Visual C++. Among the routines included in this library are string manipulation routines, date and time math routines, high-speed sorting, high-precision maths, runtime math expression analyzer, Microsoft Excel-like finance and statistical routines, email attachment MIME encoding and decoding, reusable containers (stacks, queues, trees, deques, hash tables), CRC data integrity checking, 1 dimensional and 2 dimensional (1-D and 2-D) bar codes, money routines, logging classes, patterns, random number distributions, text data manipulation and more. SysTools is open source, released by TurboPower under the Mozilla Public License. It works on Windows systems.

Mersenne Twister

This is a pseudorandom number generator written in C (with source code provided). It is purportedly fast, uses memory efficiently, and has a "far longer period and far higher order of equidistribution than any other implemented generators" (their claim). There is also a Fortran version available from the site.

Blitz++ Template Library

Blitz++ is a C++ class library for linear algebra and uses numerous techniques to speed up matrix operations. It supports dense arrays and vectors, small vectors and matrices, provides random number generators, etc. It is released under the GNU General Public License.


This is a C++ class library that allows you to make "efficient sparse matrix computations across various computational platforms." Included in the library are "matrix classes encompassing several sparse storage formats (eg compressed row, compressed column and coordinate formats)" (quotes taken from their website). It is available in source code form, with documentation available in postscript format.

CEPHES Maths/Numerical C Library

Cephes is a C library that provides numerous mathematical functions including support for the complex variable types that will be in the new ANSI C standard, C99. Among the numerous functions available are: the elementary functions (log, sin, cos, exp, etc), gamma, psi, dilogarithm, Airy, Bessel, hypergeometric, Struve, complete and incomplete elliptic functions, Planck radiation, Fresnel integrals, probability integrals and their inverses (Gaussian, Poisson, F, Chi-square, binomial, Kolmogorv-Smirnov arithmetic on polynomials, rationals, etc), and so on. You can get it with precisions from single, double, long double (80, 96 or 128 bit), q-class (384-bit). Source code is available, as well as precompiled binaries for Linux, Windows and MSDOS.

GINAC C++ Framework

This C++ framework makes it easy for you to integrate symbolic and algebraic manipulations with "other areas of computer science like computation-intensive numeric applications, graphical interfaces, etc". You also get "a parser for constructing expressions from strings, inert differentiation, archival of symbolic expressions, etc." The library is released uner the GNU GPL.

FFTW C Library

This award winning library is a C library for "computing the Discrete Fourier Transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size." It is portable, fast and free.


This is a plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Versions are available for C, Fortran 77 and Fortran 90 compilers on Linux, FreeBSD, OpenVMS, MS-DOS, Windows 95/98/NT, and other flavours of Unix. On some operating systems, Java, Perl, and Python are also supported. The library is only free for non-commercial purposes.

Related Pages

Newest Pages

Popular Pages

How to Link to This Page

It will appear on your page as:

Free Numerical, Mathematical, Statistics Libraries and Source Code Free Webmaster Tutorials, Scripts and Articles Free How-To Guides Free Programmers, Webmasters and Security Resources
If you find this site useful, please link to us.