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

Percentage Accurate: 95.5% → 98.9%
Time: 13.7s
Alternatives: 15
Speedup: 0.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

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

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


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

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

    if 200 < t

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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.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*99.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-199.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*99.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. Simplified99.9%

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

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

Alternative 2: 95.7% 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])\\ \\ \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\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
 (fma a (* 27.0 b) (fma x 2.0 (* y (* z (* t -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) {
	return fma(a, (27.0 * b), fma(x, 2.0, (y * (z * (t * -9.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 fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(z * Float64(t * -9.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[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(z * N[(t * -9.0), $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])\\
\\
\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 95.4%

    \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
  2. Step-by-step derivation
    1. +-commutative95.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-95.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. *-commutative95.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-inv95.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*96.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-in96.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. *-commutative96.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-inv96.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-96.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*96.9%

      \[\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-define97.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. fmm-def97.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) \]
    13. associate-*l*96.2%

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

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

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

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

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

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

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

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

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

Alternative 3: 45.9% accurate, 0.4× 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 := 27 \cdot \left(a \cdot b\right)\\ t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{if}\;y \leq -6.3 \cdot 10^{+125}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -2.45 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+63}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-111}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-162}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;y \leq 9.4 \cdot 10^{-257}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* 27.0 (* a b))) (t_2 (* -9.0 (* t (* y z)))))
   (if (<= y -6.3e+125)
     t_2
     (if (<= y -2.45e+70)
       t_1
       (if (<= y -2.8e+63)
         t_2
         (if (<= y -3.9e-111)
           (* x 2.0)
           (if (<= y -1.35e-162)
             (* a (* 27.0 b))
             (if (<= y 9.4e-257) (* x 2.0) (if (<= y 3.5e-108) t_1 t_2)))))))))
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 = 27.0 * (a * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (y <= -6.3e+125) {
		tmp = t_2;
	} else if (y <= -2.45e+70) {
		tmp = t_1;
	} else if (y <= -2.8e+63) {
		tmp = t_2;
	} else if (y <= -3.9e-111) {
		tmp = x * 2.0;
	} else if (y <= -1.35e-162) {
		tmp = a * (27.0 * b);
	} else if (y <= 9.4e-257) {
		tmp = x * 2.0;
	} else if (y <= 3.5e-108) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 27.0d0 * (a * b)
    t_2 = (-9.0d0) * (t * (y * z))
    if (y <= (-6.3d+125)) then
        tmp = t_2
    else if (y <= (-2.45d+70)) then
        tmp = t_1
    else if (y <= (-2.8d+63)) then
        tmp = t_2
    else if (y <= (-3.9d-111)) then
        tmp = x * 2.0d0
    else if (y <= (-1.35d-162)) then
        tmp = a * (27.0d0 * b)
    else if (y <= 9.4d-257) then
        tmp = x * 2.0d0
    else if (y <= 3.5d-108) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 27.0 * (a * b);
	double t_2 = -9.0 * (t * (y * z));
	double tmp;
	if (y <= -6.3e+125) {
		tmp = t_2;
	} else if (y <= -2.45e+70) {
		tmp = t_1;
	} else if (y <= -2.8e+63) {
		tmp = t_2;
	} else if (y <= -3.9e-111) {
		tmp = x * 2.0;
	} else if (y <= -1.35e-162) {
		tmp = a * (27.0 * b);
	} else if (y <= 9.4e-257) {
		tmp = x * 2.0;
	} else if (y <= 3.5e-108) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 = 27.0 * (a * b)
	t_2 = -9.0 * (t * (y * z))
	tmp = 0
	if y <= -6.3e+125:
		tmp = t_2
	elif y <= -2.45e+70:
		tmp = t_1
	elif y <= -2.8e+63:
		tmp = t_2
	elif y <= -3.9e-111:
		tmp = x * 2.0
	elif y <= -1.35e-162:
		tmp = a * (27.0 * b)
	elif y <= 9.4e-257:
		tmp = x * 2.0
	elif y <= 3.5e-108:
		tmp = t_1
	else:
		tmp = t_2
	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(27.0 * Float64(a * b))
	t_2 = Float64(-9.0 * Float64(t * Float64(y * z)))
	tmp = 0.0
	if (y <= -6.3e+125)
		tmp = t_2;
	elseif (y <= -2.45e+70)
		tmp = t_1;
	elseif (y <= -2.8e+63)
		tmp = t_2;
	elseif (y <= -3.9e-111)
		tmp = Float64(x * 2.0);
	elseif (y <= -1.35e-162)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (y <= 9.4e-257)
		tmp = Float64(x * 2.0);
	elseif (y <= 3.5e-108)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = 27.0 * (a * b);
	t_2 = -9.0 * (t * (y * z));
	tmp = 0.0;
	if (y <= -6.3e+125)
		tmp = t_2;
	elseif (y <= -2.45e+70)
		tmp = t_1;
	elseif (y <= -2.8e+63)
		tmp = t_2;
	elseif (y <= -3.9e-111)
		tmp = x * 2.0;
	elseif (y <= -1.35e-162)
		tmp = a * (27.0 * b);
	elseif (y <= 9.4e-257)
		tmp = x * 2.0;
	elseif (y <= 3.5e-108)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.3e+125], t$95$2, If[LessEqual[y, -2.45e+70], t$95$1, If[LessEqual[y, -2.8e+63], t$95$2, If[LessEqual[y, -3.9e-111], N[(x * 2.0), $MachinePrecision], If[LessEqual[y, -1.35e-162], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.4e-257], N[(x * 2.0), $MachinePrecision], If[LessEqual[y, 3.5e-108], t$95$1, t$95$2]]]]]]]]]
