sophy

Crates.iosophy
lib.rssophy
version0.2.0
created_at2025-09-25 14:59:53.260733+00
updated_at2025-09-25 18:17:43.026785+00
descriptionA lightweight, efficient mathematical library for numerical methods, functions, and utilities in pure Rust
homepagehttps://github.com/reinanbr/sophy
repositoryhttps://github.com/reinanbr/sophy
max_upload_size
id1854720
size24,668
Reinan Bezerra (reinanbr)

documentation

https://docs.rs/sophy

README

Sophy Library 🧮

A lightweight mathematical library for Rust providing numerical methods and mathematical utilities.

Crates.io Documentation License: MIT OR Apache-2.0

This is the core library crate. For usage examples and complete documentation, see the main project README.

✨ Features

  • 🔢 Numerical Methods: Newton-Raphson root finding and more
  • 📊 Mathematical Constants: π, e, φ, and other important constants
  • 🧮 Number Utilities: Base operations and mathematical utilities
  • 🦀 Pure Rust: Memory-safe, zero-cost abstractions
  • 📚 Well Documented: Comprehensive API documentation

📦 Installation

Add sophy as a dependency in your Cargo.toml:

[dependencies]
sophy = "0.1.23"

🚀 Quick Example

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.



Commit count: 47

cargo fmt