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

Percentage Accurate: 95.6% → 98.2%
Time: 13.6s
Alternatives: 20
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 95.6% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.4000000000000002e-7

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.4000000000000002e-7 < t

    1. Initial program 96.3%

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

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

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

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

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

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

Alternative 2: 78.6% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 6 \cdot 10^{+72}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

\mathbf{elif}\;t \leq 1.06 \cdot 10^{+184} \lor \neg \left(t \leq 3.2 \cdot 10^{+233}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.35000000000000014e-138

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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 0 70.0%

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

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

    if -1.35000000000000014e-138 < t < 6.00000000000000006e72

    1. Initial program 93.8%

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

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

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

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

    if 6.00000000000000006e72 < t < 1.06e184 or 3.20000000000000018e233 < t

    1. Initial program 96.6%

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

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

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

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

    if 1.06e184 < t < 3.20000000000000018e233

    1. Initial program 87.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-neg87.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-neg87.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*76.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*76.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. Simplified76.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 t around inf 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \left(2 \cdot \frac{x}{y} - 9 \cdot \left(t \cdot z\right)\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+72}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{+184} \lor \neg \left(t \leq 3.2 \cdot 10^{+233}\right):\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(27 \cdot \frac{a \cdot b}{t} - 9 \cdot \left(z \cdot y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 47.8% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 2.55 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-72}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;t \leq 3 \cdot 10^{+52}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{+160}:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.10000000000000003e-144

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. +-commutative92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right)} \]
      11. distribute-lft-neg-in41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000003e-144 < t < 2.55e-195

    1. Initial program 89.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-neg89.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-neg89.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.6%

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

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

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

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

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

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

    if 2.55e-195 < t < 7.8e-72 or 3e52 < t < 9.6000000000000006e160

    1. Initial program 97.9%

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

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

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

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

    if 7.8e-72 < t < 3e52

    1. Initial program 96.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-neg96.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-neg96.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*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.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. Simplified99.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 a around inf 37.2%

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

    if 9.6000000000000006e160 < t

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-144}:\\ \;\;\;\;\left(t \cdot z\right) \cdot \left(-9 \cdot y\right)\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-195}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-72}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+52}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+160}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 47.9% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 7 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;t \leq 1.56 \cdot 10^{-72}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t \leq 10^{+161}:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.10000000000000003e-144

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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 inf 41.7%

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000003e-144 < t < 7.00000000000000028e-195

    1. Initial program 89.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-neg89.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-neg89.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.6%

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

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

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

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

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

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

    if 7.00000000000000028e-195 < t < 1.55999999999999993e-72 or 7.20000000000000022e51 < t < 1e161

    1. Initial program 97.9%

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

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

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

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

    if 1.55999999999999993e-72 < t < 7.20000000000000022e51

    1. Initial program 96.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-neg96.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-neg96.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*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.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. Simplified99.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 a around inf 37.2%

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

    if 1e161 < t

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

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

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

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

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

