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

Percentage Accurate: 85.7% → 91.4%
Time: 20.6s
Alternatives: 20
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k):
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 85.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k):
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}

Alternative 1: 91.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<=
      (-
       (-
        (+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
        (* (* x 4.0) i))
       (* (* j 27.0) k))
      INFINITY)
   (-
    (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
    (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
   (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf:
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	else:
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	else
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
		tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	else
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\


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

    1. Initial program 95.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified96.5%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k))

    1. Initial program 0.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified19.4%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 13.9%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in x around inf 58.6%

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

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

        \[\leadsto x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \color{blue}{-4} \cdot i\right) \]
      3. associate-*r*66.8%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + -4 \cdot i\right) \]
    7. Simplified66.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 59.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := b \cdot c + t\_1\\ t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -1.26 \cdot 10^{+76}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+19}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-17}:\\ \;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-118}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-230}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-145}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-12}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ (* b c) t_1))
        (t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
   (if (<= t -1.26e+76)
     t_3
     (if (<= t -2e+19)
       t_2
       (if (<= t -2.7e-17)
         (+ t_1 (* a (* t -4.0)))
         (if (<= t -2.7e-58)
           t_2
           (if (<= t -1.5e-118)
             (* -4.0 (+ (* x i) (* t a)))
             (if (<= t 1.95e-230)
               t_2
               (if (<= t 5.4e-145)
                 (+ (* i (* x -4.0)) t_1)
                 (if (<= t 2.6e-12) t_2 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) + t_1;
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -1.26e+76) {
		tmp = t_3;
	} else if (t <= -2e+19) {
		tmp = t_2;
	} else if (t <= -2.7e-17) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (t <= -2.7e-58) {
		tmp = t_2;
	} else if (t <= -1.5e-118) {
		tmp = -4.0 * ((x * i) + (t * a));
	} else if (t <= 1.95e-230) {
		tmp = t_2;
	} else if (t <= 5.4e-145) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (t <= 2.6e-12) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = (b * c) + t_1
    t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    if (t <= (-1.26d+76)) then
        tmp = t_3
    else if (t <= (-2d+19)) then
        tmp = t_2
    else if (t <= (-2.7d-17)) then
        tmp = t_1 + (a * (t * (-4.0d0)))
    else if (t <= (-2.7d-58)) then
        tmp = t_2
    else if (t <= (-1.5d-118)) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    else if (t <= 1.95d-230) then
        tmp = t_2
    else if (t <= 5.4d-145) then
        tmp = (i * (x * (-4.0d0))) + t_1
    else if (t <= 2.6d-12) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) + t_1;
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -1.26e+76) {
		tmp = t_3;
	} else if (t <= -2e+19) {
		tmp = t_2;
	} else if (t <= -2.7e-17) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (t <= -2.7e-58) {
		tmp = t_2;
	} else if (t <= -1.5e-118) {
		tmp = -4.0 * ((x * i) + (t * a));
	} else if (t <= 1.95e-230) {
		tmp = t_2;
	} else if (t <= 5.4e-145) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (t <= 2.6e-12) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = (b * c) + t_1
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	tmp = 0
	if t <= -1.26e+76:
		tmp = t_3
	elif t <= -2e+19:
		tmp = t_2
	elif t <= -2.7e-17:
		tmp = t_1 + (a * (t * -4.0))
	elif t <= -2.7e-58:
		tmp = t_2
	elif t <= -1.5e-118:
		tmp = -4.0 * ((x * i) + (t * a))
	elif t <= 1.95e-230:
		tmp = t_2
	elif t <= 5.4e-145:
		tmp = (i * (x * -4.0)) + t_1
	elif t <= 2.6e-12:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(Float64(b * c) + t_1)
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -1.26e+76)
		tmp = t_3;
	elseif (t <= -2e+19)
		tmp = t_2;
	elseif (t <= -2.7e-17)
		tmp = Float64(t_1 + Float64(a * Float64(t * -4.0)));
	elseif (t <= -2.7e-58)
		tmp = t_2;
	elseif (t <= -1.5e-118)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	elseif (t <= 1.95e-230)
		tmp = t_2;
	elseif (t <= 5.4e-145)
		tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1);
	elseif (t <= 2.6e-12)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = (b * c) + t_1;
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -1.26e+76)
		tmp = t_3;
	elseif (t <= -2e+19)
		tmp = t_2;
	elseif (t <= -2.7e-17)
		tmp = t_1 + (a * (t * -4.0));
	elseif (t <= -2.7e-58)
		tmp = t_2;
	elseif (t <= -1.5e-118)
		tmp = -4.0 * ((x * i) + (t * a));
	elseif (t <= 1.95e-230)
		tmp = t_2;
	elseif (t <= 5.4e-145)
		tmp = (i * (x * -4.0)) + t_1;
	elseif (t <= 2.6e-12)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.26e+76], t$95$3, If[LessEqual[t, -2e+19], t$95$2, If[LessEqual[t, -2.7e-17], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.7e-58], t$95$2, If[LessEqual[t, -1.5e-118], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e-230], t$95$2, If[LessEqual[t, 5.4e-145], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.6e-12], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.26 \cdot 10^{+76}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq -2 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-58}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-118}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{-230}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-145}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-12}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.26000000000000007e76 or 2.59999999999999983e-12 < t

    1. Initial program 77.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified81.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 71.3%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if -1.26000000000000007e76 < t < -2e19 or -2.7000000000000001e-17 < t < -2.6999999999999999e-58 or -1.50000000000000009e-118 < t < 1.9500000000000001e-230 or 5.4000000000000001e-145 < t < 2.59999999999999983e-12

    1. Initial program 86.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified89.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 71.7%

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]

    if -2e19 < t < -2.7000000000000001e-17

    1. Initial program 99.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 85.4%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval85.4%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in85.4%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative85.4%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*l*85.4%

        \[\leadsto \left(-\color{blue}{\left(4 \cdot t\right) \cdot a}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-lft-neg-in85.4%

        \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-lft-neg-in85.4%

        \[\leadsto \color{blue}{\left(\left(-4\right) \cdot t\right)} \cdot a + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval85.4%

        \[\leadsto \left(\color{blue}{-4} \cdot t\right) \cdot a + j \cdot \left(k \cdot -27\right) \]
    6. Simplified85.4%

      \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]

    if -2.6999999999999999e-58 < t < -1.50000000000000009e-118

    1. Initial program 86.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 79.3%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out79.3%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative79.3%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified79.3%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 71.3%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]
    7. Taylor expanded in b around 0 61.8%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t + i \cdot x\right)} \]

    if 1.9500000000000001e-230 < t < 5.4000000000000001e-145

    1. Initial program 79.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified86.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in i around inf 86.4%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval86.4%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(i \cdot x\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in86.4%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative86.4%

        \[\leadsto \left(-\color{blue}{\left(i \cdot x\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*r*86.4%

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in86.4%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in86.4%

        \[\leadsto i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval86.4%

        \[\leadsto i \cdot \left(x \cdot \color{blue}{-4}\right) + j \cdot \left(k \cdot -27\right) \]
      8. *-commutative86.4%

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified86.4%

      \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.26 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+19}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-17}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-58}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-118}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-230}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-145}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-12}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 59.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ t_3 := x \cdot \left(y \cdot z\right)\\ \mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\ \mathbf{elif}\;k \leq 1.52 \cdot 10^{-133}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;k \leq 6.9 \cdot 10^{-56}:\\ \;\;\;\;t \cdot \left(18 \cdot t\_3 - a \cdot 4\right)\\ \mathbf{elif}\;k \leq 1.3 \cdot 10^{+147} \lor \neg \left(k \leq 1.9 \cdot 10^{+173}\right) \land k \leq 2 \cdot 10^{+189}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1 + 18 \cdot \left(t \cdot t\_3\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (- (* b c) (* 4.0 (+ (* x i) (* t a)))))
        (t_3 (* x (* y z))))
   (if (<= k -1.56e-21)
     (+ (* i (* x -4.0)) t_1)
     (if (<= k 1.52e-133)
       t_2
       (if (<= k 6.9e-56)
         (* t (- (* 18.0 t_3) (* a 4.0)))
         (if (or (<= k 1.3e+147) (and (not (<= k 1.9e+173)) (<= k 2e+189)))
           t_2
           (+ t_1 (* 18.0 (* t t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
	double t_3 = x * (y * z);
	double tmp;
	if (k <= -1.56e-21) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (k <= 1.52e-133) {
		tmp = t_2;
	} else if (k <= 6.9e-56) {
		tmp = t * ((18.0 * t_3) - (a * 4.0));
	} else if ((k <= 1.3e+147) || (!(k <= 1.9e+173) && (k <= 2e+189))) {
		tmp = t_2;
	} else {
		tmp = t_1 + (18.0 * (t * t_3));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = (b * c) - (4.0d0 * ((x * i) + (t * a)))
    t_3 = x * (y * z)
    if (k <= (-1.56d-21)) then
        tmp = (i * (x * (-4.0d0))) + t_1
    else if (k <= 1.52d-133) then
        tmp = t_2
    else if (k <= 6.9d-56) then
        tmp = t * ((18.0d0 * t_3) - (a * 4.0d0))
    else if ((k <= 1.3d+147) .or. (.not. (k <= 1.9d+173)) .and. (k <= 2d+189)) then
        tmp = t_2
    else
        tmp = t_1 + (18.0d0 * (t * t_3))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
	double t_3 = x * (y * z);
	double tmp;
	if (k <= -1.56e-21) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (k <= 1.52e-133) {
		tmp = t_2;
	} else if (k <= 6.9e-56) {
		tmp = t * ((18.0 * t_3) - (a * 4.0));
	} else if ((k <= 1.3e+147) || (!(k <= 1.9e+173) && (k <= 2e+189))) {
		tmp = t_2;
	} else {
		tmp = t_1 + (18.0 * (t * t_3));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = (b * c) - (4.0 * ((x * i) + (t * a)))
	t_3 = x * (y * z)
	tmp = 0
	if k <= -1.56e-21:
		tmp = (i * (x * -4.0)) + t_1
	elif k <= 1.52e-133:
		tmp = t_2
	elif k <= 6.9e-56:
		tmp = t * ((18.0 * t_3) - (a * 4.0))
	elif (k <= 1.3e+147) or (not (k <= 1.9e+173) and (k <= 2e+189)):
		tmp = t_2
	else:
		tmp = t_1 + (18.0 * (t * t_3))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))))
	t_3 = Float64(x * Float64(y * z))
	tmp = 0.0
	if (k <= -1.56e-21)
		tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1);
	elseif (k <= 1.52e-133)
		tmp = t_2;
	elseif (k <= 6.9e-56)
		tmp = Float64(t * Float64(Float64(18.0 * t_3) - Float64(a * 4.0)));
	elseif ((k <= 1.3e+147) || (!(k <= 1.9e+173) && (k <= 2e+189)))
		tmp = t_2;
	else
		tmp = Float64(t_1 + Float64(18.0 * Float64(t * t_3)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
	t_3 = x * (y * z);
	tmp = 0.0;
	if (k <= -1.56e-21)
		tmp = (i * (x * -4.0)) + t_1;
	elseif (k <= 1.52e-133)
		tmp = t_2;
	elseif (k <= 6.9e-56)
		tmp = t * ((18.0 * t_3) - (a * 4.0));
	elseif ((k <= 1.3e+147) || (~((k <= 1.9e+173)) && (k <= 2e+189)))
		tmp = t_2;
	else
		tmp = t_1 + (18.0 * (t * t_3));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.56e-21], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[k, 1.52e-133], t$95$2, If[LessEqual[k, 6.9e-56], N[(t * N[(N[(18.0 * t$95$3), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[k, 1.3e+147], And[N[Not[LessEqual[k, 1.9e+173]], $MachinePrecision], LessEqual[k, 2e+189]]], t$95$2, N[(t$95$1 + N[(18.0 * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_3 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\

\mathbf{elif}\;k \leq 1.52 \cdot 10^{-133}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;k \leq 6.9 \cdot 10^{-56}:\\
\;\;\;\;t \cdot \left(18 \cdot t\_3 - a \cdot 4\right)\\

\mathbf{elif}\;k \leq 1.3 \cdot 10^{+147} \lor \neg \left(k \leq 1.9 \cdot 10^{+173}\right) \land k \leq 2 \cdot 10^{+189}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1 + 18 \cdot \left(t \cdot t\_3\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -1.55999999999999999e-21

    1. Initial program 80.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified83.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in i around inf 55.0%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval55.0%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(i \cdot x\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in55.0%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative55.0%

        \[\leadsto \left(-\color{blue}{\left(i \cdot x\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*r*55.0%

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in55.0%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in55.0%

        \[\leadsto i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval55.0%

        \[\leadsto i \cdot \left(x \cdot \color{blue}{-4}\right) + j \cdot \left(k \cdot -27\right) \]
      8. *-commutative55.0%

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified55.0%

      \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]

    if -1.55999999999999999e-21 < k < 1.52000000000000001e-133 or 6.8999999999999996e-56 < k < 1.2999999999999999e147 or 1.90000000000000005e173 < k < 2e189

    1. Initial program 83.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 82.4%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out82.4%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative82.4%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified82.4%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 77.5%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]

    if 1.52000000000000001e-133 < k < 6.8999999999999996e-56

    1. Initial program 99.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified99.8%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 72.3%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if 1.2999999999999999e147 < k < 1.90000000000000005e173 or 2e189 < k

    1. Initial program 74.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified76.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 77.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.52 \cdot 10^{-133}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;k \leq 6.9 \cdot 10^{-56}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;k \leq 1.3 \cdot 10^{+147} \lor \neg \left(k \leq 1.9 \cdot 10^{+173}\right) \land k \leq 2 \cdot 10^{+189}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 70.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{+170}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+65}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+106}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+184}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+204}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k)))
        (t_2 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
   (if (<= x -4.5e+170)
     t_2
     (if (<= x 8.8e+45)
       t_1
       (if (<= x 1.8e+65)
         t_2
         (if (<= x 3.3e+106)
           (- (* b c) (* 4.0 (+ (* x i) (* t a))))
           (if (<= x 2.35e+184)
             (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
             (if (<= x 1.12e+204) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	double tmp;
	if (x <= -4.5e+170) {
		tmp = t_2;
	} else if (x <= 8.8e+45) {
		tmp = t_1;
	} else if (x <= 1.8e+65) {
		tmp = t_2;
	} else if (x <= 3.3e+106) {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	} else if (x <= 2.35e+184) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (x <= 1.12e+204) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
    t_2 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
    if (x <= (-4.5d+170)) then
        tmp = t_2
    else if (x <= 8.8d+45) then
        tmp = t_1
    else if (x <= 1.8d+65) then
        tmp = t_2
    else if (x <= 3.3d+106) then
        tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
    else if (x <= 2.35d+184) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    else if (x <= 1.12d+204) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	double tmp;
	if (x <= -4.5e+170) {
		tmp = t_2;
	} else if (x <= 8.8e+45) {
		tmp = t_1;
	} else if (x <= 1.8e+65) {
		tmp = t_2;
	} else if (x <= 3.3e+106) {
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	} else if (x <= 2.35e+184) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (x <= 1.12e+204) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k)
	t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0))
	tmp = 0
	if x <= -4.5e+170:
		tmp = t_2
	elif x <= 8.8e+45:
		tmp = t_1
	elif x <= 1.8e+65:
		tmp = t_2
	elif x <= 3.3e+106:
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)))
	elif x <= 2.35e+184:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	elif x <= 1.12e+204:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k))
	t_2 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0)))
	tmp = 0.0
	if (x <= -4.5e+170)
		tmp = t_2;
	elseif (x <= 8.8e+45)
		tmp = t_1;
	elseif (x <= 1.8e+65)
		tmp = t_2;
	elseif (x <= 3.3e+106)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))));
	elseif (x <= 2.35e+184)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	elseif (x <= 1.12e+204)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	tmp = 0.0;
	if (x <= -4.5e+170)
		tmp = t_2;
	elseif (x <= 8.8e+45)
		tmp = t_1;
	elseif (x <= 1.8e+65)
		tmp = t_2;
	elseif (x <= 3.3e+106)
		tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
	elseif (x <= 2.35e+184)
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	elseif (x <= 1.12e+204)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+170], t$95$2, If[LessEqual[x, 8.8e+45], t$95$1, If[LessEqual[x, 1.8e+65], t$95$2, If[LessEqual[x, 3.3e+106], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.35e+184], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.12e+204], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 8.8 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.8 \cdot 10^{+65}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{+106}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\

\mathbf{elif}\;x \leq 2.35 \cdot 10^{+184}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;x \leq 1.12 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.50000000000000022e170 or 8.8000000000000001e45 < x < 1.79999999999999989e65 or 1.11999999999999996e204 < x

    1. Initial program 63.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified74.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 63.5%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in x around inf 75.6%

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

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

        \[\leadsto x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \color{blue}{-4} \cdot i\right) \]
      3. associate-*r*78.9%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + -4 \cdot i\right) \]
    7. Simplified78.9%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + -4 \cdot i\right)} \]

    if -4.50000000000000022e170 < x < 8.8000000000000001e45 or 2.3500000000000002e184 < x < 1.11999999999999996e204

    1. Initial program 90.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 79.2%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(a \cdot t\right)\right)} - \left(j \cdot 27\right) \cdot k \]

    if 1.79999999999999989e65 < x < 3.30000000000000008e106

    1. Initial program 90.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 100.0%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out100.0%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative100.0%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 100.0%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]

    if 3.30000000000000008e106 < x < 2.3500000000000002e184

    1. Initial program 69.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified73.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 66.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+170}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{+45}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+65}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+106}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+184}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+204}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+125} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+136}\right):\\ \;\;\;\;y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k)))
   (if (or (<= t_1 -5e+125) (not (<= t_1 5e+136)))
     (* y (+ (* -27.0 (/ (* j k) y)) (* 18.0 (* t (* x z)))))
     (-
      (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
      (* 4.0 (* x i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double tmp;
	if ((t_1 <= -5e+125) || !(t_1 <= 5e+136)) {
		tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (j * 27.0d0) * k
    if ((t_1 <= (-5d+125)) .or. (.not. (t_1 <= 5d+136))) then
        tmp = y * (((-27.0d0) * ((j * k) / y)) + (18.0d0 * (t * (x * z))))
    else
        tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double tmp;
	if ((t_1 <= -5e+125) || !(t_1 <= 5e+136)) {
		tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
	} else {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (j * 27.0) * k
	tmp = 0
	if (t_1 <= -5e+125) or not (t_1 <= 5e+136):
		tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))))
	else:
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if ((t_1 <= -5e+125) || !(t_1 <= 5e+136))
		tmp = Float64(y * Float64(Float64(-27.0 * Float64(Float64(j * k) / y)) + Float64(18.0 * Float64(t * Float64(x * z)))));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (j * 27.0) * k;
	tmp = 0.0;
	if ((t_1 <= -5e+125) || ~((t_1 <= 5e+136)))
		tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
	else
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+125], N[Not[LessEqual[t$95$1, 5e+136]], $MachinePrecision]], N[(y * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+125} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+136}\right):\\
\;\;\;\;y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999962e125 or 5.0000000000000002e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 74.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified73.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 74.9%

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Taylor expanded in y around inf 74.9%

      \[\leadsto \color{blue}{y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} \]

    if -4.99999999999999962e125 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.0000000000000002e136

    1. Initial program 85.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified91.6%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 84.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -5 \cdot 10^{+125} \lor \neg \left(\left(j \cdot 27\right) \cdot k \leq 5 \cdot 10^{+136}\right):\\ \;\;\;\;y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 73.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;z \leq -480000000:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+32}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+77}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+205}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
        (t_2 (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))))
   (if (<= z -480000000.0)
     (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
     (if (<= z 5.6e+32)
       t_2
       (if (<= z 4.8e+77) (+ (* b c) t_1) (if (<= z 2.6e+205) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	double tmp;
	if (z <= -480000000.0) {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	} else if (z <= 5.6e+32) {
		tmp = t_2;
	} else if (z <= 4.8e+77) {
		tmp = (b * c) + t_1;
	} else if (z <= 2.6e+205) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    t_2 = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
    if (z <= (-480000000.0d0)) then
        tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
    else if (z <= 5.6d+32) then
        tmp = t_2
    else if (z <= 4.8d+77) then
        tmp = (b * c) + t_1
    else if (z <= 2.6d+205) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	double tmp;
	if (z <= -480000000.0) {
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	} else if (z <= 5.6e+32) {
		tmp = t_2;
	} else if (z <= 4.8e+77) {
		tmp = (b * c) + t_1;
	} else if (z <= 2.6e+205) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k)
	tmp = 0
	if z <= -480000000.0:
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0))
	elif z <= 5.6e+32:
		tmp = t_2
	elif z <= 4.8e+77:
		tmp = (b * c) + t_1
	elif z <= 2.6e+205:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k))
	tmp = 0.0
	if (z <= -480000000.0)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0)));
	elseif (z <= 5.6e+32)
		tmp = t_2;
	elseif (z <= 4.8e+77)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (z <= 2.6e+205)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
	tmp = 0.0;
	if (z <= -480000000.0)
		tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
	elseif (z <= 5.6e+32)
		tmp = t_2;
	elseif (z <= 4.8e+77)
		tmp = (b * c) + t_1;
	elseif (z <= 2.6e+205)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -480000000.0], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e+32], t$95$2, If[LessEqual[z, 4.8e+77], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 2.6e+205], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -480000000:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\

