27282930313233
if (values[1] == 0) { return ExprError.DIV0; } return new ExprDouble(values[0] / values[1]); }
10111213141516
{ public Expr evaluate(Expr[] args) throws ExprException { assertArgCount(args, 2); double num = asDouble(args[0], true); int dps = asInteger(args[1], true); return new ExprDouble(Maths.roundUp(num, dps)); }
12131415161718
{ public Expr evaluate(Expr[] args) throws ExprException { double res = 0; for (Expr arg : args) res += sumsq(arg); return new ExprDouble(res); }
21222324252627282930
assertArgCount(args, 1); ExprArray arr = new ExprArray(4, 4); for (int i = 0; i < arr.rows(); i++) { for (int j = 0; j < arr.columns(); j++) { arr.set(i, j, new ExprDouble((i + 1) * (j + 1))); } } return arr; }
202122232425262728
String s = asString(e, false); Double d = ValueParser.parse(s); if (d != null) return new ExprDouble(d.doubleValue()); else return ExprError.VALUE; }
76777879808182
} double vdb = Financials.vdb(cost, salvage, life, start_period, end_period, factor, no_switch); return new ExprDouble(vdb); }
151617181920212223
if (a instanceof ExprArray) { ExprArray ar = (ExprArray) a; a = ar.get(0); } if (a instanceof ExprNumber) { return new ExprDouble(((ExprNumber) a).doubleValue()); } return ExprDouble.ZERO; }
21222324252627
return ExprError.VALUE; int cho = ((ExprNumber) eCho).intValue(); if (num < 0 || cho < 0 || num < cho) return ExprError.NUM; return new ExprDouble(Statistics.permut(num, cho)); }
26272829303132
double r = ((ExprDouble) res).doubleValue(); if (r < d) d = r; } } return new ExprDouble(d); }
3536373839404142434445
if (arg instanceof ExprEvaluatable) { arg = ((ExprEvaluatable) arg).evaluate(); } if (arg instanceof ExprNumber) { return new ExprDouble(((ExprNumber) arg).doubleValue()); } if (arg instanceof ExprArray) { return min(((ExprArray) arg).getArgs()); }