Alternative 5: 47.9% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{-71}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;t \leq 3.7 \cdot 10^{+53}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+161}:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.10000000000000003e-144

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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 inf 41.7%

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000003e-144 < t < 4.6000000000000004e-195

    1. Initial program 89.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-neg89.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-neg89.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.6%

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

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

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

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

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

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

    if 4.6000000000000004e-195 < t < 6.3999999999999998e-71 or 3.7e53 < t < 1.1e161

    1. Initial program 97.9%

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

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

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

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

    if 6.3999999999999998e-71 < t < 3.7e53

    1. Initial program 96.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-neg96.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-neg96.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*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.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. Simplified99.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 a around inf 37.2%

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

    if 1.1e161 < t

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-144}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-195}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-71}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+53}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+161}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 47.6% 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 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{if}\;t \leq -7 \cdot 10^{-74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-195}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-71}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+51}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+160}:\\ \;\;\;\;x \cdot 2\\ \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 (* z y)))))
   (if (<= t -7e-74)
     t_1
     (if (<= t 2.2e-195)
       (* a (* 27.0 b))
       (if (<= t 2.8e-71)
         (* x 2.0)
         (if (<= t 4.8e+51)
           (* 27.0 (* a b))
           (if (<= t 9.6e+160) (* x 2.0) 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 * (z * y));
	double tmp;
	if (t <= -7e-74) {
		tmp = t_1;
	} else if (t <= 2.2e-195) {
		tmp = a * (27.0 * b);
	} else if (t <= 2.8e-71) {
		tmp = x * 2.0;
	} else if (t <= 4.8e+51) {
		tmp = 27.0 * (a * b);
	} else if (t <= 9.6e+160) {
		tmp = x * 2.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * (z * y))
    if (t <= (-7d-74)) then
        tmp = t_1
    else if (t <= 2.2d-195) then
        tmp = a * (27.0d0 * b)
    else if (t <= 2.8d-71) then
        tmp = x * 2.0d0
    else if (t <= 4.8d+51) then
        tmp = 27.0d0 * (a * b)
    else if (t <= 9.6d+160) then
        tmp = x * 2.0d0
    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 * (z * y));
	double tmp;
	if (t <= -7e-74) {
		tmp = t_1;
	} else if (t <= 2.2e-195) {
		tmp = a * (27.0 * b);
	} else if (t <= 2.8e-71) {
		tmp = x * 2.0;
	} else if (t <= 4.8e+51) {
		tmp = 27.0 * (a * b);
	} else if (t <= 9.6e+160) {
		tmp = x * 2.0;
	} 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 * (z * y))
	tmp = 0
	if t <= -7e-74:
		tmp = t_1
	elif t <= 2.2e-195:
		tmp = a * (27.0 * b)
	elif t <= 2.8e-71:
		tmp = x * 2.0
	elif t <= 4.8e+51:
		tmp = 27.0 * (a * b)
	elif t <= 9.6e+160:
		tmp = x * 2.0
	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(z * y)))
	tmp = 0.0
	if (t <= -7e-74)
		tmp = t_1;
	elseif (t <= 2.2e-195)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (t <= 2.8e-71)
		tmp = Float64(x * 2.0);
	elseif (t <= 4.8e+51)
		tmp = Float64(27.0 * Float64(a * b));
	elseif (t <= 9.6e+160)
		tmp = Float64(x * 2.0);
	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 * (z * y));
	tmp = 0.0;
	if (t <= -7e-74)
		tmp = t_1;
	elseif (t <= 2.2e-195)
		tmp = a * (27.0 * b);
	elseif (t <= 2.8e-71)
		tmp = x * 2.0;
	elseif (t <= 4.8e+51)
		tmp = 27.0 * (a * b);
	elseif (t <= 9.6e+160)
		tmp = x * 2.0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e-74], t$95$1, If[LessEqual[t, 2.2e-195], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-71], N[(x * 2.0), $MachinePrecision], If[LessEqual[t, 4.8e+51], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e+160], N[(x * 2.0), $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(z \cdot y\right)\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-195}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-71}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+51}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{+160}:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.00000000000000029e-74 or 9.6000000000000006e160 < t

    1. Initial program 98.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-neg98.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-neg98.0%

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

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

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

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

    if -7.00000000000000029e-74 < t < 2.20000000000000005e-195

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

    if 2.20000000000000005e-195 < t < 2.8e-71 or 4.7999999999999997e51 < t < 9.6000000000000006e160

    1. Initial program 97.9%

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

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

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

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

    if 2.8e-71 < t < 4.7999999999999997e51

    1. Initial program 96.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-neg96.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-neg96.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*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.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. Simplified99.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 a around inf 37.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-74}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-195}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-71}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+51}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+160}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 98.3% accurate, 0.7× speedup?

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

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


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

    1. Initial program 90.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-neg90.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-neg90.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. Step-by-step derivation
      1. +-commutative97.9%

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

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

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

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

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

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

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

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

    if -5.0000000000000001e-9 < (*.f64 y #s(literal 9 binary64))

    1. Initial program 96.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-neg96.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-neg96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 97.6% 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 -5 \cdot 10^{+84}:\\ \;\;\;\;t\_1 + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 + z \cdot \left(\left(t \cdot -9\right) \cdot y\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) -5e+84)
     (+ t_1 (- (* x 2.0) (* (* y 9.0) (* t z))))
     (+ (+ (* x 2.0) (* z (* (* t -9.0) y))) 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) <= -5e+84) {
		tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z)));
	} else {
		tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + 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) <= (-5d+84)) then
        tmp = t_1 + ((x * 2.0d0) - ((y * 9.0d0) * (t * z)))
    else
        tmp = ((x * 2.0d0) + (z * ((t * (-9.0d0)) * y))) + 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) <= -5e+84) {
		tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z)));
	} else {
		tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + 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) <= -5e+84:
		tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z)))
	else:
		tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + 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) <= -5e+84)
		tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(t * z))));
	else
		tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(Float64(t * -9.0) * y))) + 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) <= -5e+84)
		tmp = t_1 + ((x * 2.0) - ((y * 9.0) * (t * z)));
	else
		tmp = ((x * 2.0) + (z * ((t * -9.0) * y))) + 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], -5e+84], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(N[(t * -9.0), $MachinePrecision] * y), $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 -5 \cdot 10^{+84}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(t \cdot z\right)\right)\\

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


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

    1. Initial program 87.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-neg87.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-neg87.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.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*97.3%

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

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

    if -5.0000000000000001e84 < (*.f64 y #s(literal 9 binary64))

    1. Initial program 96.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-neg96.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-neg96.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*94.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*94.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. Simplified94.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 98.2% accurate, 0.8× speedup?

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

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


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

    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*91.3%

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

    if -3.4999999999999997e-225 < z

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 98.0% accurate, 0.8× speedup?

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

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


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

    1. Initial program 93.7%

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

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

    if -4.9999999999999997e-246 < z

    1. Initial program 96.0%

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

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

Alternative 11: 78.7% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+72}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35000000000000014e-138

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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 0 70.0%

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

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

    if -1.35000000000000014e-138 < t < 2.2e72

    1. Initial program 93.8%

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

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

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

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

    if 2.2e72 < t

    1. Initial program 94.7%

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

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

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

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

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