\mathbf{elif}\;z \leq 5.6 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+77}:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+205}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 81.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified77.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 60.3%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in x around inf 54.0%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv54.0%

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

        \[\leadsto x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \color{blue}{-4} \cdot i\right) \]
      3. associate-*r*56.8%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} + -4 \cdot i\right) \]
    7. Simplified56.8%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right) + -4 \cdot i\right)} \]

    if -4.8e8 < z < 5.6e32 or 4.7999999999999997e77 < z < 2.5999999999999999e205

    1. Initial program 83.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 86.5%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out86.5%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative86.5%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified86.5%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]

    if 5.6e32 < z < 4.7999999999999997e77

    1. Initial program 66.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified66.4%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 66.4%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in i around 0 83.1%

      \[\leadsto \color{blue}{b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if 2.5999999999999999e205 < z

    1. Initial program 78.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified84.0%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 79.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -480000000:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+32}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+77}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+205}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{if}\;k \leq -6.6 \cdot 10^{-22}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\ \mathbf{elif}\;k \leq 1.15 \cdot 10^{-133}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;k \leq 2.6 \cdot 10^{-56}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;k \leq 7.5 \cdot 10^{+177}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))) (t_2 (- (* b c) (* 4.0 (+ (* x i) (* t a))))))
   (if (<= k -6.6e-22)
     (+ (* i (* x -4.0)) t_1)
     (if (<= k 1.15e-133)
       t_2
       (if (<= k 2.6e-56)
         (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
         (if (<= k 7.5e+177) t_2 (+ t_1 (* a (* t -4.0)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
	double tmp;
	if (k <= -6.6e-22) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (k <= 1.15e-133) {
		tmp = t_2;
	} else if (k <= 2.6e-56) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (k <= 7.5e+177) {
		tmp = t_2;
	} else {
		tmp = t_1 + (a * (t * -4.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = (b * c) - (4.0d0 * ((x * i) + (t * a)))
    if (k <= (-6.6d-22)) then
        tmp = (i * (x * (-4.0d0))) + t_1
    else if (k <= 1.15d-133) then
        tmp = t_2
    else if (k <= 2.6d-56) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    else if (k <= 7.5d+177) then
        tmp = t_2
    else
        tmp = t_1 + (a * (t * (-4.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
	double tmp;
	if (k <= -6.6e-22) {
		tmp = (i * (x * -4.0)) + t_1;
	} else if (k <= 1.15e-133) {
		tmp = t_2;
	} else if (k <= 2.6e-56) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} else if (k <= 7.5e+177) {
		tmp = t_2;
	} else {
		tmp = t_1 + (a * (t * -4.0));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = (b * c) - (4.0 * ((x * i) + (t * a)))
	tmp = 0
	if k <= -6.6e-22:
		tmp = (i * (x * -4.0)) + t_1
	elif k <= 1.15e-133:
		tmp = t_2
	elif k <= 2.6e-56:
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	elif k <= 7.5e+177:
		tmp = t_2
	else:
		tmp = t_1 + (a * (t * -4.0))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a))))
	tmp = 0.0
	if (k <= -6.6e-22)
		tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1);
	elseif (k <= 1.15e-133)
		tmp = t_2;
	elseif (k <= 2.6e-56)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	elseif (k <= 7.5e+177)
		tmp = t_2;
	else
		tmp = Float64(t_1 + Float64(a * Float64(t * -4.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
	tmp = 0.0;
	if (k <= -6.6e-22)
		tmp = (i * (x * -4.0)) + t_1;
	elseif (k <= 1.15e-133)
		tmp = t_2;
	elseif (k <= 2.6e-56)
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	elseif (k <= 7.5e+177)
		tmp = t_2;
	else
		tmp = t_1 + (a * (t * -4.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -6.6e-22], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[k, 1.15e-133], t$95$2, If[LessEqual[k, 2.6e-56], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.5e+177], t$95$2, N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;k \leq -6.6 \cdot 10^{-22}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\

\mathbf{elif}\;k \leq 1.15 \cdot 10^{-133}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;k \leq 2.6 \cdot 10^{-56}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{elif}\;k \leq 7.5 \cdot 10^{+177}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -6.6000000000000002e-22

    1. Initial program 80.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified83.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in i around inf 55.0%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval55.0%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(i \cdot x\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in55.0%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative55.0%

        \[\leadsto \left(-\color{blue}{\left(i \cdot x\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*r*55.0%

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in55.0%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in55.0%

        \[\leadsto i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval55.0%

        \[\leadsto i \cdot \left(x \cdot \color{blue}{-4}\right) + j \cdot \left(k \cdot -27\right) \]
      8. *-commutative55.0%

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified55.0%

      \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]

    if -6.6000000000000002e-22 < k < 1.15e-133 or 2.59999999999999997e-56 < k < 7.50000000000000039e177

    1. Initial program 83.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 81.4%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out81.4%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative81.4%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified81.4%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 74.7%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]

    if 1.15e-133 < k < 2.59999999999999997e-56

    1. Initial program 99.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified99.8%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 72.3%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if 7.50000000000000039e177 < k

    1. Initial program 73.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified76.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 59.0%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval59.0%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in59.0%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative59.0%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*l*59.0%

        \[\leadsto \left(-\color{blue}{\left(4 \cdot t\right) \cdot a}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-lft-neg-in59.0%

        \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-lft-neg-in59.0%

        \[\leadsto \color{blue}{\left(\left(-4\right) \cdot t\right)} \cdot a + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval59.0%

        \[\leadsto \left(\color{blue}{-4} \cdot t\right) \cdot a + j \cdot \left(k \cdot -27\right) \]
    6. Simplified59.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -6.6 \cdot 10^{-22}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.15 \cdot 10^{-133}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;k \leq 2.6 \cdot 10^{-56}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;k \leq 7.5 \cdot 10^{+177}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+77}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-111}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-52}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k))
        (t_2 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
   (if (<= t -1.6e+77)
     t_2
     (if (<= t -8.5e-111)
       (- (- (* b c) (* 4.0 (* t a))) t_1)
       (if (<= t 2.9e-52) (- (- (* b c) (* 4.0 (* x i))) t_1) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	double tmp;
	if (t <= -1.6e+77) {
		tmp = t_2;
	} else if (t <= -8.5e-111) {
		tmp = ((b * c) - (4.0 * (t * a))) - t_1;
	} else if (t <= 2.9e-52) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (j * 27.0d0) * k
    t_2 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    if (t <= (-1.6d+77)) then
        tmp = t_2
    else if (t <= (-8.5d-111)) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
    else if (t <= 2.9d-52) then
        tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	double tmp;
	if (t <= -1.6e+77) {
		tmp = t_2;
	} else if (t <= -8.5e-111) {
		tmp = ((b * c) - (4.0 * (t * a))) - t_1;
	} else if (t <= 2.9e-52) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (j * 27.0) * k
	t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	tmp = 0
	if t <= -1.6e+77:
		tmp = t_2
	elif t <= -8.5e-111:
		tmp = ((b * c) - (4.0 * (t * a))) - t_1
	elif t <= 2.9e-52:
		tmp = ((b * c) - (4.0 * (x * i))) - t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	t_2 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))))
	tmp = 0.0
	if (t <= -1.6e+77)
		tmp = t_2;
	elseif (t <= -8.5e-111)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1);
	elseif (t <= 2.9e-52)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (j * 27.0) * k;
	t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	tmp = 0.0;
	if (t <= -1.6e+77)
		tmp = t_2;
	elseif (t <= -8.5e-111)
		tmp = ((b * c) - (4.0 * (t * a))) - t_1;
	elseif (t <= 2.9e-52)
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+77], t$95$2, If[LessEqual[t, -8.5e-111], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.9e-52], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-111}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-52}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6000000000000001e77 or 2.9000000000000002e-52 < t

    1. Initial program 77.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified81.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 73.9%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in i around 0 72.6%

      \[\leadsto \color{blue}{b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if -1.6000000000000001e77 < t < -8.5000000000000003e-111

    1. Initial program 85.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 71.1%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(a \cdot t\right)\right)} - \left(j \cdot 27\right) \cdot k \]

    if -8.5000000000000003e-111 < t < 2.9000000000000002e-52

    1. Initial program 88.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 93.6%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+77}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-111}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-52}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 71.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -5.4 \cdot 10^{+76}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-113}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k))
        (t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
   (if (<= t -5.4e+76)
     t_2
     (if (<= t -3.6e-113)
       (- (- (* b c) (* 4.0 (* t a))) t_1)
       (if (<= t 2.6e-20) (- (- (* b c) (* 4.0 (* x i))) t_1) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -5.4e+76) {
		tmp = t_2;
	} else if (t <= -3.6e-113) {
		tmp = ((b * c) - (4.0 * (t * a))) - t_1;
	} else if (t <= 2.6e-20) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (j * 27.0d0) * k
    t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    if (t <= (-5.4d+76)) then
        tmp = t_2
    else if (t <= (-3.6d-113)) then
        tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
    else if (t <= 2.6d-20) then
        tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -5.4e+76) {
		tmp = t_2;
	} else if (t <= -3.6e-113) {
		tmp = ((b * c) - (4.0 * (t * a))) - t_1;
	} else if (t <= 2.6e-20) {
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (j * 27.0) * k
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	tmp = 0
	if t <= -5.4e+76:
		tmp = t_2
	elif t <= -3.6e-113:
		tmp = ((b * c) - (4.0 * (t * a))) - t_1
	elif t <= 2.6e-20:
		tmp = ((b * c) - (4.0 * (x * i))) - t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -5.4e+76)
		tmp = t_2;
	elseif (t <= -3.6e-113)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1);
	elseif (t <= 2.6e-20)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (j * 27.0) * k;
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -5.4e+76)
		tmp = t_2;
	elseif (t <= -3.6e-113)
		tmp = ((b * c) - (4.0 * (t * a))) - t_1;
	elseif (t <= 2.6e-20)
		tmp = ((b * c) - (4.0 * (x * i))) - t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e+76], t$95$2, If[LessEqual[t, -3.6e-113], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.6e-20], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.6 \cdot 10^{-113}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-20}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.3999999999999998e76 or 2.59999999999999995e-20 < t

    1. Initial program 77.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified81.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 71.3%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]

    if -5.3999999999999998e76 < t < -3.59999999999999975e-113

    1. Initial program 85.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 71.1%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(a \cdot t\right)\right)} - \left(j \cdot 27\right) \cdot k \]

    if -3.59999999999999975e-113 < t < 2.59999999999999995e-20

    1. Initial program 87.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 89.7%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-113}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-20}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 43.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ \mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;k \leq 1020000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;k \leq 10^{+176}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;k \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (* -27.0 (* j k))))
   (if (<= k -1.56e-21)
     t_2
     (if (<= k 1020000000.0)
       t_1
       (if (<= k 1e+176)
         (* -4.0 (+ (* x i) (* t a)))
         (if (<= k 6.2e+188) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + (-4.0 * (t * a));
	double t_2 = -27.0 * (j * k);
	double tmp;
	if (k <= -1.56e-21) {
		tmp = t_2;
	} else if (k <= 1020000000.0) {
		tmp = t_1;
	} else if (k <= 1e+176) {
		tmp = -4.0 * ((x * i) + (t * a));
	} else if (k <= 6.2e+188) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (b * c) + ((-4.0d0) * (t * a))
    t_2 = (-27.0d0) * (j * k)
    if (k <= (-1.56d-21)) then
        tmp = t_2
    else if (k <= 1020000000.0d0) then
        tmp = t_1
    else if (k <= 1d+176) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    else if (k <= 6.2d+188) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + (-4.0 * (t * a));
	double t_2 = -27.0 * (j * k);
	double tmp;
	if (k <= -1.56e-21) {
		tmp = t_2;
	} else if (k <= 1020000000.0) {
		tmp = t_1;
	} else if (k <= 1e+176) {
		tmp = -4.0 * ((x * i) + (t * a));
	} else if (k <= 6.2e+188) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) + (-4.0 * (t * a))
	t_2 = -27.0 * (j * k)
	tmp = 0
	if k <= -1.56e-21:
		tmp = t_2
	elif k <= 1020000000.0:
		tmp = t_1
	elif k <= 1e+176:
		tmp = -4.0 * ((x * i) + (t * a))
	elif k <= 6.2e+188:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)))
	t_2 = Float64(-27.0 * Float64(j * k))
	tmp = 0.0
	if (k <= -1.56e-21)
		tmp = t_2;
	elseif (k <= 1020000000.0)
		tmp = t_1;
	elseif (k <= 1e+176)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	elseif (k <= 6.2e+188)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) + (-4.0 * (t * a));
	t_2 = -27.0 * (j * k);
	tmp = 0.0;
	if (k <= -1.56e-21)
		tmp = t_2;
	elseif (k <= 1020000000.0)
		tmp = t_1;
	elseif (k <= 1e+176)
		tmp = -4.0 * ((x * i) + (t * a));
	elseif (k <= 6.2e+188)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.56e-21], t$95$2, If[LessEqual[k, 1020000000.0], t$95$1, If[LessEqual[k, 1e+176], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.2e+188], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;k \leq 1020000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;k \leq 10^{+176}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\

\mathbf{elif}\;k \leq 6.2 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -1.55999999999999999e-21 or 6.2000000000000004e188 < k

    1. Initial program 78.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified81.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around inf 47.9%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if -1.55999999999999999e-21 < k < 1.02e9 or 1e176 < k < 6.2000000000000004e188

    1. Initial program 84.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified91.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 85.5%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in x around 0 58.6%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]

    if 1.02e9 < k < 1e176

    1. Initial program 87.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 82.3%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out82.3%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative82.3%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified82.3%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 65.9%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]
    7. Taylor expanded in b around 0 53.6%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t + i \cdot x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1020000000:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;k \leq 10^{+176}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;k \leq 6.2 \cdot 10^{+188}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 50.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-17}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + t\_2\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-253}:\\ \;\;\;\;b \cdot c + t\_2\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (* j (* k -27.0))))
   (if (<= a -1.4e+87)
     t_1
     (if (<= a -6.5e-17)
       (+ (* i (* x -4.0)) t_2)
       (if (<= a 7.5e-253)
         (+ (* b c) t_2)
         (if (<= a 1.25e+73) (- (* b c) (* 4.0 (* x i))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + (-4.0 * (t * a));
	double t_2 = j * (k * -27.0);
	double tmp;
	if (a <= -1.4e+87) {
		tmp = t_1;
	} else if (a <= -6.5e-17) {
		tmp = (i * (x * -4.0)) + t_2;
	} else if (a <= 7.5e-253) {
		tmp = (b * c) + t_2;
	} else if (a <= 1.25e+73) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (b * c) + ((-4.0d0) * (t * a))
    t_2 = j * (k * (-27.0d0))
    if (a <= (-1.4d+87)) then
        tmp = t_1
    else if (a <= (-6.5d-17)) then
        tmp = (i * (x * (-4.0d0))) + t_2
    else if (a <= 7.5d-253) then
        tmp = (b * c) + t_2
    else if (a <= 1.25d+73) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + (-4.0 * (t * a));
	double t_2 = j * (k * -27.0);
	double tmp;
	if (a <= -1.4e+87) {
		tmp = t_1;
	} else if (a <= -6.5e-17) {
		tmp = (i * (x * -4.0)) + t_2;
	} else if (a <= 7.5e-253) {
		tmp = (b * c) + t_2;
	} else if (a <= 1.25e+73) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) + (-4.0 * (t * a))
	t_2 = j * (k * -27.0)
	tmp = 0
	if a <= -1.4e+87:
		tmp = t_1
	elif a <= -6.5e-17:
		tmp = (i * (x * -4.0)) + t_2
	elif a <= 7.5e-253:
		tmp = (b * c) + t_2
	elif a <= 1.25e+73:
		tmp = (b * c) - (4.0 * (x * i))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)))
	t_2 = Float64(j * Float64(k * -27.0))
	tmp = 0.0
	if (a <= -1.4e+87)
		tmp = t_1;
	elseif (a <= -6.5e-17)
		tmp = Float64(Float64(i * Float64(x * -4.0)) + t_2);
	elseif (a <= 7.5e-253)
		tmp = Float64(Float64(b * c) + t_2);
	elseif (a <= 1.25e+73)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) + (-4.0 * (t * a));
	t_2 = j * (k * -27.0);
	tmp = 0.0;
	if (a <= -1.4e+87)
		tmp = t_1;
	elseif (a <= -6.5e-17)
		tmp = (i * (x * -4.0)) + t_2;
	elseif (a <= 7.5e-253)
		tmp = (b * c) + t_2;
	elseif (a <= 1.25e+73)
		tmp = (b * c) - (4.0 * (x * i));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+87], t$95$1, If[LessEqual[a, -6.5e-17], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[a, 7.5e-253], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[a, 1.25e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-17}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_2\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-253}:\\
