#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

0.1.0 Nov 19, 2024

#637 in Math

Download history 143/week @ 2024-11-18 8/week @ 2024-11-25 6/week @ 2024-12-09

157 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

~200–300KB