\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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;y \leq -6.3 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -2.45 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.8 \cdot 10^{+63}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-111}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;y \leq -1.35 \cdot 10^{-162}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;y \leq 9.4 \cdot 10^{-257}:\\
\;\;\;\;x \cdot 2\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.3000000000000002e125 or -2.45000000000000014e70 < y < -2.79999999999999987e63 or 3.4999999999999999e-108 < y

    1. Initial program 93.1%

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

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

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

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

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

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

    if -6.3000000000000002e125 < y < -2.45000000000000014e70 or 9.3999999999999996e-257 < y < 3.4999999999999999e-108

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

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

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

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

    if -2.79999999999999987e63 < y < -3.9000000000000003e-111 or -1.34999999999999992e-162 < y < 9.3999999999999996e-257

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

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

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

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

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

    if -3.9000000000000003e-111 < y < -1.34999999999999992e-162

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.3 \cdot 10^{+125}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;y \leq -2.45 \cdot 10^{+70}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+63}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-111}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-162}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;y \leq 9.4 \cdot 10^{-257}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-108}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 70.7% accurate, 0.6× 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 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\ t_2 := y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{if}\;y \leq -1.06 \cdot 10^{+218}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -6.3 \cdot 10^{+125}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \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
 (let* ((t_1 (+ (* 27.0 (* a b)) (* x 2.0))) (t_2 (* y (* -9.0 (* z t)))))
   (if (<= y -1.06e+218)
     t_2
     (if (<= y -1.2e+172)
       t_1
       (if (<= y -6.3e+125)
         t_2
         (if (<= y 4.5e-108) t_1 (* -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 t_1 = (27.0 * (a * b)) + (x * 2.0);
	double t_2 = y * (-9.0 * (z * t));
	double tmp;
	if (y <= -1.06e+218) {
		tmp = t_2;
	} else if (y <= -1.2e+172) {
		tmp = t_1;
	} else if (y <= -6.3e+125) {
		tmp = t_2;
	} else if (y <= 4.5e-108) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (27.0d0 * (a * b)) + (x * 2.0d0)
    t_2 = y * ((-9.0d0) * (z * t))
    if (y <= (-1.06d+218)) then
        tmp = t_2
    else if (y <= (-1.2d+172)) then
        tmp = t_1
    else if (y <= (-6.3d+125)) then
        tmp = t_2
    else if (y <= 4.5d-108) then
        tmp = t_1
    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 t_1 = (27.0 * (a * b)) + (x * 2.0);
	double t_2 = y * (-9.0 * (z * t));
	double tmp;
	if (y <= -1.06e+218) {
		tmp = t_2;
	} else if (y <= -1.2e+172) {
		tmp = t_1;
	} else if (y <= -6.3e+125) {
		tmp = t_2;
	} else if (y <= 4.5e-108) {
		tmp = t_1;
	} 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):
	t_1 = (27.0 * (a * b)) + (x * 2.0)
	t_2 = y * (-9.0 * (z * t))
	tmp = 0
	if y <= -1.06e+218:
		tmp = t_2
	elif y <= -1.2e+172:
		tmp = t_1
	elif y <= -6.3e+125:
		tmp = t_2
	elif y <= 4.5e-108:
		tmp = t_1
	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)
	t_1 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0))
	t_2 = Float64(y * Float64(-9.0 * Float64(z * t)))
	tmp = 0.0
	if (y <= -1.06e+218)
		tmp = t_2;
	elseif (y <= -1.2e+172)
		tmp = t_1;
	elseif (y <= -6.3e+125)
		tmp = t_2;
	elseif (y <= 4.5e-108)
		tmp = t_1;
	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)
	t_1 = (27.0 * (a * b)) + (x * 2.0);
	t_2 = y * (-9.0 * (z * t));
	tmp = 0.0;
	if (y <= -1.06e+218)
		tmp = t_2;
	elseif (y <= -1.2e+172)
		tmp = t_1;
	elseif (y <= -6.3e+125)
		tmp = t_2;
	elseif (y <= 4.5e-108)
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e+218], t$95$2, If[LessEqual[y, -1.2e+172], t$95$1, If[LessEqual[y, -6.3e+125], t$95$2, If[LessEqual[y, 4.5e-108], t$95$1, 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}
t_1 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
t_2 := y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+218}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -6.3 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.06e218 or -1.2e172 < y < -6.3000000000000002e125

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

    if -1.06e218 < y < -1.2e172 or -6.3000000000000002e125 < y < 4.4999999999999997e-108

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

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

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

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

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

    if 4.4999999999999997e-108 < y

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

Alternative 5: 50.4% accurate, 0.6× 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.72 \cdot 10^{-46}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-125}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-226}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-166}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \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 (<= z -1.72e-46)
   (* -9.0 (* z (* y t)))
   (if (<= z -3.8e-125)
     (* 27.0 (* a b))
     (if (<= z -6.2e-226)
       (* x 2.0)
       (if (<= z 4.4e-166) (* a (* 27.0 b)) (* -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 (z <= -1.72e-46) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -3.8e-125) {
		tmp = 27.0 * (a * b);
	} else if (z <= -6.2e-226) {
		tmp = x * 2.0;
	} else if (z <= 4.4e-166) {
		tmp = a * (27.0 * b);
	} 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 (z <= (-1.72d-46)) then
        tmp = (-9.0d0) * (z * (y * t))
    else if (z <= (-3.8d-125)) then
        tmp = 27.0d0 * (a * b)
    else if (z <= (-6.2d-226)) then
        tmp = x * 2.0d0
    else if (z <= 4.4d-166) then
        tmp = a * (27.0d0 * b)
    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 (z <= -1.72e-46) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -3.8e-125) {
		tmp = 27.0 * (a * b);
	} else if (z <= -6.2e-226) {
		tmp = x * 2.0;
	} else if (z <= 4.4e-166) {
		tmp = a * (27.0 * b);
	} 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 z <= -1.72e-46:
		tmp = -9.0 * (z * (y * t))
	elif z <= -3.8e-125:
		tmp = 27.0 * (a * b)
	elif z <= -6.2e-226:
		tmp = x * 2.0
	elif z <= 4.4e-166:
		tmp = a * (27.0 * b)
	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 (z <= -1.72e-46)
		tmp = Float64(-9.0 * Float64(z * Float64(y * t)));
	elseif (z <= -3.8e-125)
		tmp = Float64(27.0 * Float64(a * b));
	elseif (z <= -6.2e-226)
		tmp = Float64(x * 2.0);
	elseif (z <= 4.4e-166)
		tmp = Float64(a * Float64(27.0 * b));
	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 (z <= -1.72e-46)
		tmp = -9.0 * (z * (y * t));
	elseif (z <= -3.8e-125)
		tmp = 27.0 * (a * b);
	elseif (z <= -6.2e-226)
		tmp = x * 2.0;
	elseif (z <= 4.4e-166)
		tmp = a * (27.0 * b);
	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[z, -1.72e-46], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.8e-125], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-226], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.4e-166], N[(a * N[(27.0 * b), $MachinePrecision]), $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}\;z \leq -1.72 \cdot 10^{-46}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

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

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

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

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


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

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7199999999999999e-46 < z < -3.8000000000000001e-125

    1. Initial program 90.6%

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

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

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

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

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

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

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

    if -3.8000000000000001e-125 < z < -6.19999999999999978e-226

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -6.19999999999999978e-226 < z < 4.4000000000000002e-166

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.4000000000000002e-166 < z

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

