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

Percentage Accurate: 95.4% → 98.1%
Time: 13.7s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 95.4% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 0.1× speedup?

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

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


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

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e274 < (*.f64 (*.f64 y #s(literal 9 binary64)) z)

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.5% accurate, 0.7× speedup?

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

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


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

    1. Initial program 95.0%

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

    if 9.9999999999999996e274 < (*.f64 (*.f64 y #s(literal 9 binary64)) z)

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.7% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.6e9 or 17 < x

    1. Initial program 94.5%

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

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

    if -3.6e9 < x < 17

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

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

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

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

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

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

Alternative 4: 79.6% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -215 or 29 < x

    1. Initial program 94.5%

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

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

    if -215 < x < 29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 48.6% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e-166 < t < 1.10000000000000001e-68

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 50.7%

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

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

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

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

    if 1.10000000000000001e-68 < t < 1.36e45

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 34.4%

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

    if 1.36e45 < t

    1. Initial program 98.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. +-commutative98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 48.6% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-167 < t < 3.4000000000000001e-67

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 50.7%

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

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

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

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

    if 3.4000000000000001e-67 < t < 2.60000000000000003e47

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 34.4%

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

    if 2.60000000000000003e47 < t

    1. Initial program 98.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. +-commutative98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 48.6% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e-166 < t < 7.5999999999999995e-69

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 50.7%

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

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

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

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

    if 7.5999999999999995e-69 < t < 3.00000000000000011e45

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 34.4%

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

    if 3.00000000000000011e45 < t

    1. Initial program 98.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. +-commutative98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 48.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999999e-172 < t < 2.8000000000000001e-68

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 50.7%

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

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

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

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

    if 2.8000000000000001e-68 < t < 1.5500000000000001e39

    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. +-commutative96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 31.9%

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

    if 1.5500000000000001e39 < t

    1. Initial program 98.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. +-commutative98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 48.3% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.1999999999999999e-166 or 3.39999999999999984e51 < t

    1. Initial program 96.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. +-commutative96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e-166 < t < 1.46000000000000002e-67

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 50.7%

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

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

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

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

    if 1.46000000000000002e-67 < t < 3.39999999999999984e51

    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. +-commutative96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 33.3%

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

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

Alternative 10: 96.9% accurate, 0.8× speedup?

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

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


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

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999996e95 < z

    1. Initial program 97.1%

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

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

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

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

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

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

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

Alternative 11: 78.9% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2599999999999999e-125 or 1.7999999999999999e-85 < z

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.2599999999999999e-125 < z < 1.7999999999999999e-85

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 77.8% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.79999999999999982e-166 < t < 6.5000000000000001e73

    1. Initial program 92.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. +-commutative92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5000000000000001e73 < t

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 13: 77.9% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{-166}:\\ \;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+73}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.2e-166)
   (+ (* x 2.0) (* -9.0 (* z (* y t))))
   (if (<= t 6e+73)
     (+ (* x 2.0) (* 27.0 (* a b)))
     (- (* x 2.0) (* 9.0 (* t (* y z)))))))
assert(x < y && y < z && z < t && t < a && a < b);
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.2e-166) {
		tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
	} else if (t <= 6e+73) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = (x * 2.0) - (9.0 * (t * (y * z)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.2d-166)) then
        tmp = (x * 2.0d0) + ((-9.0d0) * (z * (y * t)))
    else if (t <= 6d+73) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else
        tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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.2e-166) {
		tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
	} else if (t <= 6e+73) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = (x * 2.0) - (9.0 * (t * (y * z)));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[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.2e-166:
		tmp = (x * 2.0) + (-9.0 * (z * (y * t)))
	elif t <= 6e+73:
		tmp = (x * 2.0) + (27.0 * (a * b))
	else:
		tmp = (x * 2.0) - (9.0 * (t * (y * z)))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
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.2e-166)
		tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(y * t))));
	elseif (t <= 6e+73)
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	else
		tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z))));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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.2e-166)
		tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
	elseif (t <= 6e+73)
		tmp = (x * 2.0) + (27.0 * (a * b));
	else
		tmp = (x * 2.0) - (9.0 * (t * (y * z)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.2e-166], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+73], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

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

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


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

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e-166 < t < 6.00000000000000021e73

    1. Initial program 92.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. +-commutative92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.00000000000000021e73 < t

    1. Initial program 99.8%

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

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

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

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

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

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

