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.round(num, dps)); }
public class TODAY extends AbstractFunction { public Expr evaluate(Expr[] args) throws ExprException { assertArgCount(args, 0); return new ExprDouble(ExcelDate.toExcelDate(new Date().getTime())); }
42434445464748
return ExprError.VALUE; b = ((ExprNumber) eB).doubleValue(); } if (x < a || x > b || a == b) return ExprError.NUM; return new ExprDouble(Statistics.betaDist(x, alpha, beta, a, b)); }
20212223242526
} protected Expr evaluate(Counter counter) throws ExprException { if (counter.result != null) return counter.result; return new ExprDouble(1. / (counter.value / counter.count)); }
14151617181920
double life = asDouble(args[2], true); double per = asDouble(args[3], true); double syd = ((cost - salvage) * (life - per + 1) * 2) / (life * (life + 1)); return new ExprDouble(syd); }
29303132333435
return ExprError.VALUE; double alpha = ((ExprNumber) ea).doubleValue(); if (alpha < 0 || alpha > 1) return ExprError.NUM; return new ExprDouble(Statistics.critBinom(trials, p, alpha)); }
9101112131415
{ public Expr evaluate(Expr[] args) throws ExprException { assertArgCount(args, 2); double num = asDouble(args[0], true); double pow = asDouble(args[1], true); return new ExprDouble(Math.pow(num, pow)); }
22232425262728
if (!isNumber(eDF)) return ExprError.VALUE; int df = ((ExprNumber) eDF).intValue(); if (df < 0 || df > 10e10) return ExprError.NUM; return new ExprDouble(Statistics.chiInv(p, df)); }
19202122232425
return ExprError.NUM; double m = val % rnd; m = Maths.round(m, 8); if (m == rnd) m = 0; return new ExprDouble(val - m); }
25262728293031
return ExprError.VALUE; double d = ((ExprNumber) eD).doubleValue(); double r = ExcelDate.date(y, m, d); if (r < 0) return ExprError.NUM; return new ExprDouble(r); }