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

Percentage Accurate: 95.1% → 99.0%
Time: 14.1s
Alternatives: 16
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 95.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.0% 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}\;y \cdot 9 \leq -200:\\ \;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(\left(-9 \cdot z\right) \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - \left(y \cdot t\right) \cdot \left(9 \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= (* y 9.0) -200.0)
   (fma a (* 27.0 b) (fma x 2.0 (* y (* (* -9.0 z) t))))
   (+ (- (* x 2.0) (* (* y t) (* 9.0 z))) (* a (* 27.0 b)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y * 9.0) <= -200.0) {
		tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * ((-9.0 * z) * t))));
	} else {
		tmp = ((x * 2.0) - ((y * t) * (9.0 * z))) + (a * (27.0 * b));
	}
	return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(y * 9.0) <= -200.0)
		tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(Float64(-9.0 * z) * t))));
	else
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * t) * Float64(9.0 * z))) + Float64(a * Float64(27.0 * b)));
	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[N[(y * 9.0), $MachinePrecision], -200.0], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(N[(-9.0 * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * t), $MachinePrecision] * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -200:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(\left(-9 \cdot z\right) \cdot t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y 9) < -200

    1. Initial program 88.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. +-commutative88.1%

        \[\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-88.1%

        \[\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. *-commutative88.1%

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

        \[\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*92.3%

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

        \[\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. *-commutative92.3%

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

        \[\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-92.3%

        \[\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*92.3%

        \[\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-define93.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. sub-neg93.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      13. fma-define93.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. *-commutative93.9%

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

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

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

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

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

    if -200 < (*.f64 y 9)

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 47.0% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+120}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -5000000:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -4 \cdot 10^{-82}:\\ \;\;\;\;z \cdot \left(y \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{-106}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-199}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (* z (* y -9.0)))))
   (if (<= (* a 27.0) -5e+120)
     (* b (* a 27.0))
     (if (<= (* a 27.0) -2e+29)
       (* y (* z (* -9.0 t)))
       (if (<= (* a 27.0) -5000000.0)
         (* x 2.0)
         (if (<= (* a 27.0) -4e-82)
           (* z (* y (* -9.0 t)))
           (if (<= (* a 27.0) -2e-106)
             (* x 2.0)
             (if (<= (* a 27.0) -1e-277)
               t_1
               (if (<= (* a 27.0) 5e-199)
                 (* x 2.0)
                 (if (<= (* a 27.0) 1e+20) t_1 (* 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 t_1 = t * (z * (y * -9.0));
	double tmp;
	if ((a * 27.0) <= -5e+120) {
		tmp = b * (a * 27.0);
	} else if ((a * 27.0) <= -2e+29) {
		tmp = y * (z * (-9.0 * t));
	} else if ((a * 27.0) <= -5000000.0) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -4e-82) {
		tmp = z * (y * (-9.0 * t));
	} else if ((a * 27.0) <= -2e-106) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -1e-277) {
		tmp = t_1;
	} else if ((a * 27.0) <= 5e-199) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= 1e+20) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * (z * (y * (-9.0d0)))
    if ((a * 27.0d0) <= (-5d+120)) then
        tmp = b * (a * 27.0d0)
    else if ((a * 27.0d0) <= (-2d+29)) then
        tmp = y * (z * ((-9.0d0) * t))
    else if ((a * 27.0d0) <= (-5000000.0d0)) then
        tmp = x * 2.0d0
    else if ((a * 27.0d0) <= (-4d-82)) then
        tmp = z * (y * ((-9.0d0) * t))
    else if ((a * 27.0d0) <= (-2d-106)) then
        tmp = x * 2.0d0
    else if ((a * 27.0d0) <= (-1d-277)) then
        tmp = t_1
    else if ((a * 27.0d0) <= 5d-199) then
        tmp = x * 2.0d0
    else if ((a * 27.0d0) <= 1d+20) then
        tmp = t_1
    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 t_1 = t * (z * (y * -9.0));
	double tmp;
	if ((a * 27.0) <= -5e+120) {
		tmp = b * (a * 27.0);
	} else if ((a * 27.0) <= -2e+29) {
		tmp = y * (z * (-9.0 * t));
	} else if ((a * 27.0) <= -5000000.0) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -4e-82) {
		tmp = z * (y * (-9.0 * t));
	} else if ((a * 27.0) <= -2e-106) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -1e-277) {
		tmp = t_1;
	} else if ((a * 27.0) <= 5e-199) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= 1e+20) {
		tmp = t_1;
	} 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):
	t_1 = t * (z * (y * -9.0))
	tmp = 0
	if (a * 27.0) <= -5e+120:
		tmp = b * (a * 27.0)
	elif (a * 27.0) <= -2e+29:
		tmp = y * (z * (-9.0 * t))
	elif (a * 27.0) <= -5000000.0:
		tmp = x * 2.0
	elif (a * 27.0) <= -4e-82:
		tmp = z * (y * (-9.0 * t))
	elif (a * 27.0) <= -2e-106:
		tmp = x * 2.0
	elif (a * 27.0) <= -1e-277:
		tmp = t_1
	elif (a * 27.0) <= 5e-199:
		tmp = x * 2.0
	elif (a * 27.0) <= 1e+20:
		tmp = t_1
	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)
	t_1 = Float64(t * Float64(z * Float64(y * -9.0)))
	tmp = 0.0
	if (Float64(a * 27.0) <= -5e+120)
		tmp = Float64(b * Float64(a * 27.0));
	elseif (Float64(a * 27.0) <= -2e+29)
		tmp = Float64(y * Float64(z * Float64(-9.0 * t)));
	elseif (Float64(a * 27.0) <= -5000000.0)
		tmp = Float64(x * 2.0);
	elseif (Float64(a * 27.0) <= -4e-82)
		tmp = Float64(z * Float64(y * Float64(-9.0 * t)));
	elseif (Float64(a * 27.0) <= -2e-106)
		tmp = Float64(x * 2.0);
	elseif (Float64(a * 27.0) <= -1e-277)
		tmp = t_1;
	elseif (Float64(a * 27.0) <= 5e-199)
		tmp = Float64(x * 2.0);
	elseif (Float64(a * 27.0) <= 1e+20)
		tmp = t_1;
	else
		tmp = Float64(27.0 * Float64(a * b));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (z * (y * -9.0));
	tmp = 0.0;
	if ((a * 27.0) <= -5e+120)
		tmp = b * (a * 27.0);
	elseif ((a * 27.0) <= -2e+29)
		tmp = y * (z * (-9.0 * t));
	elseif ((a * 27.0) <= -5000000.0)
		tmp = x * 2.0;
	elseif ((a * 27.0) <= -4e-82)
		tmp = z * (y * (-9.0 * t));
	elseif ((a * 27.0) <= -2e-106)
		tmp = x * 2.0;
	elseif ((a * 27.0) <= -1e-277)
		tmp = t_1;
	elseif ((a * 27.0) <= 5e-199)
		tmp = x * 2.0;
	elseif ((a * 27.0) <= 1e+20)
		tmp = t_1;
	else
		tmp = 27.0 * (a * b);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 27.0), $MachinePrecision], -5e+120], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -2e+29], N[(y * N[(z * N[(-9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -5000000.0], N[(x * 2.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -4e-82], N[(z * N[(y * N[(-9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -2e-106], N[(x * 2.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -1e-277], t$95$1, If[LessEqual[N[(a * 27.0), $MachinePrecision], 5e-199], N[(x * 2.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], 1e+20], t$95$1, N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+120}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\

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

\mathbf{elif}\;a \cdot 27 \leq -5000000:\\
\;\;\;\;x \cdot 2\\

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

\mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{-106}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-277}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-199}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \cdot 27 \leq 10^{+20}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 a 27) < -5.00000000000000019e120

    1. Initial program 97.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-neg97.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-neg97.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*97.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.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. Simplified97.6%

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    8. Step-by-step derivation
      1. add-cbrt-cube56.5%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(a \cdot \left(27 \cdot b\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)}} \]
      2. pow356.5%

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

      \[\leadsto \color{blue}{\sqrt[3]{{\left(a \cdot \left(27 \cdot b\right)\right)}^{3}}} \]
    10. Step-by-step derivation
      1. rem-cbrt-cube78.9%

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

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

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

    if -5.00000000000000019e120 < (*.f64 a 27) < -1.99999999999999983e29

    1. Initial program 90.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg90.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-neg90.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*85.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*85.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. Simplified85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999983e29 < (*.f64 a 27) < -5e6 or -4e-82 < (*.f64 a 27) < -1.99999999999999988e-106 or -9.99999999999999969e-278 < (*.f64 a 27) < 4.9999999999999996e-199

    1. Initial program 94.2%

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

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

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

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

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

    if -5e6 < (*.f64 a 27) < -4e-82

    1. Initial program 92.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-neg92.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-neg92.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.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.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. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999988e-106 < (*.f64 a 27) < -9.99999999999999969e-278 or 4.9999999999999996e-199 < (*.f64 a 27) < 1e20

    1. Initial program 92.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-neg92.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-neg92.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*96.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*96.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. Simplified96.3%

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

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

        \[\leadsto 27 \cdot \left(a \cdot b\right) - 9 \cdot \color{blue}{{\left(t \cdot \left(y \cdot z\right)\right)}^{1}} \]
    7. Applied egg-rr56.0%

      \[\leadsto 27 \cdot \left(a \cdot b\right) - 9 \cdot \color{blue}{{\left(t \cdot \left(y \cdot z\right)\right)}^{1}} \]
    8. Step-by-step derivation
      1. unpow156.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e20 < (*.f64 a 27)

    1. Initial program 92.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-neg92.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-neg92.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*96.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*96.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+120}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -5000000:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -4 \cdot 10^{-82}:\\ \;\;\;\;z \cdot \left(y \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{-106}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-277}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-199}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq 10^{+20}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 47.0% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+120}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -5000000:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -4 \cdot 10^{-82}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(9 \cdot \left(-z\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{-106}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-199}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (* z (* y -9.0)))))
   (if (<= (* a 27.0) -5e+120)
     (* b (* a 27.0))
     (if (<= (* a 27.0) -2e+29)
       (* y (* z (* -9.0 t)))
       (if (<= (* a 27.0) -5000000.0)
         (* x 2.0)
         (if (<= (* a 27.0) -4e-82)
           (* (* y t) (* 9.0 (- z)))
           (if (<= (* a 27.0) -2e-106)
             (* x 2.0)
             (if (<= (* a 27.0) -1e-277)
               t_1
               (if (<= (* a 27.0) 5e-199)
                 (* x 2.0)
                 (if (<= (* a 27.0) 1e+20) t_1 (* 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 t_1 = t * (z * (y * -9.0));
	double tmp;
	if ((a * 27.0) <= -5e+120) {
		tmp = b * (a * 27.0);
	} else if ((a * 27.0) <= -2e+29) {
		tmp = y * (z * (-9.0 * t));
	} else if ((a * 27.0) <= -5000000.0) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -4e-82) {
		tmp = (y * t) * (9.0 * -z);
	} else if ((a * 27.0) <= -2e-106) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -1e-277) {
		tmp = t_1;
	} else if ((a * 27.0) <= 5e-199) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= 1e+20) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * (z * (y * (-9.0d0)))
    if ((a * 27.0d0) <= (-5d+120)) then
        tmp = b * (a * 27.0d0)
    else if ((a * 27.0d0) <= (-2d+29)) then
        tmp = y * (z * ((-9.0d0) * t))
    else if ((a * 27.0d0) <= (-5000000.0d0)) then
        tmp = x * 2.0d0
    else if ((a * 27.0d0) <= (-4d-82)) then
        tmp = (y * t) * (9.0d0 * -z)
    else if ((a * 27.0d0) <= (-2d-106)) then
        tmp = x * 2.0d0
    else if ((a * 27.0d0) <= (-1d-277)) then
        tmp = t_1
    else if ((a * 27.0d0) <= 5d-199) then
        tmp = x * 2.0d0
    else if ((a * 27.0d0) <= 1d+20) then
        tmp = t_1
    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 t_1 = t * (z * (y * -9.0));
	double tmp;
	if ((a * 27.0) <= -5e+120) {
		tmp = b * (a * 27.0);
	} else if ((a * 27.0) <= -2e+29) {
		tmp = y * (z * (-9.0 * t));
	} else if ((a * 27.0) <= -5000000.0) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -4e-82) {
		tmp = (y * t) * (9.0 * -z);
	} else if ((a * 27.0) <= -2e-106) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= -1e-277) {
		tmp = t_1;
	} else if ((a * 27.0) <= 5e-199) {
		tmp = x * 2.0;
	} else if ((a * 27.0) <= 1e+20) {
		tmp = t_1;
	} 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):
	t_1 = t * (z * (y * -9.0))
	tmp = 0
	if (a * 27.0) <= -5e+120:
		tmp = b * (a * 27.0)
	elif (a * 27.0) <= -2e+29:
		tmp = y * (z * (-9.0 * t))
	elif (a * 27.0) <= -5000000.0:
		tmp = x * 2.0
	elif (a * 27.0) <= -4e-82:
		tmp = (y * t) * (9.0 * -z)
	elif (a * 27.0) <= -2e-106:
		tmp = x * 2.0
	elif (a * 27.0) <= -1e-277:
		tmp = t_1
	elif (a * 27.0) <= 5e-199:
		tmp = x * 2.0
	elif (a * 27.0) <= 1e+20:
		tmp = t_1
	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)
	t_1 = Float64(t * Float64(z * Float64(y * -9.0)))
	tmp = 0.0
	if (Float64(a * 27.0) <= -5e+120)
		tmp = Float64(b * Float64(a * 27.0));
	elseif (Float64(a * 27.0) <= -2e+29)
		tmp = Float64(y * Float64(z * Float64(-9.0 * t)));
	elseif (Float64(a * 27.0) <= -5000000.0)
		tmp = Float64(x * 2.0);
	elseif (Float64(a * 27.0) <= -4e-82)
		tmp = Float64(Float64(y * t) * Float64(9.0 * Float64(-z)));
	elseif (Float64(a * 27.0) <= -2e-106)
		tmp = Float64(x * 2.0);
	elseif (Float64(a * 27.0) <= -1e-277)
		tmp = t_1;
	elseif (Float64(a * 27.0) <= 5e-199)
		tmp = Float64(x * 2.0);
	elseif (Float64(a * 27.0) <= 1e+20)
		tmp = t_1;
	else
		tmp = Float64(27.0 * Float64(a * b));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (z * (y * -9.0));
	tmp = 0.0;
	if ((a * 27.0) <= -5e+120)
		tmp = b * (a * 27.0);
	elseif ((a * 27.0) <= -2e+29)
		tmp = y * (z * (-9.0 * t));
	elseif ((a * 27.0) <= -5000000.0)
		tmp = x * 2.0;
	elseif ((a * 27.0) <= -4e-82)
		tmp = (y * t) * (9.0 * -z);
	elseif ((a * 27.0) <= -2e-106)
		tmp = x * 2.0;
	elseif ((a * 27.0) <= -1e-277)
		tmp = t_1;
	elseif ((a * 27.0) <= 5e-199)
		tmp = x * 2.0;
	elseif ((a * 27.0) <= 1e+20)
		tmp = t_1;
	else
		tmp = 27.0 * (a * b);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 27.0), $MachinePrecision], -5e+120], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -2e+29], N[(y * N[(z * N[(-9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -5000000.0], N[(x * 2.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -4e-82], N[(N[(y * t), $MachinePrecision] * N[(9.0 * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -2e-106], N[(x * 2.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -1e-277], t$95$1, If[LessEqual[N[(a * 27.0), $MachinePrecision], 5e-199], N[(x * 2.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], 1e+20], t$95$1, N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+120}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\

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

\mathbf{elif}\;a \cdot 27 \leq -5000000:\\
\;\;\;\;x \cdot 2\\

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

\mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{-106}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-277}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-199}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;a \cdot 27 \leq 10^{+20}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 a 27) < -5.00000000000000019e120

    1. Initial program 97.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-neg97.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-neg97.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*97.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.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. Simplified97.6%

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    8. Step-by-step derivation
      1. add-cbrt-cube56.5%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(a \cdot \left(27 \cdot b\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)}} \]
      2. pow356.5%

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

      \[\leadsto \color{blue}{\sqrt[3]{{\left(a \cdot \left(27 \cdot b\right)\right)}^{3}}} \]
    10. Step-by-step derivation
      1. rem-cbrt-cube78.9%

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

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

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

    if -5.00000000000000019e120 < (*.f64 a 27) < -1.99999999999999983e29

    1. Initial program 90.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg90.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-neg90.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*85.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*85.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. Simplified85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999983e29 < (*.f64 a 27) < -5e6 or -4e-82 < (*.f64 a 27) < -1.99999999999999988e-106 or -9.99999999999999969e-278 < (*.f64 a 27) < 4.9999999999999996e-199

    1. Initial program 94.2%

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

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

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

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

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

    if -5e6 < (*.f64 a 27) < -4e-82

    1. Initial program 92.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-neg92.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-neg92.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.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.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. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-9\right) \cdot \color{blue}{\left(z \cdot \left(t \cdot y\right)\right)} \]
      6. distribute-lft-neg-in54.3%

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

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

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

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

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

    if -1.99999999999999988e-106 < (*.f64 a 27) < -9.99999999999999969e-278 or 4.9999999999999996e-199 < (*.f64 a 27) < 1e20

    1. Initial program 92.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-neg92.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-neg92.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*96.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*96.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. Simplified96.3%

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

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

        \[\leadsto 27 \cdot \left(a \cdot b\right) - 9 \cdot \color{blue}{{\left(t \cdot \left(y \cdot z\right)\right)}^{1}} \]
    7. Applied egg-rr56.0%

      \[\leadsto 27 \cdot \left(a \cdot b\right) - 9 \cdot \color{blue}{{\left(t \cdot \left(y \cdot z\right)\right)}^{1}} \]
    8. Step-by-step derivation
      1. unpow156.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e20 < (*.f64 a 27)

    1. Initial program 92.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-neg92.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-neg92.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*96.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*96.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+120}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -5000000:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -4 \cdot 10^{-82}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(9 \cdot \left(-z\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{-106}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-277}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-199}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;a \cdot 27 \leq 10^{+20}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 53.6% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ t_3 := y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{+23}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;t_1 \leq -400:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+69}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+160}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0)))
        (t_2 (* 27.0 (* a b)))
        (t_3 (* y (* -9.0 (* z t)))))
   (if (<= t_1 -2e+41)
     t_2
     (if (<= t_1 -2e+23)
       (* x 2.0)
       (if (<= t_1 -400.0)
         (* a (* 27.0 b))
         (if (<= t_1 2e+69)
           t_3
           (if (<= t_1 2e+129) t_2 (if (<= t_1 4e+160) t_3 t_1))))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double t_2 = 27.0 * (a * b);
	double t_3 = y * (-9.0 * (z * t));
	double tmp;
	if (t_1 <= -2e+41) {
		tmp = t_2;
	} else if (t_1 <= -2e+23) {
		tmp = x * 2.0;
	} else if (t_1 <= -400.0) {
		tmp = a * (27.0 * b);
	} else if (t_1 <= 2e+69) {
		tmp = t_3;
	} else if (t_1 <= 2e+129) {
		tmp = t_2;
	} else if (t_1 <= 4e+160) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    t_2 = 27.0d0 * (a * b)
    t_3 = y * ((-9.0d0) * (z * t))
    if (t_1 <= (-2d+41)) then
        tmp = t_2
    else if (t_1 <= (-2d+23)) then
        tmp = x * 2.0d0
    else if (t_1 <= (-400.0d0)) then
        tmp = a * (27.0d0 * b)
    else if (t_1 <= 2d+69) then
        tmp = t_3
    else if (t_1 <= 2d+129) then
        tmp = t_2
    else if (t_1 <= 4d+160) then
        tmp = t_3
    else
        tmp = t_1
    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 = b * (a * 27.0);
	double t_2 = 27.0 * (a * b);
	double t_3 = y * (-9.0 * (z * t));
	double tmp;
	if (t_1 <= -2e+41) {
		tmp = t_2;
	} else if (t_1 <= -2e+23) {
		tmp = x * 2.0;
	} else if (t_1 <= -400.0) {
		tmp = a * (27.0 * b);
	} else if (t_1 <= 2e+69) {
		tmp = t_3;
	} else if (t_1 <= 2e+129) {
		tmp = t_2;
	} else if (t_1 <= 4e+160) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	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 = b * (a * 27.0)
	t_2 = 27.0 * (a * b)
	t_3 = y * (-9.0 * (z * t))
	tmp = 0
	if t_1 <= -2e+41:
		tmp = t_2
	elif t_1 <= -2e+23:
		tmp = x * 2.0
	elif t_1 <= -400.0:
		tmp = a * (27.0 * b)
	elif t_1 <= 2e+69:
		tmp = t_3
	elif t_1 <= 2e+129:
		tmp = t_2
	elif t_1 <= 4e+160:
		tmp = t_3
	else:
		tmp = t_1
	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(b * Float64(a * 27.0))
	t_2 = Float64(27.0 * Float64(a * b))
	t_3 = Float64(y * Float64(-9.0 * Float64(z * t)))
	tmp = 0.0
	if (t_1 <= -2e+41)
		tmp = t_2;
	elseif (t_1 <= -2e+23)
		tmp = Float64(x * 2.0);
	elseif (t_1 <= -400.0)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (t_1 <= 2e+69)
		tmp = t_3;
	elseif (t_1 <= 2e+129)
		tmp = t_2;
	elseif (t_1 <= 4e+160)
		tmp = t_3;
	else
		tmp = t_1;
	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 = b * (a * 27.0);
	t_2 = 27.0 * (a * b);
	t_3 = y * (-9.0 * (z * t));
	tmp = 0.0;
	if (t_1 <= -2e+41)
		tmp = t_2;
	elseif (t_1 <= -2e+23)
		tmp = x * 2.0;
	elseif (t_1 <= -400.0)
		tmp = a * (27.0 * b);
	elseif (t_1 <= 2e+69)
		tmp = t_3;
	elseif (t_1 <= 2e+129)
		tmp = t_2;
	elseif (t_1 <= 4e+160)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+41], t$95$2, If[LessEqual[t$95$1, -2e+23], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$1, -400.0], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+69], t$95$3, If[LessEqual[t$95$1, 2e+129], t$95$2, If[LessEqual[t$95$1, 4e+160], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
t_3 := y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_1 \leq -400:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+69}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+129}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+160}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 (*.f64 a 27) b) < -2.00000000000000001e41 or 2.0000000000000001e69 < (*.f64 (*.f64 a 27) b) < 2e129

    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*96.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*96.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. Simplified96.7%

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

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

    if -2.00000000000000001e41 < (*.f64 (*.f64 a 27) b) < -1.9999999999999998e23

    1. Initial program 100.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-neg100.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-neg100.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*100.0%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      4. associate-*l*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. Add Preprocessing
    5. Taylor expanded in x around inf 76.1%

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

    if -1.9999999999999998e23 < (*.f64 (*.f64 a 27) b) < -400

    1. Initial program 100.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-neg100.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-neg100.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*100.0%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      4. associate-*l*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. Add Preprocessing
    5. Taylor expanded in a around inf 67.7%

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

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

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

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

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

    if -400 < (*.f64 (*.f64 a 27) b) < 2.0000000000000001e69 or 2e129 < (*.f64 (*.f64 a 27) b) < 4.00000000000000003e160

    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.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*96.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. Simplified96.0%

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

      \[\leadsto \left(x \cdot 2 - \color{blue}{9 \cdot \left(t \cdot \left(y \cdot z\right)\right)}\right) + a \cdot \left(27 \cdot b\right) \]
    6. Step-by-step derivation
      1. *-commutative93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000003e160 < (*.f64 (*.f64 a 27) b)

    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.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*96.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. Simplified96.4%

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    8. Step-by-step derivation
      1. add-cbrt-cube57.6%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(a \cdot \left(27 \cdot b\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)}} \]
      2. pow357.6%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(a \cdot \left(27 \cdot b\right)\right)}^{3}}} \]
    9. Applied egg-rr57.6%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(a \cdot \left(27 \cdot b\right)\right)}^{3}}} \]
    10. Step-by-step derivation
      1. rem-cbrt-cube93.0%

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

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

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

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

