|
Meta.Numerics library features include complex numbers, special functions, data analysis and statistical tests,
and matrix operations.
Complex and Other Numbers
The library defines several specialized mathematical objects:
- Complex numbers
- Uncertain numbers
- Spinors
For each type, appropriate arithmetic operations are defined and an associated static class implements
appropriate basic functions.
Advanced Functions
The library defines a large number of advanced mathematical function on
real numbers, Complex numbers, and integers. The real and complex advanced functions are
summarized in the following table.
| Function |
Real |
Complex |
Notes |
| Gamma |
 |
 |
also ln Γ, incomplete Γ |
| Psi (Digamma) |
 |
 |
|
| Beta |
 |
|
also incomplete B |
| Error Function erf |
 |
 |
also erfc, erf-1, Faddeeva |
| Fresnel Integrals |
 |
|
|
| Exponential and Trigonometric Integrals |
 |
|
includes En, Ei, Ci, and Si |
| Bessel J and Y |
 |
|
also for non-integer orders, spherical Bessel j and y |
| Modified Bessel I and K |
 |
|
also for non-integer orders, , Airy Ai and Bi |
| Coulomb Wave Functions F and G |
 |
|
accurate even in quantum tunneling region |
| Reimann Zeta |
 |
 |
also Dirichlet η |
| Dilogarithm Li2 (Spence's Function) |
 |
 |
|
| Hermite H |
 |
|
physicists' and statisticans' normalization |
| Laguerre L |
 |
|
|
| Legendre P |
 |
|
|
| Chebyshev T |
 |
|
|
| Zernike R |
 |
|
|
Functions of integers include Factorials, Binomial coefficients,
greatest common denominators (GCD) and least common multiples (LCM).
Spinor functions, including 3j symbols (Clebsch-Gordon coefficients) and 6j symbols.
Function Properties
Library routines support root finding, maximum and minimum finding, and the integration of arbitrary user-supplied functions.
Statistics and Data Analysis
The library provides specialized classes for working with various types of data, including:
- Univariate Samples
- Multivariate Samples
- Experimental Data with Error Bars
- Contingency Tables
For each kind of data, methods allow you to evaluate descriptive statistics, fit models, and
perform appropriate statisical tests. All fits produce not just a best-fit parameter set, but
also error bars, a covariance matrix, and a goodness-of-fit test.
Some of the many statistical tests supported by the library are listed below:
| Test Name |
Test Purpose |
| Student t |
for equal means |
| Mann-Whitney U |
for equal medians |
| Fisher F |
for equal variances |
| Kolmogorov-Smirnov D, Kuiper V |
for fit to a distribution |
| χ2 |
for fit to a function |
| Pearson r |
for linear correlation |
| Spearman ρ, Kendall τ |
for non-linear correlation |
| χ2, Kendall exact |
for categorical correlation |
The statistics library defines a large number of probability distributions:
| Chi Squared |
Exponential |
Fisher |
Kolmogorov |
| Kuiper |
Logistic |
Lognormal |
Normal |
| Student |
Triangular |
Uniform |
Weibull |
For all defined distributions, you can obtain:
- Basic Descriptive Statistics: mean, median, variance, standard Deviation
- Probability Density Function (PDF) values
- Cumulative Distribution Function (CDF) values, integrated from the left or right
- Inverse CDF values, i.e. percentile to score conversion
- Arbitrary raw and central moments
Matrix Algebra
The library defines a number of matrix classes and operations on them.
The following table summarizes the available matrix operations.
| Operation |
Generic |
Square |
Symmetric |
Tridiagonal |
| Arithmetic |
 |
 |
 |
 |
| Decomposition |
|
 |
 |
 |
| Determinant |
|
 |
 |
 |
| Inverse |
|
 |
 |
 |
| Eigenvalues and Eigenvectors |
|
 |
 |
 |
Testing
The library has undergone extensive testing. We test more than 600 mathematical relationships, most for scores
of different arguments ranging over many orders of magnitude. If there is a relationship in Abromiwitz and
Stegun expressible using our library functions, we have probably tested it. Our test cases achieve code coverage
in excess of 80%.
|