A Zig Library for Mathematical Numerical Method Techniques
This library is designed to be used to advance the mathematical capabilities of MufiZ and also to be used generally in any Zig project that requires numerical methods. Thus most components of this library is completely written in Zig, and can also have methods to accept raw C pointer types.
-
Interpolation and Approximation:
- Linear Interpolation
- Polynomial Interpolation
- Lagrange Interpolation
- Newton Interpolation
- Spline Interpolation
- Cubic Spline
- Quadratic Spline
- Rational Interpolation (requires MatrixAlgo)
- Akima Interpolation
- Gaussian Process Regression
- Least Square Approximation
- Chebyshev Approximation
-
Optimization:
- Gradient Descent (for minimization and maximization)
- Stochastic Gradient Descent
- Mini-Batch Gradient Descent
- Batch Gradient Descent
- Momentum Gradient Descent
- Nesterov Accelerated Gradient Descent
- Quasi-Newton Method
- BFGS
- L-BFGS
- Newton's Method (for minimization and root finding)
- Gradient Descent (for minimization and maximization)
-
Root Finding:
- Bisection Method
- Secant Method
- Brent's Method
- Inverse Quadratic Interpolation
-
Numerical Integration:
- Trapezoidal Rule
- Simpson's Rule
- Romberg Integration
- Gaussian Quadrature
-
Derivative Approximation:
- Forward Difference
- Backward Difference
- Central Difference
-
Ordinary Differential Equation:
- Euler's Method
- Runge-Kutta Method (RK4)
-
Finance
- Black-Scholes Model
- Binomial Option Pricing Model
- Monte Carlo Simulation
We also hope to add data visualization tools in the future, if we can find a good way to do it in Zig.
This project is licensed under the GPLv2 License - see the LICENSE file for details.
If you would like to contribute to this project, please feel free to fork this repository and submit a pull request. We would love to see more people contributing to this project!