Alternative 5: 53.6% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ t_2 := 27 \cdot \left(a \cdot b\right)\\ t_3 := y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{+23}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;t_1 \leq -400:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+69}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+160}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0)))
        (t_2 (* 27.0 (* a b)))
        (t_3 (* y (* z (* -9.0 t)))))
   (if (<= t_1 -2e+41)
     t_2
     (if (<= t_1 -2e+23)
       (* x 2.0)
       (if (<= t_1 -400.0)
         (* a (* 27.0 b))
         (if (<= t_1 2e+69)
           t_3
           (if (<= t_1 2e+129) t_2 (if (<= t_1 4e+160) t_3 t_1))))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double t_2 = 27.0 * (a * b);
	double t_3 = y * (z * (-9.0 * t));
	double tmp;
	if (t_1 <= -2e+41) {
		tmp = t_2;
	} else if (t_1 <= -2e+23) {
		tmp = x * 2.0;
	} else if (t_1 <= -400.0) {
		tmp = a * (27.0 * b);
	} else if (t_1 <= 2e+69) {
		tmp = t_3;
	} else if (t_1 <= 2e+129) {
		tmp = t_2;
	} else if (t_1 <= 4e+160) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = b * (a * 27.0d0)
    t_2 = 27.0d0 * (a * b)
    t_3 = y * (z * ((-9.0d0) * t))
    if (t_1 <= (-2d+41)) then
        tmp = t_2
    else if (t_1 <= (-2d+23)) then
        tmp = x * 2.0d0
    else if (t_1 <= (-400.0d0)) then
        tmp = a * (27.0d0 * b)
    else if (t_1 <= 2d+69) then
        tmp = t_3
    else if (t_1 <= 2d+129) then
        tmp = t_2
    else if (t_1 <= 4d+160) then
        tmp = t_3
    else
        tmp = t_1
    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 = b * (a * 27.0);
	double t_2 = 27.0 * (a * b);
	double t_3 = y * (z * (-9.0 * t));
	double tmp;
	if (t_1 <= -2e+41) {
		tmp = t_2;
	} else if (t_1 <= -2e+23) {
		tmp = x * 2.0;
	} else if (t_1 <= -400.0) {
		tmp = a * (27.0 * b);
	} else if (t_1 <= 2e+69) {
		tmp = t_3;
	} else if (t_1 <= 2e+129) {
		tmp = t_2;
	} else if (t_1 <= 4e+160) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	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 = b * (a * 27.0)
	t_2 = 27.0 * (a * b)
	t_3 = y * (z * (-9.0 * t))
	tmp = 0
	if t_1 <= -2e+41:
		tmp = t_2
	elif t_1 <= -2e+23:
		tmp = x * 2.0
	elif t_1 <= -400.0:
		tmp = a * (27.0 * b)
	elif t_1 <= 2e+69:
		tmp = t_3
	elif t_1 <= 2e+129:
		tmp = t_2
	elif t_1 <= 4e+160:
		tmp = t_3
	else:
		tmp = t_1
	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(b * Float64(a * 27.0))
	t_2 = Float64(27.0 * Float64(a * b))
	t_3 = Float64(y * Float64(z * Float64(-9.0 * t)))
	tmp = 0.0
	if (t_1 <= -2e+41)
		tmp = t_2;
	elseif (t_1 <= -2e+23)
		tmp = Float64(x * 2.0);
	elseif (t_1 <= -400.0)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (t_1 <= 2e+69)
		tmp = t_3;
	elseif (t_1 <= 2e+129)
		tmp = t_2;
	elseif (t_1 <= 4e+160)
		tmp = t_3;
	else
		tmp = t_1;
	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 = b * (a * 27.0);
	t_2 = 27.0 * (a * b);
	t_3 = y * (z * (-9.0 * t));
	tmp = 0.0;
	if (t_1 <= -2e+41)
		tmp = t_2;
	elseif (t_1 <= -2e+23)
		tmp = x * 2.0;
	elseif (t_1 <= -400.0)
		tmp = a * (27.0 * b);
	elseif (t_1 <= 2e+69)
		tmp = t_3;
	elseif (t_1 <= 2e+129)
		tmp = t_2;
	elseif (t_1 <= 4e+160)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(z * N[(-9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+41], t$95$2, If[LessEqual[t$95$1, -2e+23], N[(x * 2.0), $MachinePrecision], If[LessEqual[t$95$1, -400.0], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+69], t$95$3, If[LessEqual[t$95$1, 2e+129], t$95$2, If[LessEqual[t$95$1, 4e+160], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
t_3 := y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t_1 \leq -400:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+69}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+129}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+160}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 (*.f64 a 27) b) < -2.00000000000000001e41 or 2.0000000000000001e69 < (*.f64 (*.f64 a 27) b) < 2e129

    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*96.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*96.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. Simplified96.7%

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

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

    if -2.00000000000000001e41 < (*.f64 (*.f64 a 27) b) < -1.9999999999999998e23

    1. Initial program 100.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-neg100.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-neg100.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*100.0%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      4. associate-*l*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. Add Preprocessing
    5. Taylor expanded in x around inf 76.1%

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

    if -1.9999999999999998e23 < (*.f64 (*.f64 a 27) b) < -400

    1. Initial program 100.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-neg100.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-neg100.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*100.0%

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
      4. associate-*l*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. Add Preprocessing
    5. Taylor expanded in a around inf 67.7%

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

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

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

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

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

    if -400 < (*.f64 (*.f64 a 27) b) < 2.0000000000000001e69 or 2e129 < (*.f64 (*.f64 a 27) b) < 4.00000000000000003e160

    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.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*96.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. Simplified96.0%

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

      \[\leadsto \left(x \cdot 2 - \color{blue}{9 \cdot \left(t \cdot \left(y \cdot z\right)\right)}\right) + a \cdot \left(27 \cdot b\right) \]
    6. Step-by-step derivation
      1. *-commutative93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000003e160 < (*.f64 (*.f64 a 27) b)

    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.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*96.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. Simplified96.4%

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} \]
    8. Step-by-step derivation
      1. add-cbrt-cube57.6%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(a \cdot \left(27 \cdot b\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)\right) \cdot \left(a \cdot \left(27 \cdot b\right)\right)}} \]
      2. pow357.6%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(a \cdot \left(27 \cdot b\right)\right)}^{3}}} \]
    9. Applied egg-rr57.6%

      \[\leadsto \color{blue}{\sqrt[3]{{\left(a \cdot \left(27 \cdot b\right)\right)}^{3}}} \]
    10. Step-by-step derivation
      1. rem-cbrt-cube93.0%

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

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

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

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