Alternative 6: 48.6% accurate, 0.6× 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 -5.5 \cdot 10^{-46}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-124}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-226}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-166}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -5.5e-46)
   (* -9.0 (* z (* y t)))
   (if (<= z -7.5e-124)
     (* 27.0 (* a b))
     (if (<= z -4.8e-226)
       (* x 2.0)
       (if (<= z 1.85e-166) (* a (* 27.0 b)) (* y (* -9.0 (* z 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 (z <= -5.5e-46) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -7.5e-124) {
		tmp = 27.0 * (a * b);
	} else if (z <= -4.8e-226) {
		tmp = x * 2.0;
	} else if (z <= 1.85e-166) {
		tmp = a * (27.0 * b);
	} else {
		tmp = y * (-9.0 * (z * t));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-5.5d-46)) then
        tmp = (-9.0d0) * (z * (y * t))
    else if (z <= (-7.5d-124)) then
        tmp = 27.0d0 * (a * b)
    else if (z <= (-4.8d-226)) then
        tmp = x * 2.0d0
    else if (z <= 1.85d-166) then
        tmp = a * (27.0d0 * b)
    else
        tmp = y * ((-9.0d0) * (z * 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 tmp;
	if (z <= -5.5e-46) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= -7.5e-124) {
		tmp = 27.0 * (a * b);
	} else if (z <= -4.8e-226) {
		tmp = x * 2.0;
	} else if (z <= 1.85e-166) {
		tmp = a * (27.0 * b);
	} else {
		tmp = y * (-9.0 * (z * 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):
	tmp = 0
	if z <= -5.5e-46:
		tmp = -9.0 * (z * (y * t))
	elif z <= -7.5e-124:
		tmp = 27.0 * (a * b)
	elif z <= -4.8e-226:
		tmp = x * 2.0
	elif z <= 1.85e-166:
		tmp = a * (27.0 * b)
	else:
		tmp = y * (-9.0 * (z * 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 (z <= -5.5e-46)
		tmp = Float64(-9.0 * Float64(z * Float64(y * t)));
	elseif (z <= -7.5e-124)
		tmp = Float64(27.0 * Float64(a * b));
	elseif (z <= -4.8e-226)
		tmp = Float64(x * 2.0);
	elseif (z <= 1.85e-166)
		tmp = Float64(a * Float64(27.0 * b));
	else
		tmp = Float64(y * Float64(-9.0 * Float64(z * t)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -5.5e-46)
		tmp = -9.0 * (z * (y * t));
	elseif (z <= -7.5e-124)
		tmp = 27.0 * (a * b);
	elseif (z <= -4.8e-226)
		tmp = x * 2.0;
	elseif (z <= 1.85e-166)
		tmp = a * (27.0 * b);
	else
		tmp = y * (-9.0 * (z * t));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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, -5.5e-46], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-124], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-226], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.85e-166], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(y * N[(-9.0 * N[(z * t), $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 -5.5 \cdot 10^{-46}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

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

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

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

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


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

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999983e-46 < z < -7.4999999999999996e-124

    1. Initial program 90.6%

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

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

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

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

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

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

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

    if -7.4999999999999996e-124 < z < -4.7999999999999999e-226

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -4.7999999999999999e-226 < z < 1.8500000000000001e-166

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.8500000000000001e-166 < z

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-46}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-124}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-226}:\\ \;\;\;\;x \cdot 2\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-166}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.1% 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}\;b \leq -9.5 \cdot 10^{-46} \lor \neg \left(b \leq 6 \cdot 10^{+124}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2 - 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 (<= b -9.5e-46) (not (<= b 6e+124)))
     (- (* 27.0 (* a b)) t_1)
     (- (* 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 ((b <= -9.5e-46) || !(b <= 6e+124)) {
		tmp = (27.0 * (a * b)) - t_1;
	} else {
		tmp = (x * 2.0) - 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 ((b <= (-9.5d-46)) .or. (.not. (b <= 6d+124))) then
        tmp = (27.0d0 * (a * b)) - t_1
    else
        tmp = (x * 2.0d0) - 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 ((b <= -9.5e-46) || !(b <= 6e+124)) {
		tmp = (27.0 * (a * b)) - t_1;
	} else {
		tmp = (x * 2.0) - 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 (b <= -9.5e-46) or not (b <= 6e+124):
		tmp = (27.0 * (a * b)) - t_1
	else:
		tmp = (x * 2.0) - 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 ((b <= -9.5e-46) || !(b <= 6e+124))
		tmp = Float64(Float64(27.0 * Float64(a * b)) - t_1);
	else
		tmp = Float64(Float64(x * 2.0) - 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 ((b <= -9.5e-46) || ~((b <= 6e+124)))
		tmp = (27.0 * (a * b)) - t_1;
	else
		tmp = (x * 2.0) - 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[b, -9.5e-46], N[Not[LessEqual[b, 6e+124]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(x * 2.0), $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}\;b \leq -9.5 \cdot 10^{-46} \lor \neg \left(b \leq 6 \cdot 10^{+124}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.49999999999999993e-46 or 5.9999999999999999e124 < b

    1. Initial program 94.8%

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

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

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

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

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

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

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

    if -9.49999999999999993e-46 < b < 5.9999999999999999e124

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

Alternative 8: 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 -9.5 \cdot 10^{-46} \lor \neg \left(z \leq 1.96 \cdot 10^{-165}\right):\\ \;\;\;\;x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -9.5e-46) (not (<= z 1.96e-165)))
   (+ (* x 2.0) (* z (* y (* t -9.0))))
   (+ (* 27.0 (* a b)) (* 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) {
	double tmp;
	if ((z <= -9.5e-46) || !(z <= 1.96e-165)) {
		tmp = (x * 2.0) + (z * (y * (t * -9.0)));
	} else {
		tmp = (27.0 * (a * b)) + (x * 2.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 <= (-9.5d-46)) .or. (.not. (z <= 1.96d-165))) then
        tmp = (x * 2.0d0) + (z * (y * (t * (-9.0d0))))
    else
        tmp = (27.0d0 * (a * b)) + (x * 2.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 <= -9.5e-46) || !(z <= 1.96e-165)) {
		tmp = (x * 2.0) + (z * (y * (t * -9.0)));
	} else {
		tmp = (27.0 * (a * b)) + (x * 2.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 <= -9.5e-46) or not (z <= 1.96e-165):
		tmp = (x * 2.0) + (z * (y * (t * -9.0)))
	else:
		tmp = (27.0 * (a * b)) + (x * 2.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 <= -9.5e-46) || !(z <= 1.96e-165))
		tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0))));
	else
		tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.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 <= -9.5e-46) || ~((z <= 1.96e-165)))
		tmp = (x * 2.0) + (z * (y * (t * -9.0)));
	else
		tmp = (27.0 * (a * b)) + (x * 2.0);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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, -9.5e-46], N[Not[LessEqual[z, 1.96e-165]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-46} \lor \neg \left(z \leq 1.96 \cdot 10^{-165}\right):\\
\;\;\;\;x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.49999999999999993e-46 or 1.96e-165 < z

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.49999999999999993e-46 < z < 1.96e-165

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

\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 < -1.15000000000000004e-113

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000004e-113 < t < 3.10000000000000009

    1. Initial program 92.9%

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

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

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

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

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

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

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

    if 3.10000000000000009 < t

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

Alternative 10: 93.4% 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 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\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) (* 9.0 (* z (* y 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) - (9.0 * (z * (y * 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) - (9.0d0 * (z * (y * 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) - (9.0 * (z * (y * 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) - (9.0 * (z * (y * 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(9.0 * Float64(z * Float64(y * 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) - (9.0 * (z * (y * 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[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Derivation
  1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 95.3% 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])\\ \\ a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\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
 (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* z 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) {
	return (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
}
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 = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (z * t)))
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 (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
}
[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 (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)))
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(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))))
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 = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * 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])\\
\\
a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)
\end{array}
Derivation
  1. Initial program 95.4%

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.5000000000000002e116 or 5.2e-23 < a

    1. Initial program 95.6%

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

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

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

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

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

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

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

    if -8.5000000000000002e116 < a < 5.2e-23

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

Alternative 13: 47.3% 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}\;a \leq -8.5 \cdot 10^{+116}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-20}:\\ \;\;\;\;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 (<= a -8.5e+116)
   (* a (* 27.0 b))
   (if (<= a 2.3e-20) (* 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 (a <= -8.5e+116) {
		tmp = a * (27.0 * b);
	} else if (a <= 2.3e-20) {
		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 (a <= (-8.5d+116)) then
        tmp = a * (27.0d0 * b)
    else if (a <= 2.3d-20) 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 (a <= -8.5e+116) {
		tmp = a * (27.0 * b);
	} else if (a <= 2.3e-20) {
		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 a <= -8.5e+116:
		tmp = a * (27.0 * b)
	elif a <= 2.3e-20:
		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 (a <= -8.5e+116)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (a <= 2.3e-20)
		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 (a <= -8.5e+116)
		tmp = a * (27.0 * b);
	elseif (a <= 2.3e-20)
		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[LessEqual[a, -8.5e+116], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e-20], 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}\;a \leq -8.5 \cdot 10^{+116}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-20}:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.5000000000000002e116

    1. Initial program 97.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-neg97.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-neg97.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.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*92.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. Simplified92.5%

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

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

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

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

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

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

    if -8.5000000000000002e116 < a < 2.2999999999999999e-20

    1. Initial program 95.2%

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

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

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

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

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

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

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

    if 2.2999999999999999e-20 < a

    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*97.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*97.3%

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

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

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

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

Alternative 14: 47.3% 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}\;a \leq -8.5 \cdot 10^{+116}:\\ \;\;\;\;a \cdot \left(27 \cdot b\right)\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-21}:\\ \;\;\;\;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 (<= a -8.5e+116)
   (* a (* 27.0 b))
   (if (<= a 5.6e-21) (* 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 (a <= -8.5e+116) {
		tmp = a * (27.0 * b);
	} else if (a <= 5.6e-21) {
		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 (a <= (-8.5d+116)) then
        tmp = a * (27.0d0 * b)
    else if (a <= 5.6d-21) 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 (a <= -8.5e+116) {
		tmp = a * (27.0 * b);
	} else if (a <= 5.6e-21) {
		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 a <= -8.5e+116:
		tmp = a * (27.0 * b)
	elif a <= 5.6e-21:
		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 (a <= -8.5e+116)
		tmp = Float64(a * Float64(27.0 * b));
	elseif (a <= 5.6e-21)
		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 (a <= -8.5e+116)
		tmp = a * (27.0 * b);
	elseif (a <= 5.6e-21)
		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[LessEqual[a, -8.5e+116], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e-21], 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}\;a \leq -8.5 \cdot 10^{+116}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-21}:\\
\;\;\;\;x \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.5000000000000002e116

    1. Initial program 97.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-neg97.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-neg97.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.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*92.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. Simplified92.5%

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

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

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

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

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

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

    if -8.5000000000000002e116 < a < 5.60000000000000008e-21

    1. Initial program 95.2%

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

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

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

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

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

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

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

    if 5.60000000000000008e-21 < a

    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*97.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*97.3%

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

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

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

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

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

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

Alternative 15: 31.4% 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 95.4%

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

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

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

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

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

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

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

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

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

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

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