* @param symbols the symbol/value mapping
* @return the evaluated result
* @throws Exception if something goes wrong
*/
public static double evaluate(String expr, HashMap symbols) throws Exception {
SymbolFactory sf;
ByteArrayInputStream parserInput;
Parser parser;
sf = new DefaultSymbolFactory();
parserInput = new ByteArrayInputStream(expr.getBytes());