Alternative 12: 78.1% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 1.08 \cdot 10^{+72}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35000000000000014e-138

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. +-commutative92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right)} \]
      11. distribute-lft-neg-in41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000014e-138 < t < 1.07999999999999999e72

    1. Initial program 93.8%

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

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

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

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

    if 1.07999999999999999e72 < t

    1. Initial program 94.7%

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

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

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

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

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

Alternative 13: 75.1% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+137}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35000000000000014e-138

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. +-commutative92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right)} \]
      11. distribute-lft-neg-in41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000014e-138 < t < 8.50000000000000028e137

    1. Initial program 93.6%

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

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

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

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

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

    if 8.50000000000000028e137 < t

    1. Initial program 96.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-neg96.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-neg96.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*82.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*82.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. Simplified82.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 75.2% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+138}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35000000000000014e-138

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. +-commutative92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right)} \]
      11. distribute-lft-neg-in41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000014e-138 < t < 1.7499999999999999e138

    1. Initial program 93.6%

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

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

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

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

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

    if 1.7499999999999999e138 < t

    1. Initial program 96.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-neg96.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-neg96.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*82.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*82.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. Simplified82.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 71.9% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq 9 \cdot 10^{+161}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35000000000000014e-138

    1. Initial program 96.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-neg96.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-neg96.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*92.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*92.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. Simplified92.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. Step-by-step derivation
      1. +-commutative92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right)} \]
      11. distribute-lft-neg-in41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000014e-138 < t < 8.99999999999999984e161

    1. Initial program 93.8%

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

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

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

    if 8.99999999999999984e161 < t

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

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

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

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

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

