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

Percentage Accurate: 95.1% → 98.3%
Time: 15.0s
Alternatives: 16
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 16 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.1% 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.3% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(y \cdot 9\right) \cdot z\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+101}:\\ \;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + \left(a \cdot 27\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\ \end{array} \end{array} \]
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 (* (* y 9.0) z)))
   (if (<= t_1 2e+101)
     (+ (- (* x 2.0) (* t_1 t)) (* (* a 27.0) b))
     (* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* z t)))))))
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 = (y * 9.0) * z;
	double tmp;
	if (t_1 <= 2e+101) {
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
	} else {
		tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
	}
	return tmp;
}
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 = (y * 9.0d0) * z
    if (t_1 <= 2d+101) then
        tmp = ((x * 2.0d0) - (t_1 * t)) + ((a * 27.0d0) * b)
    else
        tmp = y * (((2.0d0 * (x / y)) + (27.0d0 * ((a * b) / y))) - (9.0d0 * (z * t)))
    end if
    code = tmp
end function
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 = (y * 9.0) * z;
	double tmp;
	if (t_1 <= 2e+101) {
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
	} else {
		tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = (y * 9.0) * z
	tmp = 0
	if t_1 <= 2e+101:
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b)
	else:
		tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)))
	return tmp
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(y * 9.0) * z)
	tmp = 0.0
	if (t_1 <= 2e+101)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(Float64(a * 27.0) * b));
	else
		tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(z * t))));
	end
	return tmp
end
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 = (y * 9.0) * z;
	tmp = 0.0;
	if (t_1 <= 2e+101)
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
	else
		tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
	end
	tmp_2 = tmp;
end
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[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+101], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+101}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + \left(a \cdot 27\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 2e101

    1. Initial program 97.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

    if 2e101 < (*.f64 (*.f64 y #s(literal 9 binary64)) z)

    1. Initial program 81.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. Step-by-step derivation
      1. sub-neg81.2%

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

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

        \[\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 \]
      4. associate-*l*95.0%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 99.8%

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

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

Alternative 2: 49.5% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{-93}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-153}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-172}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq 10^{-230}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-197}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-127}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-112}:\\ \;\;\;\;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.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* 27.0 b))) (t_2 (* -9.0 (* t (* y z)))))
   (if (<= z -4.2e-93)
     (* -9.0 (* z (* y t)))
     (if (<= z -5.8e-130)
       t_1
       (if (<= z -7.8e-153)
         t_2
         (if (<= z -7.5e-172)
           (* 27.0 (* a b))
           (if (<= z 1e-230)
             (* x 2.0)
             (if (<= z 4.4e-197)
               t_1
               (if (<= z 8.5e-127)
                 (* x 2.0)
                 (if (<= z 6.5e-112) t_1 t_2))))))))))
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 = a * (27.0 * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -4.2e-93) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -5.8e-130) {
		tmp = t_1;
	} else if (z <= -7.8e-153) {
		tmp = t_2;
	} else if (z <= -7.5e-172) {
		tmp = 27.0 * (a * b);
	} else if (z <= 1e-230) {
		tmp = x * 2.0;
	} else if (z <= 4.4e-197) {
		tmp = t_1;
	} else if (z <= 8.5e-127) {
		tmp = x * 2.0;
	} else if (z <= 6.5e-112) {
		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.
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 = a * (27.0d0 * b)
    t_2 = (-9.0d0) * (t * (y * z))
    if (z <= (-4.2d-93)) then
        tmp = (-9.0d0) * (z * (y * t))
    else if (z <= (-5.8d-130)) then
        tmp = t_1
    else if (z <= (-7.8d-153)) then
        tmp = t_2
    else if (z <= (-7.5d-172)) then
        tmp = 27.0d0 * (a * b)
    else if (z <= 1d-230) then
        tmp = x * 2.0d0
    else if (z <= 4.4d-197) then
        tmp = t_1
    else if (z <= 8.5d-127) then
        tmp = x * 2.0d0
    else if (z <= 6.5d-112) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (27.0 * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -4.2e-93) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -5.8e-130) {
		tmp = t_1;
	} else if (z <= -7.8e-153) {
		tmp = t_2;
	} else if (z <= -7.5e-172) {
		tmp = 27.0 * (a * b);
	} else if (z <= 1e-230) {
		tmp = x * 2.0;
	} else if (z <= 4.4e-197) {
		tmp = t_1;
	} else if (z <= 8.5e-127) {
		tmp = x * 2.0;
	} else if (z <= 6.5e-112) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = a * (27.0 * b)
	t_2 = -9.0 * (t * (y * z))
	tmp = 0
	if z <= -4.2e-93:
		tmp = -9.0 * (z * (y * t))
	elif z <= -5.8e-130:
		tmp = t_1
	elif z <= -7.8e-153:
		tmp = t_2
	elif z <= -7.5e-172:
		tmp = 27.0 * (a * b)
	elif z <= 1e-230:
		tmp = x * 2.0
	elif z <= 4.4e-197:
		tmp = t_1
	elif z <= 8.5e-127:
		tmp = x * 2.0
	elif z <= 6.5e-112:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(27.0 * b))
	t_2 = Float64(-9.0 * Float64(t * Float64(y * z)))
	tmp = 0.0
	if (z <= -4.2e-93)
		tmp = Float64(-9.0 * Float64(z * Float64(y * t)));
	elseif (z <= -5.8e-130)
		tmp = t_1;
	elseif (z <= -7.8e-153)
		tmp = t_2;
	elseif (z <= -7.5e-172)
		tmp = Float64(27.0 * Float64(a * b));
	elseif (z <= 1e-230)
		tmp = Float64(x * 2.0);
	elseif (z <= 4.4e-197)
		tmp = t_1;
	elseif (z <= 8.5e-127)
		tmp = Float64(x * 2.0);
	elseif (z <= 6.5e-112)
		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])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (27.0 * b);
	t_2 = -9.0 * (t * (y * z));
	tmp = 0.0;
	if (z <= -4.2e-93)
		tmp = -9.0 * (z * (y * t));
	elseif (z <= -5.8e-130)
		tmp = t_1;
	elseif (z <= -7.8e-153)
		tmp = t_2;
	elseif (z <= -7.5e-172)
		tmp = 27.0 * (a * b);
	elseif (z <= 1e-230)
		tmp = x * 2.0;
	elseif (z <= 4.4e-197)
		tmp = t_1;
	elseif (z <= 8.5e-127)
		tmp = x * 2.0;
	elseif (z <= 6.5e-112)
		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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e-93], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8e-130], t$95$1, If[LessEqual[z, -7.8e-153], t$95$2, If[LessEqual[z, -7.5e-172], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-230], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.4e-197], t$95$1, If[LessEqual[z, 8.5e-127], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6.5e-112], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{-93}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

