FuncPars - a Java function parser

FuncPars is a library which can be used to evaluate mathematical formulas given as string. It can be used for displaying graphs, evaluating configuration data or for other calculation tasks.
  • A given mathematical formula is given a string.
  • It is then parsed and converted into a RPN expression (reversed polnish notation).
  • After this, it can be calculated as often as needed, with better speed as when parsing the formula again for every calculation (RPN uses a simple stack for evaluation).
  • Changing values can be held in up to 3 variables (called x,y,z), but this can be extended
  • Currently, the only function (besides +,- etc.) supported is sin(x), but FuncPars is easy to extend with new functions.
  • It is even possible to add new operators (this is the same as adding new functions), so it is possible to even support boolean function (e.g. if you want to write a preprocessor like cpp and need to evaluate #IF expressions)

files

Version 0.2: Download
Version 0.1: Download