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

Percentage Accurate: 95.5% → 98.4%
Time: 14.5s
Alternatives: 22
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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.4% accurate, 0.1× speedup?

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

\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 (*.f64 y #s(literal 9 binary64)) < -1.99999999999999985e210

    1. Initial program 72.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. Simplified99.8%

      \[\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)} \]
    3. Add Preprocessing

    if -1.99999999999999985e210 < (*.f64 y #s(literal 9 binary64))

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot 9 \leq -2 \cdot 10^{+210}:\\ \;\;\;\;\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)\\ \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: 98.4% accurate, 0.1× speedup?

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

    1. Initial program 91.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. +-commutative91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000017e93 < t

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4 \cdot 10^{+93}:\\ \;\;\;\;\left(x \cdot 2 + b \cdot \left(a \cdot 27\right)\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\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 3: 96.0% accurate, 0.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot 27\right)\\ \mathbf{if}\;\left(x \cdot 2 - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + t\_1 \leq \infty:\\ \;\;\;\;\left(x \cdot 2 + t\_1\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(-9, \frac{z \cdot \left(y \cdot t\right)}{a}, 27 \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* a 27.0))))
   (if (<= (+ (- (* x 2.0) (* t (* (* y 9.0) z))) t_1) INFINITY)
     (- (+ (* x 2.0) t_1) (* y (* 9.0 (* z t))))
     (* a (fma -9.0 (/ (* z (* y t)) a) (* 27.0 b))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (a * 27.0);
	double tmp;
	if ((((x * 2.0) - (t * ((y * 9.0) * z))) + t_1) <= ((double) INFINITY)) {
		tmp = ((x * 2.0) + t_1) - (y * (9.0 * (z * t)));
	} else {
		tmp = a * fma(-9.0, ((z * (y * t)) / a), (27.0 * b));
	}
	return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(a * 27.0))
	tmp = 0.0
	if (Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(Float64(y * 9.0) * z))) + t_1) <= Inf)
		tmp = Float64(Float64(Float64(x * 2.0) + t_1) - Float64(y * Float64(9.0 * Float64(z * t))));
	else
		tmp = Float64(a * fma(-9.0, Float64(Float64(z * Float64(y * t)) / a), Float64(27.0 * b)));
	end
	return tmp
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], Infinity], N[(N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(-9.0 * N[(N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] + N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;\left(x \cdot 2 - t \cdot \left(\left(y \cdot 9\right) \cdot z\right)\right) + t\_1 \leq \infty:\\
\;\;\;\;\left(x \cdot 2 + t\_1\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b)) < +inf.0

    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. +-commutative95.2%

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

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

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

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*94.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-in94.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. *-commutative94.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-inv94.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-94.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*94.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-define94.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-inv94.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-define94.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-in94.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-in94.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. *-commutative94.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*95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (+.f64 (-.f64 (*.f64 x #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)) (*.f64 (*.f64 a #s(literal 27 binary64)) b))

    1. Initial program 0.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-neg0.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-neg0.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*37.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*37.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. Simplified37.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 x around 0 0.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(-9, \frac{\color{blue}{\left(t \cdot y\right) \cdot z}}{a}, 27 \cdot b\right) \]
    10. Simplified100.0%

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

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

Alternative 4: 81.0% accurate, 0.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000013e60 < z < -8.99999999999999998e-68

    1. Initial program 91.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-neg91.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-neg91.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.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*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 x around inf 69.0%

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

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

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

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

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

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

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

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

    if -8.99999999999999998e-68 < z < 7e6

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7e6 < z

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 80.7% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.60000000000000008e60 or 1.15e7 < z

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

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000008e60 < z < -7.19999999999999998e-67

    1. Initial program 91.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-neg91.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-neg91.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.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*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 x around inf 69.0%

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

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

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

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

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

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

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

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

    if -7.19999999999999998e-67 < z < 1.15e7

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.4% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq -7.8 \cdot 10^{-67} \lor \neg \left(z \leq 2 \cdot 10^{-66}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\

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


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

    1. Initial program 84.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-neg84.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-neg84.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*84.8%

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

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

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

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

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

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

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

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

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

    if -9.9999999999999999e52 < z < -7.7999999999999997e-67 or 2e-66 < z

    1. Initial program 88.9%

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

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

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

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

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

    if -7.7999999999999997e-67 < z < 2e-66

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.4% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq -1.45 \cdot 10^{-68} \lor \neg \left(z \leq 1.65 \cdot 10^{-66}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\

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


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

    1. Initial program 85.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. +-commutative85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*88.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*88.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-188.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*88.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. Simplified88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e60 < z < -1.45e-68 or 1.6499999999999999e-66 < z

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

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

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

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

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

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

    if -1.45e-68 < z < 1.6499999999999999e-66

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 79.3% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq -2.35 \cdot 10^{-67} \lor \neg \left(z \leq 2.1 \cdot 10^{-66}\right):\\
\;\;\;\;x \cdot 2 + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\

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


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

    1. Initial program 85.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. +-commutative85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*88.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*88.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-188.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*88.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. Simplified88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e60 < z < -2.35000000000000002e-67 or 2.1e-66 < z

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.35000000000000002e-67 < z < 2.1e-66

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 97.7% accurate, 0.7× speedup?

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

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


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

    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. Add Preprocessing
    3. Taylor expanded in y around 0 95.9%

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

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

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

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

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

    if 5.00000000000000008e262 < (*.f64 (*.f64 y #s(literal 9 binary64)) z)

    1. Initial program 62.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-neg62.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-neg62.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*92.6%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 80.4% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999943e-68 < z < 2e-66

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e-66 < z

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

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

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

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

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

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

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

Alternative 11: 76.2% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.89999999999999997e-33 or 1.12e28 < z

    1. Initial program 84.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. +-commutative84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999997e-33 < z < 1.12e28

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*89.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-in89.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. *-commutative89.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-inv89.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-89.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*89.2%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define89.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-inv89.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-define89.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-in89.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-in89.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. *-commutative89.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.8%

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

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

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

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

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

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

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

Alternative 12: 46.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.80000000000000006e-14 or 2.30000000000000004e157 < b

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000006e-14 < b < 2.30000000000000004e157

    1. Initial program 93.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. +-commutative93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 46.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.0200000000000001e-16 or 2.1e157 < b

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0200000000000001e-16 < b < 2.1e157

    1. Initial program 93.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. +-commutative93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 46.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.9499999999999999e-14 or 1.41999999999999987e157 < b

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9499999999999999e-14 < b < 1.41999999999999987e157

    1. Initial program 93.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. +-commutative93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 46.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.55000000000000002e-14 or 1.80000000000000012e157 < b

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000002e-14 < b < 1.80000000000000012e157

    1. Initial program 93.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. +-commutative93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-194.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 41.4%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.55 \cdot 10^{-14} \lor \neg \left(b \leq 1.8 \cdot 10^{+157}\right):\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 50.2% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-67}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -5.8e-67)
   (* -9.0 (* z (* y t)))
   (if (<= z 2.1e-66) (* b (* a 27.0)) (* t (* z (* y -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -5.8e-67) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= 2.1e-66) {
		tmp = b * (a * 27.0);
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.8d-67)) then
        tmp = (-9.0d0) * (z * (y * t))
    else if (z <= 2.1d-66) then
        tmp = b * (a * 27.0d0)
    else
        tmp = t * (z * (y * (-9.0d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -5.8e-67) {
		tmp = -9.0 * (z * (y * t));
	} else if (z <= 2.1e-66) {
		tmp = b * (a * 27.0);
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -5.8e-67:
		tmp = -9.0 * (z * (y * t))
	elif z <= 2.1e-66:
		tmp = b * (a * 27.0)
	else:
		tmp = t * (z * (y * -9.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -5.8e-67)
		tmp = Float64(-9.0 * Float64(z * Float64(y * t)));
	elseif (z <= 2.1e-66)
		tmp = Float64(b * Float64(a * 27.0));
	else
		tmp = Float64(t * Float64(z * Float64(y * -9.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -5.8e-67)
		tmp = -9.0 * (z * (y * t));
	elseif (z <= 2.1e-66)
		tmp = b * (a * 27.0);
	else
		tmp = t * (z * (y * -9.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.8e-67], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-66], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-67}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-66}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8000000000000001e-67

    1. Initial program 87.3%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative87.3%

        \[\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-87.3%

        \[\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. *-commutative87.3%

        \[\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-inv87.3%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*95.9%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in95.9%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative95.9%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv95.9%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-95.9%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*95.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-define99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*91.1%

        \[\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*91.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-191.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*91.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified91.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 49.9%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative49.9%

        \[\leadsto \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot -9} \]
      2. associate-*r*50.0%

        \[\leadsto \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot -9\right)} \]
      3. *-commutative50.0%

        \[\leadsto t \cdot \left(\color{blue}{\left(z \cdot y\right)} \cdot -9\right) \]
      4. associate-*l*49.9%

        \[\leadsto t \cdot \color{blue}{\left(z \cdot \left(y \cdot -9\right)\right)} \]
    7. Simplified49.9%

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
    8. Taylor expanded in t around 0 49.9%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*49.9%

        \[\leadsto \color{blue}{\left(-9 \cdot t\right) \cdot \left(y \cdot z\right)} \]
      2. *-commutative49.9%

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \left(-9 \cdot t\right)} \]
      3. metadata-eval49.9%

        \[\leadsto \left(y \cdot z\right) \cdot \left(\color{blue}{\left(-9\right)} \cdot t\right) \]
      4. distribute-lft-neg-in49.9%

        \[\leadsto \left(y \cdot z\right) \cdot \color{blue}{\left(-9 \cdot t\right)} \]
      5. distribute-rgt-neg-in49.9%

        \[\leadsto \color{blue}{-\left(y \cdot z\right) \cdot \left(9 \cdot t\right)} \]
      6. associate-*r*50.0%

        \[\leadsto -\color{blue}{\left(\left(y \cdot z\right) \cdot 9\right) \cdot t} \]
      7. *-commutative50.0%

        \[\leadsto -\color{blue}{\left(9 \cdot \left(y \cdot z\right)\right)} \cdot t \]
      8. distribute-lft-neg-in50.0%

        \[\leadsto \color{blue}{\left(-9 \cdot \left(y \cdot z\right)\right) \cdot t} \]
      9. distribute-lft-neg-in50.0%

        \[\leadsto \color{blue}{\left(\left(-9\right) \cdot \left(y \cdot z\right)\right)} \cdot t \]
      10. metadata-eval50.0%

        \[\leadsto \left(\color{blue}{-9} \cdot \left(y \cdot z\right)\right) \cdot t \]
      11. associate-*r*49.9%

        \[\leadsto \color{blue}{\left(\left(-9 \cdot y\right) \cdot z\right)} \cdot t \]
      12. *-commutative49.9%

        \[\leadsto \left(\color{blue}{\left(y \cdot -9\right)} \cdot z\right) \cdot t \]
      13. *-commutative49.9%

        \[\leadsto \color{blue}{\left(z \cdot \left(y \cdot -9\right)\right)} \cdot t \]
      14. *-commutative49.9%

        \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
      15. associate-*r*51.2%

        \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \left(y \cdot -9\right)} \]
      16. *-commutative51.2%

        \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \left(y \cdot -9\right) \]
      17. metadata-eval51.2%

        \[\leadsto \left(z \cdot t\right) \cdot \left(y \cdot \color{blue}{\left(-9\right)}\right) \]
      18. distribute-rgt-neg-in51.2%

        \[\leadsto \left(z \cdot t\right) \cdot \color{blue}{\left(-y \cdot 9\right)} \]
      19. distribute-rgt-neg-in51.2%

        \[\leadsto \color{blue}{-\left(z \cdot t\right) \cdot \left(y \cdot 9\right)} \]
      20. associate-*r*51.2%

        \[\leadsto -\color{blue}{\left(\left(z \cdot t\right) \cdot y\right) \cdot 9} \]
      21. distribute-rgt-neg-in51.2%

        \[\leadsto \color{blue}{\left(\left(z \cdot t\right) \cdot y\right) \cdot \left(-9\right)} \]
      22. *-commutative51.2%

        \[\leadsto \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} \cdot \left(-9\right) \]
      23. *-commutative51.2%

        \[\leadsto \left(y \cdot \color{blue}{\left(t \cdot z\right)}\right) \cdot \left(-9\right) \]
      24. metadata-eval51.2%

        \[\leadsto \left(y \cdot \left(t \cdot z\right)\right) \cdot \color{blue}{-9} \]
    10. Simplified51.2%

      \[\leadsto \color{blue}{\left(y \cdot \left(t \cdot z\right)\right) \cdot -9} \]
    11. Taylor expanded in y around 0 49.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)} \cdot -9 \]
    12. Step-by-step derivation
      1. associate-*r*54.8%

        \[\leadsto \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} \cdot -9 \]
    13. Simplified54.8%

      \[\leadsto \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} \cdot -9 \]

    if -5.8000000000000001e-67 < z < 2.1e-66

    1. Initial program 99.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-99.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative99.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv99.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv86.6%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-86.6%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*86.6%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define86.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-199.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 81.3%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 47.3%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    7. Step-by-step derivation
      1. associate-*r*47.2%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative47.2%

        \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]
    8. Simplified47.2%

      \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]

    if 2.1e-66 < z

    1. Initial program 87.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. +-commutative87.2%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-87.2%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative87.2%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv87.2%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*97.1%

        \[\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-in97.1%

        \[\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. *-commutative97.1%

        \[\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-inv97.1%

        \[\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-97.1%

        \[\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*97.1%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*89.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*89.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-189.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*89.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. Simplified89.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 41.1%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot -9} \]
      2. associate-*r*41.1%

        \[\leadsto \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot -9\right)} \]
      3. *-commutative41.1%

        \[\leadsto t \cdot \left(\color{blue}{\left(z \cdot y\right)} \cdot -9\right) \]
      4. associate-*l*41.0%

        \[\leadsto t \cdot \color{blue}{\left(z \cdot \left(y \cdot -9\right)\right)} \]
    7. Simplified41.0%

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification47.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-67}:\\ \;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.3% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-69}:\\ \;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -3.5e-69)
   (* -9.0 (* y (* z t)))
   (if (<= z 2e-66) (* b (* a 27.0)) (* t (* z (* y -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -3.5e-69) {
		tmp = -9.0 * (y * (z * t));
	} else if (z <= 2e-66) {
		tmp = b * (a * 27.0);
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (z <= (-3.5d-69)) then
        tmp = (-9.0d0) * (y * (z * t))
    else if (z <= 2d-66) then
        tmp = b * (a * 27.0d0)
    else
        tmp = t * (z * (y * (-9.0d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -3.5e-69) {
		tmp = -9.0 * (y * (z * t));
	} else if (z <= 2e-66) {
		tmp = b * (a * 27.0);
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -3.5e-69:
		tmp = -9.0 * (y * (z * t))
	elif z <= 2e-66:
		tmp = b * (a * 27.0)
	else:
		tmp = t * (z * (y * -9.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -3.5e-69)
		tmp = Float64(-9.0 * Float64(y * Float64(z * t)));
	elseif (z <= 2e-66)
		tmp = Float64(b * Float64(a * 27.0));
	else
		tmp = Float64(t * Float64(z * Float64(y * -9.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -3.5e-69)
		tmp = -9.0 * (y * (z * t));
	elseif (z <= 2e-66)
		tmp = b * (a * 27.0);
	else
		tmp = t * (z * (y * -9.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.5e-69], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-66], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-69}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\

\mathbf{elif}\;z \leq 2 \cdot 10^{-66}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.5000000000000001e-69

    1. Initial program 87.3%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative87.3%

        \[\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-87.3%

        \[\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. *-commutative87.3%

        \[\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-inv87.3%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*95.9%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in95.9%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative95.9%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv95.9%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-95.9%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*95.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-define99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative99.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*91.1%

        \[\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*91.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-191.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*91.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified91.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 49.9%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative49.9%

        \[\leadsto \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot -9} \]
      2. associate-*r*50.0%

        \[\leadsto \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot -9\right)} \]
      3. *-commutative50.0%

        \[\leadsto t \cdot \left(\color{blue}{\left(z \cdot y\right)} \cdot -9\right) \]
      4. associate-*l*49.9%

        \[\leadsto t \cdot \color{blue}{\left(z \cdot \left(y \cdot -9\right)\right)} \]
    7. Simplified49.9%

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
    8. Taylor expanded in t around 0 49.9%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*49.9%

        \[\leadsto \color{blue}{\left(-9 \cdot t\right) \cdot \left(y \cdot z\right)} \]
      2. *-commutative49.9%

        \[\leadsto \color{blue}{\left(y \cdot z\right) \cdot \left(-9 \cdot t\right)} \]
      3. metadata-eval49.9%

        \[\leadsto \left(y \cdot z\right) \cdot \left(\color{blue}{\left(-9\right)} \cdot t\right) \]
      4. distribute-lft-neg-in49.9%

        \[\leadsto \left(y \cdot z\right) \cdot \color{blue}{\left(-9 \cdot t\right)} \]
      5. distribute-rgt-neg-in49.9%

        \[\leadsto \color{blue}{-\left(y \cdot z\right) \cdot \left(9 \cdot t\right)} \]
      6. associate-*r*50.0%

        \[\leadsto -\color{blue}{\left(\left(y \cdot z\right) \cdot 9\right) \cdot t} \]
      7. *-commutative50.0%

        \[\leadsto -\color{blue}{\left(9 \cdot \left(y \cdot z\right)\right)} \cdot t \]
      8. distribute-lft-neg-in50.0%

        \[\leadsto \color{blue}{\left(-9 \cdot \left(y \cdot z\right)\right) \cdot t} \]
      9. distribute-lft-neg-in50.0%

        \[\leadsto \color{blue}{\left(\left(-9\right) \cdot \left(y \cdot z\right)\right)} \cdot t \]
      10. metadata-eval50.0%

        \[\leadsto \left(\color{blue}{-9} \cdot \left(y \cdot z\right)\right) \cdot t \]
      11. associate-*r*49.9%

        \[\leadsto \color{blue}{\left(\left(-9 \cdot y\right) \cdot z\right)} \cdot t \]
      12. *-commutative49.9%

        \[\leadsto \left(\color{blue}{\left(y \cdot -9\right)} \cdot z\right) \cdot t \]
      13. *-commutative49.9%

        \[\leadsto \color{blue}{\left(z \cdot \left(y \cdot -9\right)\right)} \cdot t \]
      14. *-commutative49.9%

        \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
      15. associate-*r*51.2%

        \[\leadsto \color{blue}{\left(t \cdot z\right) \cdot \left(y \cdot -9\right)} \]
      16. *-commutative51.2%

        \[\leadsto \color{blue}{\left(z \cdot t\right)} \cdot \left(y \cdot -9\right) \]
      17. metadata-eval51.2%

        \[\leadsto \left(z \cdot t\right) \cdot \left(y \cdot \color{blue}{\left(-9\right)}\right) \]
      18. distribute-rgt-neg-in51.2%

        \[\leadsto \left(z \cdot t\right) \cdot \color{blue}{\left(-y \cdot 9\right)} \]
      19. distribute-rgt-neg-in51.2%

        \[\leadsto \color{blue}{-\left(z \cdot t\right) \cdot \left(y \cdot 9\right)} \]
      20. associate-*r*51.2%

        \[\leadsto -\color{blue}{\left(\left(z \cdot t\right) \cdot y\right) \cdot 9} \]
      21. distribute-rgt-neg-in51.2%

        \[\leadsto \color{blue}{\left(\left(z \cdot t\right) \cdot y\right) \cdot \left(-9\right)} \]
      22. *-commutative51.2%

        \[\leadsto \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} \cdot \left(-9\right) \]
      23. *-commutative51.2%

        \[\leadsto \left(y \cdot \color{blue}{\left(t \cdot z\right)}\right) \cdot \left(-9\right) \]
      24. metadata-eval51.2%

        \[\leadsto \left(y \cdot \left(t \cdot z\right)\right) \cdot \color{blue}{-9} \]
    10. Simplified51.2%

      \[\leadsto \color{blue}{\left(y \cdot \left(t \cdot z\right)\right) \cdot -9} \]

    if -3.5000000000000001e-69 < z < 2e-66

    1. Initial program 99.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-99.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative99.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv99.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv86.6%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-86.6%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*86.6%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define86.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-199.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 81.3%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 47.3%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    7. Step-by-step derivation
      1. associate-*r*47.2%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative47.2%

        \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]
    8. Simplified47.2%

      \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]

    if 2e-66 < z

    1. Initial program 87.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. +-commutative87.2%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-87.2%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative87.2%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv87.2%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*97.1%

        \[\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-in97.1%

        \[\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. *-commutative97.1%

        \[\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-inv97.1%

        \[\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-97.1%

        \[\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*97.1%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*89.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*89.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-189.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*89.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. Simplified89.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 41.1%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot -9} \]
      2. associate-*r*41.1%

        \[\leadsto \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot -9\right)} \]
      3. *-commutative41.1%

        \[\leadsto t \cdot \left(\color{blue}{\left(z \cdot y\right)} \cdot -9\right) \]
      4. associate-*l*41.0%

        \[\leadsto t \cdot \color{blue}{\left(z \cdot \left(y \cdot -9\right)\right)} \]
    7. Simplified41.0%

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-69}:\\ \;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 50.3% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -1.15e-68)
   (* y (* -9.0 (* z t)))
   (if (<= z 1.95e-66) (* b (* a 27.0)) (* t (* z (* y -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -1.15e-68) {
		tmp = y * (-9.0 * (z * t));
	} else if (z <= 1.95e-66) {
		tmp = b * (a * 27.0);
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.15d-68)) then
        tmp = y * ((-9.0d0) * (z * t))
    else if (z <= 1.95d-66) then
        tmp = b * (a * 27.0d0)
    else
        tmp = t * (z * (y * (-9.0d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -1.15e-68) {
		tmp = y * (-9.0 * (z * t));
	} else if (z <= 1.95e-66) {
		tmp = b * (a * 27.0);
	} else {
		tmp = t * (z * (y * -9.0));
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -1.15e-68:
		tmp = y * (-9.0 * (z * t))
	elif z <= 1.95e-66:
		tmp = b * (a * 27.0)
	else:
		tmp = t * (z * (y * -9.0))
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -1.15e-68)
		tmp = Float64(y * Float64(-9.0 * Float64(z * t)));
	elseif (z <= 1.95e-66)
		tmp = Float64(b * Float64(a * 27.0));
	else
		tmp = Float64(t * Float64(z * Float64(y * -9.0)));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -1.15e-68)
		tmp = y * (-9.0 * (z * t));
	elseif (z <= 1.95e-66)
		tmp = b * (a * 27.0);
	else
		tmp = t * (z * (y * -9.0));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.15e-68], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-66], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-68}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{-66}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.14999999999999998e-68

    1. Initial program 87.3%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. sub-neg87.3%

        \[\leadsto \color{blue}{\left(x \cdot 2 + \left(-\left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right)} + \left(a \cdot 27\right) \cdot b \]
      2. sub-neg87.3%

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. associate-*l*87.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*87.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. Simplified87.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 0 69.8%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Taylor expanded in y around inf 65.2%

      \[\leadsto \color{blue}{y \cdot \left(27 \cdot \frac{a \cdot b}{y} - 9 \cdot \left(t \cdot z\right)\right)} \]
    7. Taylor expanded in a around 0 51.1%

      \[\leadsto y \cdot \color{blue}{\left(-9 \cdot \left(t \cdot z\right)\right)} \]

    if -1.14999999999999998e-68 < z < 1.94999999999999991e-66

    1. Initial program 99.7%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-99.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative99.7%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv99.7%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative86.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv86.6%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-86.6%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*86.6%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define86.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative86.6%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-199.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 81.3%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 47.3%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    7. Step-by-step derivation
      1. associate-*r*47.2%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative47.2%

        \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]
    8. Simplified47.2%

      \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]

    if 1.94999999999999991e-66 < z

    1. Initial program 87.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. +-commutative87.2%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-87.2%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative87.2%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv87.2%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*97.1%

        \[\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-in97.1%

        \[\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. *-commutative97.1%

        \[\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-inv97.1%

        \[\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-97.1%

        \[\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*97.1%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*89.8%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*89.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-189.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*89.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. Simplified89.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 41.1%

      \[\leadsto \color{blue}{-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto \color{blue}{\left(t \cdot \left(y \cdot z\right)\right) \cdot -9} \]
      2. associate-*r*41.1%

        \[\leadsto \color{blue}{t \cdot \left(\left(y \cdot z\right) \cdot -9\right)} \]
      3. *-commutative41.1%

        \[\leadsto t \cdot \left(\color{blue}{\left(z \cdot y\right)} \cdot -9\right) \]
      4. associate-*l*41.0%

        \[\leadsto t \cdot \color{blue}{\left(z \cdot \left(y \cdot -9\right)\right)} \]
    7. Simplified41.0%

      \[\leadsto \color{blue}{t \cdot \left(z \cdot \left(y \cdot -9\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 95.3% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right) \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	return ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b))
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b)))
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Derivation
  1. Initial program 92.2%

    \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
  2. Step-by-step derivation
    1. sub-neg92.2%

      \[\leadsto \color{blue}{\left(x \cdot 2 + \left(-\left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right)} + \left(a \cdot 27\right) \cdot b \]
    2. sub-neg92.2%

      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
    3. associate-*l*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.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. Simplified93.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. Add Preprocessing

Alternative 20: 47.4% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -3.05 \cdot 10^{-30} \lor \neg \left(b \leq 3.8 \cdot 10^{+81}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -3.05e-30) (not (<= b 3.8e+81))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -3.05e-30) || !(b <= 3.8e+81)) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = x * 2.0;
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((b <= (-3.05d-30)) .or. (.not. (b <= 3.8d+81))) then
        tmp = 27.0d0 * (a * b)
    else
        tmp = x * 2.0d0
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -3.05e-30) || !(b <= 3.8e+81)) {
		tmp = 27.0 * (a * b);
	} else {
		tmp = x * 2.0;
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -3.05e-30) or not (b <= 3.8e+81):
		tmp = 27.0 * (a * b)
	else:
		tmp = x * 2.0
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -3.05e-30) || !(b <= 3.8e+81))
		tmp = Float64(27.0 * Float64(a * b));
	else
		tmp = Float64(x * 2.0);
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((b <= -3.05e-30) || ~((b <= 3.8e+81)))
		tmp = 27.0 * (a * b);
	else
		tmp = x * 2.0;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.05e-30], N[Not[LessEqual[b, 3.8e+81]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.05 \cdot 10^{-30} \lor \neg \left(b \leq 3.8 \cdot 10^{+81}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot 2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.0499999999999999e-30 or 3.8e81 < b

    1. Initial program 90.9%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative90.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-90.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. *-commutative90.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-inv90.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*91.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in91.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative91.6%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv91.6%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-91.6%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*91.6%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-define95.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv95.0%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define95.0%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in95.0%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in95.0%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative95.0%

        \[\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*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-194.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 55.5%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]

    if -3.0499999999999999e-30 < b < 3.8e81

    1. Initial program 93.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative93.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-93.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. *-commutative93.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-inv93.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*93.4%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in93.4%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative93.4%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv93.4%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-93.4%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*93.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-define94.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*94.1%

        \[\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*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-194.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine93.4%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right) + \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)} \]
      2. fma-undefine93.4%

        \[\leadsto a \cdot \left(27 \cdot b\right) + \color{blue}{\left(x \cdot 2 + t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)} \]
      3. associate-+r+93.4%

        \[\leadsto \color{blue}{\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)} \]
      4. *-commutative93.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right) \cdot t} \]
      5. associate-*l*94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{y \cdot \left(\left(-9 \cdot z\right) \cdot t\right)} \]
      6. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(\color{blue}{\left(z \cdot -9\right)} \cdot t\right) \]
      7. associate-*r*94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \color{blue}{\left(z \cdot \left(-9 \cdot t\right)\right)} \]
      8. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(z \cdot \color{blue}{\left(t \cdot -9\right)}\right) \]
      9. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(z \cdot \left(t \cdot -9\right)\right) \cdot y} \]
      10. associate-*r*94.3%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -9\right)} \cdot y \]
      11. associate-*l*94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-9 \cdot y\right)} \]
      12. metadata-eval94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \left(\color{blue}{\left(-9\right)} \cdot y\right) \]
      13. distribute-lft-neg-in94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \color{blue}{\left(-9 \cdot y\right)} \]
      14. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \left(-\color{blue}{y \cdot 9}\right) \]
      15. distribute-rgt-neg-in94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(-\left(z \cdot t\right) \cdot \left(y \cdot 9\right)\right)} \]
      16. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) \]
      17. associate-+r+94.4%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\right)} \]
      18. sub-neg94.4%

        \[\leadsto a \cdot \left(27 \cdot b\right) + \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)} \]
    6. Applied egg-rr94.4%

      \[\leadsto \color{blue}{\left(b \cdot \left(a \cdot 27\right) + x \cdot 2\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)} \]
    7. Taylor expanded in x around inf 35.9%

      \[\leadsto \color{blue}{2 \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.05 \cdot 10^{-30} \lor \neg \left(b \leq 3.8 \cdot 10^{+81}\right):\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 47.4% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{-30}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{+80}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -2.5e-30)
   (* b (* a 27.0))
   (if (<= b 3.4e+80) (* x 2.0) (* 27.0 (* a b)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -2.5e-30) {
		tmp = b * (a * 27.0);
	} else if (b <= 3.4e+80) {
		tmp = x * 2.0;
	} else {
		tmp = 27.0 * (a * b);
	}
	return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-2.5d-30)) then
        tmp = b * (a * 27.0d0)
    else if (b <= 3.4d+80) then
        tmp = x * 2.0d0
    else
        tmp = 27.0d0 * (a * b)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -2.5e-30) {
		tmp = b * (a * 27.0);
	} else if (b <= 3.4e+80) {
		tmp = x * 2.0;
	} else {
		tmp = 27.0 * (a * b);
	}
	return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -2.5e-30:
		tmp = b * (a * 27.0)
	elif b <= 3.4e+80:
		tmp = x * 2.0
	else:
		tmp = 27.0 * (a * b)
	return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -2.5e-30)
		tmp = Float64(b * Float64(a * 27.0));
	elseif (b <= 3.4e+80)
		tmp = Float64(x * 2.0);
	else
		tmp = Float64(27.0 * Float64(a * b));
	end
	return tmp
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -2.5e-30)
		tmp = b * (a * 27.0);
	elseif (b <= 3.4e+80)
		tmp = x * 2.0;
	else
		tmp = 27.0 * (a * b);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.5e-30], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e+80], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{-30}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\