Alternative 6: 81.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;t_1 \leq -400 \lor \neg \left(t_1 \leq 10^{+82}\right) \land \left(t_1 \leq 5 \cdot 10^{+134} \lor \neg \left(t_1 \leq 4 \cdot 10^{+160}\right)\right):\\ \;\;\;\;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} \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 (* b (* a 27.0))))
   (if (or (<= t_1 -400.0)
           (and (not (<= t_1 1e+82))
                (or (<= t_1 5e+134) (not (<= t_1 4e+160)))))
     (+ (* x 2.0) (* 27.0 (* a b)))
     (+ (* 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 = b * (a * 27.0);
	double tmp;
	if ((t_1 <= -400.0) || (!(t_1 <= 1e+82) && ((t_1 <= 5e+134) || !(t_1 <= 4e+160)))) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} 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 = b * (a * 27.0d0)
    if ((t_1 <= (-400.0d0)) .or. (.not. (t_1 <= 1d+82)) .and. (t_1 <= 5d+134) .or. (.not. (t_1 <= 4d+160))) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    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 = b * (a * 27.0);
	double tmp;
	if ((t_1 <= -400.0) || (!(t_1 <= 1e+82) && ((t_1 <= 5e+134) || !(t_1 <= 4e+160)))) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} 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 = b * (a * 27.0)
	tmp = 0
	if (t_1 <= -400.0) or (not (t_1 <= 1e+82) and ((t_1 <= 5e+134) or not (t_1 <= 4e+160))):
		tmp = (x * 2.0) + (27.0 * (a * b))
	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(b * Float64(a * 27.0))
	tmp = 0.0
	if ((t_1 <= -400.0) || (!(t_1 <= 1e+82) && ((t_1 <= 5e+134) || !(t_1 <= 4e+160))))
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	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 = b * (a * 27.0);
	tmp = 0.0;
	if ((t_1 <= -400.0) || (~((t_1 <= 1e+82)) && ((t_1 <= 5e+134) || ~((t_1 <= 4e+160)))))
		tmp = (x * 2.0) + (27.0 * (a * b));
	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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -400.0], And[N[Not[LessEqual[t$95$1, 1e+82]], $MachinePrecision], Or[LessEqual[t$95$1, 5e+134], N[Not[LessEqual[t$95$1, 4e+160]], $MachinePrecision]]]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $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}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t_1 \leq -400 \lor \neg \left(t_1 \leq 10^{+82}\right) \land \left(t_1 \leq 5 \cdot 10^{+134} \lor \neg \left(t_1 \leq 4 \cdot 10^{+160}\right)\right):\\