\;\;\;\;b \cdot c + t\_2\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.40000000000000008e87 or 1.24999999999999994e73 < a

    1. Initial program 81.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified85.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 76.1%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in x around 0 65.2%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]

    if -1.40000000000000008e87 < a < -6.4999999999999996e-17

    1. Initial program 81.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified87.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in i around inf 63.0%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval63.0%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(i \cdot x\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in63.0%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(i \cdot x\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative63.0%

        \[\leadsto \left(-\color{blue}{\left(i \cdot x\right) \cdot 4}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*r*63.0%

        \[\leadsto \left(-\color{blue}{i \cdot \left(x \cdot 4\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-rgt-neg-in63.0%

        \[\leadsto \color{blue}{i \cdot \left(-x \cdot 4\right)} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-rgt-neg-in63.0%

        \[\leadsto i \cdot \color{blue}{\left(x \cdot \left(-4\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval63.0%

        \[\leadsto i \cdot \left(x \cdot \color{blue}{-4}\right) + j \cdot \left(k \cdot -27\right) \]
      8. *-commutative63.0%

        \[\leadsto i \cdot \color{blue}{\left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified63.0%

      \[\leadsto \color{blue}{i \cdot \left(-4 \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]

    if -6.4999999999999996e-17 < a < 7.49999999999999987e-253

    1. Initial program 82.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified89.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 60.3%

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]

    if 7.49999999999999987e-253 < a < 1.24999999999999994e73

    1. Initial program 81.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified84.5%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 76.9%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in t around 0 55.1%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification60.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+87}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-17}:\\ \;\;\;\;i \cdot \left(x \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-253}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 50.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{if}\;a \leq -8.1 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-79}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* -4.0 (+ (* x i) (* t a)))))
   (if (<= a -8.1e-16)
     t_1
     (if (<= a 4.6e-79)
       (+ (* b c) (* j (* k -27.0)))
       (if (<= a 2.5e+36) t_1 (+ (* b c) (* -4.0 (* t a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -4.0 * ((x * i) + (t * a));
	double tmp;
	if (a <= -8.1e-16) {
		tmp = t_1;
	} else if (a <= 4.6e-79) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (a <= 2.5e+36) {
		tmp = t_1;
	} else {
		tmp = (b * c) + (-4.0 * (t * a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-4.0d0) * ((x * i) + (t * a))
    if (a <= (-8.1d-16)) then
        tmp = t_1
    else if (a <= 4.6d-79) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else if (a <= 2.5d+36) then
        tmp = t_1
    else
        tmp = (b * c) + ((-4.0d0) * (t * a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -4.0 * ((x * i) + (t * a));
	double tmp;
	if (a <= -8.1e-16) {
		tmp = t_1;
	} else if (a <= 4.6e-79) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (a <= 2.5e+36) {
		tmp = t_1;
	} else {
		tmp = (b * c) + (-4.0 * (t * a));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = -4.0 * ((x * i) + (t * a))
	tmp = 0
	if a <= -8.1e-16:
		tmp = t_1
	elif a <= 4.6e-79:
		tmp = (b * c) + (j * (k * -27.0))
	elif a <= 2.5e+36:
		tmp = t_1
	else:
		tmp = (b * c) + (-4.0 * (t * a))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)))
	tmp = 0.0
	if (a <= -8.1e-16)
		tmp = t_1;
	elseif (a <= 4.6e-79)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	elseif (a <= 2.5e+36)
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = -4.0 * ((x * i) + (t * a));
	tmp = 0.0;
	if (a <= -8.1e-16)
		tmp = t_1;
	elseif (a <= 4.6e-79)
		tmp = (b * c) + (j * (k * -27.0));
	elseif (a <= 2.5e+36)
		tmp = t_1;
	else
		tmp = (b * c) + (-4.0 * (t * a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.1e-16], t$95$1, If[LessEqual[a, 4.6e-79], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+36], t$95$1, N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;a \leq -8.1 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{-79}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.10000000000000047e-16 or 4.60000000000000023e-79 < a < 2.49999999999999988e36

    1. Initial program 77.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 76.1%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out76.1%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative76.1%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified76.1%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 64.7%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]
    7. Taylor expanded in b around 0 54.5%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t + i \cdot x\right)} \]

    if -8.10000000000000047e-16 < a < 4.60000000000000023e-79

    1. Initial program 86.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified90.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 55.8%

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]

    if 2.49999999999999988e36 < a

    1. Initial program 81.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified86.6%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 77.4%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in x around 0 67.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.1 \cdot 10^{-16}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-79}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+36}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.5% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-16}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-253}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= a -2e-16)
   (* -4.0 (+ (* x i) (* t a)))
   (if (<= a 8.2e-253)
     (+ (* b c) (* j (* k -27.0)))
     (if (<= a 1.55e+73)
       (- (* b c) (* 4.0 (* x i)))
       (+ (* b c) (* -4.0 (* t a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (a <= -2e-16) {
		tmp = -4.0 * ((x * i) + (t * a));
	} else if (a <= 8.2e-253) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (a <= 1.55e+73) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) + (-4.0 * (t * a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (a <= (-2d-16)) then
        tmp = (-4.0d0) * ((x * i) + (t * a))
    else if (a <= 8.2d-253) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else if (a <= 1.55d+73) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else
        tmp = (b * c) + ((-4.0d0) * (t * a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (a <= -2e-16) {
		tmp = -4.0 * ((x * i) + (t * a));
	} else if (a <= 8.2e-253) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (a <= 1.55e+73) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) + (-4.0 * (t * a));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if a <= -2e-16:
		tmp = -4.0 * ((x * i) + (t * a))
	elif a <= 8.2e-253:
		tmp = (b * c) + (j * (k * -27.0))
	elif a <= 1.55e+73:
		tmp = (b * c) - (4.0 * (x * i))
	else:
		tmp = (b * c) + (-4.0 * (t * a))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (a <= -2e-16)
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	elseif (a <= 8.2e-253)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	elseif (a <= 1.55e+73)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	else
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (a <= -2e-16)
		tmp = -4.0 * ((x * i) + (t * a));
	elseif (a <= 8.2e-253)
		tmp = (b * c) + (j * (k * -27.0));
	elseif (a <= 1.55e+73)
		tmp = (b * c) - (4.0 * (x * i));
	else
		tmp = (b * c) + (-4.0 * (t * a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[a, -2e-16], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e-253], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-16}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-253}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\


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

    1. Initial program 80.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 80.3%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out80.3%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative80.3%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified80.3%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 62.7%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]
    7. Taylor expanded in b around 0 53.6%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t + i \cdot x\right)} \]

    if -2e-16 < a < 8.20000000000000004e-253

    1. Initial program 82.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified89.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 60.3%

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]

    if 8.20000000000000004e-253 < a < 1.55e73

    1. Initial program 81.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified84.5%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 76.9%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in t around 0 55.1%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]

    if 1.55e73 < a

    1. Initial program 83.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified86.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 78.5%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in x around 0 68.8%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification59.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-16}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-253}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 50.6% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;a \leq -1.45 \cdot 10^{-39}:\\ \;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-261}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= a -1.45e-39)
     (+ t_1 (* a (* t -4.0)))
     (if (<= a 2.45e-261)
       (+ (* b c) t_1)
       (if (<= a 1.55e+73)
         (- (* b c) (* 4.0 (* x i)))
         (+ (* b c) (* -4.0 (* t a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if (a <= -1.45e-39) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (a <= 2.45e-261) {
		tmp = (b * c) + t_1;
	} else if (a <= 1.55e+73) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) + (-4.0 * (t * a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    if (a <= (-1.45d-39)) then
        tmp = t_1 + (a * (t * (-4.0d0)))
    else if (a <= 2.45d-261) then
        tmp = (b * c) + t_1
    else if (a <= 1.55d+73) then
        tmp = (b * c) - (4.0d0 * (x * i))
    else
        tmp = (b * c) + ((-4.0d0) * (t * a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if (a <= -1.45e-39) {
		tmp = t_1 + (a * (t * -4.0));
	} else if (a <= 2.45e-261) {
		tmp = (b * c) + t_1;
	} else if (a <= 1.55e+73) {
		tmp = (b * c) - (4.0 * (x * i));
	} else {
		tmp = (b * c) + (-4.0 * (t * a));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	tmp = 0
	if a <= -1.45e-39:
		tmp = t_1 + (a * (t * -4.0))
	elif a <= 2.45e-261:
		tmp = (b * c) + t_1
	elif a <= 1.55e+73:
		tmp = (b * c) - (4.0 * (x * i))
	else:
		tmp = (b * c) + (-4.0 * (t * a))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	tmp = 0.0
	if (a <= -1.45e-39)
		tmp = Float64(t_1 + Float64(a * Float64(t * -4.0)));
	elseif (a <= 2.45e-261)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (a <= 1.55e+73)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i)));
	else
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	tmp = 0.0;
	if (a <= -1.45e-39)
		tmp = t_1 + (a * (t * -4.0));
	elseif (a <= 2.45e-261)
		tmp = (b * c) + t_1;
	elseif (a <= 1.55e+73)
		tmp = (b * c) - (4.0 * (x * i));
	else
		tmp = (b * c) + (-4.0 * (t * a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.45e-39], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.45e-261], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[a, 1.55e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{-39}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\

\mathbf{elif}\;a \leq 2.45 \cdot 10^{-261}:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.44999999999999994e-39

    1. Initial program 76.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified83.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in a around inf 62.5%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. metadata-eval62.5%

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + j \cdot \left(k \cdot -27\right) \]
      2. distribute-lft-neg-in62.5%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      3. *-commutative62.5%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)}\right) + j \cdot \left(k \cdot -27\right) \]
      4. associate-*l*62.5%

        \[\leadsto \left(-\color{blue}{\left(4 \cdot t\right) \cdot a}\right) + j \cdot \left(k \cdot -27\right) \]
      5. distribute-lft-neg-in62.5%

        \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]
      6. distribute-lft-neg-in62.5%

        \[\leadsto \color{blue}{\left(\left(-4\right) \cdot t\right)} \cdot a + j \cdot \left(k \cdot -27\right) \]
      7. metadata-eval62.5%

        \[\leadsto \left(\color{blue}{-4} \cdot t\right) \cdot a + j \cdot \left(k \cdot -27\right) \]
    6. Simplified62.5%

      \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + j \cdot \left(k \cdot -27\right) \]

    if -1.44999999999999994e-39 < a < 2.45000000000000002e-261

    1. Initial program 86.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified92.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in b around inf 63.4%

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]

    if 2.45000000000000002e-261 < a < 1.55e73

    1. Initial program 81.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified84.5%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 76.9%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in t around 0 55.1%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(i \cdot x\right)} \]

    if 1.55e73 < a

    1. Initial program 83.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified86.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 78.5%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in x around 0 68.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-39}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-261}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 32.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;a \leq -6.8 \cdot 10^{+71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-199}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (* a -4.0))))
   (if (<= a -6.8e+71)
     t_1
     (if (<= a 4.5e-199) (* -27.0 (* j k)) (if (<= a 5.4e+73) (* b c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * (a * -4.0);
	double tmp;
	if (a <= -6.8e+71) {
		tmp = t_1;
	} else if (a <= 4.5e-199) {
		tmp = -27.0 * (j * k);
	} else if (a <= 5.4e+73) {
		tmp = b * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (a * (-4.0d0))
    if (a <= (-6.8d+71)) then
        tmp = t_1
    else if (a <= 4.5d-199) then
        tmp = (-27.0d0) * (j * k)
    else if (a <= 5.4d+73) then
        tmp = b * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * (a * -4.0);
	double tmp;
	if (a <= -6.8e+71) {
		tmp = t_1;
	} else if (a <= 4.5e-199) {
		tmp = -27.0 * (j * k);
	} else if (a <= 5.4e+73) {
		tmp = b * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = t * (a * -4.0)
	tmp = 0
	if a <= -6.8e+71:
		tmp = t_1
	elif a <= 4.5e-199:
		tmp = -27.0 * (j * k)
	elif a <= 5.4e+73:
		tmp = b * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(a * -4.0))
	tmp = 0.0
	if (a <= -6.8e+71)
		tmp = t_1;
	elseif (a <= 4.5e-199)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (a <= 5.4e+73)
		tmp = Float64(b * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = t * (a * -4.0);
	tmp = 0.0;
	if (a <= -6.8e+71)
		tmp = t_1;
	elseif (a <= 4.5e-199)
		tmp = -27.0 * (j * k);
	elseif (a <= 5.4e+73)
		tmp = b * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.8e+71], t$95$1, If[LessEqual[a, 4.5e-199], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.4e+73], N[(b * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;a \leq -6.8 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-199}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.7999999999999997e71 or 5.3999999999999998e73 < a

    1. Initial program 81.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified85.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 76.3%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in a around inf 53.9%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(a \cdot -4\right)} \]

    if -6.7999999999999997e71 < a < 4.49999999999999998e-199

    1. Initial program 85.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified90.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around inf 38.0%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if 4.49999999999999998e-199 < a < 5.3999999999999998e73

    1. Initial program 78.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified81.4%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 73.5%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in b around inf 30.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{+71}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-199}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{+73}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 31.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;a \leq -9.5 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.6 \cdot 10^{-256}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (* a -4.0))))
   (if (<= a -9.5e+69)
     t_1
     (if (<= a 9.6e-256)
       (* -27.0 (* j k))
       (if (<= a 1.12e+73) (* x (* i -4.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * (a * -4.0);
	double tmp;
	if (a <= -9.5e+69) {
		tmp = t_1;
	} else if (a <= 9.6e-256) {
		tmp = -27.0 * (j * k);
	} else if (a <= 1.12e+73) {
		tmp = x * (i * -4.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (a * (-4.0d0))
    if (a <= (-9.5d+69)) then
        tmp = t_1
    else if (a <= 9.6d-256) then
        tmp = (-27.0d0) * (j * k)
    else if (a <= 1.12d+73) then
        tmp = x * (i * (-4.0d0))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * (a * -4.0);
	double tmp;
	if (a <= -9.5e+69) {
		tmp = t_1;
	} else if (a <= 9.6e-256) {
		tmp = -27.0 * (j * k);
	} else if (a <= 1.12e+73) {
		tmp = x * (i * -4.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = t * (a * -4.0)
	tmp = 0
	if a <= -9.5e+69:
		tmp = t_1
	elif a <= 9.6e-256:
		tmp = -27.0 * (j * k)
	elif a <= 1.12e+73:
		tmp = x * (i * -4.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(a * -4.0))
	tmp = 0.0
	if (a <= -9.5e+69)
		tmp = t_1;
	elseif (a <= 9.6e-256)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (a <= 1.12e+73)
		tmp = Float64(x * Float64(i * -4.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = t * (a * -4.0);
	tmp = 0.0;
	if (a <= -9.5e+69)
		tmp = t_1;
	elseif (a <= 9.6e-256)
		tmp = -27.0 * (j * k);
	elseif (a <= 1.12e+73)
		tmp = x * (i * -4.0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.5e+69], t$95$1, If[LessEqual[a, 9.6e-256], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.12e+73], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 9.6 \cdot 10^{-256}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+73}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.4999999999999995e69 or 1.12e73 < a

    1. Initial program 81.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified85.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 76.3%

      \[\leadsto \color{blue}{\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    5. Taylor expanded in a around inf 53.9%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(a \cdot -4\right)} \]

    if -9.4999999999999995e69 < a < 9.5999999999999998e-256

    1. Initial program 83.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified89.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around inf 41.0%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if 9.5999999999999998e-256 < a < 1.12e73

    1. Initial program 81.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified84.5%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 76.7%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in i around inf 30.5%

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    6. Step-by-step derivation
      1. *-commutative30.5%

        \[\leadsto -4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      2. *-commutative30.5%

        \[\leadsto \color{blue}{\left(x \cdot i\right) \cdot -4} \]
      3. associate-*l*30.5%

        \[\leadsto \color{blue}{x \cdot \left(i \cdot -4\right)} \]
      4. *-commutative30.5%

        \[\leadsto x \cdot \color{blue}{\left(-4 \cdot i\right)} \]
    7. Simplified30.5%

      \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;a \leq 9.6 \cdot 10^{-256}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 42.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -2.55 \cdot 10^{-14} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= k -2.55e-14) (not (<= k 1.2e+189)))
   (* -27.0 (* j k))
   (* -4.0 (+ (* x i) (* t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((k <= -2.55e-14) || !(k <= 1.2e+189)) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = -4.0 * ((x * i) + (t * a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= (-2.55d-14)) .or. (.not. (k <= 1.2d+189))) then
        tmp = (-27.0d0) * (j * k)
    else
        tmp = (-4.0d0) * ((x * i) + (t * a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((k <= -2.55e-14) || !(k <= 1.2e+189)) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = -4.0 * ((x * i) + (t * a));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (k <= -2.55e-14) or not (k <= 1.2e+189):
		tmp = -27.0 * (j * k)
	else:
		tmp = -4.0 * ((x * i) + (t * a))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((k <= -2.55e-14) || !(k <= 1.2e+189))
		tmp = Float64(-27.0 * Float64(j * k));
	else
		tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((k <= -2.55e-14) || ~((k <= 1.2e+189)))
		tmp = -27.0 * (j * k);
	else
		tmp = -4.0 * ((x * i) + (t * a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -2.55e-14], N[Not[LessEqual[k, 1.2e+189]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.55 \cdot 10^{-14} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -2.5499999999999999e-14 or 1.2e189 < k

    1. Initial program 79.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified81.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around inf 49.2%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if -2.5499999999999999e-14 < k < 1.2e189

    1. Initial program 84.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 79.6%

      \[\leadsto \color{blue}{\left(b \cdot c - \left(4 \cdot \left(a \cdot t\right) + 4 \cdot \left(i \cdot x\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. distribute-lft-out79.6%

        \[\leadsto \left(b \cdot c - \color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative79.6%

        \[\leadsto \left(b \cdot c - 4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
    5. Simplified79.6%

      \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(t \cdot a + i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Taylor expanded in j around 0 71.4%

      \[\leadsto \color{blue}{b \cdot c - 4 \cdot \left(a \cdot t + i \cdot x\right)} \]
    7. Taylor expanded in b around 0 48.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -2.55 \cdot 10^{-14} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 32.2% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -2.1 \cdot 10^{-25} \lor \neg \left(k \leq 5.7 \cdot 10^{+104}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= k -2.1e-25) (not (<= k 5.7e+104))) (* -27.0 (* j k)) (* b c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((k <= -2.1e-25) || !(k <= 5.7e+104)) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = b * c;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((k <= (-2.1d-25)) .or. (.not. (k <= 5.7d+104))) then
        tmp = (-27.0d0) * (j * k)
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((k <= -2.1e-25) || !(k <= 5.7e+104)) {
		tmp = -27.0 * (j * k);
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (k <= -2.1e-25) or not (k <= 5.7e+104):
		tmp = -27.0 * (j * k)
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((k <= -2.1e-25) || !(k <= 5.7e+104))
		tmp = Float64(-27.0 * Float64(j * k));
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((k <= -2.1e-25) || ~((k <= 5.7e+104)))
		tmp = -27.0 * (j * k);
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -2.1e-25], N[Not[LessEqual[k, 5.7e+104]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.1 \cdot 10^{-25} \lor \neg \left(k \leq 5.7 \cdot 10^{+104}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -2.10000000000000002e-25 or 5.69999999999999985e104 < k

    1. Initial program 79.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified82.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around inf 44.4%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if -2.10000000000000002e-25 < k < 5.69999999999999985e104

    1. Initial program 84.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified90.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 74.5%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in b around inf 29.6%

      \[\leadsto \color{blue}{b \cdot c} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -2.1 \cdot 10^{-25} \lor \neg \left(k \leq 5.7 \cdot 10^{+104}\right):\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 32.2% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -1.2 \cdot 10^{-21}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.32 \cdot 10^{+104}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= k -1.2e-21)
   (* -27.0 (* j k))
   (if (<= k 1.32e+104) (* b c) (* k (* j -27.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (k <= -1.2e-21) {
		tmp = -27.0 * (j * k);
	} else if (k <= 1.32e+104) {
		tmp = b * c;
	} else {
		tmp = k * (j * -27.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= (-1.2d-21)) then
        tmp = (-27.0d0) * (j * k)
    else if (k <= 1.32d+104) then
        tmp = b * c
    else
        tmp = k * (j * (-27.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (k <= -1.2e-21) {
		tmp = -27.0 * (j * k);
	} else if (k <= 1.32e+104) {
		tmp = b * c;
	} else {
		tmp = k * (j * -27.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if k <= -1.2e-21:
		tmp = -27.0 * (j * k)
	elif k <= 1.32e+104:
		tmp = b * c
	else:
		tmp = k * (j * -27.0)
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (k <= -1.2e-21)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (k <= 1.32e+104)
		tmp = Float64(b * c);
	else
		tmp = Float64(k * Float64(j * -27.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (k <= -1.2e-21)
		tmp = -27.0 * (j * k);
	elseif (k <= 1.32e+104)
		tmp = b * c;
	else
		tmp = k * (j * -27.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.2e-21], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.32e+104], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.2 \cdot 10^{-21}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;k \leq 1.32 \cdot 10^{+104}:\\
\;\;\;\;b \cdot c\\

\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -1.2e-21

    1. Initial program 80.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified83.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around inf 44.5%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if -1.2e-21 < k < 1.32000000000000003e104

    1. Initial program 84.4%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified90.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 74.5%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in b around inf 29.6%

      \[\leadsto \color{blue}{b \cdot c} \]

    if 1.32000000000000003e104 < k

    1. Initial program 78.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified80.5%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 73.8%

      \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    5. Taylor expanded in j around inf 44.4%

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

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
      2. *-commutative44.4%

        \[\leadsto \color{blue}{k \cdot \left(-27 \cdot j\right)} \]
      3. *-commutative44.4%

        \[\leadsto k \cdot \color{blue}{\left(j \cdot -27\right)} \]
    7. Simplified44.4%

      \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification36.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.2 \cdot 10^{-21}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;k \leq 1.32 \cdot 10^{+104}:\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 23.3% accurate, 10.3× speedup?

\[\begin{array}{l} \\ b \cdot c \end{array} \]
(FPCore (x y z t a b c i j k) :precision binary64 (* b c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return b * c;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    code = b * c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return b * c;
}
def code(x, y, z, t, a, b, c, i, j, k):
	return b * c
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(b * c)
end
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = b * c;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}

\\
b \cdot c
\end{array}
Derivation
  1. Initial program 82.1%

    \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
  2. Simplified85.6%

    \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in y around inf 74.7%

    \[\leadsto \left(\color{blue}{y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
  5. Taylor expanded in b around inf 21.1%

    \[\leadsto \color{blue}{b \cdot c} \]
  6. Final simplification21.1%

    \[\leadsto b \cdot c \]
  7. Add Preprocessing

Developer target: 89.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
        (t_2
         (-
          (- (* (* 18.0 t) (* (* x y) z)) t_1)
          (- (* (* k j) 27.0) (* c b)))))
   (if (< t -1.6210815397541398e-69)
     t_2
     (if (< t 165.68027943805222)
       (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((a * t) + (i * x)) * 4.0d0
    t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
    if (t < (-1.6210815397541398d-69)) then
        tmp = t_2
    else if (t < 165.68027943805222d0) then
        tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = ((a * t) + (i * x)) * 4.0;
	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	double tmp;
	if (t < -1.6210815397541398e-69) {
		tmp = t_2;
	} else if (t < 165.68027943805222) {
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = ((a * t) + (i * x)) * 4.0
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
	tmp = 0
	if t < -1.6210815397541398e-69:
		tmp = t_2
	elif t < 165.68027943805222:
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
	tmp = 0.0
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = ((a * t) + (i * x)) * 4.0;
	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
	tmp = 0.0;
	if (t < -1.6210815397541398e-69)
		tmp = t_2;
	elseif (t < 165.68027943805222)
		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024095 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :alt
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))