Decompiled Code For DSUM( B2:E8, D43, B20:B21 )
The expression
=DSUM( B2:E8, D43, B20:B21 )
is compiled to the following class(es):
package org.formulacompiler.gen; import org.formulacompiler.runtime.Computation; import org.formulacompiler.runtime.internal.Environment; import org.formulacompiler.runtime.internal.Runtime_v2; import org.formulacompiler.tests.reference.base.Inputs; import org.formulacompiler.tests.reference.base.Outputs; final class $Root extends Outputs implements Computation { private final Inputs $inputs; final Environment $environment; $Root(Inputs inputs, Environment environment) { $environment = environment; $inputs = inputs; } final double get$0() { return get$2(); } public final double dbl() { return get$0(); } final double get$2() { double d = 0.0; switch ((int) Runtime_v2.checkDouble(get$1())) { case 2: if (get$3("Apple", 18.0)) d += 18.0; if (get$3("Pear", 12.0)) d += 12.0; if (get$3("Cherry", 13.0)) d += 13.0; if (get$3("Apple", 14.0)) d += 14.0; if (get$3("Pear", 9.0)) d += 9.0; if (get$3("Apple", 8.0)) d += 8.0; break; case 3: if (get$3("Apple", 18.0)) d += 14.0; if (get$3("Pear", 12.0)) d += 10.0; if (get$3("Cherry", 13.0)) d += 9.0; if (get$3("Apple", 14.0)) d += 10.0; if (get$3("Pear", 9.0)) d += 8.0; if (get$3("Apple", 8.0)) d += 6.0; break; case 4: if (get$3("Apple", 18.0)) d += 105.0; if (get$3("Pear", 12.0)) d += 96.0; if (get$3("Cherry", 13.0)) d += 105.0; if (get$3("Apple", 14.0)) d += 75.0; if (get$3("Pear", 9.0)) d += 76.8; if (get$3("Apple", 8.0)) d += 45.0; break; default: return 0.0; } return d; } final boolean get$3(String string, double d) { if (string.equalsIgnoreCase("Apple") && d > 10.0 && d < 16.0) return true; return false; } final double get$1() { return $inputs.dbl(0); } }