\;\;\;\;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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 a 27) b) < -400 or 9.9999999999999996e81 < (*.f64 (*.f64 a 27) b) < 4.99999999999999981e134 or 4.00000000000000003e160 < (*.f64 (*.f64 a 27) b)

    1. Initial program 94.2%

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

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

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

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

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

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

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

    if -400 < (*.f64 (*.f64 a 27) b) < 9.9999999999999996e81 or 4.99999999999999981e134 < (*.f64 (*.f64 a 27) b) < 4.00000000000000003e160

    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.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*96.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. Simplified96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(a \cdot 27\right) \leq -400 \lor \neg \left(b \cdot \left(a \cdot 27\right) \leq 10^{+82}\right) \land \left(b \cdot \left(a \cdot 27\right) \leq 5 \cdot 10^{+134} \lor \neg \left(b \cdot \left(a \cdot 27\right) \leq 4 \cdot 10^{+160}\right)\right):\\ \;\;\;\;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} \]
  5. Add Preprocessing

Alternative 7: 81.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;t_1 \leq -400 \lor \neg \left(t_1 \leq 10^{+82}\right) \land \left(t_1 \leq 5 \cdot 10^{+134} \lor \neg \left(t_1 \leq 4 \cdot 10^{+160}\right)\right):\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (or (<= t_1 -400.0)
           (and (not (<= t_1 1e+82))
                (or (<= t_1 5e+134) (not (<= t_1 4e+160)))))
     (+ (* x 2.0) (* 27.0 (* a b)))
     (+ (* x 2.0) (* (* z t) (* 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 = b * (a * 27.0);
	double tmp;
	if ((t_1 <= -400.0) || (!(t_1 <= 1e+82) && ((t_1 <= 5e+134) || !(t_1 <= 4e+160)))) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = (x * 2.0) + ((z * t) * (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 = b * (a * 27.0d0)
    if ((t_1 <= (-400.0d0)) .or. (.not. (t_1 <= 1d+82)) .and. (t_1 <= 5d+134) .or. (.not. (t_1 <= 4d+160))) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else
        tmp = (x * 2.0d0) + ((z * t) * (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 = b * (a * 27.0);
	double tmp;
	if ((t_1 <= -400.0) || (!(t_1 <= 1e+82) && ((t_1 <= 5e+134) || !(t_1 <= 4e+160)))) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = (x * 2.0) + ((z * t) * (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 = b * (a * 27.0)
	tmp = 0
	if (t_1 <= -400.0) or (not (t_1 <= 1e+82) and ((t_1 <= 5e+134) or not (t_1 <= 4e+160))):
		tmp = (x * 2.0) + (27.0 * (a * b))
	else:
		tmp = (x * 2.0) + ((z * t) * (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(b * Float64(a * 27.0))
	tmp = 0.0
	if ((t_1 <= -400.0) || (!(t_1 <= 1e+82) && ((t_1 <= 5e+134) || !(t_1 <= 4e+160))))
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	else
		tmp = Float64(Float64(x * 2.0) + Float64(Float64(z * t) * 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 = b * (a * 27.0);
	tmp = 0.0;
	if ((t_1 <= -400.0) || (~((t_1 <= 1e+82)) && ((t_1 <= 5e+134) || ~((t_1 <= 4e+160)))))
		tmp = (x * 2.0) + (27.0 * (a * b));
	else
		tmp = (x * 2.0) + ((z * t) * (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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -400.0], And[N[Not[LessEqual[t$95$1, 1e+82]], $MachinePrecision], Or[LessEqual[t$95$1, 5e+134], N[Not[LessEqual[t$95$1, 4e+160]], $MachinePrecision]]]], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] * 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 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t_1 \leq -400 \lor \neg \left(t_1 \leq 10^{+82}\right) \land \left(t_1 \leq 5 \cdot 10^{+134} \lor \neg \left(t_1 \leq 4 \cdot 10^{+160}\right)\right):\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 a 27) b) < -400 or 9.9999999999999996e81 < (*.f64 (*.f64 a 27) b) < 4.99999999999999981e134 or 4.00000000000000003e160 < (*.f64 (*.f64 a 27) b)

    1. Initial program 94.2%

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

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

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

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

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

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

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

    if -400 < (*.f64 (*.f64 a 27) b) < 9.9999999999999996e81 or 4.99999999999999981e134 < (*.f64 (*.f64 a 27) b) < 4.00000000000000003e160

    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.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*96.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. Simplified96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 83.1% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 a 27) b) < -400

    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*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*96.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. Simplified96.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)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 85.6%

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

    if -400 < (*.f64 (*.f64 a 27) b) < 4.99999999999999999e-15

    1. Initial program 92.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-neg92.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-neg92.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*96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999999e-15 < (*.f64 (*.f64 a 27) b)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 48.3% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;z \leq -245:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-158}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-236}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-129}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* -9.0 (* t (* y z)))))
   (if (<= z -245.0)
     t_1
     (if (<= z -5.8e-158)
       (* a (* 27.0 b))
       (if (<= z -5.2e-236)
         (* x 2.0)
         (if (<= z 9e-129) (* 27.0 (* a b)) t_1))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -245.0) {
		tmp = t_1;
	} else if (z <= -5.8e-158) {
		tmp = a * (27.0 * b);
	} else if (z <= -5.2e-236) {
		tmp = x * 2.0;
	} else if (z <= 9e-129) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = t_1;
	}
	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 = (-9.0d0) * (t * (y * z))
    if (z <= (-245.0d0)) then
        tmp = t_1
    else if (z <= (-5.8d-158)) then
        tmp = a * (27.0d0 * b)
    else if (z <= (-5.2d-236)) then
        tmp = x * 2.0d0
    else if (z <= 9d-129) then
        tmp = 27.0d0 * (a * b)
    else
        tmp = t_1
    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 = -9.0 * (t * (y * z));
	double tmp;
	if (z <= -245.0) {
		tmp = t_1;
	} else if (z <= -5.8e-158) {
		tmp = a * (27.0 * b);
	} else if (z <= -5.2e-236) {
		tmp = x * 2.0;
	} else if (z <= 9e-129) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = t_1;
	}
	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 = -9.0 * (t * (y * z))
	tmp = 0
	if z <= -245.0:
		tmp = t_1
	elif z <= -5.8e-158:
		tmp = a * (27.0 * b)
	elif z <= -5.2e-236:
		tmp = x * 2.0
	elif z <= 9e-129:
		tmp = 27.0 * (a * b)
	else:
		tmp = t_1
	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(-9.0 * Float64(t * Float64(y * z)))
	tmp = 0.0
	if (z <= -245.0)
		tmp = t_1;
	elseif (z <= -5.8e-158)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (z <= -5.2e-236)
		tmp = Float64(x * 2.0);
	elseif (z <= 9e-129)
		tmp = Float64(27.0 * Float64(a * b));
	else
		tmp = t_1;
	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 = -9.0 * (t * (y * z));
	tmp = 0.0;
	if (z <= -245.0)
		tmp = t_1;
	elseif (z <= -5.8e-158)
		tmp = a * (27.0 * b);
	elseif (z <= -5.2e-236)
		tmp = x * 2.0;
	elseif (z <= 9e-129)
		tmp = 27.0 * (a * b);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -245.0], t$95$1, If[LessEqual[z, -5.8e-158], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-236], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 9e-129], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -245:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -245 or 9.00000000000000061e-129 < z

    1. Initial program 88.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-neg88.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-neg88.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*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. Add Preprocessing
    5. Taylor expanded in y around inf 48.6%

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

    if -245 < z < -5.79999999999999961e-158

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999961e-158 < z < -5.2000000000000001e-236

    1. Initial program 99.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-neg99.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-neg99.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*99.8%

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

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

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

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

    if -5.2000000000000001e-236 < z < 9.00000000000000061e-129

    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*98.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*98.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. Simplified98.0%

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

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

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

