Skip to main content

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.

MathCore is a symbolic math library and computer algebra system (CAS) for Rust. It lets you parse math expressions from strings, manipulate them symbolically, and run numerical methods — all from a single ergonomic API. Whether you need symbolic differentiation, ODE solving, FFT, or arbitrary-precision arithmetic, MathCore provides it as a native Rust crate with no_std support.

Quickstart

Get MathCore running in your project in under five minutes

Installation

Add MathCore to your Cargo.toml with the right feature flags

API Reference

Full reference for every public type, method, and module

Core Concepts

Understand the Expr tree, parsing, and error handling

What MathCore can do

Calculus

Symbolic differentiation, integration, and limits

Equation Solving

Linear, quadratic, and numerical root finding

Matrix Algebra

Determinants, eigenvalues, LU/QR/SVD decomposition

Optimization

Gradients, Hessians, gradient descent, Taylor series

Differential Equations

ODE and PDE solvers using RK4, Euler, and stiff methods

Arbitrary Precision

Exact rational arithmetic using BigInt and BigRational

Getting started

1

Add the dependency

Run cargo add mathcore or add it manually to Cargo.toml:
[dependencies]
mathcore = "0.3.1"
2

Import MathCore

use mathcore::MathCore;
3

Parse and evaluate

let math = MathCore::new();
let result = math.calculate("2 + 3 * 4").unwrap();
println!("{}", result); // 14
4

Do symbolic math

let derivative = MathCore::differentiate("x^2 + 2*x + 1", "x").unwrap();
println!("{}", derivative); // 2*x + 2

let roots = MathCore::solve("x^2 - 4", "x").unwrap();
println!("{:?}", roots); // [2, -2]
MathCore supports no_std environments. See the no_std guide for configuration details.

Build docs developers (and LLMs) love