Decompiled Code For LARGE( C914:F914, G914 )
The expression
=LARGE( C914:F914, G914 )
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 (!(4.0 - get$5() + 1.0 <= 4.0) || 4.0 - get$5() + 1.0 < 1.0) { Runtime_v2 .fun_ERROR("#NUM! because not 1 <= k <= n in SMALL/LARGE"); d = (double) -1; } else { double d_0_; d = get$6(d_0_ = 4.0 - get$5() + 1.0); } return d; } public final double dbl() { return get$0(); } final double get$6(double d) { double d_1_ = -1.7976931348623157E308; double d_2_ = 1.0; d_1_ = d_2_ > d ? d_1_ : get$7(d_2_, d_1_); d_2_++; d_1_ = d_2_ > d ? d_1_ : get$8(d_2_, d_1_); d_2_++; d_1_ = d_2_ > d ? d_1_ : get$9(d_2_, d_1_); d_2_++; d_1_ = d_2_ > d ? d_1_ : get$10(d_2_, d_1_); d_2_++; return d_1_; } final double get$7(double d, double d_3_) { double d_4_ = 1.7976931348623157E308; double d_5_ = 0.0; d_4_ = get$1() > d_3_ ? RuntimeDouble_v2.min(get$1(), d_4_) : d_4_; d_5_ = get$1() <= d_3_ ? d_5_ + 1.0 : d_5_; d_4_ = get$2() > d_3_ ? RuntimeDouble_v2.min(get$2(), d_4_) : d_4_; d_5_ = get$2() <= d_3_ ? d_5_ + 1.0 : d_5_; d_4_ = get$3() > d_3_ ? RuntimeDouble_v2.min(get$3(), d_4_) : d_4_; d_5_ = get$3() <= d_3_ ? d_5_ + 1.0 : d_5_; d_4_ = get$4() > d_3_ ? RuntimeDouble_v2.min(get$4(), d_4_) : d_4_; d_5_ = get$4() <= d_3_ ? d_5_ + 1.0 : d_5_; return d_5_ >= d ? d_3_ : d_4_; } final double get$8(double d, double d_6_) { double d_7_ = 1.7976931348623157E308; double d_8_ = 0.0; d_7_ = get$1() > d_6_ ? RuntimeDouble_v2.min(get$1(), d_7_) : d_7_; d_8_ = get$1() <= d_6_ ? d_8_ + 1.0 : d_8_; d_7_ = get$2() > d_6_ ? RuntimeDouble_v2.min(get$2(), d_7_) : d_7_; d_8_ = get$2() <= d_6_ ? d_8_ + 1.0 : d_8_; d_7_ = get$3() > d_6_ ? RuntimeDouble_v2.min(get$3(), d_7_) : d_7_; d_8_ = get$3() <= d_6_ ? d_8_ + 1.0 : d_8_; d_7_ = get$4() > d_6_ ? RuntimeDouble_v2.min(get$4(), d_7_) : d_7_; d_8_ = get$4() <= d_6_ ? d_8_ + 1.0 : d_8_; return d_8_ >= d ? d_6_ : d_7_; } final double get$9(double d, double d_9_) { double d_10_ = 1.7976931348623157E308; double d_11_ = 0.0; d_10_ = get$1() > d_9_ ? RuntimeDouble_v2.min(get$1(), d_10_) : d_10_; d_11_ = get$1() <= d_9_ ? d_11_ + 1.0 : d_11_; d_10_ = get$2() > d_9_ ? RuntimeDouble_v2.min(get$2(), d_10_) : d_10_; d_11_ = get$2() <= d_9_ ? d_11_ + 1.0 : d_11_; d_10_ = get$3() > d_9_ ? RuntimeDouble_v2.min(get$3(), d_10_) : d_10_; d_11_ = get$3() <= d_9_ ? d_11_ + 1.0 : d_11_; d_10_ = get$4() > d_9_ ? RuntimeDouble_v2.min(get$4(), d_10_) : d_10_; d_11_ = get$4() <= d_9_ ? d_11_ + 1.0 : d_11_; return d_11_ >= d ? d_9_ : d_10_; } final double get$10(double d, double d_12_) { double d_13_ = 1.7976931348623157E308; double d_14_ = 0.0; d_13_ = get$1() > d_12_ ? RuntimeDouble_v2.min(get$1(), d_13_) : d_13_; d_14_ = get$1() <= d_12_ ? d_14_ + 1.0 : d_14_; d_13_ = get$2() > d_12_ ? RuntimeDouble_v2.min(get$2(), d_13_) : d_13_; d_14_ = get$2() <= d_12_ ? d_14_ + 1.0 : d_14_; d_13_ = get$3() > d_12_ ? RuntimeDouble_v2.min(get$3(), d_13_) : d_13_; d_14_ = get$3() <= d_12_ ? d_14_ + 1.0 : d_14_; d_13_ = get$4() > d_12_ ? RuntimeDouble_v2.min(get$4(), d_13_) : d_13_; d_14_ = get$4() <= d_12_ ? d_14_ + 1.0 : d_14_; return d_14_ >= d ? d_12_ : d_13_; } 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); } }