Alternative 10: 48.2% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \mathbf{if}\;z \leq -90:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-158}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-237}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-129}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (* z (* y -9.0)))))
   (if (<= z -90.0)
     t_1
     (if (<= z -5e-158)
       (* a (* 27.0 b))
       (if (<= z -5e-237)
         (* x 2.0)
         (if (<= z 1.8e-129) (* 27.0 (* a b)) t_1))))))
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 = t * (z * (y * -9.0));
	double tmp;
	if (z <= -90.0) {
		tmp = t_1;
	} else if (z <= -5e-158) {
		tmp = a * (27.0 * b);
	} else if (z <= -5e-237) {
		tmp = x * 2.0;
	} else if (z <= 1.8e-129) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = t_1;
	}
	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 = t * (z * (y * (-9.0d0)))
    if (z <= (-90.0d0)) then
        tmp = t_1
    else if (z <= (-5d-158)) then
        tmp = a * (27.0d0 * b)
    else if (z <= (-5d-237)) then
        tmp = x * 2.0d0
    else if (z <= 1.8d-129) then
        tmp = 27.0d0 * (a * b)
    else
        tmp = t_1
    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 = t * (z * (y * -9.0));
	double tmp;
	if (z <= -90.0) {
		tmp = t_1;
	} else if (z <= -5e-158) {
		tmp = a * (27.0 * b);
	} else if (z <= -5e-237) {
		tmp = x * 2.0;
	} else if (z <= 1.8e-129) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = t_1;
	}
	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 = t * (z * (y * -9.0))
	tmp = 0
	if z <= -90.0:
		tmp = t_1
	elif z <= -5e-158:
		tmp = a * (27.0 * b)
	elif z <= -5e-237:
		tmp = x * 2.0
	elif z <= 1.8e-129:
		tmp = 27.0 * (a * b)
	else:
		tmp = t_1
	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(t * Float64(z * Float64(y * -9.0)))
	tmp = 0.0
	if (z <= -90.0)
		tmp = t_1;
	elseif (z <= -5e-158)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (z <= -5e-237)
		tmp = Float64(x * 2.0);
	elseif (z <= 1.8e-129)
		tmp = Float64(27.0 * Float64(a * b));
	else
		tmp = t_1;
	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 = t * (z * (y * -9.0));
	tmp = 0.0;
	if (z <= -90.0)
		tmp = t_1;
	elseif (z <= -5e-158)
		tmp = a * (27.0 * b);
	elseif (z <= -5e-237)
		tmp = x * 2.0;
	elseif (z <= 1.8e-129)
		tmp = 27.0 * (a * b);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -90.0], t$95$1, If[LessEqual[z, -5e-158], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-237], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.8e-129], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{if}\;z \leq -90:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -90 or 1.8e-129 < z

    1. Initial program 88.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-neg88.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-neg88.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*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. Add Preprocessing
    5. Taylor expanded in x around 0 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -90 < z < -4.99999999999999972e-158

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999972e-158 < z < -5.0000000000000002e-237

    1. Initial program 99.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-neg99.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-neg99.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*99.8%

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

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

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

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

    if -5.0000000000000002e-237 < z < 1.8e-129

    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*98.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*98.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. Simplified98.0%

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y 9) < -2e51

    1. Initial program 85.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-neg85.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-neg85.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*97.9%

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

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

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

    if -2e51 < (*.f64 y 9)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t_1 \leq 0.0004:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 a 27) b) < -2.00000000000000001e41

    1. Initial program 92.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-neg92.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-neg92.2%

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

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

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

    if -2.00000000000000001e41 < (*.f64 (*.f64 a 27) b) < 4.00000000000000019e-4

    1. Initial program 92.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-neg92.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-neg92.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*96.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*96.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. Simplified96.3%

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

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

    if 4.00000000000000019e-4 < (*.f64 (*.f64 a 27) b)

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

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

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

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

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

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

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

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

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

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