\mathbf{elif}\;z \leq -5.8 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7.8 \cdot 10^{-153}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-172}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;z \leq 10^{-230}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-197}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-127}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.2000000000000002e-93

    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. Step-by-step derivation
      1. sub-neg90.9%

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

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

        \[\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 \]
      4. associate-*l*92.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 85.2%

      \[\leadsto \color{blue}{t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)} \]
    6. Taylor expanded in t around inf 52.8%

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

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

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

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

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

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

    if -4.2000000000000002e-93 < z < -5.8e-130 or 1.00000000000000005e-230 < z < 4.4000000000000001e-197 or 8.5e-127 < z < 6.49999999999999956e-112

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.9%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 77.7%

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

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative77.8%

        \[\leadsto \color{blue}{\left(a \cdot 27\right)} \cdot b \]
      3. associate-*r*77.7%

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

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

    if -5.8e-130 < z < -7.8000000000000004e-153 or 6.49999999999999956e-112 < z

    1. Initial program 94.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. Step-by-step derivation
      1. sub-neg94.6%

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

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

        \[\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 \]
      4. associate-*l*93.6%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 50.6%

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

    if -7.8000000000000004e-153 < z < -7.4999999999999999e-172

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.6%

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

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

        \[\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 \]
      4. associate-*l*99.6%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 73.0%

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

    if -7.4999999999999999e-172 < z < 1.00000000000000005e-230 or 4.4000000000000001e-197 < z < 8.5e-127

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.8%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-93}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-130}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-153}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-172}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq 10^{-230}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-197}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-127}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-112}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 49.2% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;z \leq -4.3 \cdot 10^{-94}:\\ \;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-127}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-229}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-194}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-112}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \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.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* 27.0 b))))
   (if (<= z -4.3e-94)
     (* z (* y (* t -9.0)))
     (if (<= z -1.9e-127)
       t_1
       (if (<= z -7.2e-172)
         (* (* t -9.0) (* y z))
         (if (<= z 1.85e-229)
           (* x 2.0)
           (if (<= z 3.7e-194)
             t_1
             (if (<= z 1.4e-126)
               (* x 2.0)
               (if (<= z 6.8e-112) t_1 (* t (* y (* z -9.0))))))))))))
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 = a * (27.0 * b);
	double tmp;
	if (z <= -4.3e-94) {
		tmp = z * (y * (t * -9.0));
	} else if (z <= -1.9e-127) {
		tmp = t_1;
	} else if (z <= -7.2e-172) {
		tmp = (t * -9.0) * (y * z);
	} else if (z <= 1.85e-229) {
		tmp = x * 2.0;
	} else if (z <= 3.7e-194) {
		tmp = t_1;
	} else if (z <= 1.4e-126) {
		tmp = x * 2.0;
	} else if (z <= 6.8e-112) {
		tmp = t_1;
	} else {
		tmp = t * (y * (z * -9.0));
	}
	return tmp;
}
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 = a * (27.0d0 * b)
    if (z <= (-4.3d-94)) then
        tmp = z * (y * (t * (-9.0d0)))
    else if (z <= (-1.9d-127)) then
        tmp = t_1
    else if (z <= (-7.2d-172)) then
        tmp = (t * (-9.0d0)) * (y * z)
    else if (z <= 1.85d-229) then
        tmp = x * 2.0d0
    else if (z <= 3.7d-194) then
        tmp = t_1
    else if (z <= 1.4d-126) then
        tmp = x * 2.0d0
    else if (z <= 6.8d-112) then
        tmp = t_1
    else
        tmp = t * (y * (z * (-9.0d0)))
    end if
    code = tmp
