| Crates.io | sophi |
| lib.rs | sophi |
| version | 0.1.21 |
| created_at | 2025-04-18 19:15:20.271275+00 |
| updated_at | 2025-05-26 17:32:11.439308+00 |
| description | Math Physics library in rust |
| homepage | https://github.com/reinanbr/sophi |
| repository | https://github.com/reinanbr/sophi |
| max_upload_size | |
| id | 1639793 |
| size | 5,932 |
sophi is a lightweight, efficient, and extensible math library written in pure Rust.
It provides mathematical functions, numerical methods, and number utilities for scientific computing, educational tools, or general-purpose applications.
Add sophi as a dependency in your Cargo.toml:
[dependencies]
sophi = { path = "./sophi" }
(Published version coming soon)
use sophi::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: {}", root);
}
use sophi::functions::exp::exp;
fn main() {
let result = exp(1.0);
println!("exp(1) ≈ {}", result); // Should be close to 2.71828...
}
sophi
├── Cargo.toml
├── README.md
└── src
├── base // Number utilities
├── functions // Mathematical functions
├── methods // Numerical methods
└── lib.rs
Result instead of panic!)Contributions are welcome! Feel free to open issues, suggest features, or submit pull requests.
This project is licensed under the MIT License.
Made with ❤️ in Rust.