Decompiled Code For DSUM( B2:E8, D42, B14:D15 )
The expression
=DSUM( B2:E8, D42, B14:D15 )
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$5(get$2(), get$3(), get$4()); } public final double dbl() { return get$0(); } final double get$5(String string, double d, double d_0_) { double d_1_ = 0.0; switch ((int) Runtime_v2.checkDouble(get$1())) { case 2: if (get$6("Apple", 18.0, string, d, d_0_)) d_1_ += 18.0; if (get$6("Pear", 12.0, string, d, d_0_)) d_1_ += 12.0; if (get$6("Cherry", 13.0, string, d, d_0_)) d_1_ += 13.0; if (get$6("Apple", 14.0, string, d, d_0_)) d_1_ += 14.0; if (get$6("Pear", 9.0, string, d, d_0_)) d_1_ += 9.0; if (get$6("Apple", 8.0, string, d, d_0_)) d_1_ += 8.0; break; case 3: if (get$6("Apple", 18.0, string, d, d_0_)) d_1_ += 14.0; if (get$6("Pear", 12.0, string, d, d_0_)) d_1_ += 10.0; if (get$6("Cherry", 13.0, string, d, d_0_)) d_1_ += 9.0; if (get$6("Apple", 14.0, string, d, d_0_)) d_1_ += 10.0; if (get$6("Pear", 9.0, string, d, d_0_)) d_1_ += 8.0; if (get$6("Apple", 8.0, string, d, d_0_)) d_1_ += 6.0; break; case 4: if (get$6("Apple", 18.0, string, d, d_0_)) d_1_ += 105.0; if (get$6("Pear", 12.0, string, d, d_0_)) d_1_ += 96.0; if (get$6("Cherry", 13.0, string, d, d_0_)) d_1_ += 105.0; if (get$6("Apple", 14.0, string, d, d_0_)) d_1_ += 75.0; if (get$6("Pear", 9.0, string, d, d_0_)) d_1_ += 76.8; if (get$6("Apple", 8.0, string, d, d_0_)) d_1_ += 45.0; break; default: return 0.0; } return d_1_; } final boolean get$6(String string, double d, String string_2_, double d_3_, double d_4_) { if (string.equalsIgnoreCase(string_2_) && d > d_3_ && d < d_4_) return true; return false; } final double get$1() { return $inputs.dbl(3); } final String get$2() { return Runtime_v2.stringFromString($inputs.str(0)); } final double get$3() { return $inputs.dbl(1); } final double get$4() { return $inputs.dbl(2); } }