Alternative 16: 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 + z \cdot \left(\left(t \cdot -9\right) \cdot y\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) (* z (* (* t -9.0) y))) (* 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) + (z * ((t * -9.0) * y))) + (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) + (z * ((t * (-9.0d0)) * y))) + (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) + (z * ((t * -9.0) * y))) + (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) + (z * ((t * -9.0) * y))) + (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(z * Float64(Float64(t * -9.0) * y))) + 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) + (z * ((t * -9.0) * y))) + (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[(z * N[(N[(t * -9.0), $MachinePrecision] * y), $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 + z \cdot \left(\left(t \cdot -9\right) \cdot y\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Derivation
  1. Initial program 95.1%

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

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

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
    3. associate-*l*94.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. Step-by-step derivation
    1. sub-neg94.6%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 46.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}\;b \leq -1.05 \cdot 10^{-49} \lor \neg \left(b \leq 2700000000\right):\\ \;\;\;\;a \cdot \left(27 \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 (<= b -1.05e-49) (not (<= b 2700000000.0)))
   (* a (* 27.0 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 ((b <= -1.05e-49) || !(b <= 2700000000.0)) {
		tmp = a * (27.0 * 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 ((b <= (-1.05d-49)) .or. (.not. (b <= 2700000000.0d0))) then
        tmp = a * (27.0d0 * 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 ((b <= -1.05e-49) || !(b <= 2700000000.0)) {
		tmp = a * (27.0 * 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 (b <= -1.05e-49) or not (b <= 2700000000.0):
		tmp = a * (27.0 * 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 ((b <= -1.05e-49) || !(b <= 2700000000.0))
		tmp = Float64(a * Float64(27.0 * 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 ((b <= -1.05e-49) || ~((b <= 2700000000.0)))
		tmp = a * (27.0 * 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[b, -1.05e-49], N[Not[LessEqual[b, 2700000000.0]], $MachinePrecision]], N[(a * N[(27.0 * 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}\;b \leq -1.05 \cdot 10^{-49} \lor \neg \left(b \leq 2700000000\right):\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.0499999999999999e-49 or 2.7e9 < b

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

    if -1.0499999999999999e-49 < b < 2.7e9

    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*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 inf 46.1%

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

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

Alternative 18: 46.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}\;b \leq -1.15 \cdot 10^{-49} \lor \neg \left(b \leq 1500000000000\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 (<= b -1.15e-49) (not (<= b 1500000000000.0)))
   (* 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 ((b <= -1.15e-49) || !(b <= 1500000000000.0)) {
		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 ((b <= (-1.15d-49)) .or. (.not. (b <= 1500000000000.0d0))) 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 ((b <= -1.15e-49) || !(b <= 1500000000000.0)) {
		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 (b <= -1.15e-49) or not (b <= 1500000000000.0):
		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 ((b <= -1.15e-49) || !(b <= 1500000000000.0))
		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 ((b <= -1.15e-49) || ~((b <= 1500000000000.0)))
		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[b, -1.15e-49], N[Not[LessEqual[b, 1500000000000.0]], $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}\;b \leq -1.15 \cdot 10^{-49} \lor \neg \left(b \leq 1500000000000\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 b < -1.15e-49 or 1.5e12 < b

    1. Initial program 94.8%

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

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

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

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

    if -1.15e-49 < b < 1.5e12

    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*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 inf 46.1%

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

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

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

\mathbf{elif}\;b \leq 7 \cdot 10^{+15}:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.99999999999999993e-50

    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*95.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*95.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. Simplified95.2%

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

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

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

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

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

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

    if -6.99999999999999993e-50 < b < 7e15

    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*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 inf 46.1%

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

    if 7e15 < b

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

Alternative 20: 30.2% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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