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

Percentage Accurate: 95.4% → 98.5%
Time: 11.4s
Alternatives: 15
Speedup: 0.9×

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 15 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.4% 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.5% accurate, 0.1× 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 10^{+91}:\\ \;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\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 (<= t 1e+91)
   (+ (- (* x 2.0) (* (* y 9.0) (* t z))) (* a (* 27.0 b)))
   (fma a (* 27.0 b) (fma x 2.0 (* 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 tmp;
	if (t <= 1e+91) {
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
	} else {
		tmp = fma(a, (27.0 * b), fma(x, 2.0, (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)
	tmp = 0.0
	if (t <= 1e+91)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z))) + Float64(a * Float64(27.0 * b)));
	else
		tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0)))));
	end
	return 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, 1e+91], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $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}\;t \leq 10^{+91}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\

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


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

    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*96.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*97.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. Simplified97.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)} \]

    if 1.00000000000000008e91 < t

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.9% 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}\;z \leq -1.85 \cdot 10^{+62}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{+39} \lor \neg \left(z \leq -4.1 \cdot 10^{-23}\right) \land \left(z \leq -2.7 \cdot 10^{-69} \lor \neg \left(z \leq -5.7 \cdot 10^{-99}\right) \land z \leq 1.3 \cdot 10^{-110}\right):\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\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 (<= z -1.85e+62)
   (* -9.0 (* z (* t y)))
   (if (or (<= z -7.6e+39)
           (and (not (<= z -4.1e-23))
                (or (<= z -2.7e-69)
                    (and (not (<= z -5.7e-99)) (<= z 1.3e-110)))))
     (+ (* x 2.0) (* 27.0 (* a b)))
     (+ (* (* y z) (* t -9.0)) (* 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 (z <= -1.85e+62) {
		tmp = -9.0 * (z * (t * y));
	} else if ((z <= -7.6e+39) || (!(z <= -4.1e-23) && ((z <= -2.7e-69) || (!(z <= -5.7e-99) && (z <= 1.3e-110))))) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = ((y * z) * (t * -9.0)) + (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 (z <= (-1.85d+62)) then
        tmp = (-9.0d0) * (z * (t * y))
    else if ((z <= (-7.6d+39)) .or. (.not. (z <= (-4.1d-23))) .and. (z <= (-2.7d-69)) .or. (.not. (z <= (-5.7d-99))) .and. (z <= 1.3d-110)) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else
        tmp = ((y * z) * (t * (-9.0d0))) + (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 (z <= -1.85e+62) {
		tmp = -9.0 * (z * (t * y));
	} else if ((z <= -7.6e+39) || (!(z <= -4.1e-23) && ((z <= -2.7e-69) || (!(z <= -5.7e-99) && (z <= 1.3e-110))))) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = ((y * z) * (t * -9.0)) + (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 z <= -1.85e+62:
		tmp = -9.0 * (z * (t * y))
	elif (z <= -7.6e+39) or (not (z <= -4.1e-23) and ((z <= -2.7e-69) or (not (z <= -5.7e-99) and (z <= 1.3e-110)))):
		tmp = (x * 2.0) + (27.0 * (a * b))
	else:
		tmp = ((y * z) * (t * -9.0)) + (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 (z <= -1.85e+62)
		tmp = Float64(-9.0 * Float64(z * Float64(t * y)));
	elseif ((z <= -7.6e+39) || (!(z <= -4.1e-23) && ((z <= -2.7e-69) || (!(z <= -5.7e-99) && (z <= 1.3e-110)))))
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	else
		tmp = Float64(Float64(Float64(y * z) * Float64(t * -9.0)) + 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 (z <= -1.85e+62)
		tmp = -9.0 * (z * (t * y));
	elseif ((z <= -7.6e+39) || (~((z <= -4.1e-23)) && ((z <= -2.7e-69) || (~((z <= -5.7e-99)) && (z <= 1.3e-110)))))
		tmp = (x * 2.0) + (27.0 * (a * b));
	else
		tmp = ((y * z) * (t * -9.0)) + (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[z, -1.85e+62], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.6e+39], And[N[Not[LessEqual[z, -4.1e-23]], $MachinePrecision], Or[LessEqual[z, -2.7e-69], And[N[Not[LessEqual[z, -5.7e-99]], $MachinePrecision], LessEqual[z, 1.3e-110]]]]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $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}\;z \leq -1.85 \cdot 10^{+62}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\

\mathbf{elif}\;z \leq -7.6 \cdot 10^{+39} \lor \neg \left(z \leq -4.1 \cdot 10^{-23}\right) \land \left(z \leq -2.7 \cdot 10^{-69} \lor \neg \left(z \leq -5.7 \cdot 10^{-99}\right) \land z \leq 1.3 \cdot 10^{-110}\right):\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\

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


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

    1. Initial program 89.2%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg89.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-neg89.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*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*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. Taylor expanded in y around inf 61.8%

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

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

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

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

    if -1.85000000000000007e62 < z < -7.5999999999999996e39 or -4.10000000000000029e-23 < z < -2.6999999999999997e-69 or -5.70000000000000032e-99 < z < 1.29999999999999995e-110

    1. Initial program 97.8%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg97.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-neg97.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*98.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.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. Simplified99.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. Taylor expanded in y around 0 90.2%

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

    if -7.5999999999999996e39 < z < -4.10000000000000029e-23 or -2.6999999999999997e-69 < z < -5.70000000000000032e-99 or 1.29999999999999995e-110 < z

    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*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.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. Simplified93.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. Taylor expanded in a around 0 70.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+62}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{+39} \lor \neg \left(z \leq -4.1 \cdot 10^{-23}\right) \land \left(z \leq -2.7 \cdot 10^{-69} \lor \neg \left(z \leq -5.7 \cdot 10^{-99}\right) \land z \leq 1.3 \cdot 10^{-110}\right):\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right) + x \cdot 2\\ \end{array} \]

Alternative 3: 77.9% 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 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+61}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-23}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right) + x \cdot 2\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-68} \lor \neg \left(z \leq -2.95 \cdot 10^{-100}\right) \land z \leq 9.6 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \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
 (let* ((t_1 (+ (* x 2.0) (* 27.0 (* a b)))))
   (if (<= z -2.3e+61)
     (* -9.0 (* z (* t y)))
     (if (<= z -4.2e+39)
       t_1
       (if (<= z -1.15e-23)
         (+ (* (* y z) (* t -9.0)) (* x 2.0))
         (if (or (<= z -1.2e-68) (and (not (<= z -2.95e-100)) (<= z 9.6e-112)))
           t_1
           (- (* x 2.0) (* 9.0 (* t (* 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 t_1 = (x * 2.0) + (27.0 * (a * b));
	double tmp;
	if (z <= -2.3e+61) {
		tmp = -9.0 * (z * (t * y));
	} else if (z <= -4.2e+39) {
		tmp = t_1;
	} else if (z <= -1.15e-23) {
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	} else if ((z <= -1.2e-68) || (!(z <= -2.95e-100) && (z <= 9.6e-112))) {
		tmp = t_1;
	} else {
		tmp = (x * 2.0) - (9.0 * (t * (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) :: t_1
    real(8) :: tmp
    t_1 = (x * 2.0d0) + (27.0d0 * (a * b))
    if (z <= (-2.3d+61)) then
        tmp = (-9.0d0) * (z * (t * y))
    else if (z <= (-4.2d+39)) then
        tmp = t_1
    else if (z <= (-1.15d-23)) then
        tmp = ((y * z) * (t * (-9.0d0))) + (x * 2.0d0)
    else if ((z <= (-1.2d-68)) .or. (.not. (z <= (-2.95d-100))) .and. (z <= 9.6d-112)) then
        tmp = t_1
    else
        tmp = (x * 2.0d0) - (9.0d0 * (t * (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 t_1 = (x * 2.0) + (27.0 * (a * b));
	double tmp;
	if (z <= -2.3e+61) {
		tmp = -9.0 * (z * (t * y));
	} else if (z <= -4.2e+39) {
		tmp = t_1;
	} else if (z <= -1.15e-23) {
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	} else if ((z <= -1.2e-68) || (!(z <= -2.95e-100) && (z <= 9.6e-112))) {
		tmp = t_1;
	} else {
		tmp = (x * 2.0) - (9.0 * (t * (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):
	t_1 = (x * 2.0) + (27.0 * (a * b))
	tmp = 0
	if z <= -2.3e+61:
		tmp = -9.0 * (z * (t * y))
	elif z <= -4.2e+39:
		tmp = t_1
	elif z <= -1.15e-23:
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0)
	elif (z <= -1.2e-68) or (not (z <= -2.95e-100) and (z <= 9.6e-112)):
		tmp = t_1
	else:
		tmp = (x * 2.0) - (9.0 * (t * (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)
	t_1 = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)))
	tmp = 0.0
	if (z <= -2.3e+61)
		tmp = Float64(-9.0 * Float64(z * Float64(t * y)));
	elseif (z <= -4.2e+39)
		tmp = t_1;
	elseif (z <= -1.15e-23)
		tmp = Float64(Float64(Float64(y * z) * Float64(t * -9.0)) + Float64(x * 2.0));
	elseif ((z <= -1.2e-68) || (!(z <= -2.95e-100) && (z <= 9.6e-112)))
		tmp = t_1;
	else
		tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * 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)
	t_1 = (x * 2.0) + (27.0 * (a * b));
	tmp = 0.0;
	if (z <= -2.3e+61)
		tmp = -9.0 * (z * (t * y));
	elseif (z <= -4.2e+39)
		tmp = t_1;
	elseif (z <= -1.15e-23)
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	elseif ((z <= -1.2e-68) || (~((z <= -2.95e-100)) && (z <= 9.6e-112)))
		tmp = t_1;
	else
		tmp = (x * 2.0) - (9.0 * (t * (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_] := Block[{t$95$1 = N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+61], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e+39], t$95$1, If[LessEqual[z, -1.15e-23], N[(N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.2e-68], And[N[Not[LessEqual[z, -2.95e-100]], $MachinePrecision], LessEqual[z, 9.6e-112]]], t$95$1, N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * 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}
t_1 := x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+61}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-68} \lor \neg \left(z \leq -2.95 \cdot 10^{-100}\right) \land z \leq 9.6 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.3e61

    1. Initial program 89.2%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg89.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-neg89.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*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*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. Taylor expanded in y around inf 61.8%

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

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

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

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

    if -2.3e61 < z < -4.1999999999999997e39 or -1.15000000000000005e-23 < z < -1.19999999999999996e-68 or -2.9500000000000002e-100 < z < 9.6000000000000003e-112

    1. Initial program 97.8%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg97.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-neg97.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*98.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.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. Simplified99.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. Taylor expanded in y around 0 90.0%

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

    if -4.1999999999999997e39 < z < -1.15000000000000005e-23

    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*90.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*90.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. Simplified90.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. Taylor expanded in a around 0 65.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.19999999999999996e-68 < z < -2.9500000000000002e-100 or 9.6000000000000003e-112 < z

    1. Initial program 91.5%

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

        \[\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.5%

        \[\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. Taylor expanded in a around 0 69.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+61}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+39}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-23}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right) + x \cdot 2\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-68} \lor \neg \left(z \leq -2.95 \cdot 10^{-100}\right) \land z \leq 9.6 \cdot 10^{-112}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]

Alternative 4: 79.0% accurate, 0.8× 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_1 + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-10}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right) + x \cdot 2\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-142}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-113}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + 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))) (t_2 (+ t_1 (* z (* t (* y -9.0))))))
   (if (<= z -1.05e+58)
     t_2
     (if (<= z -5.6e-10)
       (+ (* (* y z) (* t -9.0)) (* x 2.0))
       (if (<= z -1.7e-142)
         t_2
         (if (<= z 4.8e-113)
           (+ (* x 2.0) (* 27.0 (* a b)))
           (+ 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 t_2 = t_1 + (z * (t * (y * -9.0)));
	double tmp;
	if (z <= -1.05e+58) {
		tmp = t_2;
	} else if (z <= -5.6e-10) {
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	} else if (z <= -1.7e-142) {
		tmp = t_2;
	} else if (z <= 4.8e-113) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = t_1 + (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) :: t_2
    real(8) :: tmp
    t_1 = a * (27.0d0 * b)
    t_2 = t_1 + (z * (t * (y * (-9.0d0))))
    if (z <= (-1.05d+58)) then
        tmp = t_2
    else if (z <= (-5.6d-10)) then
        tmp = ((y * z) * (t * (-9.0d0))) + (x * 2.0d0)
    else if (z <= (-1.7d-142)) then
        tmp = t_2
    else if (z <= 4.8d-113) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else
        tmp = t_1 + (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 t_2 = t_1 + (z * (t * (y * -9.0)));
	double tmp;
	if (z <= -1.05e+58) {
		tmp = t_2;
	} else if (z <= -5.6e-10) {
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	} else if (z <= -1.7e-142) {
		tmp = t_2;
	} else if (z <= 4.8e-113) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = t_1 + (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)
	t_2 = t_1 + (z * (t * (y * -9.0)))
	tmp = 0
	if z <= -1.05e+58:
		tmp = t_2
	elif z <= -5.6e-10:
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0)
	elif z <= -1.7e-142:
		tmp = t_2
	elif z <= 4.8e-113:
		tmp = (x * 2.0) + (27.0 * (a * b))
	else:
		tmp = t_1 + (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))
	t_2 = Float64(t_1 + Float64(z * Float64(t * Float64(y * -9.0))))
	tmp = 0.0
	if (z <= -1.05e+58)
		tmp = t_2;
	elseif (z <= -5.6e-10)
		tmp = Float64(Float64(Float64(y * z) * Float64(t * -9.0)) + Float64(x * 2.0));
	elseif (z <= -1.7e-142)
		tmp = t_2;
	elseif (z <= 4.8e-113)
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	else
		tmp = Float64(t_1 + 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);
	t_2 = t_1 + (z * (t * (y * -9.0)));
	tmp = 0.0;
	if (z <= -1.05e+58)
		tmp = t_2;
	elseif (z <= -5.6e-10)
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	elseif (z <= -1.7e-142)
		tmp = t_2;
	elseif (z <= 4.8e-113)
		tmp = (x * 2.0) + (27.0 * (a * b));
	else
		tmp = t_1 + (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]}, Block[{t$95$2 = N[(t$95$1 + N[(z * N[(t * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+58], t$95$2, If[LessEqual[z, -5.6e-10], N[(N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e-142], t$95$2, If[LessEqual[z, 4.8e-113], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t * N[(y * N[(z * -9.0), $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 := a \cdot \left(27 \cdot b\right)\\
t_2 := t_1 + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+58}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-142}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.05000000000000006e58 or -5.60000000000000031e-10 < z < -1.70000000000000014e-142

    1. Initial program 91.9%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg91.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-neg91.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*94.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*94.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. Simplified94.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. Taylor expanded in x around 0 74.7%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv74.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(z \cdot -9\right)\right) + a \cdot \left(b \cdot 27\right)} \]
    7. Taylor expanded in t around 0 74.7%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} + a \cdot \left(b \cdot 27\right) \]
    8. Step-by-step derivation
      1. associate-*r*74.7%

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

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

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

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

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

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

    if -1.05000000000000006e58 < z < -5.60000000000000031e-10

    1. Initial program 87.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-neg87.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-neg87.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*93.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*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. Taylor expanded in a around 0 63.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.70000000000000014e-142 < z < 4.80000000000000024e-113

    1. Initial program 98.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-neg98.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-neg98.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*98.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.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. Simplified99.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. Taylor expanded in y around 0 93.4%

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

    if 4.80000000000000024e-113 < z

    1. Initial program 91.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-neg91.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-neg91.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.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*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. Taylor expanded in x around 0 74.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+58}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-10}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right) + x \cdot 2\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-142}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-113}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]

Alternative 5: 79.8% accurate, 0.8× 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 := a \cdot \left(27 \cdot b\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{+58}:\\ \;\;\;\;t_2 + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-11}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right) + x \cdot 2\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-143}:\\ \;\;\;\;t_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-113}:\\ \;\;\;\;x \cdot 2 + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2 + 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 (* 27.0 (* a b))) (t_2 (* a (* 27.0 b))))
   (if (<= z -1e+58)
     (+ t_2 (* z (* t (* y -9.0))))
     (if (<= z -2.65e-11)
       (+ (* (* y z) (* t -9.0)) (* x 2.0))
       (if (<= z -9e-143)
         (- t_1 (* 9.0 (* t (* y z))))
         (if (<= z 5e-113)
           (+ (* x 2.0) t_1)
           (+ t_2 (* 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 = 27.0 * (a * b);
	double t_2 = a * (27.0 * b);
	double tmp;
	if (z <= -1e+58) {
		tmp = t_2 + (z * (t * (y * -9.0)));
	} else if (z <= -2.65e-11) {
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	} else if (z <= -9e-143) {
		tmp = t_1 - (9.0 * (t * (y * z)));
	} else if (z <= 5e-113) {
		tmp = (x * 2.0) + t_1;
	} else {
		tmp = t_2 + (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) :: t_2
    real(8) :: tmp
    t_1 = 27.0d0 * (a * b)
    t_2 = a * (27.0d0 * b)
    if (z <= (-1d+58)) then
        tmp = t_2 + (z * (t * (y * (-9.0d0))))
    else if (z <= (-2.65d-11)) then
        tmp = ((y * z) * (t * (-9.0d0))) + (x * 2.0d0)
    else if (z <= (-9d-143)) then
        tmp = t_1 - (9.0d0 * (t * (y * z)))
    else if (z <= 5d-113) then
        tmp = (x * 2.0d0) + t_1
    else
        tmp = t_2 + (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 = 27.0 * (a * b);
	double t_2 = a * (27.0 * b);
	double tmp;
	if (z <= -1e+58) {
		tmp = t_2 + (z * (t * (y * -9.0)));
	} else if (z <= -2.65e-11) {
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	} else if (z <= -9e-143) {
		tmp = t_1 - (9.0 * (t * (y * z)));
	} else if (z <= 5e-113) {
		tmp = (x * 2.0) + t_1;
	} else {
		tmp = t_2 + (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 = 27.0 * (a * b)
	t_2 = a * (27.0 * b)
	tmp = 0
	if z <= -1e+58:
		tmp = t_2 + (z * (t * (y * -9.0)))
	elif z <= -2.65e-11:
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0)
	elif z <= -9e-143:
		tmp = t_1 - (9.0 * (t * (y * z)))
	elif z <= 5e-113:
		tmp = (x * 2.0) + t_1
	else:
		tmp = t_2 + (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(27.0 * Float64(a * b))
	t_2 = Float64(a * Float64(27.0 * b))
	tmp = 0.0
	if (z <= -1e+58)
		tmp = Float64(t_2 + Float64(z * Float64(t * Float64(y * -9.0))));
	elseif (z <= -2.65e-11)
		tmp = Float64(Float64(Float64(y * z) * Float64(t * -9.0)) + Float64(x * 2.0));
	elseif (z <= -9e-143)
		tmp = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z))));
	elseif (z <= 5e-113)
		tmp = Float64(Float64(x * 2.0) + t_1);
	else
		tmp = Float64(t_2 + 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 = 27.0 * (a * b);
	t_2 = a * (27.0 * b);
	tmp = 0.0;
	if (z <= -1e+58)
		tmp = t_2 + (z * (t * (y * -9.0)));
	elseif (z <= -2.65e-11)
		tmp = ((y * z) * (t * -9.0)) + (x * 2.0);
	elseif (z <= -9e-143)
		tmp = t_1 - (9.0 * (t * (y * z)));
	elseif (z <= 5e-113)
		tmp = (x * 2.0) + t_1;
	else
		tmp = t_2 + (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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+58], N[(t$95$2 + N[(z * N[(t * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e-11], N[(N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-143], N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-113], N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$2 + N[(t * N[(y * N[(z * -9.0), $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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+58}:\\
\;\;\;\;t_2 + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\

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

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-113}:\\
\;\;\;\;x \cdot 2 + t_1\\

\mathbf{else}:\\
\;\;\;\;t_2 + 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 < -9.99999999999999944e57

    1. Initial program 89.2%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg89.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-neg89.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*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*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. Taylor expanded in x around 0 72.7%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv72.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(z \cdot -9\right)\right) + a \cdot \left(b \cdot 27\right)} \]
    7. Taylor expanded in t around 0 72.7%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} + a \cdot \left(b \cdot 27\right) \]
    8. Step-by-step derivation
      1. associate-*r*72.7%

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

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

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

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

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

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

    if -9.99999999999999944e57 < z < -2.6499999999999999e-11

    1. Initial program 87.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-neg87.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-neg87.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*93.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*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. Taylor expanded in a around 0 63.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.6499999999999999e-11 < z < -9.00000000000000001e-143

    1. Initial program 99.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-neg99.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-neg99.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*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. Taylor expanded in x around 0 80.7%

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

    if -9.00000000000000001e-143 < z < 4.9999999999999997e-113

    1. Initial program 98.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-neg98.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-neg98.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*98.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.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. Simplified99.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. Taylor expanded in y around 0 93.4%

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

    if 4.9999999999999997e-113 < z

    1. Initial program 91.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-neg91.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-neg91.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.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*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. Taylor expanded in x around 0 74.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+58}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-11}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right) + x \cdot 2\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-143}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-113}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \end{array} \]

Alternative 6: 48.5% accurate, 0.9× 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 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-249}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-110}:\\ \;\;\;\;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 (* 27.0 (* a b))) (t_2 (* -9.0 (* t (* y z)))))
   (if (<= z -5.5e-27)
     t_2
     (if (<= z -1.55e-68)
       t_1
       (if (<= z -1.12e-99)
         t_2
         (if (<= z -5.1e-249)
           (* a (* 27.0 b))
           (if (<= z 2.45e-263) (* x 2.0) (if (<= z 6.8e-110) 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 = 27.0 * (a * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -5.5e-27) {
		tmp = t_2;
	} else if (z <= -1.55e-68) {
		tmp = t_1;
	} else if (z <= -1.12e-99) {
		tmp = t_2;
	} else if (z <= -5.1e-249) {
		tmp = a * (27.0 * b);
	} else if (z <= 2.45e-263) {
		tmp = x * 2.0;
	} else if (z <= 6.8e-110) {
		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 = 27.0d0 * (a * b)
    t_2 = (-9.0d0) * (t * (y * z))
    if (z <= (-5.5d-27)) then
        tmp = t_2
    else if (z <= (-1.55d-68)) then
        tmp = t_1
    else if (z <= (-1.12d-99)) then
        tmp = t_2
    else if (z <= (-5.1d-249)) then
        tmp = a * (27.0d0 * b)
    else if (z <= 2.45d-263) then
        tmp = x * 2.0d0
    else if (z <= 6.8d-110) 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 = 27.0 * (a * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -5.5e-27) {
		tmp = t_2;
	} else if (z <= -1.55e-68) {
		tmp = t_1;
	} else if (z <= -1.12e-99) {
		tmp = t_2;
	} else if (z <= -5.1e-249) {
		tmp = a * (27.0 * b);
	} else if (z <= 2.45e-263) {
		tmp = x * 2.0;
	} else if (z <= 6.8e-110) {
		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 = 27.0 * (a * b)
	t_2 = -9.0 * (t * (y * z))
	tmp = 0
	if z <= -5.5e-27:
		tmp = t_2
	elif z <= -1.55e-68:
		tmp = t_1
	elif z <= -1.12e-99:
		tmp = t_2
	elif z <= -5.1e-249:
		tmp = a * (27.0 * b)
	elif z <= 2.45e-263:
		tmp = x * 2.0
	elif z <= 6.8e-110:
		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(27.0 * Float64(a * b))
	t_2 = Float64(-9.0 * Float64(t * Float64(y * z)))
	tmp = 0.0
	if (z <= -5.5e-27)
		tmp = t_2;
	elseif (z <= -1.55e-68)
		tmp = t_1;
	elseif (z <= -1.12e-99)
		tmp = t_2;
	elseif (z <= -5.1e-249)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (z <= 2.45e-263)
		tmp = Float64(x * 2.0);
	elseif (z <= 6.8e-110)
		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 = 27.0 * (a * b);
	t_2 = -9.0 * (t * (y * z));
	tmp = 0.0;
	if (z <= -5.5e-27)
		tmp = t_2;
	elseif (z <= -1.55e-68)
		tmp = t_1;
	elseif (z <= -1.12e-99)
		tmp = t_2;
	elseif (z <= -5.1e-249)
		tmp = a * (27.0 * b);
	elseif (z <= 2.45e-263)
		tmp = x * 2.0;
	elseif (z <= 6.8e-110)
		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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e-27], t$95$2, If[LessEqual[z, -1.55e-68], t$95$1, If[LessEqual[z, -1.12e-99], t$95$2, If[LessEqual[z, -5.1e-249], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-263], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6.8e-110], 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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-27}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.55 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-99}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-110}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.5000000000000002e-27 or -1.55e-68 < z < -1.11999999999999998e-99 or 6.8000000000000002e-110 < z

    1. Initial program 90.4%

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

        \[\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.4%

        \[\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.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*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. Taylor expanded in y around inf 55.6%

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

    if -5.5000000000000002e-27 < z < -1.55e-68 or 2.4499999999999999e-263 < z < 6.8000000000000002e-110

    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.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*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. Taylor expanded in a around inf 53.7%

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

    if -1.11999999999999998e-99 < z < -5.0999999999999997e-249

    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. Taylor expanded in a around inf 51.7%

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

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

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

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    6. Simplified51.8%

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

    if -5.0999999999999997e-249 < z < 2.4499999999999999e-263

    1. Initial program 96.5%

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

        \[\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.5%

        \[\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.5%

        \[\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*100.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. Simplified100.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. Taylor expanded in x around inf 48.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-27}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-68}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-99}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-249}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-110}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]

Alternative 7: 48.5% accurate, 0.9× 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 \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;z \leq -6.2 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.38 \cdot 10^{-99}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-246}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-111}:\\ \;\;\;\;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 (* 27.0 (* a b))) (t_2 (* t (* -9.0 (* y z)))))
   (if (<= z -6.2e-26)
     t_2
     (if (<= z -3.3e-68)
       t_1
       (if (<= z -1.38e-99)
         (* -9.0 (* t (* y z)))
         (if (<= z -6.5e-246)
           (* a (* 27.0 b))
           (if (<= z 8e-263) (* x 2.0) (if (<= z 2.6e-111) 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 = 27.0 * (a * b);
	double t_2 = t * (-9.0 * (y * z));
	double tmp;
	if (z <= -6.2e-26) {
		tmp = t_2;
	} else if (z <= -3.3e-68) {
		tmp = t_1;
	} else if (z <= -1.38e-99) {
		tmp = -9.0 * (t * (y * z));
	} else if (z <= -6.5e-246) {
		tmp = a * (27.0 * b);
	} else if (z <= 8e-263) {
		tmp = x * 2.0;
	} else if (z <= 2.6e-111) {
		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 = 27.0d0 * (a * b)
    t_2 = t * ((-9.0d0) * (y * z))
    if (z <= (-6.2d-26)) then
        tmp = t_2
    else if (z <= (-3.3d-68)) then
        tmp = t_1
    else if (z <= (-1.38d-99)) then
        tmp = (-9.0d0) * (t * (y * z))
    else if (z <= (-6.5d-246)) then
        tmp = a * (27.0d0 * b)
    else if (z <= 8d-263) then
        tmp = x * 2.0d0
    else if (z <= 2.6d-111) 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 = 27.0 * (a * b);
	double t_2 = t * (-9.0 * (y * z));
	double tmp;
	if (z <= -6.2e-26) {
		tmp = t_2;
	} else if (z <= -3.3e-68) {
		tmp = t_1;
	} else if (z <= -1.38e-99) {
		tmp = -9.0 * (t * (y * z));
	} else if (z <= -6.5e-246) {
		tmp = a * (27.0 * b);
	} else if (z <= 8e-263) {
		tmp = x * 2.0;
	} else if (z <= 2.6e-111) {
		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 = 27.0 * (a * b)
	t_2 = t * (-9.0 * (y * z))
	tmp = 0
	if z <= -6.2e-26:
		tmp = t_2
	elif z <= -3.3e-68:
		tmp = t_1
	elif z <= -1.38e-99:
		tmp = -9.0 * (t * (y * z))
	elif z <= -6.5e-246:
		tmp = a * (27.0 * b)
	elif z <= 8e-263:
		tmp = x * 2.0
	elif z <= 2.6e-111:
		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(27.0 * Float64(a * b))
	t_2 = Float64(t * Float64(-9.0 * Float64(y * z)))
	tmp = 0.0
	if (z <= -6.2e-26)
		tmp = t_2;
	elseif (z <= -3.3e-68)
		tmp = t_1;
	elseif (z <= -1.38e-99)
		tmp = Float64(-9.0 * Float64(t * Float64(y * z)));
	elseif (z <= -6.5e-246)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (z <= 8e-263)
		tmp = Float64(x * 2.0);
	elseif (z <= 2.6e-111)
		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 = 27.0 * (a * b);
	t_2 = t * (-9.0 * (y * z));
	tmp = 0.0;
	if (z <= -6.2e-26)
		tmp = t_2;
	elseif (z <= -3.3e-68)
		tmp = t_1;
	elseif (z <= -1.38e-99)
		tmp = -9.0 * (t * (y * z));
	elseif (z <= -6.5e-246)
		tmp = a * (27.0 * b);
	elseif (z <= 8e-263)
		tmp = x * 2.0;
	elseif (z <= 2.6e-111)
		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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-26], t$95$2, If[LessEqual[z, -3.3e-68], t$95$1, If[LessEqual[z, -1.38e-99], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-246], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-263], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.6e-111], 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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-26}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.19999999999999966e-26 or 2.59999999999999982e-111 < z

    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*93.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*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. Taylor expanded in x around 0 72.7%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Taylor expanded in a around 0 54.5%

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
    8. Taylor expanded in z around 0 54.5%

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

    if -6.19999999999999966e-26 < z < -3.2999999999999998e-68 or 8.0000000000000001e-263 < z < 2.59999999999999982e-111

    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.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*99.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. Simplified99.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. Taylor expanded in a around inf 50.9%

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

    if -3.2999999999999998e-68 < z < -1.38e-99

    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. Taylor expanded in y around inf 75.5%

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

    if -1.38e-99 < z < -6.50000000000000016e-246

    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. Taylor expanded in a around inf 51.7%

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

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

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

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    6. Simplified51.8%

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

    if -6.50000000000000016e-246 < z < 8.0000000000000001e-263

    1. Initial program 96.5%

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

        \[\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.5%

        \[\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.5%

        \[\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*100.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. Simplified100.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. Taylor expanded in x around inf 48.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-68}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -1.38 \cdot 10^{-99}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-246}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-111}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ \end{array} \]

Alternative 8: 48.5% accurate, 0.9× 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)\\ \mathbf{if}\;z \leq -9.6 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.35 \cdot 10^{-100}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-243}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \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 (* 27.0 (* a b))))
   (if (<= z -9.6e-25)
     (* t (* -9.0 (* y z)))
     (if (<= z -3e-68)
       t_1
       (if (<= z -4.35e-100)
         (* -9.0 (* t (* y z)))
         (if (<= z -1.75e-243)
           (* a (* 27.0 b))
           (if (<= z 6.6e-263)
             (* x 2.0)
             (if (<= z 5.5e-110) t_1 (* t (* z (* y -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 = 27.0 * (a * b);
	double tmp;
	if (z <= -9.6e-25) {
		tmp = t * (-9.0 * (y * z));
	} else if (z <= -3e-68) {
		tmp = t_1;
	} else if (z <= -4.35e-100) {
		tmp = -9.0 * (t * (y * z));
	} else if (z <= -1.75e-243) {
		tmp = a * (27.0 * b);
	} else if (z <= 6.6e-263) {
		tmp = x * 2.0;
	} else if (z <= 5.5e-110) {
		tmp = t_1;
	} else {
		tmp = t * (z * (y * -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 = 27.0d0 * (a * b)
    if (z <= (-9.6d-25)) then
        tmp = t * ((-9.0d0) * (y * z))
    else if (z <= (-3d-68)) then
        tmp = t_1
    else if (z <= (-4.35d-100)) then
        tmp = (-9.0d0) * (t * (y * z))
    else if (z <= (-1.75d-243)) then
        tmp = a * (27.0d0 * b)
    else if (z <= 6.6d-263) then
        tmp = x * 2.0d0
    else if (z <= 5.5d-110) then
        tmp = t_1
    else
        tmp = t * (z * (y * (-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 = 27.0 * (a * b);
	double tmp;
	if (z <= -9.6e-25) {
		tmp = t * (-9.0 * (y * z));
	} else if (z <= -3e-68) {
		tmp = t_1;
	} else if (z <= -4.35e-100) {
		tmp = -9.0 * (t * (y * z));
	} else if (z <= -1.75e-243) {
		tmp = a * (27.0 * b);
	} else if (z <= 6.6e-263) {
		tmp = x * 2.0;
	} else if (z <= 5.5e-110) {
		tmp = t_1;
	} else {
		tmp = t * (z * (y * -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 = 27.0 * (a * b)
	tmp = 0
	if z <= -9.6e-25:
		tmp = t * (-9.0 * (y * z))
	elif z <= -3e-68:
		tmp = t_1
	elif z <= -4.35e-100:
		tmp = -9.0 * (t * (y * z))
	elif z <= -1.75e-243:
		tmp = a * (27.0 * b)
	elif z <= 6.6e-263:
		tmp = x * 2.0
	elif z <= 5.5e-110:
		tmp = t_1
	else:
		tmp = t * (z * (y * -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(27.0 * Float64(a * b))
	tmp = 0.0
	if (z <= -9.6e-25)
		tmp = Float64(t * Float64(-9.0 * Float64(y * z)));
	elseif (z <= -3e-68)
		tmp = t_1;
	elseif (z <= -4.35e-100)
		tmp = Float64(-9.0 * Float64(t * Float64(y * z)));
	elseif (z <= -1.75e-243)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (z <= 6.6e-263)
		tmp = Float64(x * 2.0);
	elseif (z <= 5.5e-110)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(z * Float64(y * -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 = 27.0 * (a * b);
	tmp = 0.0;
	if (z <= -9.6e-25)
		tmp = t * (-9.0 * (y * z));
	elseif (z <= -3e-68)
		tmp = t_1;
	elseif (z <= -4.35e-100)
		tmp = -9.0 * (t * (y * z));
	elseif (z <= -1.75e-243)
		tmp = a * (27.0 * b);
	elseif (z <= 6.6e-263)
		tmp = x * 2.0;
	elseif (z <= 5.5e-110)
		tmp = t_1;
	else
		tmp = t * (z * (y * -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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.6e-25], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e-68], t$95$1, If[LessEqual[z, -4.35e-100], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-243], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e-263], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 5.5e-110], t$95$1, N[(t * N[(z * N[(y * -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 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{-25}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{-110}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -9.60000000000000037e-25

    1. Initial program 89.2%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg89.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-neg89.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*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.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. Simplified93.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. Taylor expanded in x around 0 70.1%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Taylor expanded in a around 0 56.6%

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
    8. Taylor expanded in z around 0 56.6%

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

    if -9.60000000000000037e-25 < z < -3e-68 or 6.5999999999999994e-263 < z < 5.4999999999999998e-110

    1. Initial program 99.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-neg99.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-neg99.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*99.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*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. Taylor expanded in a around inf 54.9%

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

    if -3e-68 < z < -4.34999999999999988e-100

    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. Taylor expanded in y around inf 75.5%

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

    if -4.34999999999999988e-100 < z < -1.74999999999999989e-243

    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. Taylor expanded in a around inf 50.0%

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

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

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

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    6. Simplified50.1%

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

    if -1.74999999999999989e-243 < z < 6.5999999999999994e-263

    1. Initial program 96.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-neg96.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-neg96.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*96.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.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. Simplified99.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. Taylor expanded in x around inf 46.4%

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

    if 5.4999999999999998e-110 < z

    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*93.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*93.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. Simplified93.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. Taylor expanded in x around 0 74.0%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Taylor expanded in a around 0 54.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.6 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-68}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -4.35 \cdot 10^{-100}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-243}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-110}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]

Alternative 9: 50.0% accurate, 0.9× 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 := -9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{-27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-98}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-246}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \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 (* 27.0 (* a b))) (t_2 (* -9.0 (* z (* t y)))))
   (if (<= z -4.5e-27)
     t_2
     (if (<= z -2e-69)
       t_1
       (if (<= z -2.45e-98)
         t_2
         (if (<= z -4.4e-246)
           (* a (* 27.0 b))
           (if (<= z 3.15e-263)
             (* x 2.0)
             (if (<= z 1.28e-110) t_1 (* t (* z (* y -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 = 27.0 * (a * b);
	double t_2 = -9.0 * (z * (t * y));
	double tmp;
	if (z <= -4.5e-27) {
		tmp = t_2;
	} else if (z <= -2e-69) {
		tmp = t_1;
	} else if (z <= -2.45e-98) {
		tmp = t_2;
	} else if (z <= -4.4e-246) {
		tmp = a * (27.0 * b);
	} else if (z <= 3.15e-263) {
		tmp = x * 2.0;
	} else if (z <= 1.28e-110) {
		tmp = t_1;
	} else {
		tmp = t * (z * (y * -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) :: t_2
    real(8) :: tmp
    t_1 = 27.0d0 * (a * b)
    t_2 = (-9.0d0) * (z * (t * y))
    if (z <= (-4.5d-27)) then
        tmp = t_2
    else if (z <= (-2d-69)) then
        tmp = t_1
    else if (z <= (-2.45d-98)) then
        tmp = t_2
    else if (z <= (-4.4d-246)) then
        tmp = a * (27.0d0 * b)
    else if (z <= 3.15d-263) then
        tmp = x * 2.0d0
    else if (z <= 1.28d-110) then
        tmp = t_1
    else
        tmp = t * (z * (y * (-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 = 27.0 * (a * b);
	double t_2 = -9.0 * (z * (t * y));
	double tmp;
	if (z <= -4.5e-27) {
		tmp = t_2;
	} else if (z <= -2e-69) {
		tmp = t_1;
	} else if (z <= -2.45e-98) {
		tmp = t_2;
	} else if (z <= -4.4e-246) {
		tmp = a * (27.0 * b);
	} else if (z <= 3.15e-263) {
		tmp = x * 2.0;
	} else if (z <= 1.28e-110) {
		tmp = t_1;
	} else {
		tmp = t * (z * (y * -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 = 27.0 * (a * b)
	t_2 = -9.0 * (z * (t * y))
	tmp = 0
	if z <= -4.5e-27:
		tmp = t_2
	elif z <= -2e-69:
		tmp = t_1
	elif z <= -2.45e-98:
		tmp = t_2
	elif z <= -4.4e-246:
		tmp = a * (27.0 * b)
	elif z <= 3.15e-263:
		tmp = x * 2.0
	elif z <= 1.28e-110:
		tmp = t_1
	else:
		tmp = t * (z * (y * -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(27.0 * Float64(a * b))
	t_2 = Float64(-9.0 * Float64(z * Float64(t * y)))
	tmp = 0.0
	if (z <= -4.5e-27)
		tmp = t_2;
	elseif (z <= -2e-69)
		tmp = t_1;
	elseif (z <= -2.45e-98)
		tmp = t_2;
	elseif (z <= -4.4e-246)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (z <= 3.15e-263)
		tmp = Float64(x * 2.0);
	elseif (z <= 1.28e-110)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(z * Float64(y * -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 = 27.0 * (a * b);
	t_2 = -9.0 * (z * (t * y));
	tmp = 0.0;
	if (z <= -4.5e-27)
		tmp = t_2;
	elseif (z <= -2e-69)
		tmp = t_1;
	elseif (z <= -2.45e-98)
		tmp = t_2;
	elseif (z <= -4.4e-246)
		tmp = a * (27.0 * b);
	elseif (z <= 3.15e-263)
		tmp = x * 2.0;
	elseif (z <= 1.28e-110)
		tmp = t_1;
	else
		tmp = t * (z * (y * -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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e-27], t$95$2, If[LessEqual[z, -2e-69], t$95$1, If[LessEqual[z, -2.45e-98], t$95$2, If[LessEqual[z, -4.4e-246], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.15e-263], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.28e-110], t$95$1, N[(t * N[(z * N[(y * -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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := -9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{-27}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.45 \cdot 10^{-98}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;z \leq 1.28 \cdot 10^{-110}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.5000000000000002e-27 or -1.9999999999999999e-69 < z < -2.45000000000000007e-98

    1. Initial program 89.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-neg89.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-neg89.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.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*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. Taylor expanded in y around inf 56.8%

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

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

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

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

    if -4.5000000000000002e-27 < z < -1.9999999999999999e-69 or 3.14999999999999986e-263 < z < 1.2799999999999999e-110

    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.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*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. Taylor expanded in a around inf 52.3%

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

    if -2.45000000000000007e-98 < z < -4.39999999999999996e-246

    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. Taylor expanded in a around inf 51.7%

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

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

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

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    6. Simplified51.8%

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

    if -4.39999999999999996e-246 < z < 3.14999999999999986e-263

    1. Initial program 96.5%

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

        \[\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.5%

        \[\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.5%

        \[\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*100.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. Simplified100.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. Taylor expanded in x around inf 48.0%

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

    if 1.2799999999999999e-110 < z

    1. Initial program 91.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-neg91.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-neg91.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*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.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. Taylor expanded in x around 0 74.3%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Taylor expanded in a around 0 53.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-27}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-69}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-98}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-246}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{-263}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{-110}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]

Alternative 10: 97.1% 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 2.85 \cdot 10^{+79}:\\ \;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\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 (<= z 2.85e+79)
   (+ (- (* x 2.0) (* (* y 9.0) (* t z))) (* a (* 27.0 b)))
   (+ (* (* y z) (* t -9.0)) (* 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 (z <= 2.85e+79) {
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
	} else {
		tmp = ((y * z) * (t * -9.0)) + (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 (z <= 2.85d+79) then
        tmp = ((x * 2.0d0) - ((y * 9.0d0) * (t * z))) + (a * (27.0d0 * b))
    else
        tmp = ((y * z) * (t * (-9.0d0))) + (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 (z <= 2.85e+79) {
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
	} else {
		tmp = ((y * z) * (t * -9.0)) + (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 z <= 2.85e+79:
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b))
	else:
		tmp = ((y * z) * (t * -9.0)) + (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 (z <= 2.85e+79)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z))) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(Float64(Float64(y * z) * Float64(t * -9.0)) + 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 (z <= 2.85e+79)
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
	else
		tmp = ((y * z) * (t * -9.0)) + (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[z, 2.85e+79], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $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}\;z \leq 2.85 \cdot 10^{+79}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\

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


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

    1. Initial program 95.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-neg95.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-neg95.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.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*97.5%

        \[\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.5%

      \[\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)} \]

    if 2.8499999999999998e79 < z

    1. Initial program 85.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-neg85.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-neg85.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*87.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*87.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. Simplified87.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. Taylor expanded in a around 0 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 98.2% 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 -2 \cdot 10^{-11}:\\ \;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + b \cdot \left(a \cdot 27\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -2e-11)
   (+ (- (* x 2.0) (* (* y 9.0) (* t z))) (* a (* 27.0 b)))
   (+ (- (* x 2.0) (* t (* (* y 9.0) z))) (* b (* a 27.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 <= -2e-11) {
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
	} else {
		tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.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 <= (-2d-11)) then
        tmp = ((x * 2.0d0) - ((y * 9.0d0) * (t * z))) + (a * (27.0d0 * b))
    else
        tmp = ((x * 2.0d0) - (t * ((y * 9.0d0) * z))) + (b * (a * 27.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 <= -2e-11) {
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
	} else {
		tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.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 <= -2e-11:
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b))
	else:
		tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.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 <= -2e-11)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z))) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(Float64(y * 9.0) * z))) + Float64(b * Float64(a * 27.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 <= -2e-11)
		tmp = ((x * 2.0) - ((y * 9.0) * (t * z))) + (a * (27.0 * b));
	else
		tmp = ((x * 2.0) - (t * ((y * 9.0) * z))) + (b * (a * 27.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2e-11], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-11}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\

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


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

    1. Initial program 88.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-neg88.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-neg88.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*93.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*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)} \]

    if -1.99999999999999988e-11 < z

    1. Initial program 95.1%

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

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

Alternative 12: 79.9% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+42}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;x \leq 10^{+77}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right) + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \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 (<= x -5e+42)
   (+ (* x 2.0) (* 27.0 (* a b)))
   (if (<= x 1e+77)
     (+ (* a (* 27.0 b)) (* t (* y (* z -9.0))))
     (- (* x 2.0) (* 9.0 (* t (* 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 (x <= -5e+42) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else if (x <= 1e+77) {
		tmp = (a * (27.0 * b)) + (t * (y * (z * -9.0)));
	} else {
		tmp = (x * 2.0) - (9.0 * (t * (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 (x <= (-5d+42)) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else if (x <= 1d+77) then
        tmp = (a * (27.0d0 * b)) + (t * (y * (z * (-9.0d0))))
    else
        tmp = (x * 2.0d0) - (9.0d0 * (t * (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 (x <= -5e+42) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else if (x <= 1e+77) {
		tmp = (a * (27.0 * b)) + (t * (y * (z * -9.0)));
	} else {
		tmp = (x * 2.0) - (9.0 * (t * (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 x <= -5e+42:
		tmp = (x * 2.0) + (27.0 * (a * b))
	elif x <= 1e+77:
		tmp = (a * (27.0 * b)) + (t * (y * (z * -9.0)))
	else:
		tmp = (x * 2.0) - (9.0 * (t * (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 (x <= -5e+42)
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	elseif (x <= 1e+77)
		tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(t * Float64(y * Float64(z * -9.0))));
	else
		tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * 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 (x <= -5e+42)
		tmp = (x * 2.0) + (27.0 * (a * b));
	elseif (x <= 1e+77)
		tmp = (a * (27.0 * b)) + (t * (y * (z * -9.0)));
	else
		tmp = (x * 2.0) - (9.0 * (t * (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[x, -5e+42], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+77], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * 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}\;x \leq -5 \cdot 10^{+42}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.00000000000000007e42

    1. Initial program 93.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-neg93.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-neg93.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*98.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*98.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. Simplified98.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. Taylor expanded in y around 0 81.6%

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

    if -5.00000000000000007e42 < x < 9.99999999999999983e76

    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*93.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*93.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. Simplified93.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. Taylor expanded in x around 0 86.5%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv86.5%

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999983e76 < x

    1. Initial program 95.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-neg95.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-neg95.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.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.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. Simplified99.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. Taylor expanded in a around 0 82.5%

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

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

Alternative 13: 75.4% accurate, 1.3× 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 -1.8 \cdot 10^{+59}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-20}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \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 -1.8e+59)
   (* -9.0 (* z (* t y)))
   (if (<= z 6.5e-20) (+ (* x 2.0) (* 27.0 (* a b))) (* t (* z (* y -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 <= -1.8e+59) {
		tmp = -9.0 * (z * (t * y));
	} else if (z <= 6.5e-20) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = t * (z * (y * -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 <= (-1.8d+59)) then
        tmp = (-9.0d0) * (z * (t * y))
    else if (z <= 6.5d-20) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else
        tmp = t * (z * (y * (-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 <= -1.8e+59) {
		tmp = -9.0 * (z * (t * y));
	} else if (z <= 6.5e-20) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = t * (z * (y * -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 <= -1.8e+59:
		tmp = -9.0 * (z * (t * y))
	elif z <= 6.5e-20:
		tmp = (x * 2.0) + (27.0 * (a * b))
	else:
		tmp = t * (z * (y * -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 <= -1.8e+59)
		tmp = Float64(-9.0 * Float64(z * Float64(t * y)));
	elseif (z <= 6.5e-20)
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	else
		tmp = Float64(t * Float64(z * Float64(y * -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 <= -1.8e+59)
		tmp = -9.0 * (z * (t * y));
	elseif (z <= 6.5e-20)
		tmp = (x * 2.0) + (27.0 * (a * b));
	else
		tmp = t * (z * (y * -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, -1.8e+59], N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-20], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -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 -1.8 \cdot 10^{+59}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\

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

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


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

    1. Initial program 89.2%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg89.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-neg89.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*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*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. Taylor expanded in y around inf 61.8%

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

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

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

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

    if -1.7999999999999999e59 < z < 6.50000000000000032e-20

    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. Step-by-step derivation
      1. sub-neg97.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-neg97.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*98.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.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. Simplified99.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. Taylor expanded in y around 0 83.2%

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

    if 6.50000000000000032e-20 < z

    1. Initial program 88.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-neg88.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-neg88.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*91.5%

        \[\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.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. Simplified91.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. Taylor expanded in x around 0 74.1%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    5. Taylor expanded in a around 0 61.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+59}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-20}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]

Alternative 14: 47.4% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.8e49 or 1.59999999999999997e78 < x

    1. Initial program 93.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-neg93.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-neg93.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*98.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*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. Taylor expanded in x around inf 60.4%

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

    if -4.8e49 < x < 1.59999999999999997e78

    1. Initial program 93.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-neg93.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-neg93.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.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*93.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. Simplified93.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. Taylor expanded in a around inf 44.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+49} \lor \neg \left(x \leq 1.6 \cdot 10^{+78}\right):\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \]

Alternative 15: 30.9% 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 93.4%

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

      \[\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.4%

      \[\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.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*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. Taylor expanded in x around inf 28.6%

    \[\leadsto \color{blue}{2 \cdot x} \]
  5. Final simplification28.6%

    \[\leadsto x \cdot 2 \]

Developer target: 94.8% accurate, 0.9× 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 2023334 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, A"
  :precision binary64

  :herbie-target
  (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)))