calculator-parser

Crates.iocalculator-parser
lib.rscalculator-parser
version1.0.1
sourcesrc
created_at2021-06-12 02:00:05.556511
updated_at2021-06-21 22:42:54.753024
descriptionA simple calculation parser for user input
homepagehttps://github.com/AsyncBanana/calculator-rs/tree/master/calculator
repository
max_upload_size
id409186
size11,349
AsyncBanana (AsyncBanana)

documentation

README

Calculator

A lightweight rust calculation parser. Only supports basic syntax, eg. no parentheses or functions beyond basic operators.

The current operators that are supported are

Character used Function
+ Add to number
- Subtract from number
* Multiply number
\ Divide number
^ Use an exponent

Example: 2^2+5 would be transformed into 9. It is pretty much just normal math syntax.

Just pass a string reference to the calculate function, and a 64 bit floating point number will be returned.

Commit count: 0

cargo fmt