Skip to content

calcr interprets text as mathematical expressions supporting basic operators (+,-,*,/) and variable substitution.

Notifications You must be signed in to change notification settings

platzhaltr/calcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

calcr is a small calculator that interprets text as a mathematical expression, supporting basic operators (+,-,*,/) and variable substitution.

float result = Calcr.parseFloat("1 + x", "x", 42); // result = 43

Or use multiple variables

Map<String, Float> variables = new HashMap<String, Float>();
variables.put("x", 42f);
variables.put("y", 7f);
float result = Calcr.parseFloat("x / y", variables); // result = 6

Development

git clone git://github.com/platzhaltr/calcr.git
cd calcr
mvn clean install

Related work

  • exp4j Math expression evaluator with support for all Math operators functions and the possibility to create new ones.

About

calcr interprets text as mathematical expressions supporting basic operators (+,-,*,/) and variable substitution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages