Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A

Percentage Accurate: 95.6% → 98.6%
Time: 12.1s
Alternatives: 17
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 95.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}

Alternative 1: 98.6% accurate, 0.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 10000:\\ \;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z 10000.0)
   (fma a (* 27.0 b) (fma x 2.0 (* y (* (* z t) -9.0))))
   (+ (- (* x 2.0) (* z (* t (* y 9.0)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= 10000.0) {
		tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * ((z * t) * -9.0))));
	} else {
		tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + (b * (a * 27.0));
	}
	return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= 10000.0)
		tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(Float64(z * t) * -9.0))));
	else
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(z * Float64(t * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0)));
	end
	return tmp
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 10000.0], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(z * N[(t * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 10000:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1e4

    1. Initial program 94.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative94.0%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-94.0%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv94.0%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*94.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in94.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative94.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv94.6%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-94.6%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*94.6%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define95.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. fma-neg95.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, -\left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      13. associate-*l*97.3%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, -\color{blue}{\left(y \cdot 9\right) \cdot \left(t \cdot z\right)}\right)\right) \]
      14. distribute-rgt-neg-in97.3%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(y \cdot 9\right) \cdot \left(-t \cdot z\right)}\right)\right) \]
      15. *-commutative97.3%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \left(y \cdot 9\right) \cdot \left(-\color{blue}{z \cdot t}\right)\right)\right) \]
      16. associate-*l*97.3%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{y \cdot \left(9 \cdot \left(-z \cdot t\right)\right)}\right)\right) \]
      17. *-commutative97.3%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \color{blue}{\left(\left(-z \cdot t\right) \cdot 9\right)}\right)\right) \]
      18. distribute-lft-neg-in97.3%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \color{blue}{\left(-\left(z \cdot t\right) \cdot 9\right)}\right)\right) \]
      19. distribute-rgt-neg-in97.3%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \color{blue}{\left(\left(z \cdot t\right) \cdot \left(-9\right)\right)}\right)\right) \]
    3. Simplified97.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\right)\right)} \]
    4. Add Preprocessing

    if 1e4 < z

    1. Initial program 87.6%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*86.0%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      2. *-commutative86.0%

        \[\leadsto \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \color{blue}{\left(t \cdot z\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      3. associate-*r*95.1%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) + \left(a \cdot 27\right) \cdot b \]
    4. Applied egg-rr95.1%

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) + \left(a \cdot 27\right) \cdot b \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 10000:\\ \;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 96.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 27.0)))))
   (if (<= t_1 INFINITY) t_1 (* 27.0 (* a b)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = 27.0 * (a * b);
	}
	return tmp;
}
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = 27.0 * (a * b);
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = 27.0 * (a * b)
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(27.0 * Float64(a * b));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = 27.0 * (a * b);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b)) < +inf.0

    1. Initial program 94.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing

    if +inf.0 < (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b))

    1. Initial program 0.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 66.7%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right) \leq \infty:\\ \;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 79.7% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ t_2 := 27 \cdot \left(a \cdot b\right) - t\_1\\ \mathbf{if}\;a \leq -4.4 \cdot 10^{+95}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-118}:\\ \;\;\;\;x \cdot 2 - t\_1\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* 9.0 (* t (* z y)))) (t_2 (- (* 27.0 (* a b)) t_1)))
   (if (<= a -4.4e+95)
     t_2
     (if (<= a 7.5e-118)
       (- (* x 2.0) t_1)
       (if (<= a 1.08e+42) t_2 (* b (* a 27.0)))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 9.0 * (t * (z * y));
	double t_2 = (27.0 * (a * b)) - t_1;
	double tmp;
	if (a <= -4.4e+95) {
		tmp = t_2;
	} else if (a <= 7.5e-118) {
		tmp = (x * 2.0) - t_1;
	} else if (a <= 1.08e+42) {
		tmp = t_2;
	} else {
		tmp = b * (a * 27.0);
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 9.0d0 * (t * (z * y))
    t_2 = (27.0d0 * (a * b)) - t_1
    if (a <= (-4.4d+95)) then
        tmp = t_2
    else if (a <= 7.5d-118) then
        tmp = (x * 2.0d0) - t_1
    else if (a <= 1.08d+42) then
        tmp = t_2
    else
        tmp = b * (a * 27.0d0)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 9.0 * (t * (z * y));
	double t_2 = (27.0 * (a * b)) - t_1;
	double tmp;
	if (a <= -4.4e+95) {
		tmp = t_2;
	} else if (a <= 7.5e-118) {
		tmp = (x * 2.0) - t_1;
	} else if (a <= 1.08e+42) {
		tmp = t_2;
	} else {
		tmp = b * (a * 27.0);
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = 9.0 * (t * (z * y))
	t_2 = (27.0 * (a * b)) - t_1
	tmp = 0
	if a <= -4.4e+95:
		tmp = t_2
	elif a <= 7.5e-118:
		tmp = (x * 2.0) - t_1
	elif a <= 1.08e+42:
		tmp = t_2
	else:
		tmp = b * (a * 27.0)
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(9.0 * Float64(t * Float64(z * y)))
	t_2 = Float64(Float64(27.0 * Float64(a * b)) - t_1)
	tmp = 0.0
	if (a <= -4.4e+95)
		tmp = t_2;
	elseif (a <= 7.5e-118)
		tmp = Float64(Float64(x * 2.0) - t_1);
	elseif (a <= 1.08e+42)
		tmp = t_2;
	else
		tmp = Float64(b * Float64(a * 27.0));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = 9.0 * (t * (z * y));
	t_2 = (27.0 * (a * b)) - t_1;
	tmp = 0.0;
	if (a <= -4.4e+95)
		tmp = t_2;
	elseif (a <= 7.5e-118)
		tmp = (x * 2.0) - t_1;
	elseif (a <= 1.08e+42)
		tmp = t_2;
	else
		tmp = b * (a * 27.0);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[a, -4.4e+95], t$95$2, If[LessEqual[a, 7.5e-118], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[a, 1.08e+42], t$95$2, N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
t_2 := 27 \cdot \left(a \cdot b\right) - t\_1\\
\mathbf{if}\;a \leq -4.4 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-118}:\\
\;\;\;\;x \cdot 2 - t\_1\\

\mathbf{elif}\;a \leq 1.08 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.3999999999999998e95 or 7.49999999999999978e-118 < a < 1.08e42

    1. Initial program 91.9%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 70.5%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]

    if -4.3999999999999998e95 < a < 7.49999999999999978e-118

    1. Initial program 95.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 83.8%

      \[\leadsto \color{blue}{2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]

    if 1.08e42 < a

    1. Initial program 88.2%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 58.9%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*58.8%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr58.8%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{+95}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-118}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{elif}\;a \leq 1.08 \cdot 10^{+42}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 49.3% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;a \leq -2.4 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-30}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-193}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-28}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (<= a -2.4e+104)
     t_1
     (if (<= a -7.5e-30)
       (* y (* t (* z -9.0)))
       (if (<= a -6e-193)
         (* x 2.0)
         (if (<= a 3.4e-28) (* -9.0 (* t (* z y))) t_1))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -2.4e+104) {
		tmp = t_1;
	} else if (a <= -7.5e-30) {
		tmp = y * (t * (z * -9.0));
	} else if (a <= -6e-193) {
		tmp = x * 2.0;
	} else if (a <= 3.4e-28) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    if (a <= (-2.4d+104)) then
        tmp = t_1
    else if (a <= (-7.5d-30)) then
        tmp = y * (t * (z * (-9.0d0)))
    else if (a <= (-6d-193)) then
        tmp = x * 2.0d0
    else if (a <= 3.4d-28) then
        tmp = (-9.0d0) * (t * (z * y))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -2.4e+104) {
		tmp = t_1;
	} else if (a <= -7.5e-30) {
		tmp = y * (t * (z * -9.0));
	} else if (a <= -6e-193) {
		tmp = x * 2.0;
	} else if (a <= 3.4e-28) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = b * (a * 27.0)
	tmp = 0
	if a <= -2.4e+104:
		tmp = t_1
	elif a <= -7.5e-30:
		tmp = y * (t * (z * -9.0))
	elif a <= -6e-193:
		tmp = x * 2.0
	elif a <= 3.4e-28:
		tmp = -9.0 * (t * (z * y))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (a <= -2.4e+104)
		tmp = t_1;
	elseif (a <= -7.5e-30)
		tmp = Float64(y * Float64(t * Float64(z * -9.0)));
	elseif (a <= -6e-193)
		tmp = Float64(x * 2.0);
	elseif (a <= 3.4e-28)
		tmp = Float64(-9.0 * Float64(t * Float64(z * y)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a * 27.0);
	tmp = 0.0;
	if (a <= -2.4e+104)
		tmp = t_1;
	elseif (a <= -7.5e-30)
		tmp = y * (t * (z * -9.0));
	elseif (a <= -6e-193)
		tmp = x * 2.0;
	elseif (a <= 3.4e-28)
		tmp = -9.0 * (t * (z * y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.4e+104], t$95$1, If[LessEqual[a, -7.5e-30], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6e-193], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 3.4e-28], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.4 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-30}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\

\mathbf{elif}\;a \leq -6 \cdot 10^{-193}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{-28}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.4e104 or 3.4000000000000001e-28 < a

    1. Initial program 90.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.9%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*53.9%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr53.9%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]

    if -2.4e104 < a < -7.5000000000000006e-30

    1. Initial program 90.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 39.7%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*39.7%

        \[\leadsto \color{blue}{\left(-9 \cdot t\right) \cdot \left(y \cdot z\right)} \]
      2. *-commutative39.7%

        \[\leadsto \left(-9 \cdot t\right) \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. associate-*r*43.8%

        \[\leadsto \color{blue}{\left(\left(-9 \cdot t\right) \cdot z\right) \cdot y} \]
      4. *-commutative43.8%

        \[\leadsto \left(\color{blue}{\left(t \cdot -9\right)} \cdot z\right) \cdot y \]
    5. Applied egg-rr43.8%

      \[\leadsto \color{blue}{\left(\left(t \cdot -9\right) \cdot z\right) \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative43.8%

        \[\leadsto \color{blue}{\left(z \cdot \left(t \cdot -9\right)\right)} \cdot y \]
      2. *-commutative43.8%

        \[\leadsto \left(z \cdot \color{blue}{\left(-9 \cdot t\right)}\right) \cdot y \]
      3. associate-*r*43.8%

        \[\leadsto \color{blue}{\left(\left(z \cdot -9\right) \cdot t\right)} \cdot y \]
    7. Applied egg-rr43.8%

      \[\leadsto \color{blue}{\left(\left(z \cdot -9\right) \cdot t\right)} \cdot y \]

    if -7.5000000000000006e-30 < a < -5.9999999999999998e-193

    1. Initial program 94.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 51.5%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if -5.9999999999999998e-193 < a < 3.4000000000000001e-28

    1. Initial program 97.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 44.0%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification50.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+104}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-30}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-193}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-28}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 49.3% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-29}:\\ \;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-192}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-28}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (<= a -6.2e+104)
     t_1
     (if (<= a -2.05e-29)
       (* y (* z (* t -9.0)))
       (if (<= a -4.9e-192)
         (* x 2.0)
         (if (<= a 7.8e-28) (* -9.0 (* t (* z y))) t_1))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -6.2e+104) {
		tmp = t_1;
	} else if (a <= -2.05e-29) {
		tmp = y * (z * (t * -9.0));
	} else if (a <= -4.9e-192) {
		tmp = x * 2.0;
	} else if (a <= 7.8e-28) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    if (a <= (-6.2d+104)) then
        tmp = t_1
    else if (a <= (-2.05d-29)) then
        tmp = y * (z * (t * (-9.0d0)))
    else if (a <= (-4.9d-192)) then
        tmp = x * 2.0d0
    else if (a <= 7.8d-28) then
        tmp = (-9.0d0) * (t * (z * y))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -6.2e+104) {
		tmp = t_1;
	} else if (a <= -2.05e-29) {
		tmp = y * (z * (t * -9.0));
	} else if (a <= -4.9e-192) {
		tmp = x * 2.0;
	} else if (a <= 7.8e-28) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = b * (a * 27.0)
	tmp = 0
	if a <= -6.2e+104:
		tmp = t_1
	elif a <= -2.05e-29:
		tmp = y * (z * (t * -9.0))
	elif a <= -4.9e-192:
		tmp = x * 2.0
	elif a <= 7.8e-28:
		tmp = -9.0 * (t * (z * y))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (a <= -6.2e+104)
		tmp = t_1;
	elseif (a <= -2.05e-29)
		tmp = Float64(y * Float64(z * Float64(t * -9.0)));
	elseif (a <= -4.9e-192)
		tmp = Float64(x * 2.0);
	elseif (a <= 7.8e-28)
		tmp = Float64(-9.0 * Float64(t * Float64(z * y)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a * 27.0);
	tmp = 0.0;
	if (a <= -6.2e+104)
		tmp = t_1;
	elseif (a <= -2.05e-29)
		tmp = y * (z * (t * -9.0));
	elseif (a <= -4.9e-192)
		tmp = x * 2.0;
	elseif (a <= 7.8e-28)
		tmp = -9.0 * (t * (z * y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+104], t$95$1, If[LessEqual[a, -2.05e-29], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.9e-192], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 7.8e-28], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-29}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\

\mathbf{elif}\;a \leq -4.9 \cdot 10^{-192}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{-28}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.20000000000000033e104 or 7.79999999999999998e-28 < a

    1. Initial program 90.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.9%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*53.9%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr53.9%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]

    if -6.20000000000000033e104 < a < -2.0499999999999999e-29

    1. Initial program 90.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 39.7%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*39.7%

        \[\leadsto \color{blue}{\left(-9 \cdot t\right) \cdot \left(y \cdot z\right)} \]
      2. *-commutative39.7%

        \[\leadsto \left(-9 \cdot t\right) \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. associate-*r*43.8%

        \[\leadsto \color{blue}{\left(\left(-9 \cdot t\right) \cdot z\right) \cdot y} \]
      4. *-commutative43.8%

        \[\leadsto \left(\color{blue}{\left(t \cdot -9\right)} \cdot z\right) \cdot y \]
    5. Applied egg-rr43.8%

      \[\leadsto \color{blue}{\left(\left(t \cdot -9\right) \cdot z\right) \cdot y} \]

    if -2.0499999999999999e-29 < a < -4.9e-192

    1. Initial program 94.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 51.5%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if -4.9e-192 < a < 7.79999999999999998e-28

    1. Initial program 97.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 44.0%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+104}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-29}:\\ \;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-192}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-28}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 48.9% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-29}:\\ \;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-186}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (<= a -2.3e+104)
     t_1
     (if (<= a -2.25e-29)
       (* (* z -9.0) (* y t))
       (if (<= a -1.3e-186)
         (* x 2.0)
         (if (<= a 1.7e-27) (* -9.0 (* t (* z y))) t_1))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -2.3e+104) {
		tmp = t_1;
	} else if (a <= -2.25e-29) {
		tmp = (z * -9.0) * (y * t);
	} else if (a <= -1.3e-186) {
		tmp = x * 2.0;
	} else if (a <= 1.7e-27) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    if (a <= (-2.3d+104)) then
        tmp = t_1
    else if (a <= (-2.25d-29)) then
        tmp = (z * (-9.0d0)) * (y * t)
    else if (a <= (-1.3d-186)) then
        tmp = x * 2.0d0
    else if (a <= 1.7d-27) then
        tmp = (-9.0d0) * (t * (z * y))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -2.3e+104) {
		tmp = t_1;
	} else if (a <= -2.25e-29) {
		tmp = (z * -9.0) * (y * t);
	} else if (a <= -1.3e-186) {
		tmp = x * 2.0;
	} else if (a <= 1.7e-27) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = b * (a * 27.0)
	tmp = 0
	if a <= -2.3e+104:
		tmp = t_1
	elif a <= -2.25e-29:
		tmp = (z * -9.0) * (y * t)
	elif a <= -1.3e-186:
		tmp = x * 2.0
	elif a <= 1.7e-27:
		tmp = -9.0 * (t * (z * y))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (a <= -2.3e+104)
		tmp = t_1;
	elseif (a <= -2.25e-29)
		tmp = Float64(Float64(z * -9.0) * Float64(y * t));
	elseif (a <= -1.3e-186)
		tmp = Float64(x * 2.0);
	elseif (a <= 1.7e-27)
		tmp = Float64(-9.0 * Float64(t * Float64(z * y)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a * 27.0);
	tmp = 0.0;
	if (a <= -2.3e+104)
		tmp = t_1;
	elseif (a <= -2.25e-29)
		tmp = (z * -9.0) * (y * t);
	elseif (a <= -1.3e-186)
		tmp = x * 2.0;
	elseif (a <= 1.7e-27)
		tmp = -9.0 * (t * (z * y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e+104], t$95$1, If[LessEqual[a, -2.25e-29], N[(N[(z * -9.0), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.3e-186], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1.7e-27], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.25 \cdot 10^{-29}:\\
\;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-186}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.29999999999999985e104 or 1.69999999999999985e-27 < a

    1. Initial program 90.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.9%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*53.9%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr53.9%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]

    if -2.29999999999999985e104 < a < -2.2499999999999999e-29

    1. Initial program 90.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 39.7%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutative39.7%

        \[\leadsto \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot -9} \]
      2. associate-*r*41.6%

        \[\leadsto \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} \cdot -9 \]
      3. associate-*l*41.7%

        \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot \left(z \cdot -9\right)} \]
      4. *-commutative41.7%

        \[\leadsto \color{blue}{\left(y \cdot t\right)} \cdot \left(z \cdot -9\right) \]
    5. Applied egg-rr41.7%

      \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot \left(z \cdot -9\right)} \]

    if -2.2499999999999999e-29 < a < -1.29999999999999997e-186

    1. Initial program 94.5%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 50.1%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if -1.29999999999999997e-186 < a < 1.69999999999999985e-27

    1. Initial program 97.1%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 43.3%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-29}:\\ \;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-186}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.9% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-29}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-186}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 10^{-27}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (<= a -2.3e+104)
     t_1
     (if (<= a -2.4e-29)
       (* -9.0 (* z (* y t)))
       (if (<= a -2.6e-186)
         (* x 2.0)
         (if (<= a 1e-27) (* -9.0 (* t (* z y))) t_1))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -2.3e+104) {
		tmp = t_1;
	} else if (a <= -2.4e-29) {
		tmp = -9.0 * (z * (y * t));
	} else if (a <= -2.6e-186) {
		tmp = x * 2.0;
	} else if (a <= 1e-27) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    if (a <= (-2.3d+104)) then
        tmp = t_1
    else if (a <= (-2.4d-29)) then
        tmp = (-9.0d0) * (z * (y * t))
    else if (a <= (-2.6d-186)) then
        tmp = x * 2.0d0
    else if (a <= 1d-27) then
        tmp = (-9.0d0) * (t * (z * y))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (a <= -2.3e+104) {
		tmp = t_1;
	} else if (a <= -2.4e-29) {
		tmp = -9.0 * (z * (y * t));
	} else if (a <= -2.6e-186) {
		tmp = x * 2.0;
	} else if (a <= 1e-27) {
		tmp = -9.0 * (t * (z * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = b * (a * 27.0)
	tmp = 0
	if a <= -2.3e+104:
		tmp = t_1
	elif a <= -2.4e-29:
		tmp = -9.0 * (z * (y * t))
	elif a <= -2.6e-186:
		tmp = x * 2.0
	elif a <= 1e-27:
		tmp = -9.0 * (t * (z * y))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (a <= -2.3e+104)
		tmp = t_1;
	elseif (a <= -2.4e-29)
		tmp = Float64(-9.0 * Float64(z * Float64(y * t)));
	elseif (a <= -2.6e-186)
		tmp = Float64(x * 2.0);
	elseif (a <= 1e-27)
		tmp = Float64(-9.0 * Float64(t * Float64(z * y)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a * 27.0);
	tmp = 0.0;
	if (a <= -2.3e+104)
		tmp = t_1;
	elseif (a <= -2.4e-29)
		tmp = -9.0 * (z * (y * t));
	elseif (a <= -2.6e-186)
		tmp = x * 2.0;
	elseif (a <= 1e-27)
		tmp = -9.0 * (t * (z * y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e+104], t$95$1, If[LessEqual[a, -2.4e-29], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.6e-186], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1e-27], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-29}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

\mathbf{elif}\;a \leq -2.6 \cdot 10^{-186}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \leq 10^{-27}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.29999999999999985e104 or 1e-27 < a

    1. Initial program 90.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.9%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*53.9%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr53.9%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]

    if -2.29999999999999985e104 < a < -2.39999999999999992e-29

    1. Initial program 90.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 39.7%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*41.6%

        \[\leadsto -9 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} \]
      2. *-commutative41.6%

        \[\leadsto -9 \cdot \left(\color{blue}{\left(y \cdot t\right)} \cdot z\right) \]
    5. Applied egg-rr41.6%

      \[\leadsto -9 \cdot \color{blue}{\left(\left(y \cdot t\right) \cdot z\right)} \]

    if -2.39999999999999992e-29 < a < -2.59999999999999993e-186

    1. Initial program 94.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 51.5%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if -2.59999999999999993e-186 < a < 1e-27

    1. Initial program 97.1%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 44.2%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+104}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-29}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-186}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 10^{-27}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 48.4% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ t_2 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-190}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* -9.0 (* t (* z y)))) (t_2 (* b (* a 27.0))))
   (if (<= a -2.5e+104)
     t_2
     (if (<= a -2.3e+76)
       t_1
       (if (<= a -3.2e-190) (* x 2.0) (if (<= a 1.7e-27) t_1 t_2))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -9.0 * (t * (z * y));
	double t_2 = b * (a * 27.0);
	double tmp;
	if (a <= -2.5e+104) {
		tmp = t_2;
	} else if (a <= -2.3e+76) {
		tmp = t_1;
	} else if (a <= -3.2e-190) {
		tmp = x * 2.0;
	} else if (a <= 1.7e-27) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-9.0d0) * (t * (z * y))
    t_2 = b * (a * 27.0d0)
    if (a <= (-2.5d+104)) then
        tmp = t_2
    else if (a <= (-2.3d+76)) then
        tmp = t_1
    else if (a <= (-3.2d-190)) then
        tmp = x * 2.0d0
    else if (a <= 1.7d-27) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -9.0 * (t * (z * y));
	double t_2 = b * (a * 27.0);
	double tmp;
	if (a <= -2.5e+104) {
		tmp = t_2;
	} else if (a <= -2.3e+76) {
		tmp = t_1;
	} else if (a <= -3.2e-190) {
		tmp = x * 2.0;
	} else if (a <= 1.7e-27) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = -9.0 * (t * (z * y))
	t_2 = b * (a * 27.0)
	tmp = 0
	if a <= -2.5e+104:
		tmp = t_2
	elif a <= -2.3e+76:
		tmp = t_1
	elif a <= -3.2e-190:
		tmp = x * 2.0
	elif a <= 1.7e-27:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(-9.0 * Float64(t * Float64(z * y)))
	t_2 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (a <= -2.5e+104)
		tmp = t_2;
	elseif (a <= -2.3e+76)
		tmp = t_1;
	elseif (a <= -3.2e-190)
		tmp = Float64(x * 2.0);
	elseif (a <= 1.7e-27)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = -9.0 * (t * (z * y));
	t_2 = b * (a * 27.0);
	tmp = 0.0;
	if (a <= -2.5e+104)
		tmp = t_2;
	elseif (a <= -2.3e+76)
		tmp = t_1;
	elseif (a <= -3.2e-190)
		tmp = x * 2.0;
	elseif (a <= 1.7e-27)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e+104], t$95$2, If[LessEqual[a, -2.3e+76], t$95$1, If[LessEqual[a, -3.2e-190], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1.7e-27], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
t_2 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -2.3 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-190}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.4999999999999998e104 or 1.69999999999999985e-27 < a

    1. Initial program 90.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.9%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*53.9%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr53.9%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]

    if -2.4999999999999998e104 < a < -2.30000000000000001e76 or -3.2000000000000001e-190 < a < 1.69999999999999985e-27

    1. Initial program 94.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 42.8%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]

    if -2.30000000000000001e76 < a < -3.2000000000000001e-190

    1. Initial program 95.1%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 43.8%

      \[\leadsto \color{blue}{2 \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{+76}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-190}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-27}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 95.4% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;a \cdot 27 \leq 5 \cdot 10^{+33}:\\ \;\;\;\;t\_1 + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (<= (* a 27.0) 5e+33) (+ t_1 (- (* x 2.0) (* y (* t (* z 9.0))))) t_1)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if ((a * 27.0) <= 5e+33) {
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    if ((a * 27.0d0) <= 5d+33) then
        tmp = t_1 + ((x * 2.0d0) - (y * (t * (z * 9.0d0))))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if ((a * 27.0) <= 5e+33) {
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = b * (a * 27.0)
	tmp = 0
	if (a * 27.0) <= 5e+33:
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))))
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (Float64(a * 27.0) <= 5e+33)
		tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(y * Float64(t * Float64(z * 9.0)))));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a * 27.0);
	tmp = 0.0;
	if ((a * 27.0) <= 5e+33)
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 27.0), $MachinePrecision], 5e+33], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;a \cdot 27 \leq 5 \cdot 10^{+33}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 27 binary64)) < 4.99999999999999973e33

    1. Initial program 93.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*93.7%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot \left(9 \cdot z\right)\right)} \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
      2. associate-*l*95.4%

        \[\leadsto \left(x \cdot 2 - \color{blue}{y \cdot \left(\left(9 \cdot z\right) \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
    4. Applied egg-rr95.4%

      \[\leadsto \left(x \cdot 2 - \color{blue}{y \cdot \left(\left(9 \cdot z\right) \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]

    if 4.99999999999999973e33 < (*.f64 a #s(literal 27 binary64))

    1. Initial program 88.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 59.5%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*59.5%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr59.5%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 27 \leq 5 \cdot 10^{+33}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right) + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 95.3% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 2.5 \cdot 10^{+278}:\\ \;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b 2.5e+278)
   (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* a (* 27.0 b)))
   (+ (* x 2.0) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= 2.5e+278) {
		tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b));
	} else {
		tmp = (x * 2.0) + (b * (a * 27.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= 2.5d+278) then
        tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (a * (27.0d0 * b))
    else
        tmp = (x * 2.0d0) + (b * (a * 27.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= 2.5e+278) {
		tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b));
	} else {
		tmp = (x * 2.0) + (b * (a * 27.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= 2.5e+278:
		tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b))
	else:
		tmp = (x * 2.0) + (b * (a * 27.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= 2.5e+278)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= 2.5e+278)
		tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (a * (27.0 * b));
	else
		tmp = (x * 2.0) + (b * (a * 27.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.5e+278], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.5 \cdot 10^{+278}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.50000000000000014e278

    1. Initial program 93.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*93.4%

        \[\leadsto \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \color{blue}{a \cdot \left(27 \cdot b\right)} \]
      2. *-commutative93.4%

        \[\leadsto \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \color{blue}{\left(27 \cdot b\right) \cdot a} \]
    4. Applied egg-rr93.4%

      \[\leadsto \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \color{blue}{\left(27 \cdot b\right) \cdot a} \]

    if 2.50000000000000014e278 < b

    1. Initial program 66.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 100.0%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*100.0%

        \[\leadsto 2 \cdot x + \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr100.0%

      \[\leadsto 2 \cdot x + \color{blue}{\left(27 \cdot a\right) \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.5 \cdot 10^{+278}:\\ \;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 98.3% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;z \leq 1.6 \cdot 10^{-41}:\\ \;\;\;\;t\_1 + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (<= z 1.6e-41)
     (+ t_1 (- (* x 2.0) (* y (* t (* z 9.0)))))
     (+ (- (* x 2.0) (* z (* t (* y 9.0)))) t_1))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (z <= 1.6e-41) {
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
	} else {
		tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    if (z <= 1.6d-41) then
        tmp = t_1 + ((x * 2.0d0) - (y * (t * (z * 9.0d0))))
    else
        tmp = ((x * 2.0d0) - (z * (t * (y * 9.0d0)))) + t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if (z <= 1.6e-41) {
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
	} else {
		tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = b * (a * 27.0)
	tmp = 0
	if z <= 1.6e-41:
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))))
	else:
		tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (z <= 1.6e-41)
		tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(y * Float64(t * Float64(z * 9.0)))));
	else
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(z * Float64(t * Float64(y * 9.0)))) + t_1);
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (a * 27.0);
	tmp = 0.0;
	if (z <= 1.6e-41)
		tmp = t_1 + ((x * 2.0) - (y * (t * (z * 9.0))));
	else
		tmp = ((x * 2.0) - (z * (t * (y * 9.0)))) + t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.6e-41], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(z * N[(t * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;z \leq 1.6 \cdot 10^{-41}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.60000000000000006e-41

    1. Initial program 93.8%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*93.8%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot \left(9 \cdot z\right)\right)} \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
      2. associate-*l*97.2%

        \[\leadsto \left(x \cdot 2 - \color{blue}{y \cdot \left(\left(9 \cdot z\right) \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
    4. Applied egg-rr97.2%

      \[\leadsto \left(x \cdot 2 - \color{blue}{y \cdot \left(\left(9 \cdot z\right) \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]

    if 1.60000000000000006e-41 < z

    1. Initial program 89.0%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*86.2%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      2. *-commutative86.2%

        \[\leadsto \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \color{blue}{\left(t \cdot z\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      3. associate-*r*95.6%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) + \left(a \cdot 27\right) \cdot b \]
    4. Applied egg-rr95.6%

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) + \left(a \cdot 27\right) \cdot b \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.6 \cdot 10^{-41}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right) + \left(x \cdot 2 - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - z \cdot \left(t \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 77.5% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-13} \lor \neg \left(z \leq 6 \cdot 10^{-103}\right):\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -1.3e-13) (not (<= z 6e-103)))
   (- (* x 2.0) (* 9.0 (* t (* z y))))
   (+ (* x 2.0) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -1.3e-13) || !(z <= 6e-103)) {
		tmp = (x * 2.0) - (9.0 * (t * (z * y)));
	} else {
		tmp = (x * 2.0) + (b * (a * 27.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((z <= (-1.3d-13)) .or. (.not. (z <= 6d-103))) then
        tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
    else
        tmp = (x * 2.0d0) + (b * (a * 27.0d0))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -1.3e-13) || !(z <= 6e-103)) {
		tmp = (x * 2.0) - (9.0 * (t * (z * y)));
	} else {
		tmp = (x * 2.0) + (b * (a * 27.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if (z <= -1.3e-13) or not (z <= 6e-103):
		tmp = (x * 2.0) - (9.0 * (t * (z * y)))
	else:
		tmp = (x * 2.0) + (b * (a * 27.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -1.3e-13) || !(z <= 6e-103))
		tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y))));
	else
		tmp = Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((z <= -1.3e-13) || ~((z <= 6e-103)))
		tmp = (x * 2.0) - (9.0 * (t * (z * y)));
	else
		tmp = (x * 2.0) + (b * (a * 27.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e-13], N[Not[LessEqual[z, 6e-103]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-13} \lor \neg \left(z \leq 6 \cdot 10^{-103}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3e-13 or 6e-103 < z

    1. Initial program 89.2%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 68.0%

      \[\leadsto \color{blue}{2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]

    if -1.3e-13 < z < 6e-103

    1. Initial program 97.8%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 85.7%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*85.8%

        \[\leadsto 2 \cdot x + \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr85.8%

      \[\leadsto 2 \cdot x + \color{blue}{\left(27 \cdot a\right) \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-13} \lor \neg \left(z \leq 6 \cdot 10^{-103}\right):\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.7% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -1.85e+105) (not (<= a 2.9e-117))) (* b (* a 27.0)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -1.85e+105) || !(a <= 2.9e-117)) {
		tmp = b * (a * 27.0);
	} else {
		tmp = x * 2.0;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((a <= (-1.85d+105)) .or. (.not. (a <= 2.9d-117))) then
        tmp = b * (a * 27.0d0)
    else
        tmp = x * 2.0d0
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -1.85e+105) || !(a <= 2.9e-117)) {
		tmp = b * (a * 27.0);
	} else {
		tmp = x * 2.0;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -1.85e+105) or not (a <= 2.9e-117):
		tmp = b * (a * 27.0)
	else:
		tmp = x * 2.0
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -1.85e+105) || !(a <= 2.9e-117))
		tmp = Float64(b * Float64(a * 27.0));
	else
		tmp = Float64(x * 2.0);
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((a <= -1.85e+105) || ~((a <= 2.9e-117)))
		tmp = b * (a * 27.0);
	else
		tmp = x * 2.0;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.85e+105], N[Not[LessEqual[a, 2.9e-117]], $MachinePrecision]], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot 2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.84999999999999992e105 or 2.9000000000000001e-117 < a

    1. Initial program 90.9%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.5%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*53.5%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr53.5%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]

    if -1.84999999999999992e105 < a < 2.9000000000000001e-117

    1. Initial program 94.3%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 41.4%

      \[\leadsto \color{blue}{2 \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 48.7% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -7e+105) (not (<= a 2.9e-117))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -7e+105) || !(a <= 2.9e-117)) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = x * 2.0;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((a <= (-7d+105)) .or. (.not. (a <= 2.9d-117))) then
        tmp = 27.0d0 * (a * b)
    else
        tmp = x * 2.0d0
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -7e+105) || !(a <= 2.9e-117)) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = x * 2.0;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -7e+105) or not (a <= 2.9e-117):
		tmp = 27.0 * (a * b)
	else:
		tmp = x * 2.0
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -7e+105) || !(a <= 2.9e-117))
		tmp = Float64(27.0 * Float64(a * b));
	else
		tmp = Float64(x * 2.0);
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((a <= -7e+105) || ~((a <= 2.9e-117)))
		tmp = 27.0 * (a * b);
	else
		tmp = x * 2.0;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7e+105], N[Not[LessEqual[a, 2.9e-117]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot 2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.99999999999999982e105 or 2.9000000000000001e-117 < a

    1. Initial program 90.9%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.5%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]

    if -6.99999999999999982e105 < a < 2.9000000000000001e-117

    1. Initial program 94.3%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 41.4%

      \[\leadsto \color{blue}{2 \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+105} \lor \neg \left(a \leq 2.9 \cdot 10^{-117}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 69.2% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 8 \cdot 10^{+176}:\\ \;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t 8e+176) (+ (* x 2.0) (* b (* a 27.0))) (* y (* t (* z -9.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 8e+176) {
		tmp = (x * 2.0) + (b * (a * 27.0));
	} else {
		tmp = y * (t * (z * -9.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= 8d+176) then
        tmp = (x * 2.0d0) + (b * (a * 27.0d0))
    else
        tmp = y * (t * (z * (-9.0d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 8e+176) {
		tmp = (x * 2.0) + (b * (a * 27.0));
	} else {
		tmp = y * (t * (z * -9.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= 8e+176:
		tmp = (x * 2.0) + (b * (a * 27.0))
	else:
		tmp = y * (t * (z * -9.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= 8e+176)
		tmp = Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0)));
	else
		tmp = Float64(y * Float64(t * Float64(z * -9.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= 8e+176)
		tmp = (x * 2.0) + (b * (a * 27.0));
	else
		tmp = y * (t * (z * -9.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 8e+176], N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8 \cdot 10^{+176}:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 8.0000000000000001e176

    1. Initial program 92.6%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 66.9%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    4. Step-by-step derivation
      1. associate-*r*66.9%

        \[\leadsto 2 \cdot x + \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    5. Applied egg-rr66.9%

      \[\leadsto 2 \cdot x + \color{blue}{\left(27 \cdot a\right) \cdot b} \]

    if 8.0000000000000001e176 < t

    1. Initial program 90.9%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.9%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*69.1%

        \[\leadsto \color{blue}{\left(-9 \cdot t\right) \cdot \left(y \cdot z\right)} \]
      2. *-commutative69.1%

        \[\leadsto \left(-9 \cdot t\right) \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. associate-*r*69.4%

        \[\leadsto \color{blue}{\left(\left(-9 \cdot t\right) \cdot z\right) \cdot y} \]
      4. *-commutative69.4%

        \[\leadsto \left(\color{blue}{\left(t \cdot -9\right)} \cdot z\right) \cdot y \]
    5. Applied egg-rr69.4%

      \[\leadsto \color{blue}{\left(\left(t \cdot -9\right) \cdot z\right) \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative69.4%

        \[\leadsto \color{blue}{\left(z \cdot \left(t \cdot -9\right)\right)} \cdot y \]
      2. *-commutative69.4%

        \[\leadsto \left(z \cdot \color{blue}{\left(-9 \cdot t\right)}\right) \cdot y \]
      3. associate-*r*69.3%

        \[\leadsto \color{blue}{\left(\left(z \cdot -9\right) \cdot t\right)} \cdot y \]
    7. Applied egg-rr69.3%

      \[\leadsto \color{blue}{\left(\left(z \cdot -9\right) \cdot t\right)} \cdot y \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8 \cdot 10^{+176}:\\ \;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 69.2% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 1.9 \cdot 10^{+177}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t 1.9e+177) (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* z -9.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 1.9e+177) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = y * (t * (z * -9.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= 1.9d+177) then
        tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
    else
        tmp = y * (t * (z * (-9.0d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 1.9e+177) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = y * (t * (z * -9.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= 1.9e+177:
		tmp = (27.0 * (a * b)) + (x * 2.0)
	else:
		tmp = y * (t * (z * -9.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= 1.9e+177)
		tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0));
	else
		tmp = Float64(y * Float64(t * Float64(z * -9.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= 1.9e+177)
		tmp = (27.0 * (a * b)) + (x * 2.0);
	else
		tmp = y * (t * (z * -9.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 1.9e+177], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.9 \cdot 10^{+177}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.8999999999999999e177

    1. Initial program 92.6%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 66.9%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]

    if 1.8999999999999999e177 < t

    1. Initial program 90.9%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.9%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*69.1%

        \[\leadsto \color{blue}{\left(-9 \cdot t\right) \cdot \left(y \cdot z\right)} \]
      2. *-commutative69.1%

        \[\leadsto \left(-9 \cdot t\right) \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. associate-*r*69.4%

        \[\leadsto \color{blue}{\left(\left(-9 \cdot t\right) \cdot z\right) \cdot y} \]
      4. *-commutative69.4%

        \[\leadsto \left(\color{blue}{\left(t \cdot -9\right)} \cdot z\right) \cdot y \]
    5. Applied egg-rr69.4%

      \[\leadsto \color{blue}{\left(\left(t \cdot -9\right) \cdot z\right) \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative69.4%

        \[\leadsto \color{blue}{\left(z \cdot \left(t \cdot -9\right)\right)} \cdot y \]
      2. *-commutative69.4%

        \[\leadsto \left(z \cdot \color{blue}{\left(-9 \cdot t\right)}\right) \cdot y \]
      3. associate-*r*69.3%

        \[\leadsto \color{blue}{\left(\left(z \cdot -9\right) \cdot t\right)} \cdot y \]
    7. Applied egg-rr69.3%

      \[\leadsto \color{blue}{\left(\left(z \cdot -9\right) \cdot t\right)} \cdot y \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.9 \cdot 10^{+177}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 30.3% accurate, 5.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ x \cdot 2 \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	return Float64(x * 2.0)
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
	tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Derivation
  1. Initial program 92.5%

    \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 30.5%

    \[\leadsto \color{blue}{2 \cdot x} \]
  4. Final simplification30.5%

    \[\leadsto x \cdot 2 \]
  5. Add Preprocessing

Developer target: 95.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\ \;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (< y 7.590524218811189e-161)
   (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b)))
   (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y < 7.590524218811189e-161) {
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
	} else {
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y < 7.590524218811189d-161) then
        tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
    else
        tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y < 7.590524218811189e-161) {
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
	} else {
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y < 7.590524218811189e-161:
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b))
	else:
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y < 7.590524218811189e-161)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y < 7.590524218811189e-161)
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
	else
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024097 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, A"
  :precision binary64

  :alt
  (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))

  (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))