end function
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 = a * (27.0 * b);
	double tmp;
	if (z <= -4.3e-94) {
		tmp = z * (y * (t * -9.0));
	} else if (z <= -1.9e-127) {
		tmp = t_1;
	} else if (z <= -7.2e-172) {
		tmp = (t * -9.0) * (y * z);
	} else if (z <= 1.85e-229) {
		tmp = x * 2.0;
	} else if (z <= 3.7e-194) {
		tmp = t_1;
	} else if (z <= 1.4e-126) {
		tmp = x * 2.0;
	} else if (z <= 6.8e-112) {
		tmp = t_1;
	} else {
		tmp = t * (y * (z * -9.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = a * (27.0 * b)
	tmp = 0
	if z <= -4.3e-94:
		tmp = z * (y * (t * -9.0))
	elif z <= -1.9e-127:
		tmp = t_1
	elif z <= -7.2e-172:
		tmp = (t * -9.0) * (y * z)
	elif z <= 1.85e-229:
		tmp = x * 2.0
	elif z <= 3.7e-194:
		tmp = t_1
	elif z <= 1.4e-126:
		tmp = x * 2.0
	elif z <= 6.8e-112:
		tmp = t_1
	else:
		tmp = t * (y * (z * -9.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(27.0 * b))
	tmp = 0.0
	if (z <= -4.3e-94)
		tmp = Float64(z * Float64(y * Float64(t * -9.0)));
	elseif (z <= -1.9e-127)
		tmp = t_1;
	elseif (z <= -7.2e-172)
		tmp = Float64(Float64(t * -9.0) * Float64(y * z));
	elseif (z <= 1.85e-229)
		tmp = Float64(x * 2.0);
	elseif (z <= 3.7e-194)
		tmp = t_1;
	elseif (z <= 1.4e-126)
		tmp = Float64(x * 2.0);
	elseif (z <= 6.8e-112)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(y * Float64(z * -9.0)));
	end
	return tmp
end
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 = a * (27.0 * b);
	tmp = 0.0;
	if (z <= -4.3e-94)
		tmp = z * (y * (t * -9.0));
	elseif (z <= -1.9e-127)
		tmp = t_1;
	elseif (z <= -7.2e-172)
		tmp = (t * -9.0) * (y * z);
	elseif (z <= 1.85e-229)
		tmp = x * 2.0;
	elseif (z <= 3.7e-194)
		tmp = t_1;
	elseif (z <= 1.4e-126)
		tmp = x * 2.0;
	elseif (z <= 6.8e-112)
		tmp = t_1;
	else
		tmp = t * (y * (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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e-94], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.9e-127], t$95$1, If[LessEqual[z, -7.2e-172], N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-229], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.7e-194], t$95$1, If[LessEqual[z, 1.4e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6.8e-112], t$95$1, N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{-94}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{-229}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.2999999999999998e-94

    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 0 90.8%

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(9 \cdot \left(y \cdot z\right)\right)} \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    4. Taylor expanded in y around inf 52.8%

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

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

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

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

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

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

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

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

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

    if -4.2999999999999998e-94 < z < -1.90000000000000001e-127 or 1.8499999999999999e-229 < z < 3.70000000000000008e-194 or 1.39999999999999996e-126 < z < 6.7999999999999996e-112

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.9%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 73.5%

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

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative73.6%

        \[\leadsto \color{blue}{\left(a \cdot 27\right)} \cdot b \]
      3. associate-*r*73.5%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    7. Simplified73.5%

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

    if -1.90000000000000001e-127 < z < -7.20000000000000029e-172

    1. Initial program 99.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 99.3%

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(9 \cdot \left(y \cdot z\right)\right)} \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    4. Taylor expanded in y around inf 50.8%

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

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

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

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

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

    if -7.20000000000000029e-172 < z < 1.8499999999999999e-229 or 3.70000000000000008e-194 < z < 1.39999999999999996e-126

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.8%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 59.5%

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

    if 6.7999999999999996e-112 < z

    1. Initial program 94.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. Step-by-step derivation
      1. sub-neg94.1%

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

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*93.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 \]
      4. associate-*l*93.0%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 83.9%

      \[\leadsto \color{blue}{y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(t \cdot z\right)\right)} \]
    6. Taylor expanded in y around inf 48.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-94}:\\ \;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-127}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-229}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-194}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-112}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 49.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ t_2 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \mathbf{if}\;z \leq -3 \cdot 10^{-94}:\\ \;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-230}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-113}:\\ \;\;\;\;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.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* 27.0 b))) (t_2 (* t (* y (* z -9.0)))))
   (if (<= z -3e-94)
     (* z (* y (* t -9.0)))
     (if (<= z -8e-128)
       t_1
       (if (<= z -7.2e-172)
         t_2
         (if (<= z 8.2e-230)
           (* x 2.0)
           (if (<= z 1.45e-196)
             t_1
             (if (<= z 1.5e-126) (* x 2.0) (if (<= z 4.2e-113) t_1 t_2)))))))))
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 = a * (27.0 * b);
	double t_2 = t * (y * (z * -9.0));
	double tmp;
	if (z <= -3e-94) {
		tmp = z * (y * (t * -9.0));
	} else if (z <= -8e-128) {
		tmp = t_1;
	} else if (z <= -7.2e-172) {
		tmp = t_2;
	} else if (z <= 8.2e-230) {
		tmp = x * 2.0;
	} else if (z <= 1.45e-196) {
		tmp = t_1;
	} else if (z <= 1.5e-126) {
		tmp = x * 2.0;
	} else if (z <= 4.2e-113) {
		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.
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 = a * (27.0d0 * b)
    t_2 = t * (y * (z * (-9.0d0)))
    if (z <= (-3d-94)) then
        tmp = z * (y * (t * (-9.0d0)))
    else if (z <= (-8d-128)) then
        tmp = t_1
    else if (z <= (-7.2d-172)) then
        tmp = t_2
    else if (z <= 8.2d-230) then
        tmp = x * 2.0d0
    else if (z <= 1.45d-196) then
        tmp = t_1
    else if (z <= 1.5d-126) then
        tmp = x * 2.0d0
    else if (z <= 4.2d-113) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (27.0 * b);
	double t_2 = t * (y * (z * -9.0));
	double tmp;
	if (z <= -3e-94) {
		tmp = z * (y * (t * -9.0));
	} else if (z <= -8e-128) {
		tmp = t_1;
	} else if (z <= -7.2e-172) {
		tmp = t_2;
	} else if (z <= 8.2e-230) {
		tmp = x * 2.0;
	} else if (z <= 1.45e-196) {
		tmp = t_1;
	} else if (z <= 1.5e-126) {
		tmp = x * 2.0;
	} else if (z <= 4.2e-113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = a * (27.0 * b)
	t_2 = t * (y * (z * -9.0))
	tmp = 0
	if z <= -3e-94:
		tmp = z * (y * (t * -9.0))
	elif z <= -8e-128:
		tmp = t_1
	elif z <= -7.2e-172:
		tmp = t_2
	elif z <= 8.2e-230:
		tmp = x * 2.0
	elif z <= 1.45e-196:
		tmp = t_1
	elif z <= 1.5e-126:
		tmp = x * 2.0
	elif z <= 4.2e-113:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(27.0 * b))
	t_2 = Float64(t * Float64(y * Float64(z * -9.0)))
	tmp = 0.0
	if (z <= -3e-94)
		tmp = Float64(z * Float64(y * Float64(t * -9.0)));
	elseif (z <= -8e-128)
		tmp = t_1;
	elseif (z <= -7.2e-172)
		tmp = t_2;
	elseif (z <= 8.2e-230)
		tmp = Float64(x * 2.0);
	elseif (z <= 1.45e-196)
		tmp = t_1;
	elseif (z <= 1.5e-126)
		tmp = Float64(x * 2.0);
	elseif (z <= 4.2e-113)
		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])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (27.0 * b);
	t_2 = t * (y * (z * -9.0));
	tmp = 0.0;
	if (z <= -3e-94)
		tmp = z * (y * (t * -9.0));
	elseif (z <= -8e-128)
		tmp = t_1;
	elseif (z <= -7.2e-172)
		tmp = t_2;
	elseif (z <= 8.2e-230)
		tmp = x * 2.0;
	elseif (z <= 1.45e-196)
		tmp = t_1;
	elseif (z <= 1.5e-126)
		tmp = x * 2.0;
	elseif (z <= 4.2e-113)
		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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-94], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8e-128], t$95$1, If[LessEqual[z, -7.2e-172], t$95$2, If[LessEqual[z, 8.2e-230], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.45e-196], t$95$1, If[LessEqual[z, 1.5e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.2e-113], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{-94}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\

\mathbf{elif}\;z \leq -8 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 8.2 \cdot 10^{-230}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.0000000000000001e-94

    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 0 90.8%

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(9 \cdot \left(y \cdot z\right)\right)} \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    4. Taylor expanded in y around inf 52.8%

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

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

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

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

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

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

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

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

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

    if -3.0000000000000001e-94 < z < -8.00000000000000043e-128 or 8.2000000000000003e-230 < z < 1.44999999999999994e-196 or 1.5000000000000001e-126 < z < 4.2e-113

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.9%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 77.7%

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

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative77.8%

        \[\leadsto \color{blue}{\left(a \cdot 27\right)} \cdot b \]
      3. associate-*r*77.7%

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

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

    if -8.00000000000000043e-128 < z < -7.20000000000000029e-172 or 4.2e-113 < z

    1. Initial program 94.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. Step-by-step derivation
      1. sub-neg94.8%

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

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

        \[\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 \]
      4. associate-*l*93.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 84.0%

      \[\leadsto \color{blue}{y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(t \cdot z\right)\right)} \]
    6. Taylor expanded in y around inf 48.6%

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

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

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

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

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

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

    if -7.20000000000000029e-172 < z < 8.2000000000000003e-230 or 1.44999999999999994e-196 < z < 1.5000000000000001e-126

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.8%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-94}:\\ \;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-128}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-230}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-196}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-113}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 49.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ t_2 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \mathbf{if}\;z \leq -8 \cdot 10^{-94}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-232}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-197}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-112}:\\ \;\;\;\;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.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* 27.0 b))) (t_2 (* t (* y (* z -9.0)))))
   (if (<= z -8e-94)
     (* -9.0 (* z (* y t)))
     (if (<= z -4.2e-130)
       t_1
       (if (<= z -7.2e-172)
         t_2
         (if (<= z 2.95e-232)
           (* x 2.0)
           (if (<= z 2.25e-197)
             t_1
             (if (<= z 1.2e-126)
               (* x 2.0)
               (if (<= z 1.85e-112) t_1 t_2)))))))))
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 = a * (27.0 * b);
	double t_2 = t * (y * (z * -9.0));
	double tmp;
	if (z <= -8e-94) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -4.2e-130) {
		tmp = t_1;
	} else if (z <= -7.2e-172) {
		tmp = t_2;
	} else if (z <= 2.95e-232) {
		tmp = x * 2.0;
	} else if (z <= 2.25e-197) {
		tmp = t_1;
	} else if (z <= 1.2e-126) {
		tmp = x * 2.0;
	} else if (z <= 1.85e-112) {
		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.
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 = a * (27.0d0 * b)
    t_2 = t * (y * (z * (-9.0d0)))
    if (z <= (-8d-94)) then
        tmp = (-9.0d0) * (z * (y * t))
    else if (z <= (-4.2d-130)) then
        tmp = t_1
    else if (z <= (-7.2d-172)) then
        tmp = t_2
    else if (z <= 2.95d-232) then
        tmp = x * 2.0d0
    else if (z <= 2.25d-197) then
        tmp = t_1
    else if (z <= 1.2d-126) then
        tmp = x * 2.0d0
    else if (z <= 1.85d-112) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (27.0 * b);
	double t_2 = t * (y * (z * -9.0));
	double tmp;
	if (z <= -8e-94) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -4.2e-130) {
		tmp = t_1;
	} else if (z <= -7.2e-172) {
		tmp = t_2;
	} else if (z <= 2.95e-232) {
		tmp = x * 2.0;
	} else if (z <= 2.25e-197) {
		tmp = t_1;
	} else if (z <= 1.2e-126) {
		tmp = x * 2.0;
	} else if (z <= 1.85e-112) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = a * (27.0 * b)
	t_2 = t * (y * (z * -9.0))
	tmp = 0
	if z <= -8e-94:
		tmp = -9.0 * (z * (y * t))
	elif z <= -4.2e-130:
		tmp = t_1
	elif z <= -7.2e-172:
		tmp = t_2
	elif z <= 2.95e-232:
		tmp = x * 2.0
	elif z <= 2.25e-197:
		tmp = t_1
	elif z <= 1.2e-126:
		tmp = x * 2.0
	elif z <= 1.85e-112:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(27.0 * b))
	t_2 = Float64(t * Float64(y * Float64(z * -9.0)))
	tmp = 0.0
	if (z <= -8e-94)
		tmp = Float64(-9.0 * Float64(z * Float64(y * t)));
	elseif (z <= -4.2e-130)
		tmp = t_1;
	elseif (z <= -7.2e-172)
		tmp = t_2;
	elseif (z <= 2.95e-232)
		tmp = Float64(x * 2.0);
	elseif (z <= 2.25e-197)
		tmp = t_1;
	elseif (z <= 1.2e-126)
		tmp = Float64(x * 2.0);
	elseif (z <= 1.85e-112)
		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])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (27.0 * b);
	t_2 = t * (y * (z * -9.0));
	tmp = 0.0;
	if (z <= -8e-94)
		tmp = -9.0 * (z * (y * t));
	elseif (z <= -4.2e-130)
		tmp = t_1;
	elseif (z <= -7.2e-172)
		tmp = t_2;
	elseif (z <= 2.95e-232)
		tmp = x * 2.0;
	elseif (z <= 2.25e-197)
		tmp = t_1;
	elseif (z <= 1.2e-126)
		tmp = x * 2.0;
	elseif (z <= 1.85e-112)
		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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-94], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-130], t$95$1, If[LessEqual[z, -7.2e-172], t$95$2, If[LessEqual[z, 2.95e-232], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.25e-197], t$95$1, If[LessEqual[z, 1.2e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.85e-112], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-94}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.95 \cdot 10^{-232}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-197}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.9999999999999996e-94

    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. Step-by-step derivation
      1. sub-neg90.9%

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

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

        \[\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 \]
      4. associate-*l*92.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 85.2%

      \[\leadsto \color{blue}{t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)} \]
    6. Taylor expanded in t around inf 52.8%

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

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

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

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

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

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

    if -7.9999999999999996e-94 < z < -4.20000000000000004e-130 or 2.95000000000000008e-232 < z < 2.25e-197 or 1.20000000000000003e-126 < z < 1.8499999999999999e-112

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.9%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 77.7%

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

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative77.8%

        \[\leadsto \color{blue}{\left(a \cdot 27\right)} \cdot b \]
      3. associate-*r*77.7%

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

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

    if -4.20000000000000004e-130 < z < -7.20000000000000029e-172 or 1.8499999999999999e-112 < z

    1. Initial program 94.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. Step-by-step derivation
      1. sub-neg94.8%

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

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

        \[\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 \]
      4. associate-*l*93.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 84.0%

      \[\leadsto \color{blue}{y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(t \cdot z\right)\right)} \]
    6. Taylor expanded in y around inf 48.6%

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

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

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

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

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

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

    if -7.20000000000000029e-172 < z < 2.95000000000000008e-232 or 2.25e-197 < z < 1.20000000000000003e-126

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.8%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-94}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-130}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-232}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-197}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-112}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 47.9% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := a \cdot \left(27 \cdot b\right)\\ t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{-93}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-172}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-232}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-193}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-113}:\\ \;\;\;\;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.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* 27.0 b))) (t_2 (* -9.0 (* t (* y z)))))
   (if (<= z -5.4e-93)
     t_2
     (if (<= z -1.85e-128)
       t_1
       (if (<= z -7e-172)
         t_2
         (if (<= z 1.7e-232)
           (* x 2.0)
           (if (<= z 8.8e-193)
             t_1
             (if (<= z 2.4e-126)
               (* x 2.0)
               (if (<= z 2.55e-113) t_1 t_2)))))))))
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 = a * (27.0 * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -5.4e-93) {
		tmp = t_2;
	} else if (z <= -1.85e-128) {
		tmp = t_1;
	} else if (z <= -7e-172) {
		tmp = t_2;
	} else if (z <= 1.7e-232) {
		tmp = x * 2.0;
	} else if (z <= 8.8e-193) {
		tmp = t_1;
	} else if (z <= 2.4e-126) {
		tmp = x * 2.0;
	} else if (z <= 2.55e-113) {
		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.
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 = a * (27.0d0 * b)
    t_2 = (-9.0d0) * (t * (y * z))
    if (z <= (-5.4d-93)) then
        tmp = t_2
    else if (z <= (-1.85d-128)) then
        tmp = t_1
    else if (z <= (-7d-172)) then
        tmp = t_2
    else if (z <= 1.7d-232) then
        tmp = x * 2.0d0
    else if (z <= 8.8d-193) then
        tmp = t_1
    else if (z <= 2.4d-126) then
        tmp = x * 2.0d0
    else if (z <= 2.55d-113) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (27.0 * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -5.4e-93) {
		tmp = t_2;
	} else if (z <= -1.85e-128) {
		tmp = t_1;
	} else if (z <= -7e-172) {
		tmp = t_2;
	} else if (z <= 1.7e-232) {
		tmp = x * 2.0;
	} else if (z <= 8.8e-193) {
		tmp = t_1;
	} else if (z <= 2.4e-126) {
		tmp = x * 2.0;
	} else if (z <= 2.55e-113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = a * (27.0 * b)
	t_2 = -9.0 * (t * (y * z))
	tmp = 0
	if z <= -5.4e-93:
		tmp = t_2
	elif z <= -1.85e-128:
		tmp = t_1
	elif z <= -7e-172:
		tmp = t_2
	elif z <= 1.7e-232:
		tmp = x * 2.0
	elif z <= 8.8e-193:
		tmp = t_1
	elif z <= 2.4e-126:
		tmp = x * 2.0
	elif z <= 2.55e-113:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(27.0 * b))
	t_2 = Float64(-9.0 * Float64(t * Float64(y * z)))
	tmp = 0.0
	if (z <= -5.4e-93)
		tmp = t_2;
	elseif (z <= -1.85e-128)
		tmp = t_1;
	elseif (z <= -7e-172)
		tmp = t_2;
	elseif (z <= 1.7e-232)
		tmp = Float64(x * 2.0);
	elseif (z <= 8.8e-193)
		tmp = t_1;
	elseif (z <= 2.4e-126)
		tmp = Float64(x * 2.0);
	elseif (z <= 2.55e-113)
		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])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (27.0 * b);
	t_2 = -9.0 * (t * (y * z));
	tmp = 0.0;
	if (z <= -5.4e-93)
		tmp = t_2;
	elseif (z <= -1.85e-128)
		tmp = t_1;
	elseif (z <= -7e-172)
		tmp = t_2;
	elseif (z <= 1.7e-232)
		tmp = x * 2.0;
	elseif (z <= 8.8e-193)
		tmp = t_1;
	elseif (z <= 2.4e-126)
		tmp = x * 2.0;
	elseif (z <= 2.55e-113)
		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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-93], t$95$2, If[LessEqual[z, -1.85e-128], t$95$1, If[LessEqual[z, -7e-172], t$95$2, If[LessEqual[z, 1.7e-232], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 8.8e-193], t$95$1, If[LessEqual[z, 2.4e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.55e-113], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{-93}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.85 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-232}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 8.8 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.4000000000000002e-93 or -1.85e-128 < z < -7.00000000000000057e-172 or 2.54999999999999989e-113 < z

    1. Initial program 93.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. sub-neg93.0%

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

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

        \[\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 \]
      4. associate-*l*93.4%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 50.6%

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

    if -5.4000000000000002e-93 < z < -1.85e-128 or 1.7000000000000001e-232 < z < 8.79999999999999906e-193 or 2.40000000000000007e-126 < z < 2.54999999999999989e-113

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.9%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 73.5%

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

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative73.6%

        \[\leadsto \color{blue}{\left(a \cdot 27\right)} \cdot b \]
      3. associate-*r*73.5%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    7. Simplified73.5%

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

    if -7.00000000000000057e-172 < z < 1.7000000000000001e-232 or 8.79999999999999906e-193 < z < 2.40000000000000007e-126

    1. Initial program 99.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. Step-by-step derivation
      1. sub-neg99.8%

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

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

        \[\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 \]
      4. associate-*l*99.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 59.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{-93}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-128}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-172}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-232}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-193}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-126}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-113}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 72.1% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+32}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+115}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+136} \lor \neg \left(b \leq 2.8 \cdot 10^{+188}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \end{array} \end{array} \]
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.9e+32)
   (* a (* 27.0 b))
   (if (<= b 2e+115)
     (+ (* (* t -9.0) (* y z)) (* x 2.0))
     (if (or (<= b 3e+136) (not (<= b 2.8e+188)))
       (+ (* 27.0 (* a b)) (* x 2.0))
       (- (* x 2.0) (* 9.0 (* z (* y t))))))))
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.9e+32) {
		tmp = a * (27.0 * b);
	} else if (b <= 2e+115) {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	} else if ((b <= 3e+136) || !(b <= 2.8e+188)) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = (x * 2.0) - (9.0 * (z * (y * t)));
	}
	return tmp;
}
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.9d+32)) then
        tmp = a * (27.0d0 * b)
    else if (b <= 2d+115) then
        tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
    else if ((b <= 3d+136) .or. (.not. (b <= 2.8d+188))) then
        tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
    else
        tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
    end if
    code = tmp
