12131415161718
counter.count++; counter.value += value; } protected Expr evaluate(Counter counter) throws ExprException { return new ExprDouble(counter.value / counter.count); }
53545556575859
double b = bnum / bdem; double a = averageY - b * averageX; double res = a + b * forecastX; return new ExprDouble(res); }
3031323334353637
factor = asDouble(args[4], true); if (cost == 0) return ExprDouble.ZERO; return new ExprDouble(Financials.ddb(cost, salvage, life, period, factor)); }
6789101112
import org.boris.expr.function.SimpleDatabaseFunction; public class DCOUNTA extends SimpleDatabaseFunction { protected Expr evaluateMatches(Expr[] matches) throws ExprException { return new ExprDouble(matches.length); }
45464748495051
// Need to match sign with implementation double mod = num % div; if ((mod > 0 && div < 0) || (mod < 0 && div > 0)) mod *= -1; return new ExprDouble(mod); }
28293031323334
double sum = 0; for (int i = 0; i < len; i++) { sum += eval(asDouble(arrayX, i), asDouble(arrayY, i)); } return new ExprDouble(sum); }
34353637383940
double sum = 0; for (int i = 0; i < len; i++) { sum += eval(get(range, i), cond, get(sumrange, i)); } return new ExprDouble(sum); }
assertArgCount(args, 3); double x = asDouble(args[0], true); double l = asDouble(args[1], true); boolean c = asBoolean(args[2], true); return new ExprDouble(Statistics.exponDist(x, l, c)); }
35363738394041
counter.value += value; counter.count++; } protected Expr evaluate(Counter counter) throws ExprException { return new ExprDouble(counter.value2); }
17181920212223
public static Expr product(Expr[] args) throws ExprException { double res = 1; for (Expr arg : args) res *= product(arg); return new ExprDouble(res); }