Try the
GNU Scientific Library. It handles the following:
Complex Numbers, Roots of Polynomials, Special Functions,
Vectors and Matrices, Permutations, Sorting,
BLAS Support, Linear Algebra Eigensystems,
Fast Fourier Transforms, Quadrature, Random Numbers,
Quasi-Random Sequences Random Distributions Statistics
Histograms, N-Tuples, Monte Carlo Integration,
Simulated Annealing, Differential Equations, Interpolation,
Numerical Differentiation, Chebyshev Approximation, Series Acceleration,
Discrete Hankel Transforms Root-Finding Minimization
Least-Squares Fitting, Physical Constants, IEEE Floating-Point,
Discrete Wavelet Transforms.
It works with C or C++