A generic numerical and symbolic mathematics library for Zig.
This library is in the early stages of development and might return incorrect results. Breaking changes are to be expected every commit, and only the most basic functionality is currently implemented.
- Core:
- Math:
- Accurate math functions for all floating point types
- Types:
- Dyadic rationals
- Complex floats
- Arbitrary precision integers, rationals, reals, and complex numbers: reals not implemented yet
- Math:
- Vectors (
vector):- Two storage formats:
DenseSparse
- Two storage formats:
- Matrices (
matrix):- Diverse storage formats:
- General (
general):DenseSparse(CSR, CSC)
- Symmetric (
symmetric):DenseSparse(CSR, CSC)
- Hermitian (
hermitian):DenseSparse(CSR, CSC)
- Triangular (
triangular):DenseSparse(CSR, CSC)
DiagonalPermutation
- General (
- Matrix addition/subtraction and scalar multiplication/division
- Views
- Diverse storage formats:
- N-dimensional arrays (
array):- Two storage formats:
Dense(plusStridedfor views)Sparse(CSF): not implemented yet
- Broadcasting
- Element-wise operations
- Views
- Two storage formats:
- Linear Algebra (
linalg):- Matrix multiplication
- Matrix decompositions:
- LU (no pivoting (
lu), partial pivoting (plu), full pivoting (pluq)) - Cholesky (lower (
llt), upper (utu), "smart" (cholesky)) - Bunch-Kaufman (lower (
ldlt), upper (udut), "smart" (bunchkaufman)) - QR (no pivoting (
qr), column pivoting (qrp))
- LU (no pivoting (
- BLAS routines (
blas) - Select LAPACK routines (
lapack)
- Automatic Differentiation (
autodiff): currently only used for testing generic numeric type support- Dual numbers
- Symbolic System:
- Nothing implemented yet
To use this library in your project, run
zig fetch --save git+https://github.com/srmadrid/zmland add it to your build.zig file:
const zml = b.dependency("zml", .{});
exe.root_module.addImport("zml", zml.module("zml"));This library is in the early stages of development and is not yet ready for use. Breaking changes are to be expected every commit, and only the most basic functionality is currently implemented (see Current Features for more information). If you decide to use this library, please be aware that you may encounter bugs and incomplete features. If you find a bug, please report it via an issue on GitHub.
Any feature requests or suggestions are welcome. Please open an issue on GitHub to discuss any ideas you have.