Alternative 14: 74.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-54}:\\ \;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-34}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -6.5e-54)
   (* y (* z (* t -9.0)))
   (if (<= z 8e-34) (+ (* x 2.0) (* 27.0 (* a b))) (* t (* z (* y -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -6.5e-54) {
		tmp = y * (z * (t * -9.0));
	} else if (z <= 8e-34) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-6.5d-54)) then
        tmp = y * (z * (t * (-9.0d0)))
    else if (z <= 8d-34) then
        tmp = (x * 2.0d0) + (27.0d0 * (a * b))
    else
        tmp = t * (z * (y * (-9.0d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -6.5e-54) {
		tmp = y * (z * (t * -9.0));
	} else if (z <= 8e-34) {
		tmp = (x * 2.0) + (27.0 * (a * b));
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[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 <= -6.5e-54:
		tmp = y * (z * (t * -9.0))
	elif z <= 8e-34:
		tmp = (x * 2.0) + (27.0 * (a * b))
	else:
		tmp = t * (z * (y * -9.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
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 <= -6.5e-54)
		tmp = Float64(y * Float64(z * Float64(t * -9.0)));
	elseif (z <= 8e-34)
		tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b)));
	else
		tmp = Float64(t * Float64(z * Float64(y * -9.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -6.5e-54)
		tmp = y * (z * (t * -9.0));
	elseif (z <= 8e-34)
		tmp = (x * 2.0) + (27.0 * (a * b));
	else
		tmp = t * (z * (y * -9.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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, -6.5e-54], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-34], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-54}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\

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

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


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

    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*90.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*90.1%

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999991e-54 < z < 7.99999999999999942e-34

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.99999999999999942e-34 < z

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-54}:\\ \;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-34}:\\ \;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 95.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b))
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b)))
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Derivation
  1. Initial program 94.6%

    \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
  2. Step-by-step derivation
    1. sub-neg94.6%

      \[\leadsto \color{blue}{\left(x \cdot 2 + \left(-\left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right)} + \left(a \cdot 27\right) \cdot b \]
    2. sub-neg94.6%

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
    3. associate-*l*95.0%

      \[\leadsto \left(x \cdot 2 - \color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) + \left(a \cdot 27\right) \cdot b \]
    4. associate-*l*95.4%

      \[\leadsto \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + \color{blue}{a \cdot \left(27 \cdot b\right)} \]
  3. Simplified95.4%

    \[\leadsto \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 16: 47.5% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -5200000 \lor \neg \left(x \leq 29\right):\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= x -5200000.0) (not (<= x 29.0))) (* x 2.0) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((x <= -5200000.0) || !(x <= 29.0)) {
		tmp = x * 2.0;
	} else {
		tmp = a * (27.0 * b);
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((x <= (-5200000.0d0)) .or. (.not. (x <= 29.0d0))) then
        tmp = x * 2.0d0
    else
        tmp = a * (27.0d0 * b)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((x <= -5200000.0) || !(x <= 29.0)) {
		tmp = x * 2.0;
	} else {
		tmp = a * (27.0 * b);
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if (x <= -5200000.0) or not (x <= 29.0):
		tmp = x * 2.0
	else:
		tmp = a * (27.0 * b)
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((x <= -5200000.0) || !(x <= 29.0))
		tmp = Float64(x * 2.0);
	else
		tmp = Float64(a * Float64(27.0 * b));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((x <= -5200000.0) || ~((x <= 29.0)))
		tmp = x * 2.0;
	else
		tmp = a * (27.0 * b);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -5200000.0], N[Not[LessEqual[x, 29.0]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5200000 \lor \neg \left(x \leq 29\right):\\
\;\;\;\;x \cdot 2\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.2e6 or 29 < x

    1. Initial program 94.5%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative94.5%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-94.5%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative94.5%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv94.5%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv93.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-93.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*93.7%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define96.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-196.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified96.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 71.1%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 53.1%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if -5.2e6 < x < 29

    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. +-commutative94.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-94.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative94.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv94.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv94.0%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-94.0%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*94.7%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define94.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-195.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 51.9%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 44.8%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    7. Step-by-step derivation
      1. *-commutative44.8%

        \[\leadsto 27 \cdot \color{blue}{\left(b \cdot a\right)} \]
      2. associate-*r*44.8%

        \[\leadsto \color{blue}{\left(27 \cdot b\right) \cdot a} \]
    8. Simplified44.8%

      \[\leadsto \color{blue}{\left(27 \cdot b\right) \cdot a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5200000 \lor \neg \left(x \leq 29\right):\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 47.5% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -205000000000 \lor \neg \left(x \leq 29\right):\\ \;\;\;\;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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= x -205000000000.0) (not (<= x 29.0))) (* x 2.0) (* b (* a 27.0))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((x <= -205000000000.0) || !(x <= 29.0)) {
		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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((x <= (-205000000000.0d0)) .or. (.not. (x <= 29.0d0))) 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;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((x <= -205000000000.0) || !(x <= 29.0)) {
		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])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if (x <= -205000000000.0) or not (x <= 29.0):
		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])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((x <= -205000000000.0) || !(x <= 29.0))
		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])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((x <= -205000000000.0) || ~((x <= 29.0)))
		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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -205000000000.0], N[Not[LessEqual[x, 29.0]], $MachinePrecision]], 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -205000000000 \lor \neg \left(x \leq 29\right):\\
