sophy 0.2.0

A lightweight, efficient mathematical library for numerical methods, functions, and utilities in pure Rust
Documentation
  • Coverage
  • 100%
    16 out of 16 items documented14 out of 14 items with examples
  • Size
  • Source code size: 24.12 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.87 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • reinanbr/sophy
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • reinanbr

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.