Mathpaqs is a collection of mathematical, 100% portable, packages in Ada.


Download Mathpaqs from the SourceForge project page.



Mathpaqs topics


The list of packages below is sorted by topics.

In the Mathpaqs archive, each topic has a subdirectory.

Of course there are many possible interactions, like between Multi-precision numbers and Algebra (see Euclidean_Ring_Tools) - it is like combining mathematics fields...




Euclidean_Ring_Tools:   Generic package: given a type with the properties of an Euclidean ring (like integers or polynomials, with 0,1,+,* and integral division), it gives the Greatest Common Divisor and the Bezout factors.


Frac:   Generic package: given a type with the properties of a ring, it gives the fractions of it, with operators.


Frac.Order:     Supplement of generic package 'Frac': provides an order relation from one of the ring


Frac_Euclid:    Generic package: given a type with the properties of an Euclidean ring (with division), it gives the fractions field of it, with operators and reduction.


Frac_Euclid.Order:      Supplement of generic package 'Frac_Euclid': provides an order relation from one of the ring


Polynomials:    Generic package, creates polynomials on a field.


Examples of instantiation:

·         Float_Polynomials:      = Polynomials( float,    0.0,1.0, "-",... );

·         Rationals.Polynomials:  = Polynomials( rational, frac_0, frac_1, "-",... );


Rationals:      Package for manipulation of rational numbers. One-liner package: Frac_Euclid( integer, 0,1, "-","+","-","*","/"); !

·       Rationals_Order:        = Rationals.Order("<");


  Linear algebra


G_Matrices:     Generic simple matrix package, with matrix-matrix, matrix-vector, vector operations


Generic_Real_Linear_Equations:   by Jon Squire. Inversion, Cholesky decomposition, LU decomposition, QR decomposition, SV decomposition




G_FEK:          Parts of the Finite Element Kernel from M. Bercovier (original in FORTRAN);

                Computes values and derivatives of elementary functions given the element's geometry.

                Available so far:

                  1D: L2 (linear)

                  2D: Q4 (linear), Q9 (quadratic)

                  3D: B27 (quadratic)

                Generic -> can be instantiated for any precision!


ConjGrad:       Fast (Bi)Conjugate Gradient iterative methods for solving Ax=b. Generic -> applies to the matrix storage of your choice (e.g. sparse) !



  Multi-precision integers


Multi_precision_integers:       Multiple-precision integers package


Multi_precision_integers_IO:    Text_IO, for multi-precision integers


  (Pseudo-) Random number generation, probability models, statistics


Generic_Random_Functions: Functions facilitating computations with various random distributions


Discrete_Random_Simulation: random generation on any discrete distribution


Finite_distributed_random: random generation on any enumerated type


U_Rand:     Standalone random generator (Pure Ada 95, replaces easily Ada's generator if it is too slow)


Copulas:    An object-oriented multivariate uniform random generator with dependency model of any kind. A few basic copulas are provided.


Samples:    A package for building samples of random values, then computing statistics from these samples           


Estimators: Various statistical estimators


  Sparse matrices


Sparse:     Sparse matrix package (Pure Ada 83); uses SparseB

SparseB:    Low-level vector operations for Sparse package

            - Pure Ada 83 [.adb] body, and

            - DEC/Compaq/HP [.dec] body mapped to BLAS




Formulas [NEW] :   a generic symbolic computation package (expression parser, fast evaluation, formula simplification)

Contours [NEW] :   a generic contour plot package





Gautier de Montmollin, e-mail