#expression-evaluator #basic #parentheses #evaluate #operator #rpn

bt_math

Basic math expression evaluator library. Support basic math operators (+,-,*,/,^), parenthesis, and some functions such as log, ln, log2, exp, sin, cos, tan, asin, acos, atan, abs, sqrt

1 unstable release

new 0.1.0 Nov 19, 2024

#499 in Math

Download history 70/week @ 2024-11-13

73 downloads per month

GPL-3.0-only

11KB
151 lines

Project Title

BT MATH

Description

A simple implementation of an expression evaluator that can handle basic arithmetic operations, parentheses, and some mathematical functions that provide a way to evaluate mathematical expressions using RPN (Reverse Polish Notation) implemented in two parts: parsing and evaluation.

Usage

let expression = "2 + 3 * 4";
 .......
let f = evaluate_expression(expression).unwrap();

Version History

  • 0.1.0
    • Initial Release

License

GPL-3.0-only

Dependencies

~2–3MB
~54K SLoC