\;\;\;\;x \cdot 2\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.05e11 or 29 < x

    1. Initial program 94.5%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative94.5%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-94.5%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative94.5%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv94.5%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv93.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-93.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*93.7%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define96.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-196.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified96.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 71.1%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 53.1%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if -2.05e11 < x < 29

    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. +-commutative94.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-94.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative94.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv94.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv94.0%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-94.0%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*94.7%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define94.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-195.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 51.9%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in b around inf 51.9%

      \[\leadsto \color{blue}{b \cdot \left(2 \cdot \frac{x}{b} + 27 \cdot a\right)} \]
    7. Taylor expanded in b around inf 44.8%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    8. Step-by-step derivation
      1. associate-*r*44.8%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
    9. Simplified44.8%

      \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -205000000000 \lor \neg \left(x \leq 29\right):\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 47.6% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -58000000000 \lor \neg \left(x \leq 38\right):\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= x -58000000000.0) (not (<= x 38.0))) (* x 2.0) (* 27.0 (* a b))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((x <= -58000000000.0) || !(x <= 38.0)) {
		tmp = x * 2.0;
	} else {
		tmp = 27.0 * (a * b);
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((x <= (-58000000000.0d0)) .or. (.not. (x <= 38.0d0))) then
        tmp = x * 2.0d0
    else
        tmp = 27.0d0 * (a * b)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((x <= -58000000000.0) || !(x <= 38.0)) {
		tmp = x * 2.0;
	} else {
		tmp = 27.0 * (a * b);
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if (x <= -58000000000.0) or not (x <= 38.0):
		tmp = x * 2.0
	else:
		tmp = 27.0 * (a * b)
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((x <= -58000000000.0) || !(x <= 38.0))
		tmp = Float64(x * 2.0);
	else
		tmp = Float64(27.0 * Float64(a * b));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((x <= -58000000000.0) || ~((x <= 38.0)))
		tmp = x * 2.0;
	else
		tmp = 27.0 * (a * b);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -58000000000.0], N[Not[LessEqual[x, 38.0]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -58000000000 \lor \neg \left(x \leq 38\right):\\
\;\;\;\;x \cdot 2\\

\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.8e10 or 38 < x

    1. Initial program 94.5%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative94.5%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-94.5%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative94.5%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv94.5%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative93.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv93.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-93.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*93.7%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define96.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative96.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-196.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*96.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified96.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 71.1%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around inf 53.1%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if -5.8e10 < x < 38

    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. +-commutative94.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-94.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative94.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv94.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative94.0%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv94.0%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-94.0%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*94.7%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define94.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-195.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*95.5%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 44.8%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -58000000000 \lor \neg \left(x \leq 38\right):\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 30.7% accurate, 5.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\ [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ x \cdot 2 \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b])
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	return Float64(x * 2.0)
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
	tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Derivation
  1. Initial program 94.6%

    \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
  2. Step-by-step derivation
    1. +-commutative94.6%

      \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
    2. associate-+r-94.6%

      \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
    3. *-commutative94.6%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
    4. cancel-sign-sub-inv94.6%

      \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
    5. associate-*r*93.8%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
    6. distribute-lft-neg-in93.8%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
    7. *-commutative93.8%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
    8. cancel-sign-sub-inv93.8%

      \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
    9. associate-+r-93.8%

      \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
    10. associate-*l*94.2%

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
    11. fma-define95.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
    12. cancel-sign-sub-inv95.4%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
    13. fma-define95.4%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
    14. distribute-lft-neg-in95.4%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
    15. distribute-rgt-neg-in95.4%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
    16. *-commutative95.4%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
    17. associate-*r*96.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
    18. associate-*l*96.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
    19. neg-mul-196.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
    20. associate-*r*96.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
  3. Simplified96.2%

    \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in t around 0 61.3%

    \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
  6. Taylor expanded in x around inf 30.7%

    \[\leadsto \color{blue}{2 \cdot x} \]
  7. Final simplification30.7%

    \[\leadsto x \cdot 2 \]
  8. Add Preprocessing

Developer Target 1: 95.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\ \;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (< y 7.590524218811189e-161)
   (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b)))
   (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y < 7.590524218811189e-161) {
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
	} else {
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y < 7.590524218811189d-161) then
        tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
    else
        tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y < 7.590524218811189e-161) {
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
	} else {
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y < 7.590524218811189e-161:
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b))
	else:
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y < 7.590524218811189e-161)
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b)));
	else
		tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y < 7.590524218811189e-161)
		tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
	else
		tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024146 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))

  (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))