\mathbf{elif}\;b \leq 3.4 \cdot 10^{+80}:\\
\;\;\;\;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 b < -2.49999999999999986e-30

    1. Initial program 92.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. +-commutative92.1%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-92.1%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative92.1%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv92.1%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*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-define95.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv95.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define95.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in95.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in95.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative95.9%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
      18. associate-*l*94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-194.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*94.7%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 69.9%

      \[\leadsto \color{blue}{2 \cdot x + 27 \cdot \left(a \cdot b\right)} \]
    6. Taylor expanded in x around 0 53.0%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
    7. Step-by-step derivation
      1. associate-*r*53.0%

        \[\leadsto \color{blue}{\left(27 \cdot a\right) \cdot b} \]
      2. *-commutative53.0%

        \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]
    8. Simplified53.0%

      \[\leadsto \color{blue}{b \cdot \left(27 \cdot a\right)} \]

    if -2.49999999999999986e-30 < b < 3.39999999999999992e80

    1. Initial program 93.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative93.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-93.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. *-commutative93.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-inv93.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*93.4%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in93.4%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative93.4%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv93.4%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-93.4%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*93.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-define94.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      12. cancel-sign-sub-inv94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
      13. fma-define94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
      14. distribute-lft-neg-in94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
      15. distribute-rgt-neg-in94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
      16. *-commutative94.1%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
      17. associate-*r*94.1%

        \[\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*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
      19. neg-mul-194.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
      20. associate-*r*94.2%

        \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine93.4%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right) + \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)} \]
      2. fma-undefine93.4%

        \[\leadsto a \cdot \left(27 \cdot b\right) + \color{blue}{\left(x \cdot 2 + t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)} \]
      3. associate-+r+93.4%

        \[\leadsto \color{blue}{\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)} \]
      4. *-commutative93.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right) \cdot t} \]
      5. associate-*l*94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{y \cdot \left(\left(-9 \cdot z\right) \cdot t\right)} \]
      6. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(\color{blue}{\left(z \cdot -9\right)} \cdot t\right) \]
      7. associate-*r*94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \color{blue}{\left(z \cdot \left(-9 \cdot t\right)\right)} \]
      8. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(z \cdot \color{blue}{\left(t \cdot -9\right)}\right) \]
      9. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(z \cdot \left(t \cdot -9\right)\right) \cdot y} \]
      10. associate-*r*94.3%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -9\right)} \cdot y \]
      11. associate-*l*94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-9 \cdot y\right)} \]
      12. metadata-eval94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \left(\color{blue}{\left(-9\right)} \cdot y\right) \]
      13. distribute-lft-neg-in94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \color{blue}{\left(-9 \cdot y\right)} \]
      14. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \left(-\color{blue}{y \cdot 9}\right) \]
      15. distribute-rgt-neg-in94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(-\left(z \cdot t\right) \cdot \left(y \cdot 9\right)\right)} \]
      16. *-commutative94.4%

        \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) \]
      17. associate-+r+94.4%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\right)} \]
      18. sub-neg94.4%

        \[\leadsto a \cdot \left(27 \cdot b\right) + \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)} \]
    6. Applied egg-rr94.4%

      \[\leadsto \color{blue}{\left(b \cdot \left(a \cdot 27\right) + x \cdot 2\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)} \]
    7. Taylor expanded in x around inf 35.9%

      \[\leadsto \color{blue}{2 \cdot x} \]

    if 3.39999999999999992e80 < b

    1. Initial program 88.8%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative88.8%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
      2. associate-+r-88.8%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
      3. *-commutative88.8%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      4. cancel-sign-sub-inv88.8%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
      5. associate-*r*88.8%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
      6. distribute-lft-neg-in88.8%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
      7. *-commutative88.8%

        \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
      8. cancel-sign-sub-inv88.8%

        \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
      9. associate-+r-88.8%

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
      10. associate-*l*88.8%

        \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
      11. fma-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*93.3%

        \[\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*93.3%

        \[\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-193.3%

        \[\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*93.3%

        \[\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. Simplified93.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 59.6%

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{-30}:\\ \;\;\;\;b \cdot \left(a \cdot 27\right)\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{+80}:\\ \;\;\;\;x \cdot 2\\ \mathbf{else}:\\ \;\;\;\;27 \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 32.0% accurate, 5.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ x \cdot 2 \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
	return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b])
def code(x, y, z, t, a, b):
	return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	return Float64(x * 2.0)
end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
	tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Derivation
  1. Initial program 92.2%

    \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
  2. Step-by-step derivation
    1. +-commutative92.2%

      \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
    2. associate-+r-92.2%

      \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t} \]
    3. *-commutative92.2%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
    4. cancel-sign-sub-inv92.2%

      \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-t\right) \cdot \left(\left(y \cdot 9\right) \cdot z\right)} \]
    5. associate-*r*92.6%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(\left(-t\right) \cdot \left(y \cdot 9\right)\right) \cdot z} \]
    6. distribute-lft-neg-in92.6%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \color{blue}{\left(-t \cdot \left(y \cdot 9\right)\right)} \cdot z \]
    7. *-commutative92.6%

      \[\leadsto \left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot t}\right) \cdot z \]
    8. cancel-sign-sub-inv92.6%

      \[\leadsto \color{blue}{\left(\left(a \cdot 27\right) \cdot b + x \cdot 2\right) - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z} \]
    9. associate-+r-92.6%

      \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
    10. associate-*l*92.5%

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right) \]
    11. fma-define94.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot t\right) \cdot z\right)} \]
    12. cancel-sign-sub-inv94.5%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z}\right) \]
    13. fma-define94.5%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \color{blue}{\mathsf{fma}\left(x, 2, \left(-\left(y \cdot 9\right) \cdot t\right) \cdot z\right)}\right) \]
    14. distribute-lft-neg-in94.5%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{-\left(\left(y \cdot 9\right) \cdot t\right) \cdot z}\right)\right) \]
    15. distribute-rgt-neg-in94.5%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(\left(y \cdot 9\right) \cdot t\right) \cdot \left(-z\right)}\right)\right) \]
    16. *-commutative94.5%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{\left(t \cdot \left(y \cdot 9\right)\right)} \cdot \left(-z\right)\right)\right) \]
    17. associate-*r*94.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot \left(-z\right)\right)}\right)\right) \]
    18. associate-*l*94.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \color{blue}{\left(y \cdot \left(9 \cdot \left(-z\right)\right)\right)}\right)\right) \]
    19. neg-mul-194.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(9 \cdot \color{blue}{\left(-1 \cdot z\right)}\right)\right)\right)\right) \]
    20. associate-*r*94.2%

      \[\leadsto \mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \color{blue}{\left(\left(9 \cdot -1\right) \cdot z\right)}\right)\right)\right) \]
  3. Simplified94.2%

    \[\leadsto \color{blue}{\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. fma-undefine92.2%

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right) + \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)} \]
    2. fma-undefine92.2%

      \[\leadsto a \cdot \left(27 \cdot b\right) + \color{blue}{\left(x \cdot 2 + t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)} \]
    3. associate-+r+92.2%

      \[\leadsto \color{blue}{\left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)} \]
    4. *-commutative92.2%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(y \cdot \left(-9 \cdot z\right)\right) \cdot t} \]
    5. associate-*l*93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{y \cdot \left(\left(-9 \cdot z\right) \cdot t\right)} \]
    6. *-commutative93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(\color{blue}{\left(z \cdot -9\right)} \cdot t\right) \]
    7. associate-*r*93.1%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \color{blue}{\left(z \cdot \left(-9 \cdot t\right)\right)} \]
    8. *-commutative93.1%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + y \cdot \left(z \cdot \color{blue}{\left(t \cdot -9\right)}\right) \]
    9. *-commutative93.1%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(z \cdot \left(t \cdot -9\right)\right) \cdot y} \]
    10. associate-*r*93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -9\right)} \cdot y \]
    11. associate-*l*93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-9 \cdot y\right)} \]
    12. metadata-eval93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \left(\color{blue}{\left(-9\right)} \cdot y\right) \]
    13. distribute-lft-neg-in93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \color{blue}{\left(-9 \cdot y\right)} \]
    14. *-commutative93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(z \cdot t\right) \cdot \left(-\color{blue}{y \cdot 9}\right) \]
    15. distribute-rgt-neg-in93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \color{blue}{\left(-\left(z \cdot t\right) \cdot \left(y \cdot 9\right)\right)} \]
    16. *-commutative93.5%

      \[\leadsto \left(a \cdot \left(27 \cdot b\right) + x \cdot 2\right) + \left(-\color{blue}{\left(y \cdot 9\right) \cdot \left(z \cdot t\right)}\right) \]
    17. associate-+r+93.5%

      \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 + \left(-\left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\right)} \]
    18. sub-neg93.5%

      \[\leadsto a \cdot \left(27 \cdot b\right) + \color{blue}{\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)} \]
  6. Applied egg-rr93.5%

    \[\leadsto \color{blue}{\left(b \cdot \left(a \cdot 27\right) + x \cdot 2\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)} \]
  7. Taylor expanded in x around inf 26.2%

    \[\leadsto \color{blue}{2 \cdot x} \]
  8. Final simplification26.2%

    \[\leadsto x \cdot 2 \]
  9. Add Preprocessing

Developer Target 1: 95.1% 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 2024157 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))

  (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))