Common Lisp actually has several numerical computing libraries. While many of them use BLAS/LAPACK/GSLL for linear algebra operations, there are no optimized operations in these libraries for basic mathematics. By basic mathematics, I mean addition, subtraction, multiplication, division. But even beyond them, there are other operations including floor, ceiling, round, absolute-value, exponentiation, logarithmic, as well as trigonometric, inverse trigonometric and their hyperbolic counterparts.
Moreover, most libraries (including in non Common Lisp ecosystems) fall short of my wishlist. Thus, I have been developing numericals and dense-numericals to fulfil this itch. I widely adopt:
This is further coupled with multithreading using lparallel and the C-library builtin OpenMP.
numericals works with standard Common Lisp arrays, this means, you can use it in conjunction with any other Lisp array computing library that also works with Lisp arrays. You can read more about numericals and dense-numericals here.
This line of work has actually spanned two C libraries. So, if you are a C developer and are looking for projects to contribute, here are two such projects.
- BMAS: The ultimate goal is to provide a certain set of math operations across different SIMD platforms and for strided vectors. Currently, full support is only limited to AVX256.
- ceigenlite: Eigen is an excellent C++ library for numerical computing with vectors and matrices. ceigenlite aims to provide a C interface to some of the common tasks that Eigen is capable of. In some sense, this will be a higher level interface to BLAS and LAPACK. Currently, this is just 20% complete. Besides, the compile times are enormous, so distributing the library as a binary would be great! But this has only so far been done for linux-amd64. Porting to other OS and architectures remains.