Crates.io | bt_math |
lib.rs | bt_math |
version | 0.1.0 |
source | src |
created_at | 2024-11-19 09:16:23.360424 |
updated_at | 2024-11-19 09:16:23.360424 |
description | 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 |
homepage | https://github.com/bachuetech/bt_math |
repository | https://github.com/bachuetech/bt_math.git |
max_upload_size | |
id | 1453045 |
size | 14,088 |
BT MATH
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.
let expression = "2 + 3 * 4";
.......
let f = evaluate_expression(expression).unwrap();
GPL-3.0-only