Skip to content

Commit ce00df4

Browse files
committed
Initial commit: MathCore - Symbolic mathematics library for Rust
MathCore is a comprehensive computer algebra system (CAS) for Rust that provides: Core Features: - Symbolic expression parsing and manipulation - Symbolic differentiation and integration - Equation solving (linear, quadratic, polynomial) - Complex number support - Expression simplification Advanced Features: - Differential equations (ODEs and PDEs) - Matrix operations with nalgebra integration - Arbitrary precision arithmetic (BigInt/BigRational) - Fast Fourier Transform (FFT) - Numerical methods (Newton-Raphson, Runge-Kutta, etc.) - Parallel computation support with Rayon - WASM support for browser deployment The library is designed with performance, safety, and ergonomics in mind, leveraging Rust's type system for reliable scientific computing. Version: 0.3.1 License: MIT Author: Mehmet Yilmaz <mehmet@nonanti.dev>
0 parents  commit ce00df4

26 files changed

Lines changed: 6293 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "09:00"
9+
open-pull-requests-limit: 10
10+
reviewers:
11+
- "Nonanti"
12+
assignees:
13+
- "Nonanti"
14+
commit-message:
15+
prefix: "deps"
16+
include: "scope"
17+
labels:
18+
- "dependencies"
19+
- "rust"
20+
21+
- package-ecosystem: "github-actions"
22+
directory: "/"
23+
schedule:
24+
interval: "weekly"
25+
day: "monday"
26+
time: "09:00"
27+
open-pull-requests-limit: 5
28+
reviewers:
29+
- "Nonanti"
30+
commit-message:
31+
prefix: "ci"
32+
include: "scope"
33+
labels:
34+
- "ci"
35+
- "github-actions"

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Test
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
rust:
19+
- stable
20+
- beta
21+
- nightly
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: dtolnay/rust-toolchain@master
25+
with:
26+
toolchain: ${{ matrix.rust }}
27+
- uses: Swatinem/rust-cache@v2
28+
- name: Run tests
29+
run: cargo test --verbose
30+
- name: Run tests (no default features)
31+
run: cargo test --verbose --no-default-features
32+
- name: Run tests (all features)
33+
run: cargo test --verbose --all-features
34+
35+
fmt:
36+
name: Rustfmt
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: dtolnay/rust-toolchain@stable
41+
with:
42+
components: rustfmt
43+
- name: Check formatting
44+
run: cargo fmt -- --check
45+
46+
clippy:
47+
name: Clippy
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: dtolnay/rust-toolchain@stable
52+
with:
53+
components: clippy
54+
- uses: Swatinem/rust-cache@v2
55+
- name: Run clippy
56+
run: cargo clippy -- -D warnings
57+
58+
coverage:
59+
name: Code coverage
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: dtolnay/rust-toolchain@stable
64+
- uses: Swatinem/rust-cache@v2
65+
- name: Install tarpaulin
66+
run: cargo install cargo-tarpaulin
67+
- name: Generate coverage
68+
run: cargo tarpaulin --verbose --workspace

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
name: Publish to crates.io
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
- name: Publish
16+
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
17+
env:
18+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/target
2+
**/*.rs.bk
3+
*.pdb
4+
Cargo.lock
5+
.DS_Store
6+
*.swp
7+
*.swo
8+
*~
9+
.idea/
10+
.vscode/

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Changelog
2+
3+
## [0.3.1] - 2025-08-30
4+
### Changed
5+
- Repository maintenance and documentation improvements
6+
- Clean commit history for better maintainability
7+
8+
## [0.3.0] - 2025-08-28
9+
10+
### Added
11+
- Differential equations solver (ODEs and PDEs)
12+
- RK4 method
13+
- Euler method
14+
- Stiff solver (implicit)
15+
- 2nd order ODEs
16+
- System of ODEs
17+
- Heat equation
18+
- Wave equation
19+
- Laplace equation
20+
21+
### Changed
22+
- Renamed ML module to Optimization
23+
- Better docs
24+
- PDE solvers more stable now
25+
26+
### Fixed
27+
- Type errors in matrix ops
28+
- Convergence issues
29+
30+
## [0.2.0] - 2025-07-15
31+
32+
### Added
33+
- Limits (one-sided, at infinity)
34+
- Matrix operations:
35+
- Basic ops (multiply, add, transpose)
36+
- Determinant, trace, eigenvalues
37+
- LU/QR/SVD decomposition
38+
- Linear system solver
39+
- Arbitrary precision (BigInt/BigRational)
40+
- Exact rational math
41+
- Compute pi and e to arbitrary digits
42+
- Optimization stuff:
43+
- Gradients and Hessians
44+
- Autodiff
45+
- Gradient descent
46+
- Taylor series
47+
- Newton's method
48+
- Lagrange multipliers
49+
- Better integration:
50+
- Integration by parts
51+
- u-substitution
52+
- Partial fractions
53+
54+
### Improved
55+
- Complex numbers work better
56+
- Error handling
57+
58+
## [0.1.0] - 2025-05-20
59+
60+
Initial release!
61+
62+
- Expression parser (handles precedence correctly)
63+
- Symbolic engine
64+
- Basic math ops
65+
- Differentiation/integration (symbolic)
66+
- Equation solver
67+
- Complex numbers
68+
- ASCII plots
69+
- Simplification
70+
- Variables

0 commit comments

Comments
 (0)