Decompiled Code For LARGE( C905:G905, H905 )
The expression
=LARGE( C905:G905, H905 )
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 (!(5.0 - get$6() + 1.0 <= 5.0) || 5.0 - get$6() + 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$7(d_0_ = 5.0 - get$6() + 1.0); } return d; } public final double dbl() { return get$0(); } final double get$7(double d) { double d_1_ = -1.7976931348623157E308; double d_2_ = 1.0; 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_++; d_1_ = d_2_ > d ? d_1_ : get$11(d_2_, d_1_); d_2_++; d_1_ = d_2_ > d ? d_1_ : get$12(d_2_, d_1_); d_2_++; return d_1_; } final double get$8(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_; d_4_ = get$5() > d_3_ ? RuntimeDouble_v2.min(get$5(), d_4_) : d_4_; d_5_ = get$5() <= d_3_ ? d_5_ + 1.0 : d_5_; return d_5_ >= d ? d_3_ : d_4_; } final double get$9(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_; d_7_ = get$5() > d_6_ ? RuntimeDouble_v2.min(get$5(), d_7_) : d_7_; d_8_ = get$5() <= d_6_ ? d_8_ + 1.0 : d_8_; return d_8_ >= d ? d_6_ : d_7_; } final double get$10(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_; d_10_ = get$5() > d_9_ ? RuntimeDouble_v2.min(get$5(), d_10_) : d_10_; d_11_ = get$5() <= d_9_ ? d_11_ + 1.0 : d_11_; return d_11_ >= d ? d_9_ : d_10_; } final double get$11(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_; d_13_ = get$5() > d_12_ ? RuntimeDouble_v2.min(get$5(), d_13_) : d_13_; d_14_ = get$5() <= d_12_ ? d_14_ + 1.0 : d_14_; return d_14_ >= d ? d_12_ : d_13_; } final double get$12(double d, double d_15_) { double d_16_ = 1.7976931348623157E308; double d_17_ = 0.0; d_16_ = get$1() > d_15_ ? RuntimeDouble_v2.min(get$1(), d_16_) : d_16_; d_17_ = get$1() <= d_15_ ? d_17_ + 1.0 : d_17_; d_16_ = get$2() > d_15_ ? RuntimeDouble_v2.min(get$2(), d_16_) : d_16_; d_17_ = get$2() <= d_15_ ? d_17_ + 1.0 : d_17_; d_16_ = get$3() > d_15_ ? RuntimeDouble_v2.min(get$3(), d_16_) : d_16_; d_17_ = get$3() <= d_15_ ? d_17_ + 1.0 : d_17_; d_16_ = get$4() > d_15_ ? RuntimeDouble_v2.min(get$4(), d_16_) : d_16_; d_17_ = get$4() <= d_15_ ? d_17_ + 1.0 : d_17_; d_16_ = get$5() > d_15_ ? RuntimeDouble_v2.min(get$5(), d_16_) : d_16_; d_17_ = get$5() <= d_15_ ? d_17_ + 1.0 : d_17_; return d_17_ >= d ? d_15_ : d_16_; } 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); } }