Mantissa
Status: in development. Mantissa is a new Numerical Method product that has not been released yet. This page describes what it is being built to do. There is no download, price or release date yet; to follow its progress or to discuss early access, contact us.
The problem
Almost all numerical code in finance runs in double precision, because that is what double means, not because anyone decided the problem needed it. On current hardware that default is no longer free: lower-precision formats move half or a quarter of the data and run faster on accelerators. At the same time, the matrices we factorize most often, sample covariance matrices, are estimates whose statistical error is far larger than double-precision rounding error.
The approach
Mantissa treats precision as a resource to be budgeted, following the analysis in Precision Is a Resource:
- the sample size of the data determines how many bits the answer deserves;
- the conditioning of the matrix determines how many bits the factorization needs in order to exist;
- iterative refinement connects the two, so the work runs in the cheapest precision that conditioning allows and only residual work runs in higher precision (Carson and Higham, 2018).
For long accumulations, such as profit-and-loss series or Monte Carlo averages, Mantissa uses stochastic rounding or compensated summation, because there the number of operations, not the data, is what threatens accuracy.
What it is being built to do
- Recommend a precision for each solve from the sample length, the dimension and an accuracy target relative to statistical error.
- Mixed-precision Cholesky, LDLᵀ and least-squares solvers with automatic refinement and a fallback when a low-precision factorization breaks down.
- Stochastic rounding and compensated summation for accumulators.
- A short error report with every solve: precision used, refinement steps, estimated numerical error and its size relative to the statistical error.
How it fits
Mantissa is designed as a computational layer underneath the linear algebra that SuanShu and AlgoQuant users already rely on, in particular covariance estimation and portfolio optimization.