MISRA Discussion Forums

Full Version: Misra Compliant Math Library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,
we are looking for a certified (ISO 26262) and possibly Misra compliant Math library. Both C or C++ would do. We would need it to run on both Arm and Intel architectures which for instance eliminates Intel MKL (which is apparently getting certified).

We have looked through the open source implementations, in particular Eigen, Armadillo, or Blaze but all of them throw too many Misra defects.

We would heavily appreciate any suggestions or if none of the libraries are available - what do automotive folks then normally do?

We are looking for the following features in the library:

1. static memory representation:
dense matrices (probably column major for efficient vector representations)
sparse matrices
symmetric matrices
upper/lower triangular matrices
diagonal matrices
block representations

2. basic math operations (in a memory efficient manner):
vector-vector (inner, outer products)
integer powers
able to apply basic scalar math operations on the entire matrix

3. basic solvers:
matrix inversion
linear system solvers (e.g. Ax = b)
I suggest talking to NAG (Numerical Algorithms Group )https://www.nag.co.uk/content/nag-library

BTWI have no connection to them.
The MISRA C Working Group is not able to offer specific recommendations.

With regards potential adoption of any particular library (whether commercial or open-source) there are (at least) three options to consider:

1. Work with the O/S project or commercial company to improve the MISRA compliance
2. Treat the library as "Adopted Code" (as per MISRA Compliance:2016) and enforce a different Guideline Classification
3. Adopt the code within your project, and (subject to licence terms) modify to be more MISRA compliant.
@misra-c: "The MISRA C Working Group is not able to offer specific recommendations."

Does this mean that you are not aware of any Misra compliant library or that you do not want to give favorable treatment to any possible provider of a such library?

If the latter I'd just like to clarify that we are just looking for publicly available information that we might have missed because this is such a specialized feature request.