public ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol) {double result;try {List<Double> temp = new ArrayList<>();for (ValueEval arg : args) {collectValues(arg, temp);}double[] values = new double[temp.size()];for (int i = 0; i < values.length; i++) {values[i] = temp.get(i).doubleValue();}result = evaluate(values);} catch (EvaluationException e) {return e.getErrorEval();}return new NumberEval(result);}