Port of exp4j math expression evaluator from Frank Asseg