end function
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.9e+32) {
		tmp = a * (27.0 * b);
	} else if (b <= 2e+115) {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	} else if ((b <= 3e+136) || !(b <= 2.8e+188)) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = (x * 2.0) - (9.0 * (z * (y * t)));
	}
	return tmp;
}
[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.9e+32:
		tmp = a * (27.0 * b)
	elif b <= 2e+115:
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0)
	elif (b <= 3e+136) or not (b <= 2.8e+188):
		tmp = (27.0 * (a * b)) + (x * 2.0)
	else:
		tmp = (x * 2.0) - (9.0 * (z * (y * t)))
	return tmp
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.9e+32)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (b <= 2e+115)
		tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0));
	elseif ((b <= 3e+136) || !(b <= 2.8e+188))
		tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0));
	else
		tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t))));
	end
	return tmp
end
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.9e+32)
		tmp = a * (27.0 * b);
	elseif (b <= 2e+115)
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	elseif ((b <= 3e+136) || ~((b <= 2.8e+188)))
		tmp = (27.0 * (a * b)) + (x * 2.0);
	else
		tmp = (x * 2.0) - (9.0 * (z * (y * t)));
	end
	tmp_2 = tmp;
end
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.9e+32], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e+115], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 3e+136], N[Not[LessEqual[b, 2.8e+188]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;b \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\

\mathbf{elif}\;b \leq 3 \cdot 10^{+136} \lor \neg \left(b \leq 2.8 \cdot 10^{+188}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.90000000000000003e32

    1. Initial program 98.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. Step-by-step derivation
      1. sub-neg98.3%

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

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*92.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 \]
      4. associate-*l*91.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 53.0%

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

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative53.0%

        \[\leadsto \color{blue}{\left(a \cdot 27\right)} \cdot b \]
      3. associate-*r*53.0%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    7. Simplified53.0%

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

    if -2.90000000000000003e32 < b < 2e115

    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. Step-by-step derivation
      1. sub-neg94.7%

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

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

        \[\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 \]
      4. associate-*l*96.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 79.3%

      \[\leadsto \color{blue}{2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv79.3%

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

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

        \[\leadsto x \cdot 2 + \color{blue}{\left(\left(-9\right) \cdot t\right) \cdot \left(y \cdot z\right)} \]
      4. metadata-eval79.4%

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

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

    if 2e115 < b < 2.99999999999999979e136 or 2.7999999999999998e188 < b

    1. Initial program 90.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. Step-by-step derivation
      1. sub-neg90.3%

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

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

        \[\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 \]
      4. associate-*l*90.3%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 93.0%

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

    if 2.99999999999999979e136 < b < 2.7999999999999998e188

    1. Initial program 91.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. Step-by-step derivation
      1. sub-neg91.2%

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

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

        \[\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 \]
      4. associate-*l*99.4%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 73.8%

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

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

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

      \[\leadsto 2 \cdot x - 9 \cdot \color{blue}{{\left(\left(y \cdot z\right) \cdot t\right)}^{1}} \]
    8. Step-by-step derivation
      1. unpow173.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+32}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+115}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+136} \lor \neg \left(b \leq 2.8 \cdot 10^{+188}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 72.5% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -2.95 \cdot 10^{+32}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+114}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+136} \lor \neg \left(b \leq 7.5 \cdot 10^{+161}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\\ \end{array} \end{array} \]
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.95e+32)
   (* a (* 27.0 b))
   (if (<= b 4.2e+114)
     (+ (* (* t -9.0) (* y z)) (* x 2.0))
     (if (or (<= b 2.4e+136) (not (<= b 7.5e+161)))
       (+ (* 27.0 (* a b)) (* x 2.0))
       (* y (* (* z t) -9.0))))))
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.95e+32) {
		tmp = a * (27.0 * b);
	} else if (b <= 4.2e+114) {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	} else if ((b <= 2.4e+136) || !(b <= 7.5e+161)) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = y * ((z * t) * -9.0);
	}
	return tmp;
}
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.95d+32)) then
        tmp = a * (27.0d0 * b)
    else if (b <= 4.2d+114) then
        tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
    else if ((b <= 2.4d+136) .or. (.not. (b <= 7.5d+161))) then
        tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
    else
        tmp = y * ((z * t) * (-9.0d0))
    end if
    code = tmp
end function
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.95e+32) {
		tmp = a * (27.0 * b);
	} else if (b <= 4.2e+114) {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	} else if ((b <= 2.4e+136) || !(b <= 7.5e+161)) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = y * ((z * t) * -9.0);
	}
	return tmp;
}
[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.95e+32:
		tmp = a * (27.0 * b)
	elif b <= 4.2e+114:
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0)
	elif (b <= 2.4e+136) or not (b <= 7.5e+161):
		tmp = (27.0 * (a * b)) + (x * 2.0)
	else:
		tmp = y * ((z * t) * -9.0)
	return tmp
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.95e+32)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (b <= 4.2e+114)
		tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0));
	elseif ((b <= 2.4e+136) || !(b <= 7.5e+161))
		tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0));
	else
		tmp = Float64(y * Float64(Float64(z * t) * -9.0));
	end
	return tmp
end
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.95e+32)
		tmp = a * (27.0 * b);
	elseif (b <= 4.2e+114)
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	elseif ((b <= 2.4e+136) || ~((b <= 7.5e+161)))
		tmp = (27.0 * (a * b)) + (x * 2.0);
	else
		tmp = y * ((z * t) * -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.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.95e+32], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e+114], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 2.4e+136], N[Not[LessEqual[b, 7.5e+161]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.95 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;b \leq 4.2 \cdot 10^{+114}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+136} \lor \neg \left(b \leq 7.5 \cdot 10^{+161}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.94999999999999983e32

    1. Initial program 98.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. Step-by-step derivation
      1. sub-neg98.3%

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

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*92.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 \]
      4. associate-*l*91.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 53.0%

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

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative53.0%

        \[\leadsto \color{blue}{\left(a \cdot 27\right)} \cdot b \]
      3. associate-*r*53.0%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    7. Simplified53.0%

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

    if -2.94999999999999983e32 < b < 4.2000000000000001e114

    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. Step-by-step derivation
      1. sub-neg94.7%

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

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

        \[\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 \]
      4. associate-*l*96.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 79.3%

      \[\leadsto \color{blue}{2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv79.3%

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

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

        \[\leadsto x \cdot 2 + \color{blue}{\left(\left(-9\right) \cdot t\right) \cdot \left(y \cdot z\right)} \]
      4. metadata-eval79.4%

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

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

    if 4.2000000000000001e114 < b < 2.4e136 or 7.4999999999999995e161 < b

    1. Initial program 92.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. Step-by-step derivation
      1. sub-neg92.1%

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

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*92.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 \]
      4. associate-*l*92.1%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 90.5%

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

    if 2.4e136 < b < 7.4999999999999995e161

    1. Initial program 84.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. Step-by-step derivation
      1. sub-neg84.1%

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

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*99.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 \]
      4. associate-*l*99.2%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 84.4%

      \[\leadsto \color{blue}{2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Taylor expanded in y around inf 100.0%

      \[\leadsto \color{blue}{y \cdot \left(2 \cdot \frac{x}{y} - 9 \cdot \left(t \cdot z\right)\right)} \]
    7. Taylor expanded in x around 0 100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.95 \cdot 10^{+32}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+114}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+136} \lor \neg \left(b \leq 7.5 \cdot 10^{+161}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 78.7% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := 27 \cdot \left(a \cdot b\right)\\ t_2 := t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;b \leq -3.1 \cdot 10^{-55}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+50}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{+212}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1 + 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.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* 27.0 (* a b))) (t_2 (- t_1 (* 9.0 (* t (* y z))))))
   (if (<= b -3.1e-55)
     t_2
     (if (<= b 9e+50)
       (+ (* (* t -9.0) (* y z)) (* x 2.0))
       (if (<= b 9.5e+212) t_2 (+ t_1 (* x 2.0)))))))
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 = 27.0 * (a * b);
	double t_2 = t_1 - (9.0 * (t * (y * z)));
	double tmp;
	if (b <= -3.1e-55) {
		tmp = t_2;
	} else if (b <= 9e+50) {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	} else if (b <= 9.5e+212) {
		tmp = t_2;
	} else {
		tmp = t_1 + (x * 2.0);
	}
	return tmp;
}
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 = 27.0d0 * (a * b)
    t_2 = t_1 - (9.0d0 * (t * (y * z)))
    if (b <= (-3.1d-55)) then
        tmp = t_2
    else if (b <= 9d+50) then
        tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
    else if (b <= 9.5d+212) then
        tmp = t_2
    else
        tmp = t_1 + (x * 2.0d0)
    end if
    code = tmp
end function
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 = 27.0 * (a * b);
	double t_2 = t_1 - (9.0 * (t * (y * z)));
	double tmp;
	if (b <= -3.1e-55) {
		tmp = t_2;
	} else if (b <= 9e+50) {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	} else if (b <= 9.5e+212) {
		tmp = t_2;
	} else {
		tmp = t_1 + (x * 2.0);
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = 27.0 * (a * b)
	t_2 = t_1 - (9.0 * (t * (y * z)))
	tmp = 0
	if b <= -3.1e-55:
		tmp = t_2
	elif b <= 9e+50:
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0)
	elif b <= 9.5e+212:
		tmp = t_2
	else:
		tmp = t_1 + (x * 2.0)
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(27.0 * Float64(a * b))
	t_2 = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z))))
	tmp = 0.0
	if (b <= -3.1e-55)
		tmp = t_2;
	elseif (b <= 9e+50)
		tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0));
	elseif (b <= 9.5e+212)
		tmp = t_2;
	else
		tmp = Float64(t_1 + Float64(x * 2.0));
	end
	return tmp
end
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 = 27.0 * (a * b);
	t_2 = t_1 - (9.0 * (t * (y * z)));
	tmp = 0.0;
	if (b <= -3.1e-55)
		tmp = t_2;
	elseif (b <= 9e+50)
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	elseif (b <= 9.5e+212)
		tmp = t_2;
	else
		tmp = t_1 + (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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e-55], t$95$2, If[LessEqual[b, 9e+50], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e+212], t$95$2, N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
t_2 := t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{-55}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 9 \cdot 10^{+50}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\

\mathbf{elif}\;b \leq 9.5 \cdot 10^{+212}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot 2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.09999999999999997e-55 or 9.00000000000000027e50 < b < 9.4999999999999993e212

    1. Initial program 96.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. Step-by-step derivation
      1. sub-neg96.3%

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

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*93.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 \]
      4. associate-*l*93.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 78.6%

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

    if -3.09999999999999997e-55 < b < 9.00000000000000027e50

    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. sub-neg94.0%

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

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

        \[\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 \]
      4. associate-*l*96.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 79.5%

      \[\leadsto \color{blue}{2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv79.5%

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

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

        \[\leadsto x \cdot 2 + \color{blue}{\left(\left(-9\right) \cdot t\right) \cdot \left(y \cdot z\right)} \]
      4. metadata-eval79.6%

        \[\leadsto x \cdot 2 + \left(\color{blue}{-9} \cdot t\right) \cdot \left(y \cdot z\right) \]
    7. Applied egg-rr79.6%

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

    if 9.4999999999999993e212 < b

    1. Initial program 93.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. Step-by-step derivation
      1. sub-neg93.3%

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

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

        \[\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 \]
      4. associate-*l*93.1%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 100.0%

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

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

Alternative 10: 98.1% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 8.2 \cdot 10^{+27}:\\ \;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)\\ \end{array} \end{array} \]
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 8.2e+27)
   (+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 b)))
   (* t (- (+ (* 2.0 (/ x t)) (* 27.0 (/ (* a b) t))) (* 9.0 (* y z))))))
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 <= 8.2e+27) {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	} else {
		tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
	}
	return tmp;
}
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 <= 8.2d+27) then
        tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
    else
        tmp = t * (((2.0d0 * (x / t)) + (27.0d0 * ((a * b) / t))) - (9.0d0 * (y * z)))
    end if
    code = tmp
end function
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 <= 8.2e+27) {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	} else {
		tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
	}
	return tmp;
}
[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 <= 8.2e+27:
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b))
	else:
		tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)))
	return tmp
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 <= 8.2e+27)
		tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(t * Float64(Float64(Float64(2.0 * Float64(x / t)) + Float64(27.0 * Float64(Float64(a * b) / t))) - Float64(9.0 * Float64(y * z))));
	end
	return tmp
end
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 <= 8.2e+27)
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	else
		tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
	end
	tmp_2 = tmp;
end
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, 8.2e+27], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.2 \cdot 10^{+27}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\

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


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

    1. Initial program 94.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. Step-by-step derivation
      1. sub-neg94.2%

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

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

        \[\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 \]
      4. associate-*l*97.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. sub-neg97.9%

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000005e27 < t

    1. Initial program 97.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. Step-by-step derivation
      1. sub-neg97.9%

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

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

        \[\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 \]
      4. associate-*l*86.4%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 99.7%

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

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

Alternative 11: 97.7% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(y \cdot 9\right) \cdot z\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+101}:\\ \;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + \left(a \cdot 27\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \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.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* y 9.0) z)))
   (if (<= t_1 2e+101)
     (+ (- (* x 2.0) (* t_1 t)) (* (* a 27.0) b))
     (+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 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 = (y * 9.0) * z;
	double tmp;
	if (t_1 <= 2e+101) {
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
	} else {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	}
	return tmp;
}
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 = (y * 9.0d0) * z
    if (t_1 <= 2d+101) then
        tmp = ((x * 2.0d0) - (t_1 * t)) + ((a * 27.0d0) * b)
    else
        tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
    end if
    code = tmp
end function
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 = (y * 9.0) * z;
	double tmp;
	if (t_1 <= 2e+101) {
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
	} else {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	t_1 = (y * 9.0) * z
	tmp = 0
	if t_1 <= 2e+101:
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b)
	else:
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b))
	return tmp
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(y * 9.0) * z)
	tmp = 0.0
	if (t_1 <= 2e+101)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(Float64(a * 27.0) * b));
	else
		tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b)));
	end
	return tmp
end
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 = (y * 9.0) * z;
	tmp = 0.0;
	if (t_1 <= 2e+101)
		tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
	else
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	end
	tmp_2 = tmp;
end
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[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+101], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+101}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + \left(a \cdot 27\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 2e101

    1. Initial program 97.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

    if 2e101 < (*.f64 (*.f64 y #s(literal 9 binary64)) z)

    1. Initial program 81.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. Step-by-step derivation
      1. sub-neg81.2%

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

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

        \[\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 \]
      4. associate-*l*95.0%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. sub-neg95.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 97.5% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-127}:\\ \;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \end{array} \]
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 -3.5e-127)
   (+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 b)))
   (+ (* (* a 27.0) b) (- (* x 2.0) (* t (* 9.0 (* y z)))))))
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 <= -3.5e-127) {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	} else {
		tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z))));
	}
	return tmp;
}
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 <= (-3.5d-127)) then
        tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
    else
        tmp = ((a * 27.0d0) * b) + ((x * 2.0d0) - (t * (9.0d0 * (y * z))))
    end if
    code = tmp
