pemel 0.2.1

Parsing and Evaluating of Math Expressions Library
Documentation
  • Coverage
  • 17.07%
    7 out of 41 items documented0 out of 0 items with examples
  • Size
  • Source code size: 37.95 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 683.41 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MikulasBar/pemel
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MikulasBar

PEMEL

Crates.io License

Overview

pemel is a Rust library providing a utilities for parsing and evaluating mathematical expressions.

Features

  • Basic arithmetic operations
  • Trigonometric functions
  • Exponential and logarithmic functions
  • Absolute value function
  • Evaluation with multiple variables
  • Numeric derivatives
  • Implicit evaluation during parsing
  • Substitution

Usage

Here is a simple example of how to use pemel:

use pemel::prelude::*;

fn main() {
    let input = "2 * x^2 - 5 * log(x)";
    let expr = Expr::parse(input, true).unwrap();
    let result = expr.eval_with_var("x", 10.0).unwrap();

    println!("{}", result); // Output: 195.0
}

Contributing

Untill I create a CONTRIBUTING.md file, I will not accept any pull requests.

License

This project is licensed under the MIT License. See the LICENSE file for details.