AFC - Abacus Formula Compiler for Java

Decompiled Code For MODE( C832:G832 )

The expression

=MODE( C832:G832 )

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$6();
    }

    public final double dbl() {
        return get$0();
    }

    final double get$6() {
        double d = 0.0;
        double d_0_ = 0.0;
        double d_1_ = 0.0;
        double d_2_ = 0.0;
        d = d_2_ > d_1_ ? d_0_ : d;
        d_0_ = get$1();
        d_1_ = d_2_ > d_1_ ? d_2_ : d_1_;
        double d_3_ = 0.0;
        if (get$1() == get$1())
            d_3_ = d_3_ + 1.0;
        if (get$2() == get$1())
            d_3_ = d_3_ + 1.0;
        if (get$3() == get$1())
            d_3_ = d_3_ + 1.0;
        if (get$4() == get$1())
            d_3_ = d_3_ + 1.0;
        if (get$5() == get$1())
            d_3_ = d_3_ + 1.0;
        d_2_ = d_3_;
        d = d_2_ > d_1_ ? d_0_ : d;
        d_0_ = get$2();
        d_1_ = d_2_ > d_1_ ? d_2_ : d_1_;
        double d_4_ = 0.0;
        if (get$1() == get$2())
            d_4_ = d_4_ + 1.0;
        if (get$2() == get$2())
            d_4_ = d_4_ + 1.0;
        if (get$3() == get$2())
            d_4_ = d_4_ + 1.0;
        if (get$4() == get$2())
            d_4_ = d_4_ + 1.0;
        if (get$5() == get$2())
            d_4_ = d_4_ + 1.0;
        d_2_ = d_4_;
        d = d_2_ > d_1_ ? d_0_ : d;
        d_0_ = get$3();
        d_1_ = d_2_ > d_1_ ? d_2_ : d_1_;
        double d_5_ = 0.0;
        if (get$1() == get$3())
            d_5_ = d_5_ + 1.0;
        if (get$2() == get$3())
            d_5_ = d_5_ + 1.0;
        if (get$3() == get$3())
            d_5_ = d_5_ + 1.0;
        if (get$4() == get$3())
            d_5_ = d_5_ + 1.0;
        if (get$5() == get$3())
            d_5_ = d_5_ + 1.0;
        d_2_ = d_5_;
        d = d_2_ > d_1_ ? d_0_ : d;
        d_0_ = get$4();
        d_1_ = d_2_ > d_1_ ? d_2_ : d_1_;
        double d_6_ = 0.0;
        if (get$1() == get$4())
            d_6_ = d_6_ + 1.0;
        if (get$2() == get$4())
            d_6_ = d_6_ + 1.0;
        if (get$3() == get$4())
            d_6_ = d_6_ + 1.0;
        if (get$4() == get$4())
            d_6_ = d_6_ + 1.0;
        if (get$5() == get$4())
            d_6_ = d_6_ + 1.0;
        d_2_ = d_6_;
        d = d_2_ > d_1_ ? d_0_ : d;
        d_0_ = get$5();
        d_1_ = d_2_ > d_1_ ? d_2_ : d_1_;
        double d_7_ = 0.0;
        if (get$1() == get$5())
            d_7_ = d_7_ + 1.0;
        if (get$2() == get$5())
            d_7_ = d_7_ + 1.0;
        if (get$3() == get$5())
            d_7_ = d_7_ + 1.0;
        if (get$4() == get$5())
            d_7_ = d_7_ + 1.0;
        if (get$5() == get$5())
            d_7_ = d_7_ + 1.0;
        d_2_ = d_7_;
        double d_8_;
        if (d_1_ <= 1.0) {
            Runtime_v2.fun_NA();
            d_8_ = (double) -1;
        } else
            d_8_ = d;
        return d_8_;
    }

    final double get$1() {
        return $inputs.dbl(0);
    }

    final double get$2() {
        return $inputs.dbl(1);
    }

    final double get$3() {
        return $inputs.dbl(2);
    }

    final double get$4() {
        return $inputs.dbl(3);
    }

    final double get$5() {
        return $inputs.dbl(4);
    }
}