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);}
public ValueEval Evaluate(ValueEval[] args, int srcCellRow, int srcCellCol){double result;try{IList temp = new ArrayList();for (int i = 0; i < args.Length; i++){CollectValues(args[i], temp);}double[] values = new double[temp.Count];for (int i = 0; i < values.Length; i++){values[i] = (Double)temp[i];}result = Evaluate(values);}catch (EvaluationException e){return e.GetErrorEval();}return new NumberEval(result);}