| Crates.io | thales |
| lib.rs | thales |
| version | 0.3.3 |
| created_at | 2026-01-01 18:05:20.616321+00 |
| updated_at | 2026-01-17 17:26:57.673003+00 |
| description | A comprehensive Computer Algebra System (CAS) library for symbolic mathematics, equation solving, calculus, and linear algebra |
| homepage | https://github.com/ChrisGVE/thales |
| repository | https://github.com/ChrisGVE/thales |
| max_upload_size | |
| id | 2016695 |
| size | 1,897,898 |
A comprehensive Computer Algebra System (CAS) library for symbolic mathematics, equation solving, calculus, and numerical methods. Named after Thales of Miletus, the first mathematician in the Greek tradition.
[dependencies]
thales = "0.3.0"
use thales::{parse_equation, SmartSolver, Solver, Variable};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let equation = parse_equation("2*x + 5 = 13")?;
let solver = SmartSolver::new();
let x = Variable::new("x");
let (solution, path) = solver.solve(&equation, &x)?;
// View step-by-step solution
for step in path.steps() {
println!("{}", step);
}
Ok(())
}
use thales::{Cartesian2D, Polar};
fn main() {
let point = Cartesian2D::new(3.0, 4.0);
let polar = point.to_polar();
assert!((polar.r - 5.0).abs() < 1e-10);
// Round-trip conversion
let back = polar.to_cartesian();
assert!((back.x - 3.0).abs() < 1e-10);
}
The full documentation is available on docs.rs/thales, including:
| Guide | Description |
|---|---|
| Solving Equations | Linear, quadratic, polynomial, and systems |
| Calculus Operations | Derivatives, integrals, limits, ODEs |
| Series Expansions | Taylor, Maclaurin, Laurent, asymptotic |
| Coordinate Systems | 2D/3D transforms, complex numbers |
| Numerical Methods | Root-finding algorithms |
| Working with Units | Dimensional analysis |
| Error Handling | ThalesError patterns |
Build for iOS with FFI support:
# Add iOS targets
rustup target add aarch64-apple-ios aarch64-apple-ios-sim
# Build for device
cargo build --release --features ffi --target aarch64-apple-ios
See IOS_BUILD.md for complete iOS integration instructions.
See CHANGELOG.md for version history and release notes.
MIT License - see LICENSE for details.