Crates.io | bt_math |
lib.rs | bt_math |
version | |
source | src |
created_at | 2024-11-19 09:16:23.360424+00 |
updated_at | 2025-02-16 20:01:48.039085+00 |
description | Basic math expression evaluator library. Support basic math operators (+,-,*,/,^), parenthesis, and functions such as log10, ln, log2, exp, sin, cos, tan, asin, acos, atan, abs, sqrt. Support PI and E (Euler's number) as constants. Support negative numbers/expressions. Pow(x,y) supported |
homepage | https://github.com/bachuetech/bt_math |
repository | https://github.com/bachuetech/bt_math.git |
max_upload_size | |
id | 1453045 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.
Support the use of PI and E (Euler's number), negative numbers or expressions, and the following functions: ln, log2, exp (e^#), asin, acos, atan, sin, cos. tan. abs, sqrt. log10
let expression = "2 + 3 * 4";
.......
let f = evaluate_expression(expression).unwrap();
GPL-3.0-only