AFC - Abacus Formula Compiler for Java

Decompiled Code For TRIMMEAN( C844:G844, H844 )

The expression

=TRIMMEAN( C844:G844, H844 )

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.RuntimeDouble_v2;
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() {
        double d;
        if (!(get$6() >= 0.0) || get$6() >= 1.0) {
            Runtime_v2.fun_ERROR("#NUM! because not 0 <= k < 1 in TRIMMEAN");
            d = (double) -1;
        } else if (Math.floor(get$6() * 5.0 / 2.0) == 0.0)
            d = get$7();
        else {
            $Root root_0_ = this;
            double d_2_;
            double d_1_ = d_2_ = Math.floor(get$6() * 5.0 / 2.0);
            double d_3_;
            if (!(5.0 - Math.floor(get$6() * 5.0 / 2.0) + 1.0 <= 5.0)
                || 5.0 - Math.floor(get$6() * 5.0 / 2.0) + 1.0 < 1.0) {
                Runtime_v2
                    .fun_ERROR("#NUM! because not 1 <= k <= n in SMALL/LARGE");
                d_3_ = (double) -1;
            } else {
                double d_4_;
                d_3_ = get$9(d_4_
                             = 5.0 - Math.floor(get$6() * 5.0 / 2.0) + 1.0);
            }
            double d_6_;
            double d_5_ = d_6_ = d_3_;
            double d_7_;
            if (!(Math.floor(get$6() * 5.0 / 2.0) <= 5.0)
                || Math.floor(get$6() * 5.0 / 2.0) < 1.0) {
                Runtime_v2
                    .fun_ERROR("#NUM! because not 1 <= k <= n in SMALL/LARGE");
                d_7_ = (double) -1;
            } else {
                double d_8_;
                d_7_ = get$15(d_8_ = Math.floor(get$6() * 5.0 / 2.0));
            }
            double d_9_;
            d = root_0_.get$8(d_1_, d_5_, d_9_ = d_7_);
        }
        return d;
    }

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

    final double get$7() {
        double d = 0.0;
        d += get$1();
        d += get$2();
        d += get$3();
        d += get$4();
        d += get$5();
        return d / 5.0;
    }

    final double get$8(double d, double d_10_, double d_11_) {
        double d_12_ = 0.0;
        double d_13_ = 0.0;
        double d_14_ = 0.0;
        d_12_ = get$1() < d_10_ &#38;&#38; get$1() > d_11_ ? d_12_ + get$1() : d_12_;
        d_13_ = get$1() >= d_10_ ? d_13_ + 1.0 : d_13_;
        d_14_ = get$1() <= d_11_ ? d_14_ + 1.0 : d_14_;
        d_12_ = get$2() < d_10_ &#38;&#38; get$2() > d_11_ ? d_12_ + get$2() : d_12_;
        d_13_ = get$2() >= d_10_ ? d_13_ + 1.0 : d_13_;
        d_14_ = get$2() <= d_11_ ? d_14_ + 1.0 : d_14_;
        d_12_ = get$3() < d_10_ &#38;&#38; get$3() > d_11_ ? d_12_ + get$3() : d_12_;
        d_13_ = get$3() >= d_10_ ? d_13_ + 1.0 : d_13_;
        d_14_ = get$3() <= d_11_ ? d_14_ + 1.0 : d_14_;
        d_12_ = get$4() < d_10_ &#38;&#38; get$4() > d_11_ ? d_12_ + get$4() : d_12_;
        d_13_ = get$4() >= d_10_ ? d_13_ + 1.0 : d_13_;
        d_14_ = get$4() <= d_11_ ? d_14_ + 1.0 : d_14_;
        d_12_ = get$5() < d_10_ &#38;&#38; get$5() > d_11_ ? d_12_ + get$5() : d_12_;
        d_13_ = get$5() >= d_10_ ? d_13_ + 1.0 : d_13_;
        d_14_ = get$5() <= d_11_ ? d_14_ + 1.0 : d_14_;
        return ((d_12_ + (d_13_ - d) * d_10_ + (d_14_ - d) * d_11_)
                / (5.0 - 2.0 * d));
    }

    final double get$9(double d) {
        double d_15_ = -1.7976931348623157E308;
        double d_16_ = 1.0;
        d_15_ = d_16_ > d ? d_15_ : get$10(d_16_, d_15_);
        d_16_++;
        d_15_ = d_16_ > d ? d_15_ : get$11(d_16_, d_15_);
        d_16_++;
        d_15_ = d_16_ > d ? d_15_ : get$12(d_16_, d_15_);
        d_16_++;
        d_15_ = d_16_ > d ? d_15_ : get$13(d_16_, d_15_);
        d_16_++;
        d_15_ = d_16_ > d ? d_15_ : get$14(d_16_, d_15_);
        d_16_++;
        return d_15_;
    }

    final double get$10(double d, double d_17_) {
        double d_18_ = 1.7976931348623157E308;
        double d_19_ = 0.0;
        d_18_ = get$1() > d_17_ ? RuntimeDouble_v2.min(get$1(), d_18_) : d_18_;
        d_19_ = get$1() <= d_17_ ? d_19_ + 1.0 : d_19_;
        d_18_ = get$2() > d_17_ ? RuntimeDouble_v2.min(get$2(), d_18_) : d_18_;
        d_19_ = get$2() <= d_17_ ? d_19_ + 1.0 : d_19_;
        d_18_ = get$3() > d_17_ ? RuntimeDouble_v2.min(get$3(), d_18_) : d_18_;
        d_19_ = get$3() <= d_17_ ? d_19_ + 1.0 : d_19_;
        d_18_ = get$4() > d_17_ ? RuntimeDouble_v2.min(get$4(), d_18_) : d_18_;
        d_19_ = get$4() <= d_17_ ? d_19_ + 1.0 : d_19_;
        d_18_ = get$5() > d_17_ ? RuntimeDouble_v2.min(get$5(), d_18_) : d_18_;
        d_19_ = get$5() <= d_17_ ? d_19_ + 1.0 : d_19_;
        return d_19_ >= d ? d_17_ : d_18_;
    }

    final double get$11(double d, double d_20_) {
        double d_21_ = 1.7976931348623157E308;
        double d_22_ = 0.0;
        d_21_ = get$1() > d_20_ ? RuntimeDouble_v2.min(get$1(), d_21_) : d_21_;
        d_22_ = get$1() <= d_20_ ? d_22_ + 1.0 : d_22_;
        d_21_ = get$2() > d_20_ ? RuntimeDouble_v2.min(get$2(), d_21_) : d_21_;
        d_22_ = get$2() <= d_20_ ? d_22_ + 1.0 : d_22_;
        d_21_ = get$3() > d_20_ ? RuntimeDouble_v2.min(get$3(), d_21_) : d_21_;
        d_22_ = get$3() <= d_20_ ? d_22_ + 1.0 : d_22_;
        d_21_ = get$4() > d_20_ ? RuntimeDouble_v2.min(get$4(), d_21_) : d_21_;
        d_22_ = get$4() <= d_20_ ? d_22_ + 1.0 : d_22_;
        d_21_ = get$5() > d_20_ ? RuntimeDouble_v2.min(get$5(), d_21_) : d_21_;
        d_22_ = get$5() <= d_20_ ? d_22_ + 1.0 : d_22_;
        return d_22_ >= d ? d_20_ : d_21_;
    }

    final double get$12(double d, double d_23_) {
        double d_24_ = 1.7976931348623157E308;
        double d_25_ = 0.0;
        d_24_ = get$1() > d_23_ ? RuntimeDouble_v2.min(get$1(), d_24_) : d_24_;
        d_25_ = get$1() <= d_23_ ? d_25_ + 1.0 : d_25_;
        d_24_ = get$2() > d_23_ ? RuntimeDouble_v2.min(get$2(), d_24_) : d_24_;
        d_25_ = get$2() <= d_23_ ? d_25_ + 1.0 : d_25_;
        d_24_ = get$3() > d_23_ ? RuntimeDouble_v2.min(get$3(), d_24_) : d_24_;
        d_25_ = get$3() <= d_23_ ? d_25_ + 1.0 : d_25_;
        d_24_ = get$4() > d_23_ ? RuntimeDouble_v2.min(get$4(), d_24_) : d_24_;
        d_25_ = get$4() <= d_23_ ? d_25_ + 1.0 : d_25_;
        d_24_ = get$5() > d_23_ ? RuntimeDouble_v2.min(get$5(), d_24_) : d_24_;
        d_25_ = get$5() <= d_23_ ? d_25_ + 1.0 : d_25_;
        return d_25_ >= d ? d_23_ : d_24_;
    }

    final double get$13(double d, double d_26_) {
        double d_27_ = 1.7976931348623157E308;
        double d_28_ = 0.0;
        d_27_ = get$1() > d_26_ ? RuntimeDouble_v2.min(get$1(), d_27_) : d_27_;
        d_28_ = get$1() <= d_26_ ? d_28_ + 1.0 : d_28_;
        d_27_ = get$2() > d_26_ ? RuntimeDouble_v2.min(get$2(), d_27_) : d_27_;
        d_28_ = get$2() <= d_26_ ? d_28_ + 1.0 : d_28_;
        d_27_ = get$3() > d_26_ ? RuntimeDouble_v2.min(get$3(), d_27_) : d_27_;
        d_28_ = get$3() <= d_26_ ? d_28_ + 1.0 : d_28_;
        d_27_ = get$4() > d_26_ ? RuntimeDouble_v2.min(get$4(), d_27_) : d_27_;
        d_28_ = get$4() <= d_26_ ? d_28_ + 1.0 : d_28_;
        d_27_ = get$5() > d_26_ ? RuntimeDouble_v2.min(get$5(), d_27_) : d_27_;
        d_28_ = get$5() <= d_26_ ? d_28_ + 1.0 : d_28_;
        return d_28_ >= d ? d_26_ : d_27_;
    }

    final double get$14(double d, double d_29_) {
        double d_30_ = 1.7976931348623157E308;
        double d_31_ = 0.0;
        d_30_ = get$1() > d_29_ ? RuntimeDouble_v2.min(get$1(), d_30_) : d_30_;
        d_31_ = get$1() <= d_29_ ? d_31_ + 1.0 : d_31_;
        d_30_ = get$2() > d_29_ ? RuntimeDouble_v2.min(get$2(), d_30_) : d_30_;
        d_31_ = get$2() <= d_29_ ? d_31_ + 1.0 : d_31_;
        d_30_ = get$3() > d_29_ ? RuntimeDouble_v2.min(get$3(), d_30_) : d_30_;
        d_31_ = get$3() <= d_29_ ? d_31_ + 1.0 : d_31_;
        d_30_ = get$4() > d_29_ ? RuntimeDouble_v2.min(get$4(), d_30_) : d_30_;
        d_31_ = get$4() <= d_29_ ? d_31_ + 1.0 : d_31_;
        d_30_ = get$5() > d_29_ ? RuntimeDouble_v2.min(get$5(), d_30_) : d_30_;
        d_31_ = get$5() <= d_29_ ? d_31_ + 1.0 : d_31_;
        return d_31_ >= d ? d_29_ : d_30_;
    }

    final double get$15(double d) {
        double d_32_ = -1.7976931348623157E308;
        double d_33_ = 1.0;
        d_32_ = d_33_ > d ? d_32_ : get$16(d_33_, d_32_);
        d_33_++;
        d_32_ = d_33_ > d ? d_32_ : get$17(d_33_, d_32_);
        d_33_++;
        d_32_ = d_33_ > d ? d_32_ : get$18(d_33_, d_32_);
        d_33_++;
        d_32_ = d_33_ > d ? d_32_ : get$19(d_33_, d_32_);
        d_33_++;
        d_32_ = d_33_ > d ? d_32_ : get$20(d_33_, d_32_);
        d_33_++;
        return d_32_;
    }

    final double get$16(double d, double d_34_) {
        double d_35_ = 1.7976931348623157E308;
        double d_36_ = 0.0;
        d_35_ = get$1() > d_34_ ? RuntimeDouble_v2.min(get$1(), d_35_) : d_35_;
        d_36_ = get$1() <= d_34_ ? d_36_ + 1.0 : d_36_;
        d_35_ = get$2() > d_34_ ? RuntimeDouble_v2.min(get$2(), d_35_) : d_35_;
        d_36_ = get$2() <= d_34_ ? d_36_ + 1.0 : d_36_;
        d_35_ = get$3() > d_34_ ? RuntimeDouble_v2.min(get$3(), d_35_) : d_35_;
        d_36_ = get$3() <= d_34_ ? d_36_ + 1.0 : d_36_;
        d_35_ = get$4() > d_34_ ? RuntimeDouble_v2.min(get$4(), d_35_) : d_35_;
        d_36_ = get$4() <= d_34_ ? d_36_ + 1.0 : d_36_;
        d_35_ = get$5() > d_34_ ? RuntimeDouble_v2.min(get$5(), d_35_) : d_35_;
        d_36_ = get$5() <= d_34_ ? d_36_ + 1.0 : d_36_;
        return d_36_ >= d ? d_34_ : d_35_;
    }

    final double get$17(double d, double d_37_) {
        double d_38_ = 1.7976931348623157E308;
        double d_39_ = 0.0;
        d_38_ = get$1() > d_37_ ? RuntimeDouble_v2.min(get$1(), d_38_) : d_38_;
        d_39_ = get$1() <= d_37_ ? d_39_ + 1.0 : d_39_;
        d_38_ = get$2() > d_37_ ? RuntimeDouble_v2.min(get$2(), d_38_) : d_38_;
        d_39_ = get$2() <= d_37_ ? d_39_ + 1.0 : d_39_;
        d_38_ = get$3() > d_37_ ? RuntimeDouble_v2.min(get$3(), d_38_) : d_38_;
        d_39_ = get$3() <= d_37_ ? d_39_ + 1.0 : d_39_;
        d_38_ = get$4() > d_37_ ? RuntimeDouble_v2.min(get$4(), d_38_) : d_38_;
        d_39_ = get$4() <= d_37_ ? d_39_ + 1.0 : d_39_;
        d_38_ = get$5() > d_37_ ? RuntimeDouble_v2.min(get$5(), d_38_) : d_38_;
        d_39_ = get$5() <= d_37_ ? d_39_ + 1.0 : d_39_;
        return d_39_ >= d ? d_37_ : d_38_;
    }

    final double get$18(double d, double d_40_) {
        double d_41_ = 1.7976931348623157E308;
        double d_42_ = 0.0;
        d_41_ = get$1() > d_40_ ? RuntimeDouble_v2.min(get$1(), d_41_) : d_41_;
        d_42_ = get$1() <= d_40_ ? d_42_ + 1.0 : d_42_;
        d_41_ = get$2() > d_40_ ? RuntimeDouble_v2.min(get$2(), d_41_) : d_41_;
        d_42_ = get$2() <= d_40_ ? d_42_ + 1.0 : d_42_;
        d_41_ = get$3() > d_40_ ? RuntimeDouble_v2.min(get$3(), d_41_) : d_41_;
        d_42_ = get$3() <= d_40_ ? d_42_ + 1.0 : d_42_;
        d_41_ = get$4() > d_40_ ? RuntimeDouble_v2.min(get$4(), d_41_) : d_41_;
        d_42_ = get$4() <= d_40_ ? d_42_ + 1.0 : d_42_;
        d_41_ = get$5() > d_40_ ? RuntimeDouble_v2.min(get$5(), d_41_) : d_41_;
        d_42_ = get$5() <= d_40_ ? d_42_ + 1.0 : d_42_;
        return d_42_ >= d ? d_40_ : d_41_;
    }

    final double get$19(double d, double d_43_) {
        double d_44_ = 1.7976931348623157E308;
        double d_45_ = 0.0;
        d_44_ = get$1() > d_43_ ? RuntimeDouble_v2.min(get$1(), d_44_) : d_44_;
        d_45_ = get$1() <= d_43_ ? d_45_ + 1.0 : d_45_;
        d_44_ = get$2() > d_43_ ? RuntimeDouble_v2.min(get$2(), d_44_) : d_44_;
        d_45_ = get$2() <= d_43_ ? d_45_ + 1.0 : d_45_;
        d_44_ = get$3() > d_43_ ? RuntimeDouble_v2.min(get$3(), d_44_) : d_44_;
        d_45_ = get$3() <= d_43_ ? d_45_ + 1.0 : d_45_;
        d_44_ = get$4() > d_43_ ? RuntimeDouble_v2.min(get$4(), d_44_) : d_44_;
        d_45_ = get$4() <= d_43_ ? d_45_ + 1.0 : d_45_;
        d_44_ = get$5() > d_43_ ? RuntimeDouble_v2.min(get$5(), d_44_) : d_44_;
        d_45_ = get$5() <= d_43_ ? d_45_ + 1.0 : d_45_;
        return d_45_ >= d ? d_43_ : d_44_;
    }

    final double get$20(double d, double d_46_) {
        double d_47_ = 1.7976931348623157E308;
        double d_48_ = 0.0;
        d_47_ = get$1() > d_46_ ? RuntimeDouble_v2.min(get$1(), d_47_) : d_47_;
        d_48_ = get$1() <= d_46_ ? d_48_ + 1.0 : d_48_;
        d_47_ = get$2() > d_46_ ? RuntimeDouble_v2.min(get$2(), d_47_) : d_47_;
        d_48_ = get$2() <= d_46_ ? d_48_ + 1.0 : d_48_;
        d_47_ = get$3() > d_46_ ? RuntimeDouble_v2.min(get$3(), d_47_) : d_47_;
        d_48_ = get$3() <= d_46_ ? d_48_ + 1.0 : d_48_;
        d_47_ = get$4() > d_46_ ? RuntimeDouble_v2.min(get$4(), d_47_) : d_47_;
        d_48_ = get$4() <= d_46_ ? d_48_ + 1.0 : d_48_;
        d_47_ = get$5() > d_46_ ? RuntimeDouble_v2.min(get$5(), d_47_) : d_47_;
        d_48_ = get$5() <= d_46_ ? d_48_ + 1.0 : d_48_;
        return d_48_ >= d ? d_46_ : d_47_;
    }

    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);
    }

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