Alternative 13: 76.7% 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 -85000:\\ \;\;\;\;y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-26}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(9 \cdot \left(-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 (<= z -85000.0)
   (* y (* z (* -9.0 t)))
   (if (<= z 2e-26) (+ (* x 2.0) (* 27.0 (* a b))) (* (* y t) (* 9.0 (- z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -85000.0) {
		tmp = y * (z * (-9.0 * t));
	} else if (z <= 2e-26) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = (y * t) * (9.0 * -z);
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (z <= (-85000.0d0)) then
        tmp = y * (z * ((-9.0d0) * t))
    else if (z <= 2d-26) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else
        tmp = (y * t) * (9.0d0 * -z)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -85000.0) {
		tmp = y * (z * (-9.0 * t));
	} else if (z <= 2e-26) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = (y * t) * (9.0 * -z);
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -85000.0:
		tmp = y * (z * (-9.0 * t))
	elif z <= 2e-26:
		tmp = (x * 2.0) + (27.0 * (a * b))
	else:
		tmp = (y * t) * (9.0 * -z)
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -85000.0)
		tmp = Float64(y * Float64(z * Float64(-9.0 * t)));
	elseif (z <= 2e-26)
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	else
		tmp = Float64(Float64(y * t) * Float64(9.0 * Float64(-z)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -85000.0)
		tmp = y * (z * (-9.0 * t));
	elseif (z <= 2e-26)
		tmp = (x * 2.0) + (27.0 * (a * b));
	else
		tmp = (y * t) * (9.0 * -z);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -85000.0], N[(y * N[(z * N[(-9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-26], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * N[(9.0 * (-z)), $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 -85000:\\
\;\;\;\;y \cdot \left(z \cdot \left(-9 \cdot t\right)\right)\\

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

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


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

    1. Initial program 74.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-neg74.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-neg74.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*90.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*90.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. Simplified90.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -85000 < z < 2.0000000000000001e-26

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

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

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

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

    if 2.0000000000000001e-26 < z

    1. Initial program 92.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-neg92.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-neg92.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*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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-9\right) \cdot \color{blue}{\left(z \cdot \left(t \cdot y\right)\right)} \]
      6. distribute-lft-neg-in54.5%

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

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

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

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

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

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

Alternative 14: 93.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \left(x \cdot 2 - \left(y \cdot t\right) \cdot \left(9 \cdot z\right)\right) + a \cdot \left(27 \cdot b\right) \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) (* (* y t) (* 9.0 z))) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - ((y * t) * (9.0 * z))) + (a * (27.0 * b));
}
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) - ((y * t) * (9.0d0 * z))) + (a * (27.0d0 * b))
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) - ((y * t) * (9.0 * z))) + (a * (27.0 * b));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	return ((x * 2.0) - ((y * t) * (9.0 * z))) + (a * (27.0 * b))
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * t) * Float64(9.0 * z))) + Float64(a * Float64(27.0 * b)))
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) - ((y * t) * (9.0 * z))) + (a * (27.0 * b));
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[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * t), $MachinePrecision] * N[(9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - \left(y \cdot t\right) \cdot \left(9 \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)
\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*96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 45.3% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.07999999999999998e39 or 1.0500000000000001e-144 < a

    1. Initial program 94.0%

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

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

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

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

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

    if -1.07999999999999998e39 < a < 1.0500000000000001e-144

    1. Initial program 92.6%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg92.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-neg92.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*97.9%

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

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

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

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

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

Alternative 16: 30.1% 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*96.4%

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

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

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

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

Developer target: 94.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024026 
(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)))