Crates.io | sophy |
lib.rs | sophy |
version | 0.2.0 |
created_at | 2025-09-25 14:59:53.260733+00 |
updated_at | 2025-09-25 18:17:43.026785+00 |
description | A lightweight, efficient mathematical library for numerical methods, functions, and utilities in pure Rust |
homepage | https://github.com/reinanbr/sophy |
repository | https://github.com/reinanbr/sophy |
max_upload_size | |
id | 1854720 |
size | 24,668 |
A lightweight mathematical library for Rust providing numerical methods and mathematical utilities.
This is the core library crate. For usage examples and complete documentation, see the main project README.
Add sophy
as a dependency in your Cargo.toml
:
[dependencies]
sophy = "0.1.23"
use sophy::methods::raphson::raphson;
fn main() {
let f = |x: f64| x * x - 2.0; // Function: x^2 - 2
let df = |x: f64| 2.0 * x; // Derivative: 2x
let root = raphson(1.0, f, df, 1e-10, 100);
println!("Root approximation: {:.10}", root); // √2 ≈ 1.4142135624
}
## 📂 Project Structure
sophi ├── Cargo.toml ├── README.md └── src ├── base // Number utilities ├── functions // Mathematical functions ├── methods // Numerical methods └── lib.rs
## 🔧 Roadmap
* [ ] Add more numerical methods (e.g., integration, interpolation)
* [ ] Implement linear algebra operations
* [ ] Add probability and statistics functions
* [ ] Improve error handling (return `Result` instead of `panic!`)
* [ ] Publish on [crates.io](https://crates.io/)
## 🤝 Contributions
Contributions are welcome! Feel free to open issues, suggest features, or submit pull requests.
## 📜 License
This project is licensed under the MIT License.
---
Made with ❤️ in Rust.