MathCore is a computer algebra system (CAS) for Rust that lets you work with math symbolically — not just numerically. Instead of approximating results at evaluation time, MathCore manipulates expressions as symbolic trees, enabling exact differentiation, integration, equation solving, and simplification directly in your Rust programs. Whether you’re building a physics simulator, an ML optimizer, or a financial calculator that demands exact arithmetic, MathCore gives you a production-ready symbolic math foundation without leaving the Rust ecosystem.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nonanti/mathcore/llms.txt
Use this file to discover all available pages before exploring further.
Key Features
Expression Parsing
Parse math expressions from strings with correct operator precedence, including arithmetic, trigonometric, exponential, logarithmic, and complex-number syntax.
Symbolic Calculus
Differentiate and integrate expressions symbolically. Supports polynomials, trigonometric functions, exponentials, and products via the chain and product rules.
Equation Solving
Solve linear, quadratic, and select higher-degree equations for exact roots. Returns all solutions, including complex roots when they exist.
Matrix Algebra
Symbolic and numeric matrix operations powered by nalgebra: determinants, eigenvalues, LU/QR/SVD decompositions, and linear-system solvers.
Optimization & Autodiff
Compute gradients and Hessians symbolically, run gradient descent, and expand Taylor series — building blocks for ML and numerical optimization.
ODE & PDE Solvers
Solve ordinary and partial differential equations using RK4, Euler, implicit stiff solvers, and finite-difference methods for the heat, wave, and Laplace equations.
FFT & Signal Processing
Perform fast Fourier transforms via rustfft (opt-in
fft feature) for frequency-domain analysis and signal processing pipelines.Arbitrary Precision
Exact rational arithmetic with
BigInt/BigRational, including the ability to compute π and e to an arbitrary number of digits without floating-point error.When to Use MathCore
Scientific Computing
Physics simulations and engineering calculations that require symbolic manipulation alongside numerical evaluation — limits, series expansions, and ODE integration all in one library.
ML & Optimization
Automatic differentiation and symbolic gradient computation for loss functions, making it straightforward to derive and verify update rules without external AD frameworks.
Education
Demonstrate calculus, linear algebra, and numerical methods concepts interactively. MathCore’s human-readable
Display output makes it easy to show step-by-step symbolic results.Financial Calculations
Exact rational arithmetic eliminates floating-point rounding in interest calculations, amortisation schedules, and any domain where precision loss is unacceptable.
no_std Support
MathCore is built on a #![no_std] core and uses alloc throughout, so it can run in embedded or bare-metal environments. The std, parallel, and fft features are all opt-in — disable the default features to get a fully no_std-compatible build:
Current Version
The current stable release is 0.3.1 (2025-08-30). Version 0.3.0 introduced the ODE/PDE solver module (RK4, Euler, implicit stiff, heat/wave/Laplace equations). See the changelog on GitHub for the full history.MathCore follows semantic versioning. The public API is considered stable within a minor version series.
Ready to Get Started?
Add MathCore to your project and run your first symbolic computation in under five minutes.Quickstart →
Parse expressions, differentiate, and solve equations with MathCore in a single Rust file.