end function
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 <= -3.5e-127) {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	} else {
		tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z))));
	}
	return tmp;
}
[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 <= -3.5e-127:
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b))
	else:
		tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z))))
	return tmp
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 <= -3.5e-127)
		tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(Float64(Float64(a * 27.0) * b) + Float64(Float64(x * 2.0) - Float64(t * Float64(9.0 * Float64(y * z)))));
	end
	return tmp
end
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 <= -3.5e-127)
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	else
		tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z))));
	end
	tmp_2 = tmp;
end
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, -3.5e-127], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-127}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\

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


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

    1. Initial program 91.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. Step-by-step derivation
      1. sub-neg91.3%

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

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

        \[\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 \]
      4. associate-*l*93.3%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. sub-neg93.3%

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999989e-127 < z

    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 0 97.0%

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

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

Alternative 13: 90.1% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 3.25 \cdot 10^{+153}:\\ \;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + 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.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t 3.25e+153)
   (+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 b)))
   (+ (* (* t -9.0) (* y z)) (* x 2.0))))
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 <= 3.25e+153) {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	} else {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	}
	return tmp;
}
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 <= 3.25d+153) then
        tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
    else
        tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
    end if
    code = tmp
end function
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 <= 3.25e+153) {
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	} else {
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
	}
	return tmp;
}
[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 <= 3.25e+153:
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b))
	else:
		tmp = ((t * -9.0) * (y * z)) + (x * 2.0)
	return tmp
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 <= 3.25e+153)
		tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0));
	end
	return tmp
end
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 <= 3.25e+153)
		tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
	else
		tmp = ((t * -9.0) * (y * z)) + (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.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 3.25e+153], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.25 \cdot 10^{+153}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\

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


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

    1. Initial program 94.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. Step-by-step derivation
      1. sub-neg94.9%

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

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

        \[\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 \]
      4. associate-*l*97.3%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. sub-neg97.3%

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

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

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

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

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

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

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

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

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

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

    if 3.24999999999999986e153 < t

    1. Initial program 96.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. Step-by-step derivation
      1. sub-neg96.2%

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

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

        \[\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 \]
      4. associate-*l*78.6%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 82.0%

      \[\leadsto \color{blue}{2 \cdot x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv82.0%

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

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

        \[\leadsto x \cdot 2 + \color{blue}{\left(\left(-9\right) \cdot t\right) \cdot \left(y \cdot z\right)} \]
      4. metadata-eval82.2%

        \[\leadsto x \cdot 2 + \left(\color{blue}{-9} \cdot t\right) \cdot \left(y \cdot z\right) \]
    7. Applied egg-rr82.2%

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

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

Alternative 14: 74.9% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+28}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-65}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot \left(t \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.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -4.4e+28)
   (* -9.0 (* z (* y t)))
   (if (<= z 4.2e-65) (+ (* 27.0 (* a b)) (* x 2.0)) (* z (* y (* t -9.0))))))
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 <= -4.4e+28) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= 4.2e-65) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = z * (y * (t * -9.0));
	}
	return tmp;
}
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 <= (-4.4d+28)) then
        tmp = (-9.0d0) * (z * (y * t))
    else if (z <= 4.2d-65) then
        tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
    else
        tmp = z * (y * (t * (-9.0d0)))
    end if
    code = tmp
end function
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 <= -4.4e+28) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= 4.2e-65) {
		tmp = (27.0 * (a * b)) + (x * 2.0);
	} else {
		tmp = z * (y * (t * -9.0));
	}
	return tmp;
}
[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 <= -4.4e+28:
		tmp = -9.0 * (z * (y * t))
	elif z <= 4.2e-65:
		tmp = (27.0 * (a * b)) + (x * 2.0)
	else:
		tmp = z * (y * (t * -9.0))
	return tmp
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 <= -4.4e+28)
		tmp = Float64(-9.0 * Float64(z * Float64(y * t)));
	elseif (z <= 4.2e-65)
		tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0));
	else
		tmp = Float64(z * Float64(y * Float64(t * -9.0)));
	end
	return tmp
end
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 <= -4.4e+28)
		tmp = -9.0 * (z * (y * t));
	elseif (z <= 4.2e-65)
		tmp = (27.0 * (a * b)) + (x * 2.0);
	else
		tmp = z * (y * (t * -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.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.4e+28], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-65], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+28}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-65}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.39999999999999973e28

    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. Step-by-step derivation
      1. sub-neg89.0%

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

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

        \[\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 \]
      4. associate-*l*91.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 84.2%

      \[\leadsto \color{blue}{t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)} \]
    6. Taylor expanded in t around inf 64.6%

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

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

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

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

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

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

    if -4.39999999999999973e28 < z < 4.20000000000000006e-65

    1. Initial program 98.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. Step-by-step derivation
      1. sub-neg98.9%

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

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*99.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 \]
      4. associate-*l*98.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 83.4%

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

    if 4.20000000000000006e-65 < z

    1. Initial program 93.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 93.6%

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(9 \cdot \left(y \cdot z\right)\right)} \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    4. Taylor expanded in y around inf 50.6%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 46.2% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+97} \lor \neg \left(a \leq 2.9 \cdot 10^{-75}\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.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -7.2e+97) (not (<= a 2.9e-75))) (* 27.0 (* a b)) (* x 2.0)))
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 <= -7.2e+97) || !(a <= 2.9e-75)) {
		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.
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 <= (-7.2d+97)) .or. (.not. (a <= 2.9d-75))) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -7.2e+97) || !(a <= 2.9e-75)) {
		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])
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -7.2e+97) or not (a <= 2.9e-75):
		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])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -7.2e+97) || !(a <= 2.9e-75))
		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])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((a <= -7.2e+97) || ~((a <= 2.9e-75)))
		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.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7.2e+97], N[Not[LessEqual[a, 2.9e-75]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+97} \lor \neg \left(a \leq 2.9 \cdot 10^{-75}\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 < -7.19999999999999932e97 or 2.9000000000000002e-75 < a

    1. Initial program 94.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. Step-by-step derivation
      1. sub-neg94.1%

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

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

        \[\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 \]
      4. associate-*l*94.9%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 53.6%

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

    if -7.19999999999999932e97 < a < 2.9000000000000002e-75

    1. Initial program 95.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. Step-by-step derivation
      1. sub-neg95.8%

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

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

        \[\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 \]
      4. associate-*l*95.7%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 40.8%

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

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

Alternative 16: 30.8% accurate, 5.7× speedup?

\[\begin{array}{l} [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.
(FPCore (x y z t a b) :precision binary64 (* x 2.0))
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.
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;
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])
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])
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])){:}
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.
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 \cdot 2
\end{array}
Derivation
  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. Step-by-step derivation
    1. sub-neg95.0%

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
    3. associate-*l*95.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 \]
    4. associate-*l*95.3%

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

    \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 32.3%

    \[\leadsto \color{blue}{2 \cdot x} \]
  6. Final simplification32.3%

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

Developer target: 94.8% 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 2024092 
(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)))