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

Percentage Accurate: 85.1% → 92.2%
Time: 24.9s
Alternatives: 24
Speedup: 0.9×

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 24 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.1% 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: 92.2% accurate, 0.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 18\right) \cdot y\\ \mathbf{if}\;\left(\left(\left(z \cdot t_1\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \mathsf{fma}\left(z, t_1, a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(k \cdot 27\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* x 18.0) y)))
   (if (<=
        (- (+ (- (* (* z t_1) t) (* t (* a 4.0))) (* b c)) (* (* x 4.0) i))
        INFINITY)
     (fma
      (* k -27.0)
      j
      (fma t (fma z t_1 (* a -4.0)) (fma b c (* x (* i -4.0)))))
     (- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (* j (* k 27.0))))))
assert(y < z);
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 = (x * 18.0) * y;
	double tmp;
	if ((((((z * t_1) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) <= ((double) INFINITY)) {
		tmp = fma((k * -27.0), j, fma(t, fma(z, t_1, (a * -4.0)), fma(b, c, (x * (i * -4.0)))));
	} else {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (k * 27.0));
	}
	return tmp;
}
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(x * 18.0) * y)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(z * t_1) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) <= Inf)
		tmp = fma(Float64(k * -27.0), j, fma(t, fma(z, t_1, Float64(a * -4.0)), fma(b, c, Float64(x * Float64(i * -4.0)))));
	else
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - Float64(j * Float64(k * 27.0)));
	end
	return tmp
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(z * t$95$1), $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], Infinity], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(z * t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 18\right) \cdot y\\
\mathbf{if}\;\left(\left(\left(z \cdot t_1\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \mathsf{fma}\left(z, t_1, a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right)\\

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


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

    1. Initial program 94.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. Simplified94.4%

      \[\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. Step-by-step derivation
      1. +-commutative94.4%

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + \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)} \]
      2. *-commutative94.4%

        \[\leadsto \color{blue}{\left(k \cdot -27\right) \cdot j} + \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) \]
      3. fma-def95.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \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)\right)} \]
      4. fma-udef95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \color{blue}{x \cdot \left(18 \cdot \left(y \cdot z\right)\right) + a \cdot -4}, \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) \]
      5. associate-*l*95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} + a \cdot -4, \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) \]
      6. associate-*r*95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} + a \cdot -4, \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) \]
      7. *-commutative95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \color{blue}{z \cdot \left(\left(x \cdot 18\right) \cdot y\right)} + a \cdot -4, \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) \]
      8. fma-def95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \color{blue}{\mathsf{fma}\left(z, \left(x \cdot 18\right) \cdot y, a \cdot -4\right)}, \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) \]
      9. *-commutative95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \mathsf{fma}\left(z, \color{blue}{y \cdot \left(x \cdot 18\right)}, a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right)\right) \]
      10. *-commutative95.7%

        \[\leadsto \mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \mathsf{fma}\left(z, y \cdot \left(x \cdot 18\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \color{blue}{\left(-4 \cdot i\right)}\right)\right)\right) \]
    4. Applied egg-rr95.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \mathsf{fma}\left(z, y \cdot \left(x \cdot 18\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right)\right)} \]

    if +inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i))

    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. Step-by-step derivation
      1. associate-*l*0.0%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+0.0%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--11.1%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*22.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*22.2%

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

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

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

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

Alternative 2: 91.4% accurate, 0.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := \left(\left(\left(\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(k \cdot 27\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (-
          (-
           (+ (- (* (* z (* (* x 18.0) y)) t) (* t (* a 4.0))) (* b c))
           (* (* x 4.0) i))
          (* k (* j 27.0)))))
   (if (<= t_1 INFINITY)
     t_1
     (- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (* j (* k 27.0))))))
assert(y < z);
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 = (((((z * ((x * 18.0) * y)) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (k * 27.0));
	}
	return tmp;
}
assert y < z;
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 = (((((z * ((x * 18.0) * y)) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (k * 27.0));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (((((z * ((x * 18.0) * y)) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (k * 27.0))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(z * Float64(Float64(x * 18.0) * y)) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - Float64(j * Float64(k * 27.0)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (((((z * ((x * 18.0) * y)) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - (j * (k * 27.0));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(z * N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]), $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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 96.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 \]

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) 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. Step-by-step derivation
      1. associate-*l*0.0%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+0.0%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--9.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*19.4%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*19.4%

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

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

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

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

Alternative 3: 53.8% accurate, 0.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\ t_2 := \left(k \cdot -27\right) \cdot j\\ t_3 := x \cdot \left(i \cdot -4\right) + t_2\\ t_4 := t_2 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{-12}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -2.45 \cdot 10^{-275}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-292}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 6.8 \cdot 10^{-136}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \cdot c \leq 1.42 \cdot 10^{+94}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{+120}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+179}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* 27.0 (* k j))))
        (t_2 (* (* k -27.0) j))
        (t_3 (+ (* x (* i -4.0)) t_2))
        (t_4 (+ t_2 (* -4.0 (* t a)))))
   (if (<= (* b c) -1.25e-12)
     t_1
     (if (<= (* b c) -2.45e-275)
       t_4
       (if (<= (* b c) 1.65e-292)
         t_3
         (if (<= (* b c) 6.8e-136)
           t_4
           (if (<= (* b c) 1.42e+94)
             t_3
             (if (<= (* b c) 2.6e+120)
               (* t (* 18.0 (* x (* y z))))
               (if (<= (* b c) 6.2e+179) t_3 t_1)))))))))
assert(y < z);
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) - (27.0 * (k * j));
	double t_2 = (k * -27.0) * j;
	double t_3 = (x * (i * -4.0)) + t_2;
	double t_4 = t_2 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -1.25e-12) {
		tmp = t_1;
	} else if ((b * c) <= -2.45e-275) {
		tmp = t_4;
	} else if ((b * c) <= 1.65e-292) {
		tmp = t_3;
	} else if ((b * c) <= 6.8e-136) {
		tmp = t_4;
	} else if ((b * c) <= 1.42e+94) {
		tmp = t_3;
	} else if ((b * c) <= 2.6e+120) {
		tmp = t * (18.0 * (x * (y * z)));
	} else if ((b * c) <= 6.2e+179) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) :: t_4
    real(8) :: tmp
    t_1 = (b * c) - (27.0d0 * (k * j))
    t_2 = (k * (-27.0d0)) * j
    t_3 = (x * (i * (-4.0d0))) + t_2
    t_4 = t_2 + ((-4.0d0) * (t * a))
    if ((b * c) <= (-1.25d-12)) then
        tmp = t_1
    else if ((b * c) <= (-2.45d-275)) then
        tmp = t_4
    else if ((b * c) <= 1.65d-292) then
        tmp = t_3
    else if ((b * c) <= 6.8d-136) then
        tmp = t_4
    else if ((b * c) <= 1.42d+94) then
        tmp = t_3
    else if ((b * c) <= 2.6d+120) then
        tmp = t * (18.0d0 * (x * (y * z)))
    else if ((b * c) <= 6.2d+179) then
        tmp = t_3
    else
        tmp = t_1
    end if
    code = tmp
end function
assert y < z;
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) - (27.0 * (k * j));
	double t_2 = (k * -27.0) * j;
	double t_3 = (x * (i * -4.0)) + t_2;
	double t_4 = t_2 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -1.25e-12) {
		tmp = t_1;
	} else if ((b * c) <= -2.45e-275) {
		tmp = t_4;
	} else if ((b * c) <= 1.65e-292) {
		tmp = t_3;
	} else if ((b * c) <= 6.8e-136) {
		tmp = t_4;
	} else if ((b * c) <= 1.42e+94) {
		tmp = t_3;
	} else if ((b * c) <= 2.6e+120) {
		tmp = t * (18.0 * (x * (y * z)));
	} else if ((b * c) <= 6.2e+179) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (27.0 * (k * j))
	t_2 = (k * -27.0) * j
	t_3 = (x * (i * -4.0)) + t_2
	t_4 = t_2 + (-4.0 * (t * a))
	tmp = 0
	if (b * c) <= -1.25e-12:
		tmp = t_1
	elif (b * c) <= -2.45e-275:
		tmp = t_4
	elif (b * c) <= 1.65e-292:
		tmp = t_3
	elif (b * c) <= 6.8e-136:
		tmp = t_4
	elif (b * c) <= 1.42e+94:
		tmp = t_3
	elif (b * c) <= 2.6e+120:
		tmp = t * (18.0 * (x * (y * z)))
	elif (b * c) <= 6.2e+179:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(k * j)))
	t_2 = Float64(Float64(k * -27.0) * j)
	t_3 = Float64(Float64(x * Float64(i * -4.0)) + t_2)
	t_4 = Float64(t_2 + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (Float64(b * c) <= -1.25e-12)
		tmp = t_1;
	elseif (Float64(b * c) <= -2.45e-275)
		tmp = t_4;
	elseif (Float64(b * c) <= 1.65e-292)
		tmp = t_3;
	elseif (Float64(b * c) <= 6.8e-136)
		tmp = t_4;
	elseif (Float64(b * c) <= 1.42e+94)
		tmp = t_3;
	elseif (Float64(b * c) <= 2.6e+120)
		tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z))));
	elseif (Float64(b * c) <= 6.2e+179)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - (27.0 * (k * j));
	t_2 = (k * -27.0) * j;
	t_3 = (x * (i * -4.0)) + t_2;
	t_4 = t_2 + (-4.0 * (t * a));
	tmp = 0.0;
	if ((b * c) <= -1.25e-12)
		tmp = t_1;
	elseif ((b * c) <= -2.45e-275)
		tmp = t_4;
	elseif ((b * c) <= 1.65e-292)
		tmp = t_3;
	elseif ((b * c) <= 6.8e-136)
		tmp = t_4;
	elseif ((b * c) <= 1.42e+94)
		tmp = t_3;
	elseif ((b * c) <= 2.6e+120)
		tmp = t * (18.0 * (x * (y * z)));
	elseif ((b * c) <= 6.2e+179)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.25e-12], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.45e-275], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], 1.65e-292], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 6.8e-136], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], 1.42e+94], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 2.6e+120], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.2e+179], t$95$3, t$95$1]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\
t_2 := \left(k \cdot -27\right) \cdot j\\
t_3 := x \cdot \left(i \cdot -4\right) + t_2\\
t_4 := t_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{-12}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -2.45 \cdot 10^{-275}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-292}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot c \leq 6.8 \cdot 10^{-136}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \cdot c \leq 1.42 \cdot 10^{+94}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{+120}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+179}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -1.24999999999999992e-12 or 6.2e179 < (*.f64 b c)

    1. Initial program 80.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. Step-by-step derivation
      1. associate-*l*80.1%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+80.1%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--81.1%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*82.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*82.9%

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

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

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

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

    if -1.24999999999999992e-12 < (*.f64 b c) < -2.44999999999999991e-275 or 1.64999999999999997e-292 < (*.f64 b c) < 6.8000000000000001e-136

    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. Simplified88.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. 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) \]
    4. Step-by-step derivation
      1. *-commutative59.0%

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

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

    if -2.44999999999999991e-275 < (*.f64 b c) < 1.64999999999999997e-292 or 6.8000000000000001e-136 < (*.f64 b c) < 1.4200000000000001e94 or 2.5999999999999999e120 < (*.f64 b c) < 6.2e179

    1. Initial program 88.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. Simplified91.9%

      \[\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. Taylor expanded in i around inf 66.3%

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

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

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

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

    if 1.4200000000000001e94 < (*.f64 b c) < 2.5999999999999999e120

    1. Initial program 99.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. Step-by-step derivation
      1. associate-*l*99.7%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+99.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--99.7%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*100.0%

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 100.0%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    7. Taylor expanded in x around inf 84.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{-12}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;b \cdot c \leq -2.45 \cdot 10^{-275}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-292}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;b \cdot c \leq 6.8 \cdot 10^{-136}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 1.42 \cdot 10^{+94}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{+120}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+179}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \end{array} \]

Alternative 4: 89.3% accurate, 0.9× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot 27\right)\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{+78} \lor \neg \left(t \leq 2.4 \cdot 10^{+185}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right) - a \cdot \left(t \cdot 4\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - t_1\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k 27.0))))
   (if (or (<= t -6.2e+78) (not (<= t 2.4e+185)))
     (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)
     (-
      (+
       (- (* x (* (* y t) (* 18.0 z))) (* a (* t 4.0)))
       (- (* b c) (* x (* 4.0 i))))
      t_1))))
assert(y < z);
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 ((t <= -6.2e+78) || !(t <= 2.4e+185)) {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
	} else {
		tmp = (((x * ((y * t) * (18.0 * z))) - (a * (t * 4.0))) + ((b * c) - (x * (4.0 * i)))) - t_1;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((t <= (-6.2d+78)) .or. (.not. (t <= 2.4d+185))) then
        tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
    else
        tmp = (((x * ((y * t) * (18.0d0 * z))) - (a * (t * 4.0d0))) + ((b * c) - (x * (4.0d0 * i)))) - t_1
    end if
    code = tmp
end function
assert y < z;
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 ((t <= -6.2e+78) || !(t <= 2.4e+185)) {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
	} else {
		tmp = (((x * ((y * t) * (18.0 * z))) - (a * (t * 4.0))) + ((b * c) - (x * (4.0 * i)))) - t_1;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * 27.0)
	tmp = 0
	if (t <= -6.2e+78) or not (t <= 2.4e+185):
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1
	else:
		tmp = (((x * ((y * t) * (18.0 * z))) - (a * (t * 4.0))) + ((b * c) - (x * (4.0 * i)))) - t_1
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * 27.0))
	tmp = 0.0
	if ((t <= -6.2e+78) || !(t <= 2.4e+185))
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1);
	else
		tmp = Float64(Float64(Float64(Float64(x * Float64(Float64(y * t) * Float64(18.0 * z))) - Float64(a * Float64(t * 4.0))) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - t_1);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * 27.0);
	tmp = 0.0;
	if ((t <= -6.2e+78) || ~((t <= 2.4e+185)))
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
	else
		tmp = (((x * ((y * t) * (18.0 * z))) - (a * (t * 4.0))) + ((b * c) - (x * (4.0 * i)))) - t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -6.2e+78], N[Not[LessEqual[t, 2.4e+185]], $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] - t$95$1), $MachinePrecision], N[(N[(N[(N[(x * N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+78} \lor \neg \left(t \leq 2.4 \cdot 10^{+185}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.2e78 or 2.39999999999999989e185 < t

    1. Initial program 75.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. Step-by-step derivation
      1. associate-*l*75.3%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+75.3%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--79.6%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*79.6%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*79.6%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 91.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)} - j \cdot \left(27 \cdot k\right) \]

    if -6.2e78 < t < 2.39999999999999989e185

    1. Initial program 88.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. Step-by-step derivation
      1. associate-*l*87.9%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.9%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*89.4%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*89.4%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate-*r*87.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      2. distribute-rgt-out--87.9%

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

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

        \[\leadsto \left(\left(\color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*r*87.9%

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

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

        \[\leadsto \left(\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right) - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      8. associate-*l*87.9%

        \[\leadsto \left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - \color{blue}{a \cdot \left(4 \cdot t\right)}\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
    5. Applied egg-rr87.9%

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

      \[\leadsto \left(\left(\color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
    7. Step-by-step derivation
      1. *-commutative89.4%

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

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

        \[\leadsto \left(\left(\left(t \cdot \color{blue}{\left(\left(z \cdot y\right) \cdot x\right)}\right) \cdot 18 - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*r*91.5%

        \[\leadsto \left(\left(\color{blue}{\left(\left(t \cdot \left(z \cdot y\right)\right) \cdot x\right)} \cdot 18 - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*r*92.8%

        \[\leadsto \left(\left(\left(\color{blue}{\left(\left(t \cdot z\right) \cdot y\right)} \cdot x\right) \cdot 18 - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      6. associate-*r*92.8%

        \[\leadsto \left(\left(\color{blue}{\left(\left(t \cdot z\right) \cdot y\right) \cdot \left(x \cdot 18\right)} - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      7. associate-*r*90.6%

        \[\leadsto \left(\left(\color{blue}{\left(t \cdot z\right) \cdot \left(y \cdot \left(x \cdot 18\right)\right)} - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      8. associate-*l*87.9%

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

        \[\leadsto \left(\left(\color{blue}{\left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) \cdot t} - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      10. associate-*r*89.4%

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

        \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot 18\right) \cdot \left(z \cdot y\right)\right)} \cdot t - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      12. associate-*l*89.4%

        \[\leadsto \left(\left(\color{blue}{\left(x \cdot \left(18 \cdot \left(z \cdot y\right)\right)\right)} \cdot t - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      13. associate-*l*91.5%

        \[\leadsto \left(\left(\color{blue}{x \cdot \left(\left(18 \cdot \left(z \cdot y\right)\right) \cdot t\right)} - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      14. associate-*r*91.5%

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

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

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

        \[\leadsto \left(\left(x \cdot \color{blue}{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot 18\right)} - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      18. associate-*r*92.5%

        \[\leadsto \left(\left(x \cdot \left(\color{blue}{\left(\left(t \cdot y\right) \cdot z\right)} \cdot 18\right) - a \cdot \left(4 \cdot t\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      19. associate-*l*92.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{+78} \lor \neg \left(t \leq 2.4 \cdot 10^{+185}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - j \cdot \left(k \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right) - a \cdot \left(t \cdot 4\right)\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(k \cdot 27\right)\\ \end{array} \]

Alternative 5: 87.5% accurate, 0.9× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot 27\right)\\ \mathbf{if}\;x \leq -1.6 \cdot 10^{+232} \lor \neg \left(x \leq 2.2 \cdot 10^{+135}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t_1\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k 27.0))))
   (if (or (<= x -1.6e+232) (not (<= x 2.2e+135)))
     (- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) t_1)
     (-
      (+
       (- (* b c) (* x (* 4.0 i)))
       (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
      t_1))))
assert(y < z);
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 ((x <= -1.6e+232) || !(x <= 2.2e+135)) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1;
	} else {
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((x <= (-1.6d+232)) .or. (.not. (x <= 2.2d+135))) then
        tmp = (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))) - t_1
    else
        tmp = (((b * c) - (x * (4.0d0 * i))) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_1
    end if
    code = tmp
end function
assert y < z;
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 ((x <= -1.6e+232) || !(x <= 2.2e+135)) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1;
	} else {
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * 27.0)
	tmp = 0
	if (x <= -1.6e+232) or not (x <= 2.2e+135):
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1
	else:
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * 27.0))
	tmp = 0.0
	if ((x <= -1.6e+232) || !(x <= 2.2e+135))
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - t_1);
	else
		tmp = Float64(Float64(Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_1);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * 27.0);
	tmp = 0.0;
	if ((x <= -1.6e+232) || ~((x <= 2.2e+135)))
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_1;
	else
		tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -1.6e+232], N[Not[LessEqual[x, 2.2e+135]], $MachinePrecision]], N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+232} \lor \neg \left(x \leq 2.2 \cdot 10^{+135}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.6000000000000001e232 or 2.1999999999999999e135 < x

    1. Initial program 55.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. Step-by-step derivation
      1. associate-*l*55.6%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+55.6%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--55.6%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*60.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*60.0%

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

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

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

    if -1.6000000000000001e232 < x < 2.1999999999999999e135

    1. Initial program 91.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. Step-by-step derivation
      1. associate-*l*90.6%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+90.6%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--92.0%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*92.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*92.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+232} \lor \neg \left(x \leq 2.2 \cdot 10^{+135}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(k \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - j \cdot \left(k \cdot 27\right)\\ \end{array} \]

Alternative 6: 56.9% accurate, 1.0× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := b \cdot c - \left(x \cdot 4\right) \cdot i\\ t_2 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\ t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ t_4 := \left(k \cdot -27\right) \cdot j\\ t_5 := t_4 + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{+125}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-29}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-178}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-255}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 10^{-157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+51}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + t_4\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* (* x 4.0) i)))
        (t_2 (- (* b c) (* 27.0 (* k j))))
        (t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
        (t_4 (* (* k -27.0) j))
        (t_5 (+ t_4 (* (* 18.0 t) (* z (* x y))))))
   (if (<= t -5.5e+125)
     t_3
     (if (<= t -4.4e-29)
       t_5
       (if (<= t -3e-138)
         t_1
         (if (<= t -1.4e-178)
           t_5
           (if (<= t 6e-305)
             t_1
             (if (<= t 5.7e-255)
               t_2
               (if (<= t 1e-157)
                 t_1
                 (if (<= t 1.9e+51)
                   (+ (* x (* i -4.0)) t_4)
                   (if (<= t 4.5e+80) t_2 t_3)))))))))))
assert(y < z);
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) - ((x * 4.0) * i);
	double t_2 = (b * c) - (27.0 * (k * j));
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_4 = (k * -27.0) * j;
	double t_5 = t_4 + ((18.0 * t) * (z * (x * y)));
	double tmp;
	if (t <= -5.5e+125) {
		tmp = t_3;
	} else if (t <= -4.4e-29) {
		tmp = t_5;
	} else if (t <= -3e-138) {
		tmp = t_1;
	} else if (t <= -1.4e-178) {
		tmp = t_5;
	} else if (t <= 6e-305) {
		tmp = t_1;
	} else if (t <= 5.7e-255) {
		tmp = t_2;
	} else if (t <= 1e-157) {
		tmp = t_1;
	} else if (t <= 1.9e+51) {
		tmp = (x * (i * -4.0)) + t_4;
	} else if (t <= 4.5e+80) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = (b * c) - ((x * 4.0d0) * i)
    t_2 = (b * c) - (27.0d0 * (k * j))
    t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    t_4 = (k * (-27.0d0)) * j
    t_5 = t_4 + ((18.0d0 * t) * (z * (x * y)))
    if (t <= (-5.5d+125)) then
        tmp = t_3
    else if (t <= (-4.4d-29)) then
        tmp = t_5
    else if (t <= (-3d-138)) then
        tmp = t_1
    else if (t <= (-1.4d-178)) then
        tmp = t_5
    else if (t <= 6d-305) then
        tmp = t_1
    else if (t <= 5.7d-255) then
        tmp = t_2
    else if (t <= 1d-157) then
        tmp = t_1
    else if (t <= 1.9d+51) then
        tmp = (x * (i * (-4.0d0))) + t_4
    else if (t <= 4.5d+80) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
assert y < z;
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) - ((x * 4.0) * i);
	double t_2 = (b * c) - (27.0 * (k * j));
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_4 = (k * -27.0) * j;
	double t_5 = t_4 + ((18.0 * t) * (z * (x * y)));
	double tmp;
	if (t <= -5.5e+125) {
		tmp = t_3;
	} else if (t <= -4.4e-29) {
		tmp = t_5;
	} else if (t <= -3e-138) {
		tmp = t_1;
	} else if (t <= -1.4e-178) {
		tmp = t_5;
	} else if (t <= 6e-305) {
		tmp = t_1;
	} else if (t <= 5.7e-255) {
		tmp = t_2;
	} else if (t <= 1e-157) {
		tmp = t_1;
	} else if (t <= 1.9e+51) {
		tmp = (x * (i * -4.0)) + t_4;
	} else if (t <= 4.5e+80) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - ((x * 4.0) * i)
	t_2 = (b * c) - (27.0 * (k * j))
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	t_4 = (k * -27.0) * j
	t_5 = t_4 + ((18.0 * t) * (z * (x * y)))
	tmp = 0
	if t <= -5.5e+125:
		tmp = t_3
	elif t <= -4.4e-29:
		tmp = t_5
	elif t <= -3e-138:
		tmp = t_1
	elif t <= -1.4e-178:
		tmp = t_5
	elif t <= 6e-305:
		tmp = t_1
	elif t <= 5.7e-255:
		tmp = t_2
	elif t <= 1e-157:
		tmp = t_1
	elif t <= 1.9e+51:
		tmp = (x * (i * -4.0)) + t_4
	elif t <= 4.5e+80:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i))
	t_2 = Float64(Float64(b * c) - Float64(27.0 * Float64(k * j)))
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	t_4 = Float64(Float64(k * -27.0) * j)
	t_5 = Float64(t_4 + Float64(Float64(18.0 * t) * Float64(z * Float64(x * y))))
	tmp = 0.0
	if (t <= -5.5e+125)
		tmp = t_3;
	elseif (t <= -4.4e-29)
		tmp = t_5;
	elseif (t <= -3e-138)
		tmp = t_1;
	elseif (t <= -1.4e-178)
		tmp = t_5;
	elseif (t <= 6e-305)
		tmp = t_1;
	elseif (t <= 5.7e-255)
		tmp = t_2;
	elseif (t <= 1e-157)
		tmp = t_1;
	elseif (t <= 1.9e+51)
		tmp = Float64(Float64(x * Float64(i * -4.0)) + t_4);
	elseif (t <= 4.5e+80)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - ((x * 4.0) * i);
	t_2 = (b * c) - (27.0 * (k * j));
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	t_4 = (k * -27.0) * j;
	t_5 = t_4 + ((18.0 * t) * (z * (x * y)));
	tmp = 0.0;
	if (t <= -5.5e+125)
		tmp = t_3;
	elseif (t <= -4.4e-29)
		tmp = t_5;
	elseif (t <= -3e-138)
		tmp = t_1;
	elseif (t <= -1.4e-178)
		tmp = t_5;
	elseif (t <= 6e-305)
		tmp = t_1;
	elseif (t <= 5.7e-255)
		tmp = t_2;
	elseif (t <= 1e-157)
		tmp = t_1;
	elseif (t <= 1.9e+51)
		tmp = (x * (i * -4.0)) + t_4;
	elseif (t <= 4.5e+80)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $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]}, Block[{t$95$4 = N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 + N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+125], t$95$3, If[LessEqual[t, -4.4e-29], t$95$5, If[LessEqual[t, -3e-138], t$95$1, If[LessEqual[t, -1.4e-178], t$95$5, If[LessEqual[t, 6e-305], t$95$1, If[LessEqual[t, 5.7e-255], t$95$2, If[LessEqual[t, 1e-157], t$95$1, If[LessEqual[t, 1.9e+51], N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[t, 4.5e+80], t$95$2, t$95$3]]]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(x \cdot 4\right) \cdot i\\
t_2 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_4 := \left(k \cdot -27\right) \cdot j\\
t_5 := t_4 + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+125}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-29}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t \leq -3 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.4 \cdot 10^{-178}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.7 \cdot 10^{-255}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 10^{-157}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) + t_4\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+80}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5.49999999999999996e125 or 4.50000000000000007e80 < t

    1. Initial program 76.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. Step-by-step derivation
      1. associate-*l*76.6%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+76.6%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--80.8%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*80.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*80.8%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 86.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 77.5%

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

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

    if -5.49999999999999996e125 < t < -4.39999999999999981e-29 or -3.0000000000000001e-138 < t < -1.4000000000000001e-178

    1. Initial program 95.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. Simplified95.4%

      \[\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. Taylor expanded in y around inf 69.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) \]
    4. Step-by-step derivation
      1. associate-*r*69.9%

        \[\leadsto \color{blue}{\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right)} + j \cdot \left(k \cdot -27\right) \]
      2. associate-*r*72.1%

        \[\leadsto \left(18 \cdot t\right) \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Simplified72.1%

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

    if -4.39999999999999981e-29 < t < -3.0000000000000001e-138 or -1.4000000000000001e-178 < t < 6.0000000000000002e-305 or 5.7000000000000002e-255 < t < 9.99999999999999943e-158

    1. Initial program 85.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. Step-by-step derivation
      1. associate-*l*85.8%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+85.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--85.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.4%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.4%

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

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

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 73.0%

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

        \[\leadsto b \cdot c - 4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      2. associate-*r*73.0%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot x\right) \cdot i} \]
    7. Simplified73.0%

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

    if 6.0000000000000002e-305 < t < 5.7000000000000002e-255 or 1.8999999999999999e51 < t < 4.50000000000000007e80

    1. Initial program 82.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. Step-by-step derivation
      1. associate-*l*78.1%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+78.1%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--78.1%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*82.1%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*82.1%

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

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

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

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

    if 9.99999999999999943e-158 < t < 1.8999999999999999e51

    1. Initial program 87.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. Simplified95.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. Taylor expanded in i around inf 64.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+125}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-29}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-138}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-178}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + \left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-305}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-255}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;t \leq 10^{-157}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+51}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+80}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 7: 58.3% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\ t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ t_3 := x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ t_4 := b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{if}\;t \leq -9.5 \cdot 10^{+81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{+29}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-6}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-145}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-257}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-157}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+49}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* 27.0 (* k j))))
        (t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
        (t_3 (+ (* x (* i -4.0)) (* (* k -27.0) j)))
        (t_4 (- (* b c) (* (* x 4.0) i))))
   (if (<= t -9.5e+81)
     t_2
     (if (<= t -1.4e+29)
       t_3
       (if (<= t -7.4e-6)
         t_2
         (if (<= t -8.2e-145)
           t_4
           (if (<= t 4.2e-257)
             t_1
             (if (<= t 1.1e-157)
               t_4
               (if (<= t 2.15e+49) t_3 (if (<= t 5e+82) t_1 t_2))))))))))
assert(y < z);
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) - (27.0 * (k * j));
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_3 = (x * (i * -4.0)) + ((k * -27.0) * j);
	double t_4 = (b * c) - ((x * 4.0) * i);
	double tmp;
	if (t <= -9.5e+81) {
		tmp = t_2;
	} else if (t <= -1.4e+29) {
		tmp = t_3;
	} else if (t <= -7.4e-6) {
		tmp = t_2;
	} else if (t <= -8.2e-145) {
		tmp = t_4;
	} else if (t <= 4.2e-257) {
		tmp = t_1;
	} else if (t <= 1.1e-157) {
		tmp = t_4;
	} else if (t <= 2.15e+49) {
		tmp = t_3;
	} else if (t <= 5e+82) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) :: t_4
    real(8) :: tmp
    t_1 = (b * c) - (27.0d0 * (k * j))
    t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    t_3 = (x * (i * (-4.0d0))) + ((k * (-27.0d0)) * j)
    t_4 = (b * c) - ((x * 4.0d0) * i)
    if (t <= (-9.5d+81)) then
        tmp = t_2
    else if (t <= (-1.4d+29)) then
        tmp = t_3
    else if (t <= (-7.4d-6)) then
        tmp = t_2
    else if (t <= (-8.2d-145)) then
        tmp = t_4
    else if (t <= 4.2d-257) then
        tmp = t_1
    else if (t <= 1.1d-157) then
        tmp = t_4
    else if (t <= 2.15d+49) then
        tmp = t_3
    else if (t <= 5d+82) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
assert y < z;
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) - (27.0 * (k * j));
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_3 = (x * (i * -4.0)) + ((k * -27.0) * j);
	double t_4 = (b * c) - ((x * 4.0) * i);
	double tmp;
	if (t <= -9.5e+81) {
		tmp = t_2;
	} else if (t <= -1.4e+29) {
		tmp = t_3;
	} else if (t <= -7.4e-6) {
		tmp = t_2;
	} else if (t <= -8.2e-145) {
		tmp = t_4;
	} else if (t <= 4.2e-257) {
		tmp = t_1;
	} else if (t <= 1.1e-157) {
		tmp = t_4;
	} else if (t <= 2.15e+49) {
		tmp = t_3;
	} else if (t <= 5e+82) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (27.0 * (k * j))
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	t_3 = (x * (i * -4.0)) + ((k * -27.0) * j)
	t_4 = (b * c) - ((x * 4.0) * i)
	tmp = 0
	if t <= -9.5e+81:
		tmp = t_2
	elif t <= -1.4e+29:
		tmp = t_3
	elif t <= -7.4e-6:
		tmp = t_2
	elif t <= -8.2e-145:
		tmp = t_4
	elif t <= 4.2e-257:
		tmp = t_1
	elif t <= 1.1e-157:
		tmp = t_4
	elif t <= 2.15e+49:
		tmp = t_3
	elif t <= 5e+82:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(k * j)))
	t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	t_3 = Float64(Float64(x * Float64(i * -4.0)) + Float64(Float64(k * -27.0) * j))
	t_4 = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i))
	tmp = 0.0
	if (t <= -9.5e+81)
		tmp = t_2;
	elseif (t <= -1.4e+29)
		tmp = t_3;
	elseif (t <= -7.4e-6)
		tmp = t_2;
	elseif (t <= -8.2e-145)
		tmp = t_4;
	elseif (t <= 4.2e-257)
		tmp = t_1;
	elseif (t <= 1.1e-157)
		tmp = t_4;
	elseif (t <= 2.15e+49)
		tmp = t_3;
	elseif (t <= 5e+82)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - (27.0 * (k * j));
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	t_3 = (x * (i * -4.0)) + ((k * -27.0) * j);
	t_4 = (b * c) - ((x * 4.0) * i);
	tmp = 0.0;
	if (t <= -9.5e+81)
		tmp = t_2;
	elseif (t <= -1.4e+29)
		tmp = t_3;
	elseif (t <= -7.4e-6)
		tmp = t_2;
	elseif (t <= -8.2e-145)
		tmp = t_4;
	elseif (t <= 4.2e-257)
		tmp = t_1;
	elseif (t <= 1.1e-157)
		tmp = t_4;
	elseif (t <= 2.15e+49)
		tmp = t_3;
	elseif (t <= 5e+82)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $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]}, Block[{t$95$3 = N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e+81], t$95$2, If[LessEqual[t, -1.4e+29], t$95$3, If[LessEqual[t, -7.4e-6], t$95$2, If[LessEqual[t, -8.2e-145], t$95$4, If[LessEqual[t, 4.2e-257], t$95$1, If[LessEqual[t, 1.1e-157], t$95$4, If[LessEqual[t, 2.15e+49], t$95$3, If[LessEqual[t, 5e+82], t$95$1, t$95$2]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_3 := x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\
t_4 := b \cdot c - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+81}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.4 \cdot 10^{+29}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -7.4 \cdot 10^{-6}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -8.2 \cdot 10^{-145}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-257}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{-157}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 2.15 \cdot 10^{+49}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.50000000000000083e81 or -1.4e29 < t < -7.4000000000000003e-6 or 5.00000000000000015e82 < t

    1. Initial program 80.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. Step-by-step derivation
      1. associate-*l*80.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+80.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--83.4%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*83.4%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*83.4%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 88.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 79.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)} \]
    6. Taylor expanded in b around 0 74.9%

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

    if -9.50000000000000083e81 < t < -1.4e29 or 1.10000000000000005e-157 < t < 2.15e49

    1. Initial program 89.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. Simplified96.4%

      \[\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. Taylor expanded in i around inf 62.9%

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

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

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

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

    if -7.4000000000000003e-6 < t < -8.1999999999999995e-145 or 4.2000000000000002e-257 < t < 1.10000000000000005e-157

    1. Initial program 87.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. Step-by-step derivation
      1. associate-*l*87.7%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*87.7%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*87.7%

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

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

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 69.0%

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

        \[\leadsto b \cdot c - 4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      2. associate-*r*69.0%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot x\right) \cdot i} \]
    7. Simplified69.0%

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

    if -8.1999999999999995e-145 < t < 4.2000000000000002e-257 or 2.15e49 < t < 5.00000000000000015e82

    1. Initial program 85.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. Step-by-step derivation
      1. associate-*l*83.5%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+83.5%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--83.5%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*87.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*87.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+81}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-6}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-145}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-257}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-157}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+82}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 8: 58.2% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := \left(k \cdot -27\right) \cdot j\\ t_2 := b \cdot c - \left(x \cdot 4\right) \cdot i\\ t_3 := x \cdot \left(y \cdot z\right)\\ t_4 := t \cdot \left(18 \cdot t_3 - a \cdot 4\right)\\ t_5 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+125}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -0.00036:\\ \;\;\;\;18 \cdot \left(t \cdot t_3\right) + t_1\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-258}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-158}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + t_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+83}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* k -27.0) j))
        (t_2 (- (* b c) (* (* x 4.0) i)))
        (t_3 (* x (* y z)))
        (t_4 (* t (- (* 18.0 t_3) (* a 4.0))))
        (t_5 (- (* b c) (* 27.0 (* k j)))))
   (if (<= t -2.8e+125)
     t_4
     (if (<= t -0.00036)
       (+ (* 18.0 (* t t_3)) t_1)
       (if (<= t -3.1e-145)
         t_2
         (if (<= t 3e-258)
           t_5
           (if (<= t 1.3e-158)
             t_2
             (if (<= t 3.5e+49)
               (+ (* x (* i -4.0)) t_1)
               (if (<= t 1.05e+83) t_5 t_4)))))))))
assert(y < z);
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 = (k * -27.0) * j;
	double t_2 = (b * c) - ((x * 4.0) * i);
	double t_3 = x * (y * z);
	double t_4 = t * ((18.0 * t_3) - (a * 4.0));
	double t_5 = (b * c) - (27.0 * (k * j));
	double tmp;
	if (t <= -2.8e+125) {
		tmp = t_4;
	} else if (t <= -0.00036) {
		tmp = (18.0 * (t * t_3)) + t_1;
	} else if (t <= -3.1e-145) {
		tmp = t_2;
	} else if (t <= 3e-258) {
		tmp = t_5;
	} else if (t <= 1.3e-158) {
		tmp = t_2;
	} else if (t <= 3.5e+49) {
		tmp = (x * (i * -4.0)) + t_1;
	} else if (t <= 1.05e+83) {
		tmp = t_5;
	} else {
		tmp = t_4;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = (k * (-27.0d0)) * j
    t_2 = (b * c) - ((x * 4.0d0) * i)
    t_3 = x * (y * z)
    t_4 = t * ((18.0d0 * t_3) - (a * 4.0d0))
    t_5 = (b * c) - (27.0d0 * (k * j))
    if (t <= (-2.8d+125)) then
        tmp = t_4
    else if (t <= (-0.00036d0)) then
        tmp = (18.0d0 * (t * t_3)) + t_1
    else if (t <= (-3.1d-145)) then
        tmp = t_2
    else if (t <= 3d-258) then
        tmp = t_5
    else if (t <= 1.3d-158) then
        tmp = t_2
    else if (t <= 3.5d+49) then
        tmp = (x * (i * (-4.0d0))) + t_1
    else if (t <= 1.05d+83) then
        tmp = t_5
    else
        tmp = t_4
    end if
    code = tmp
end function
assert y < z;
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 = (k * -27.0) * j;
	double t_2 = (b * c) - ((x * 4.0) * i);
	double t_3 = x * (y * z);
	double t_4 = t * ((18.0 * t_3) - (a * 4.0));
	double t_5 = (b * c) - (27.0 * (k * j));
	double tmp;
	if (t <= -2.8e+125) {
		tmp = t_4;
	} else if (t <= -0.00036) {
		tmp = (18.0 * (t * t_3)) + t_1;
	} else if (t <= -3.1e-145) {
		tmp = t_2;
	} else if (t <= 3e-258) {
		tmp = t_5;
	} else if (t <= 1.3e-158) {
		tmp = t_2;
	} else if (t <= 3.5e+49) {
		tmp = (x * (i * -4.0)) + t_1;
	} else if (t <= 1.05e+83) {
		tmp = t_5;
	} else {
		tmp = t_4;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (k * -27.0) * j
	t_2 = (b * c) - ((x * 4.0) * i)
	t_3 = x * (y * z)
	t_4 = t * ((18.0 * t_3) - (a * 4.0))
	t_5 = (b * c) - (27.0 * (k * j))
	tmp = 0
	if t <= -2.8e+125:
		tmp = t_4
	elif t <= -0.00036:
		tmp = (18.0 * (t * t_3)) + t_1
	elif t <= -3.1e-145:
		tmp = t_2
	elif t <= 3e-258:
		tmp = t_5
	elif t <= 1.3e-158:
		tmp = t_2
	elif t <= 3.5e+49:
		tmp = (x * (i * -4.0)) + t_1
	elif t <= 1.05e+83:
		tmp = t_5
	else:
		tmp = t_4
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(k * -27.0) * j)
	t_2 = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i))
	t_3 = Float64(x * Float64(y * z))
	t_4 = Float64(t * Float64(Float64(18.0 * t_3) - Float64(a * 4.0)))
	t_5 = Float64(Float64(b * c) - Float64(27.0 * Float64(k * j)))
	tmp = 0.0
	if (t <= -2.8e+125)
		tmp = t_4;
	elseif (t <= -0.00036)
		tmp = Float64(Float64(18.0 * Float64(t * t_3)) + t_1);
	elseif (t <= -3.1e-145)
		tmp = t_2;
	elseif (t <= 3e-258)
		tmp = t_5;
	elseif (t <= 1.3e-158)
		tmp = t_2;
	elseif (t <= 3.5e+49)
		tmp = Float64(Float64(x * Float64(i * -4.0)) + t_1);
	elseif (t <= 1.05e+83)
		tmp = t_5;
	else
		tmp = t_4;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (k * -27.0) * j;
	t_2 = (b * c) - ((x * 4.0) * i);
	t_3 = x * (y * z);
	t_4 = t * ((18.0 * t_3) - (a * 4.0));
	t_5 = (b * c) - (27.0 * (k * j));
	tmp = 0.0;
	if (t <= -2.8e+125)
		tmp = t_4;
	elseif (t <= -0.00036)
		tmp = (18.0 * (t * t_3)) + t_1;
	elseif (t <= -3.1e-145)
		tmp = t_2;
	elseif (t <= 3e-258)
		tmp = t_5;
	elseif (t <= 1.3e-158)
		tmp = t_2;
	elseif (t <= 3.5e+49)
		tmp = (x * (i * -4.0)) + t_1;
	elseif (t <= 1.05e+83)
		tmp = t_5;
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(N[(18.0 * t$95$3), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+125], t$95$4, If[LessEqual[t, -0.00036], N[(N[(18.0 * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -3.1e-145], t$95$2, If[LessEqual[t, 3e-258], t$95$5, If[LessEqual[t, 1.3e-158], t$95$2, If[LessEqual[t, 3.5e+49], N[(N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 1.05e+83], t$95$5, t$95$4]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(k \cdot -27\right) \cdot j\\
t_2 := b \cdot c - \left(x \cdot 4\right) \cdot i\\
t_3 := x \cdot \left(y \cdot z\right)\\
t_4 := t \cdot \left(18 \cdot t_3 - a \cdot 4\right)\\
t_5 := b \cdot c - 27 \cdot \left(k \cdot j\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+125}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -0.00036:\\
\;\;\;\;18 \cdot \left(t \cdot t_3\right) + t_1\\

\mathbf{elif}\;t \leq -3.1 \cdot 10^{-145}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-258}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-158}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right) + t_1\\

\mathbf{elif}\;t \leq 1.05 \cdot 10^{+83}:\\
\;\;\;\;t_5\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.8000000000000001e125 or 1.05000000000000001e83 < t

    1. Initial program 76.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. Step-by-step derivation
      1. associate-*l*76.6%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+76.6%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--80.8%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*80.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*80.8%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 86.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 77.5%

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

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

    if -2.8000000000000001e125 < t < -3.60000000000000023e-4

    1. Initial program 93.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. Simplified96.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. Taylor expanded in y around inf 74.0%

      \[\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) \]

    if -3.60000000000000023e-4 < t < -3.1e-145 or 3.00000000000000021e-258 < t < 1.3e-158

    1. Initial program 87.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. Step-by-step derivation
      1. associate-*l*87.9%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.9%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.0%

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

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

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 67.8%

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

        \[\leadsto b \cdot c - 4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      2. associate-*r*67.8%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot x\right) \cdot i} \]
    7. Simplified67.8%

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

    if -3.1e-145 < t < 3.00000000000000021e-258 or 3.49999999999999975e49 < t < 1.05000000000000001e83

    1. Initial program 85.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. Step-by-step derivation
      1. associate-*l*83.5%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+83.5%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--83.5%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*87.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*87.0%

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

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

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

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

    if 1.3e-158 < t < 3.49999999999999975e49

    1. Initial program 87.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. Simplified95.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. Taylor expanded in i around inf 64.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+125}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -0.00036:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-258}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-158}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+83}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 9: 74.1% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := 4 \cdot \left(x \cdot i\right)\\ t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ t_3 := j \cdot \left(k \cdot 27\right)\\ \mathbf{if}\;t \leq -7 \cdot 10^{+126}:\\ \;\;\;\;b \cdot c + t_2\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{+31}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_3\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-8}:\\ \;\;\;\;t_2 - t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+88}:\\ \;\;\;\;b \cdot c - \left(t_1 + 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 - t_3\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* 4.0 (* x i)))
        (t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
        (t_3 (* j (* k 27.0))))
   (if (<= t -7e+126)
     (+ (* b c) t_2)
     (if (<= t -1.25e+31)
       (- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) t_3)
       (if (<= t -4.4e-8)
         (- t_2 t_1)
         (if (<= t 1.1e+88)
           (- (* b c) (+ t_1 (* 27.0 (* k j))))
           (- t_2 t_3)))))))
assert(y < z);
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);
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_3 = j * (k * 27.0);
	double tmp;
	if (t <= -7e+126) {
		tmp = (b * c) + t_2;
	} else if (t <= -1.25e+31) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_3;
	} else if (t <= -4.4e-8) {
		tmp = t_2 - t_1;
	} else if (t <= 1.1e+88) {
		tmp = (b * c) - (t_1 + (27.0 * (k * j)));
	} else {
		tmp = t_2 - t_3;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = 4.0d0 * (x * i)
    t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    t_3 = j * (k * 27.0d0)
    if (t <= (-7d+126)) then
        tmp = (b * c) + t_2
    else if (t <= (-1.25d+31)) then
        tmp = (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))) - t_3
    else if (t <= (-4.4d-8)) then
        tmp = t_2 - t_1
    else if (t <= 1.1d+88) then
        tmp = (b * c) - (t_1 + (27.0d0 * (k * j)))
    else
        tmp = t_2 - t_3
    end if
    code = tmp
end function
assert y < z;
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);
	double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double t_3 = j * (k * 27.0);
	double tmp;
	if (t <= -7e+126) {
		tmp = (b * c) + t_2;
	} else if (t <= -1.25e+31) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_3;
	} else if (t <= -4.4e-8) {
		tmp = t_2 - t_1;
	} else if (t <= 1.1e+88) {
		tmp = (b * c) - (t_1 + (27.0 * (k * j)));
	} else {
		tmp = t_2 - t_3;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = 4.0 * (x * i)
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	t_3 = j * (k * 27.0)
	tmp = 0
	if t <= -7e+126:
		tmp = (b * c) + t_2
	elif t <= -1.25e+31:
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_3
	elif t <= -4.4e-8:
		tmp = t_2 - t_1
	elif t <= 1.1e+88:
		tmp = (b * c) - (t_1 + (27.0 * (k * j)))
	else:
		tmp = t_2 - t_3
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(4.0 * Float64(x * i))
	t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	t_3 = Float64(j * Float64(k * 27.0))
	tmp = 0.0
	if (t <= -7e+126)
		tmp = Float64(Float64(b * c) + t_2);
	elseif (t <= -1.25e+31)
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - t_3);
	elseif (t <= -4.4e-8)
		tmp = Float64(t_2 - t_1);
	elseif (t <= 1.1e+88)
		tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(k * j))));
	else
		tmp = Float64(t_2 - t_3);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = 4.0 * (x * i);
	t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	t_3 = j * (k * 27.0);
	tmp = 0.0;
	if (t <= -7e+126)
		tmp = (b * c) + t_2;
	elseif (t <= -1.25e+31)
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_3;
	elseif (t <= -4.4e-8)
		tmp = t_2 - t_1;
	elseif (t <= 1.1e+88)
		tmp = (b * c) - (t_1 + (27.0 * (k * j)));
	else
		tmp = t_2 - t_3;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $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]}, Block[{t$95$3 = N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+126], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, -1.25e+31], N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t, -4.4e-8], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[t, 1.1e+88], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - t$95$3), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_3 := j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{+126}:\\
\;\;\;\;b \cdot c + t_2\\

\mathbf{elif}\;t \leq -1.25 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_3\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-8}:\\
\;\;\;\;t_2 - t_1\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+88}:\\
\;\;\;\;b \cdot c - \left(t_1 + 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_2 - t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -7.0000000000000005e126

    1. Initial program 61.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. Step-by-step derivation
      1. associate-*l*61.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+61.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--70.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*71.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*71.0%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 83.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 80.9%

      \[\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 -7.0000000000000005e126 < t < -1.25000000000000007e31

    1. Initial program 92.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. Step-by-step derivation
      1. associate-*l*92.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+92.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--92.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*92.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*92.2%

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

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

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

    if -1.25000000000000007e31 < t < -4.3999999999999997e-8

    1. Initial program 100.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. Step-by-step derivation
      1. associate-*l*100.0%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+100.0%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--100.0%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*99.8%

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

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

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

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

    if -4.3999999999999997e-8 < t < 1.10000000000000004e88

    1. Initial program 86.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. Step-by-step derivation
      1. associate-*l*86.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.2%

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

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

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

    if 1.10000000000000004e88 < t

    1. Initial program 87.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. Step-by-step derivation
      1. associate-*l*87.7%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*87.7%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*87.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+126}:\\ \;\;\;\;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 -1.25 \cdot 10^{+31}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(k \cdot 27\right)\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-8}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+88}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - j \cdot \left(k \cdot 27\right)\\ \end{array} \]

Alternative 10: 74.3% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot 27\right)\\ t_2 := x \cdot \left(y \cdot z\right)\\ t_3 := t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\\ t_4 := 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+148}:\\ \;\;\;\;b \cdot c + t_3\\ \mathbf{elif}\;t \leq -1.16 \cdot 10^{+31}:\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot t_2\right)\right) - t_1\\ \mathbf{elif}\;t \leq -0.000255:\\ \;\;\;\;t_3 - t_4\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+89}:\\ \;\;\;\;b \cdot c - \left(t_4 + 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3 - t_1\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k 27.0)))
        (t_2 (* x (* y z)))
        (t_3 (* t (- (* 18.0 t_2) (* a 4.0))))
        (t_4 (* 4.0 (* x i))))
   (if (<= t -1.6e+148)
     (+ (* b c) t_3)
     (if (<= t -1.16e+31)
       (- (+ (* b c) (* 18.0 (* t t_2))) t_1)
       (if (<= t -0.000255)
         (- t_3 t_4)
         (if (<= t 1.9e+89)
           (- (* b c) (+ t_4 (* 27.0 (* k j))))
           (- t_3 t_1)))))))
assert(y < z);
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 = x * (y * z);
	double t_3 = t * ((18.0 * t_2) - (a * 4.0));
	double t_4 = 4.0 * (x * i);
	double tmp;
	if (t <= -1.6e+148) {
		tmp = (b * c) + t_3;
	} else if (t <= -1.16e+31) {
		tmp = ((b * c) + (18.0 * (t * t_2))) - t_1;
	} else if (t <= -0.000255) {
		tmp = t_3 - t_4;
	} else if (t <= 1.9e+89) {
		tmp = (b * c) - (t_4 + (27.0 * (k * j)));
	} else {
		tmp = t_3 - t_1;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) :: t_4
    real(8) :: tmp
    t_1 = j * (k * 27.0d0)
    t_2 = x * (y * z)
    t_3 = t * ((18.0d0 * t_2) - (a * 4.0d0))
    t_4 = 4.0d0 * (x * i)
    if (t <= (-1.6d+148)) then
        tmp = (b * c) + t_3
    else if (t <= (-1.16d+31)) then
        tmp = ((b * c) + (18.0d0 * (t * t_2))) - t_1
    else if (t <= (-0.000255d0)) then
        tmp = t_3 - t_4
    else if (t <= 1.9d+89) then
        tmp = (b * c) - (t_4 + (27.0d0 * (k * j)))
    else
        tmp = t_3 - t_1
    end if
    code = tmp
end function
assert y < z;
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 = x * (y * z);
	double t_3 = t * ((18.0 * t_2) - (a * 4.0));
	double t_4 = 4.0 * (x * i);
	double tmp;
	if (t <= -1.6e+148) {
		tmp = (b * c) + t_3;
	} else if (t <= -1.16e+31) {
		tmp = ((b * c) + (18.0 * (t * t_2))) - t_1;
	} else if (t <= -0.000255) {
		tmp = t_3 - t_4;
	} else if (t <= 1.9e+89) {
		tmp = (b * c) - (t_4 + (27.0 * (k * j)));
	} else {
		tmp = t_3 - t_1;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * 27.0)
	t_2 = x * (y * z)
	t_3 = t * ((18.0 * t_2) - (a * 4.0))
	t_4 = 4.0 * (x * i)
	tmp = 0
	if t <= -1.6e+148:
		tmp = (b * c) + t_3
	elif t <= -1.16e+31:
		tmp = ((b * c) + (18.0 * (t * t_2))) - t_1
	elif t <= -0.000255:
		tmp = t_3 - t_4
	elif t <= 1.9e+89:
		tmp = (b * c) - (t_4 + (27.0 * (k * j)))
	else:
		tmp = t_3 - t_1
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * 27.0))
	t_2 = Float64(x * Float64(y * z))
	t_3 = Float64(t * Float64(Float64(18.0 * t_2) - Float64(a * 4.0)))
	t_4 = Float64(4.0 * Float64(x * i))
	tmp = 0.0
	if (t <= -1.6e+148)
		tmp = Float64(Float64(b * c) + t_3);
	elseif (t <= -1.16e+31)
		tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_2))) - t_1);
	elseif (t <= -0.000255)
		tmp = Float64(t_3 - t_4);
	elseif (t <= 1.9e+89)
		tmp = Float64(Float64(b * c) - Float64(t_4 + Float64(27.0 * Float64(k * j))));
	else
		tmp = Float64(t_3 - t_1);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * 27.0);
	t_2 = x * (y * z);
	t_3 = t * ((18.0 * t_2) - (a * 4.0));
	t_4 = 4.0 * (x * i);
	tmp = 0.0;
	if (t <= -1.6e+148)
		tmp = (b * c) + t_3;
	elseif (t <= -1.16e+31)
		tmp = ((b * c) + (18.0 * (t * t_2))) - t_1;
	elseif (t <= -0.000255)
		tmp = t_3 - t_4;
	elseif (t <= 1.9e+89)
		tmp = (b * c) - (t_4 + (27.0 * (k * j)));
	else
		tmp = t_3 - t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+148], N[(N[(b * c), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t, -1.16e+31], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, -0.000255], N[(t$95$3 - t$95$4), $MachinePrecision], If[LessEqual[t, 1.9e+89], N[(N[(b * c), $MachinePrecision] - N[(t$95$4 + N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot 27\right)\\
t_2 := x \cdot \left(y \cdot z\right)\\
t_3 := t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\\
t_4 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+148}:\\
\;\;\;\;b \cdot c + t_3\\

\mathbf{elif}\;t \leq -1.16 \cdot 10^{+31}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot t_2\right)\right) - t_1\\

\mathbf{elif}\;t \leq -0.000255:\\
\;\;\;\;t_3 - t_4\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+89}:\\
\;\;\;\;b \cdot c - \left(t_4 + 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_3 - t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.6e148

    1. Initial program 59.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. Step-by-step derivation
      1. associate-*l*59.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+59.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--70.3%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*70.4%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*70.4%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 81.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 81.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.6e148 < t < -1.1599999999999999e31

    1. Initial program 89.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. Step-by-step derivation
      1. associate-*l*89.9%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+89.9%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--89.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*89.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*89.9%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 90.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in a around 0 87.4%

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

    if -1.1599999999999999e31 < t < -2.55e-4

    1. Initial program 100.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. Step-by-step derivation
      1. associate-*l*100.0%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+100.0%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--100.0%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*99.8%

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

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

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

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

    if -2.55e-4 < t < 1.90000000000000012e89

    1. Initial program 86.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. Step-by-step derivation
      1. associate-*l*86.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.2%

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

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

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

    if 1.90000000000000012e89 < t

    1. Initial program 87.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. Step-by-step derivation
      1. associate-*l*87.7%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*87.7%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*87.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+148}:\\ \;\;\;\;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 -1.16 \cdot 10^{+31}:\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - j \cdot \left(k \cdot 27\right)\\ \mathbf{elif}\;t \leq -0.000255:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+89}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - j \cdot \left(k \cdot 27\right)\\ \end{array} \]

Alternative 11: 83.8% accurate, 1.1× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot 27\right)\\ \mathbf{if}\;t \leq -0.00062 \lor \neg \left(t \leq 1.38 \cdot 10^{+85}\right):\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t_1\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k 27.0))))
   (if (or (<= t -0.00062) (not (<= t 1.38e+85)))
     (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)
     (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1))))
assert(y < z);
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 ((t <= -0.00062) || !(t <= 1.38e+85)) {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((t <= (-0.00062d0)) .or. (.not. (t <= 1.38d+85))) then
        tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
    else
        tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_1
    end if
    code = tmp
end function
assert y < z;
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 ((t <= -0.00062) || !(t <= 1.38e+85)) {
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
	} else {
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * 27.0)
	tmp = 0
	if (t <= -0.00062) or not (t <= 1.38e+85):
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1
	else:
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * 27.0))
	tmp = 0.0
	if ((t <= -0.00062) || !(t <= 1.38e+85))
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1);
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_1);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * 27.0);
	tmp = 0.0;
	if ((t <= -0.00062) || ~((t <= 1.38e+85)))
		tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
	else
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -0.00062], N[Not[LessEqual[t, 1.38e+85]], $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] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;t \leq -0.00062 \lor \neg \left(t \leq 1.38 \cdot 10^{+85}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.2e-4 or 1.3799999999999999e85 < t

    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. Step-by-step derivation
      1. associate-*l*81.8%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+81.8%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--84.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*84.7%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*84.7%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 87.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)} - j \cdot \left(27 \cdot k\right) \]

    if -6.2e-4 < t < 1.3799999999999999e85

    1. Initial program 86.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. Step-by-step derivation
      1. associate-*l*86.3%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.3%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.3%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.2%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate-*r*86.3%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      2. distribute-rgt-out--86.3%

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

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

        \[\leadsto \left(\left(\color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*r*86.3%

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

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

        \[\leadsto \left(\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right) - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      8. associate-*l*86.3%

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

      \[\leadsto \left(\color{blue}{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - a \cdot \left(4 \cdot t\right)\right)} + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
    6. Taylor expanded in z around 0 89.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)} - j \cdot \left(27 \cdot k\right) \]
    7. Step-by-step derivation
      1. distribute-lft-out89.6%

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

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

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

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

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

Alternative 12: 74.7% accurate, 1.2× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+86} \lor \neg \left(t \leq -2.9 \cdot 10^{+29}\right) \land \left(t \leq -9 \cdot 10^{-5} \lor \neg \left(t \leq 5.8 \cdot 10^{+87}\right)\right):\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= t -9.2e+86)
         (and (not (<= t -2.9e+29)) (or (<= t -9e-5) (not (<= t 5.8e+87)))))
   (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
   (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* k j))))))
assert(y < z);
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 ((t <= -9.2e+86) || (!(t <= -2.9e+29) && ((t <= -9e-5) || !(t <= 5.8e+87)))) {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	} else {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((t <= (-9.2d+86)) .or. (.not. (t <= (-2.9d+29))) .and. (t <= (-9d-5)) .or. (.not. (t <= 5.8d+87))) then
        tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    else
        tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (k * j)))
    end if
    code = tmp
end function
assert y < z;
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 ((t <= -9.2e+86) || (!(t <= -2.9e+29) && ((t <= -9e-5) || !(t <= 5.8e+87)))) {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	} else {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (t <= -9.2e+86) or (not (t <= -2.9e+29) and ((t <= -9e-5) or not (t <= 5.8e+87))):
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	else:
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((t <= -9.2e+86) || (!(t <= -2.9e+29) && ((t <= -9e-5) || !(t <= 5.8e+87))))
		tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))));
	else
		tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(k * j))));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((t <= -9.2e+86) || (~((t <= -2.9e+29)) && ((t <= -9e-5) || ~((t <= 5.8e+87)))))
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	else
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -9.2e+86], And[N[Not[LessEqual[t, -2.9e+29]], $MachinePrecision], Or[LessEqual[t, -9e-5], N[Not[LessEqual[t, 5.8e+87]], $MachinePrecision]]]], 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[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+86} \lor \neg \left(t \leq -2.9 \cdot 10^{+29}\right) \land \left(t \leq -9 \cdot 10^{-5} \lor \neg \left(t \leq 5.8 \cdot 10^{+87}\right)\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.19999999999999958e86 or -2.8999999999999999e29 < t < -9.00000000000000057e-5 or 5.7999999999999996e87 < t

    1. Initial program 79.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. Step-by-step derivation
      1. associate-*l*79.5%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+79.5%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--82.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*82.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*82.9%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 89.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 80.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 -9.19999999999999958e86 < t < -2.8999999999999999e29 or -9.00000000000000057e-5 < t < 5.7999999999999996e87

    1. Initial program 87.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. Step-by-step derivation
      1. associate-*l*87.1%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.1%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.1%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+86} \lor \neg \left(t \leq -2.9 \cdot 10^{+29}\right) \land \left(t \leq -9 \cdot 10^{-5} \lor \neg \left(t \leq 5.8 \cdot 10^{+87}\right)\right):\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \end{array} \]

Alternative 13: 73.3% accurate, 1.2× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := x \cdot \left(y \cdot z\right)\\ t_2 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\ t_3 := 4 \cdot \left(x \cdot i\right)\\ t_4 := b \cdot c + t_2\\ \mathbf{if}\;t \leq -2.65 \cdot 10^{+125}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{+31}:\\ \;\;\;\;18 \cdot \left(t \cdot t_1\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq -1.12 \cdot 10^{-5}:\\ \;\;\;\;t_2 - t_3\\ \mathbf{elif}\;t \leq 1.38 \cdot 10^{+85}:\\ \;\;\;\;b \cdot c - \left(t_3 + 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (* y z)))
        (t_2 (* t (- (* 18.0 t_1) (* a 4.0))))
        (t_3 (* 4.0 (* x i)))
        (t_4 (+ (* b c) t_2)))
   (if (<= t -2.65e+125)
     t_4
     (if (<= t -1.5e+31)
       (+ (* 18.0 (* t t_1)) (* (* k -27.0) j))
       (if (<= t -1.12e-5)
         (- t_2 t_3)
         (if (<= t 1.38e+85) (- (* b c) (+ t_3 (* 27.0 (* k j)))) t_4))))))
assert(y < z);
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 = x * (y * z);
	double t_2 = t * ((18.0 * t_1) - (a * 4.0));
	double t_3 = 4.0 * (x * i);
	double t_4 = (b * c) + t_2;
	double tmp;
	if (t <= -2.65e+125) {
		tmp = t_4;
	} else if (t <= -1.5e+31) {
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j);
	} else if (t <= -1.12e-5) {
		tmp = t_2 - t_3;
	} else if (t <= 1.38e+85) {
		tmp = (b * c) - (t_3 + (27.0 * (k * j)));
	} else {
		tmp = t_4;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) :: t_4
    real(8) :: tmp
    t_1 = x * (y * z)
    t_2 = t * ((18.0d0 * t_1) - (a * 4.0d0))
    t_3 = 4.0d0 * (x * i)
    t_4 = (b * c) + t_2
    if (t <= (-2.65d+125)) then
        tmp = t_4
    else if (t <= (-1.5d+31)) then
        tmp = (18.0d0 * (t * t_1)) + ((k * (-27.0d0)) * j)
    else if (t <= (-1.12d-5)) then
        tmp = t_2 - t_3
    else if (t <= 1.38d+85) then
        tmp = (b * c) - (t_3 + (27.0d0 * (k * j)))
    else
        tmp = t_4
    end if
    code = tmp
end function
assert y < z;
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 = x * (y * z);
	double t_2 = t * ((18.0 * t_1) - (a * 4.0));
	double t_3 = 4.0 * (x * i);
	double t_4 = (b * c) + t_2;
	double tmp;
	if (t <= -2.65e+125) {
		tmp = t_4;
	} else if (t <= -1.5e+31) {
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j);
	} else if (t <= -1.12e-5) {
		tmp = t_2 - t_3;
	} else if (t <= 1.38e+85) {
		tmp = (b * c) - (t_3 + (27.0 * (k * j)));
	} else {
		tmp = t_4;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (y * z)
	t_2 = t * ((18.0 * t_1) - (a * 4.0))
	t_3 = 4.0 * (x * i)
	t_4 = (b * c) + t_2
	tmp = 0
	if t <= -2.65e+125:
		tmp = t_4
	elif t <= -1.5e+31:
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j)
	elif t <= -1.12e-5:
		tmp = t_2 - t_3
	elif t <= 1.38e+85:
		tmp = (b * c) - (t_3 + (27.0 * (k * j)))
	else:
		tmp = t_4
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(y * z))
	t_2 = Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0)))
	t_3 = Float64(4.0 * Float64(x * i))
	t_4 = Float64(Float64(b * c) + t_2)
	tmp = 0.0
	if (t <= -2.65e+125)
		tmp = t_4;
	elseif (t <= -1.5e+31)
		tmp = Float64(Float64(18.0 * Float64(t * t_1)) + Float64(Float64(k * -27.0) * j));
	elseif (t <= -1.12e-5)
		tmp = Float64(t_2 - t_3);
	elseif (t <= 1.38e+85)
		tmp = Float64(Float64(b * c) - Float64(t_3 + Float64(27.0 * Float64(k * j))));
	else
		tmp = t_4;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (y * z);
	t_2 = t * ((18.0 * t_1) - (a * 4.0));
	t_3 = 4.0 * (x * i);
	t_4 = (b * c) + t_2;
	tmp = 0.0;
	if (t <= -2.65e+125)
		tmp = t_4;
	elseif (t <= -1.5e+31)
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j);
	elseif (t <= -1.12e-5)
		tmp = t_2 - t_3;
	elseif (t <= 1.38e+85)
		tmp = (b * c) - (t_3 + (27.0 * (k * j)));
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t, -2.65e+125], t$95$4, If[LessEqual[t, -1.5e+31], N[(N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.12e-5], N[(t$95$2 - t$95$3), $MachinePrecision], If[LessEqual[t, 1.38e+85], N[(N[(b * c), $MachinePrecision] - N[(t$95$3 + N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\
t_3 := 4 \cdot \left(x \cdot i\right)\\
t_4 := b \cdot c + t_2\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{+125}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -1.5 \cdot 10^{+31}:\\
\;\;\;\;18 \cdot \left(t \cdot t_1\right) + \left(k \cdot -27\right) \cdot j\\

\mathbf{elif}\;t \leq -1.12 \cdot 10^{-5}:\\
\;\;\;\;t_2 - t_3\\

\mathbf{elif}\;t \leq 1.38 \cdot 10^{+85}:\\
\;\;\;\;b \cdot c - \left(t_3 + 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.6500000000000001e125 or 1.3799999999999999e85 < t

    1. Initial program 76.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. Step-by-step derivation
      1. associate-*l*76.3%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+76.3%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--80.5%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*80.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*80.5%

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 78.5%

      \[\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.6500000000000001e125 < t < -1.49999999999999995e31

    1. Initial program 92.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. Simplified96.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. Taylor expanded in y around inf 77.5%

      \[\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) \]

    if -1.49999999999999995e31 < t < -1.11999999999999995e-5

    1. Initial program 100.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. Step-by-step derivation
      1. associate-*l*100.0%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+100.0%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--100.0%

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*99.8%

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

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

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

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

    if -1.11999999999999995e-5 < t < 1.3799999999999999e85

    1. Initial program 86.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. Step-by-step derivation
      1. associate-*l*86.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{+125}:\\ \;\;\;\;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 -1.5 \cdot 10^{+31}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq -1.12 \cdot 10^{-5}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;t \leq 1.38 \cdot 10^{+85}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \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} \]

Alternative 14: 79.5% accurate, 1.2× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \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 := j \cdot \left(k \cdot 27\right)\\ \mathbf{if}\;t \leq -1.65 \cdot 10^{+127}:\\ \;\;\;\;b \cdot c + t_1\\ \mathbf{elif}\;t \leq -0.0052:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_2\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+94}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 - t_2\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(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 (* j (* k 27.0))))
   (if (<= t -1.65e+127)
     (+ (* b c) t_1)
     (if (<= t -0.0052)
       (- (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) t_2)
       (if (<= t 4e+94)
         (- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_2)
         (- t_1 t_2))))))
assert(y < z);
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 = j * (k * 27.0);
	double tmp;
	if (t <= -1.65e+127) {
		tmp = (b * c) + t_1;
	} else if (t <= -0.0052) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2;
	} else if (t <= 4e+94) {
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_2;
	} else {
		tmp = t_1 - t_2;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = j * (k * 27.0d0)
    if (t <= (-1.65d+127)) then
        tmp = (b * c) + t_1
    else if (t <= (-0.0052d0)) then
        tmp = (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))) - t_2
    else if (t <= 4d+94) then
        tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_2
    else
        tmp = t_1 - t_2
    end if
    code = tmp
end function
assert y < z;
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 = j * (k * 27.0);
	double tmp;
	if (t <= -1.65e+127) {
		tmp = (b * c) + t_1;
	} else if (t <= -0.0052) {
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2;
	} else if (t <= 4e+94) {
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_2;
	} else {
		tmp = t_1 - t_2;
	}
	return tmp;
}
[y, z] = sort([y, z])
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 = j * (k * 27.0)
	tmp = 0
	if t <= -1.65e+127:
		tmp = (b * c) + t_1
	elif t <= -0.0052:
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2
	elif t <= 4e+94:
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_2
	else:
		tmp = t_1 - t_2
	return tmp
y, z = sort([y, z])
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(j * Float64(k * 27.0))
	tmp = 0.0
	if (t <= -1.65e+127)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (t <= -0.0052)
		tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) - t_2);
	elseif (t <= 4e+94)
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_2);
	else
		tmp = Float64(t_1 - t_2);
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
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 = j * (k * 27.0);
	tmp = 0.0;
	if (t <= -1.65e+127)
		tmp = (b * c) + t_1;
	elseif (t <= -0.0052)
		tmp = (x * ((18.0 * (t * (y * z))) - (4.0 * i))) - t_2;
	elseif (t <= 4e+94)
		tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_2;
	else
		tmp = t_1 - t_2;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+127], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -0.0052], N[(N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 4e+94], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(t$95$1 - t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\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 := j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+127}:\\
\;\;\;\;b \cdot c + t_1\\

\mathbf{elif}\;t \leq -0.0052:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - t_2\\

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

\mathbf{else}:\\
\;\;\;\;t_1 - t_2\\


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

    1. Initial program 61.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. Step-by-step derivation
      1. associate-*l*61.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+61.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--70.9%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*71.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*71.0%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 83.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 80.9%

      \[\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.64999999999999988e127 < t < -0.0051999999999999998

    1. Initial program 93.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. Step-by-step derivation
      1. associate-*l*93.8%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+93.8%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--93.8%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*93.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*93.8%

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

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

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

    if -0.0051999999999999998 < t < 4.0000000000000001e94

    1. Initial program 86.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. Step-by-step derivation
      1. associate-*l*86.3%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.3%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.3%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.2%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Step-by-step derivation
      1. associate-*r*86.3%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot z} - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      2. distribute-rgt-out--86.3%

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

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

        \[\leadsto \left(\left(\color{blue}{t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*r*86.3%

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

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

        \[\leadsto \left(\left(t \cdot \left(z \cdot \color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)}\right) - \left(a \cdot 4\right) \cdot t\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
      8. associate-*l*86.3%

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

      \[\leadsto \left(\color{blue}{\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - a \cdot \left(4 \cdot t\right)\right)} + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right) \]
    6. Taylor expanded in z around 0 89.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)} - j \cdot \left(27 \cdot k\right) \]
    7. Step-by-step derivation
      1. distribute-lft-out89.6%

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

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

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

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

    if 4.0000000000000001e94 < t

    1. Initial program 87.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. Step-by-step derivation
      1. associate-*l*87.7%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--87.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*87.7%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*87.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+127}:\\ \;\;\;\;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 -0.0052:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right) - j \cdot \left(k \cdot 27\right)\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+94}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - 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) - j \cdot \left(k \cdot 27\right)\\ \end{array} \]

Alternative 15: 74.8% accurate, 1.3× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-8} \lor \neg \left(t \leq 1.1 \cdot 10^{+85}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - j \cdot \left(k \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= t -1.1e-8) (not (<= t 1.1e+85)))
   (- (* t (- (* 18.0 (* x (* y z))) (* a 4.0))) (* j (* k 27.0)))
   (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* k j))))))
assert(y < z);
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 ((t <= -1.1e-8) || !(t <= 1.1e+85)) {
		tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (j * (k * 27.0));
	} else {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((t <= (-1.1d-8)) .or. (.not. (t <= 1.1d+85))) then
        tmp = (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))) - (j * (k * 27.0d0))
    else
        tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (k * j)))
    end if
    code = tmp
end function
assert y < z;
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 ((t <= -1.1e-8) || !(t <= 1.1e+85)) {
		tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (j * (k * 27.0));
	} else {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (t <= -1.1e-8) or not (t <= 1.1e+85):
		tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (j * (k * 27.0))
	else:
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((t <= -1.1e-8) || !(t <= 1.1e+85))
		tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) - Float64(j * Float64(k * 27.0)));
	else
		tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(k * j))));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((t <= -1.1e-8) || ~((t <= 1.1e+85)))
		tmp = (t * ((18.0 * (x * (y * z))) - (a * 4.0))) - (j * (k * 27.0));
	else
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.1e-8], N[Not[LessEqual[t, 1.1e+85]], $MachinePrecision]], N[(N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-8} \lor \neg \left(t \leq 1.1 \cdot 10^{+85}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right) - j \cdot \left(k \cdot 27\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.0999999999999999e-8 or 1.1000000000000001e85 < t

    1. Initial program 81.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. Step-by-step derivation
      1. associate-*l*82.0%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+82.0%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--84.8%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*84.8%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*84.8%

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

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

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

    if -1.0999999999999999e-8 < t < 1.1000000000000001e85

    1. Initial program 86.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. Step-by-step derivation
      1. associate-*l*86.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.2%

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

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

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

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

Alternative 16: 70.5% accurate, 1.5× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := x \cdot \left(y \cdot z\right)\\ t_2 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{+126}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -0.0026:\\ \;\;\;\;18 \cdot \left(t \cdot t_1\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+91}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (* y z))) (t_2 (* t (- (* 18.0 t_1) (* a 4.0)))))
   (if (<= t -2.4e+126)
     t_2
     (if (<= t -0.0026)
       (+ (* 18.0 (* t t_1)) (* (* k -27.0) j))
       (if (<= t 3e+91)
         (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* k j))))
         t_2)))))
assert(y < z);
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 = x * (y * z);
	double t_2 = t * ((18.0 * t_1) - (a * 4.0));
	double tmp;
	if (t <= -2.4e+126) {
		tmp = t_2;
	} else if (t <= -0.0026) {
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j);
	} else if (t <= 3e+91) {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = x * (y * z)
    t_2 = t * ((18.0d0 * t_1) - (a * 4.0d0))
    if (t <= (-2.4d+126)) then
        tmp = t_2
    else if (t <= (-0.0026d0)) then
        tmp = (18.0d0 * (t * t_1)) + ((k * (-27.0d0)) * j)
    else if (t <= 3d+91) then
        tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (k * j)))
    else
        tmp = t_2
    end if
    code = tmp
end function
assert y < z;
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 = x * (y * z);
	double t_2 = t * ((18.0 * t_1) - (a * 4.0));
	double tmp;
	if (t <= -2.4e+126) {
		tmp = t_2;
	} else if (t <= -0.0026) {
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j);
	} else if (t <= 3e+91) {
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (y * z)
	t_2 = t * ((18.0 * t_1) - (a * 4.0))
	tmp = 0
	if t <= -2.4e+126:
		tmp = t_2
	elif t <= -0.0026:
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j)
	elif t <= 3e+91:
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)))
	else:
		tmp = t_2
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(y * z))
	t_2 = Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -2.4e+126)
		tmp = t_2;
	elseif (t <= -0.0026)
		tmp = Float64(Float64(18.0 * Float64(t * t_1)) + Float64(Float64(k * -27.0) * j));
	elseif (t <= 3e+91)
		tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(k * j))));
	else
		tmp = t_2;
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (y * z);
	t_2 = t * ((18.0 * t_1) - (a * 4.0));
	tmp = 0.0;
	if (t <= -2.4e+126)
		tmp = t_2;
	elseif (t <= -0.0026)
		tmp = (18.0 * (t * t_1)) + ((k * -27.0) * j);
	elseif (t <= 3e+91)
		tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (k * j)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+126], t$95$2, If[LessEqual[t, -0.0026], N[(N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+91], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -0.0026:\\
\;\;\;\;18 \cdot \left(t \cdot t_1\right) + \left(k \cdot -27\right) \cdot j\\

\mathbf{elif}\;t \leq 3 \cdot 10^{+91}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.40000000000000012e126 or 3.00000000000000006e91 < t

    1. Initial program 76.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. Step-by-step derivation
      1. associate-*l*76.3%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+76.3%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--80.5%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*80.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*80.5%

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

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

      \[\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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 78.5%

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

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

    if -2.40000000000000012e126 < t < -0.0025999999999999999

    1. Initial program 93.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. Simplified96.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. Taylor expanded in y around inf 74.0%

      \[\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) \]

    if -0.0025999999999999999 < t < 3.00000000000000006e91

    1. Initial program 86.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. Step-by-step derivation
      1. associate-*l*86.3%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+86.3%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--86.3%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*88.2%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*88.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+126}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -0.0026:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+91}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]

Alternative 17: 53.7% accurate, 1.6× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.2 \cdot 10^{-14} \lor \neg \left(b \cdot c \leq 3.2 \cdot 10^{+21}\right):\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + -4 \cdot \left(t \cdot a\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= (* b c) -3.2e-14) (not (<= (* b c) 3.2e+21)))
   (- (* b c) (* 27.0 (* k j)))
   (+ (* (* k -27.0) j) (* -4.0 (* t a)))))
assert(y < z);
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 (((b * c) <= -3.2e-14) || !((b * c) <= 3.2e+21)) {
		tmp = (b * c) - (27.0 * (k * j));
	} else {
		tmp = ((k * -27.0) * j) + (-4.0 * (t * a));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 (((b * c) <= (-3.2d-14)) .or. (.not. ((b * c) <= 3.2d+21))) then
        tmp = (b * c) - (27.0d0 * (k * j))
    else
        tmp = ((k * (-27.0d0)) * j) + ((-4.0d0) * (t * a))
    end if
    code = tmp
end function
assert y < z;
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 (((b * c) <= -3.2e-14) || !((b * c) <= 3.2e+21)) {
		tmp = (b * c) - (27.0 * (k * j));
	} else {
		tmp = ((k * -27.0) * j) + (-4.0 * (t * a));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if ((b * c) <= -3.2e-14) or not ((b * c) <= 3.2e+21):
		tmp = (b * c) - (27.0 * (k * j))
	else:
		tmp = ((k * -27.0) * j) + (-4.0 * (t * a))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((Float64(b * c) <= -3.2e-14) || !(Float64(b * c) <= 3.2e+21))
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(k * j)));
	else
		tmp = Float64(Float64(Float64(k * -27.0) * j) + Float64(-4.0 * Float64(t * a)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (((b * c) <= -3.2e-14) || ~(((b * c) <= 3.2e+21)))
		tmp = (b * c) - (27.0 * (k * j));
	else
		tmp = ((k * -27.0) * j) + (-4.0 * (t * a));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -3.2e-14], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.2e+21]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.2 \cdot 10^{-14} \lor \neg \left(b \cdot c \leq 3.2 \cdot 10^{+21}\right):\\
\;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -3.2000000000000002e-14 or 3.2e21 < (*.f64 b c)

    1. Initial program 82.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. Step-by-step derivation
      1. associate-*l*82.0%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+82.0%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--82.7%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*84.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*84.9%

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

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

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

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

    if -3.2000000000000002e-14 < (*.f64 b c) < 3.2e21

    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. Simplified90.4%

      \[\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. Taylor expanded in a around inf 53.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.2 \cdot 10^{-14} \lor \neg \left(b \cdot c \leq 3.2 \cdot 10^{+21}\right):\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 18: 51.5% accurate, 1.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} t_1 := b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{if}\;x \leq -5.5 \cdot 10^{+93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{+23}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-16} \lor \neg \left(x \leq 1.85 \cdot 10^{+28}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* (* x 4.0) i))))
   (if (<= x -5.5e+93)
     t_1
     (if (<= x -3.6e+23)
       (+ (* b c) (* (* k -27.0) j))
       (if (or (<= x -1.4e-16) (not (<= x 1.85e+28)))
         t_1
         (- (* b c) (* 27.0 (* k j))))))))
assert(y < z);
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) - ((x * 4.0) * i);
	double tmp;
	if (x <= -5.5e+93) {
		tmp = t_1;
	} else if (x <= -3.6e+23) {
		tmp = (b * c) + ((k * -27.0) * j);
	} else if ((x <= -1.4e-16) || !(x <= 1.85e+28)) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (k * j));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = (b * c) - ((x * 4.0d0) * i)
    if (x <= (-5.5d+93)) then
        tmp = t_1
    else if (x <= (-3.6d+23)) then
        tmp = (b * c) + ((k * (-27.0d0)) * j)
    else if ((x <= (-1.4d-16)) .or. (.not. (x <= 1.85d+28))) then
        tmp = t_1
    else
        tmp = (b * c) - (27.0d0 * (k * j))
    end if
    code = tmp
end function
assert y < z;
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) - ((x * 4.0) * i);
	double tmp;
	if (x <= -5.5e+93) {
		tmp = t_1;
	} else if (x <= -3.6e+23) {
		tmp = (b * c) + ((k * -27.0) * j);
	} else if ((x <= -1.4e-16) || !(x <= 1.85e+28)) {
		tmp = t_1;
	} else {
		tmp = (b * c) - (27.0 * (k * j));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - ((x * 4.0) * i)
	tmp = 0
	if x <= -5.5e+93:
		tmp = t_1
	elif x <= -3.6e+23:
		tmp = (b * c) + ((k * -27.0) * j)
	elif (x <= -1.4e-16) or not (x <= 1.85e+28):
		tmp = t_1
	else:
		tmp = (b * c) - (27.0 * (k * j))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i))
	tmp = 0.0
	if (x <= -5.5e+93)
		tmp = t_1;
	elseif (x <= -3.6e+23)
		tmp = Float64(Float64(b * c) + Float64(Float64(k * -27.0) * j));
	elseif ((x <= -1.4e-16) || !(x <= 1.85e+28))
		tmp = t_1;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(k * j)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - ((x * 4.0) * i);
	tmp = 0.0;
	if (x <= -5.5e+93)
		tmp = t_1;
	elseif (x <= -3.6e+23)
		tmp = (b * c) + ((k * -27.0) * j);
	elseif ((x <= -1.4e-16) || ~((x <= 1.85e+28)))
		tmp = t_1;
	else
		tmp = (b * c) - (27.0 * (k * j));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e+93], t$95$1, If[LessEqual[x, -3.6e+23], N[(N[(b * c), $MachinePrecision] + N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.4e-16], N[Not[LessEqual[x, 1.85e+28]], $MachinePrecision]], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{+93}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -3.6 \cdot 10^{+23}:\\
\;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\

\mathbf{elif}\;x \leq -1.4 \cdot 10^{-16} \lor \neg \left(x \leq 1.85 \cdot 10^{+28}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.5000000000000003e93 or -3.5999999999999998e23 < x < -1.4000000000000001e-16 or 1.85e28 < x

    1. Initial program 72.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. Step-by-step derivation
      1. associate-*l*72.2%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+72.2%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--74.1%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*77.9%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*77.9%

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

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

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 54.3%

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

        \[\leadsto b \cdot c - 4 \cdot \color{blue}{\left(x \cdot i\right)} \]
      2. associate-*r*54.3%

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot x\right) \cdot i} \]
    7. Simplified54.3%

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

    if -5.5000000000000003e93 < x < -3.5999999999999998e23

    1. Initial program 80.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. Simplified89.7%

      \[\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. Taylor expanded in b around inf 74.6%

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

    if -1.4000000000000001e-16 < x < 1.85e28

    1. Initial program 95.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. Step-by-step derivation
      1. associate-*l*94.7%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+94.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--95.5%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*93.3%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*93.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{+93}:\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{elif}\;x \leq -3.6 \cdot 10^{+23}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-16} \lor \neg \left(x \leq 1.85 \cdot 10^{+28}\right):\\ \;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \end{array} \]

Alternative 19: 33.5% accurate, 2.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -35000 \lor \neg \left(x \leq 2.7 \cdot 10^{+17}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -35000.0) (not (<= x 2.7e+17)))
   (* t (* 18.0 (* x (* y z))))
   (* -27.0 (* k j))))
assert(y < z);
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 <= -35000.0) || !(x <= 2.7e+17)) {
		tmp = t * (18.0 * (x * (y * z)));
	} else {
		tmp = -27.0 * (k * j);
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((x <= (-35000.0d0)) .or. (.not. (x <= 2.7d+17))) then
        tmp = t * (18.0d0 * (x * (y * z)))
    else
        tmp = (-27.0d0) * (k * j)
    end if
    code = tmp
end function
assert y < z;
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 <= -35000.0) || !(x <= 2.7e+17)) {
		tmp = t * (18.0 * (x * (y * z)));
	} else {
		tmp = -27.0 * (k * j);
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (x <= -35000.0) or not (x <= 2.7e+17):
		tmp = t * (18.0 * (x * (y * z)))
	else:
		tmp = -27.0 * (k * j)
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((x <= -35000.0) || !(x <= 2.7e+17))
		tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z))));
	else
		tmp = Float64(-27.0 * Float64(k * j));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((x <= -35000.0) || ~((x <= 2.7e+17)))
		tmp = t * (18.0 * (x * (y * z)));
	else
		tmp = -27.0 * (k * j);
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -35000.0], N[Not[LessEqual[x, 2.7e+17]], $MachinePrecision]], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -35000 \lor \neg \left(x \leq 2.7 \cdot 10^{+17}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -35000 or 2.7e17 < x

    1. Initial program 72.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. Step-by-step derivation
      1. associate-*l*72.6%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+72.6%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--74.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*79.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*79.0%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 67.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 58.7%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    7. Taylor expanded in x around inf 38.5%

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

    if -35000 < x < 2.7e17

    1. Initial program 96.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. Simplified95.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. Taylor expanded in j around inf 36.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -35000 \lor \neg \left(x \leq 2.7 \cdot 10^{+17}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \end{array} \]

Alternative 20: 33.9% accurate, 2.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -35000000000 \lor \neg \left(x \leq 3.2 \cdot 10^{+16}\right):\\ \;\;\;\;t \cdot \left(y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -35000000000.0) (not (<= x 3.2e+16)))
   (* t (* y (* (* x 18.0) z)))
   (* -27.0 (* k j))))
assert(y < z);
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 <= -35000000000.0) || !(x <= 3.2e+16)) {
		tmp = t * (y * ((x * 18.0) * z));
	} else {
		tmp = -27.0 * (k * j);
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((x <= (-35000000000.0d0)) .or. (.not. (x <= 3.2d+16))) then
        tmp = t * (y * ((x * 18.0d0) * z))
    else
        tmp = (-27.0d0) * (k * j)
    end if
    code = tmp
end function
assert y < z;
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 <= -35000000000.0) || !(x <= 3.2e+16)) {
		tmp = t * (y * ((x * 18.0) * z));
	} else {
		tmp = -27.0 * (k * j);
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (x <= -35000000000.0) or not (x <= 3.2e+16):
		tmp = t * (y * ((x * 18.0) * z))
	else:
		tmp = -27.0 * (k * j)
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((x <= -35000000000.0) || !(x <= 3.2e+16))
		tmp = Float64(t * Float64(y * Float64(Float64(x * 18.0) * z)));
	else
		tmp = Float64(-27.0 * Float64(k * j));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((x <= -35000000000.0) || ~((x <= 3.2e+16)))
		tmp = t * (y * ((x * 18.0) * z));
	else
		tmp = -27.0 * (k * j);
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -35000000000.0], N[Not[LessEqual[x, 3.2e+16]], $MachinePrecision]], N[(t * N[(y * N[(N[(x * 18.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -35000000000 \lor \neg \left(x \leq 3.2 \cdot 10^{+16}\right):\\
\;\;\;\;t \cdot \left(y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.5e10 or 3.2e16 < x

    1. Initial program 72.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. Step-by-step derivation
      1. associate-*l*72.6%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+72.6%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--74.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*79.0%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*79.0%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 67.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 58.7%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    7. Taylor expanded in x around inf 38.5%

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(z \cdot \left(18 \cdot x\right)\right)\right)} \]
    9. Simplified40.8%

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

    if -3.5e10 < x < 3.2e16

    1. Initial program 96.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. Simplified95.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. Taylor expanded in j around inf 36.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -35000000000 \lor \neg \left(x \leq 3.2 \cdot 10^{+16}\right):\\ \;\;\;\;t \cdot \left(y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \end{array} \]

Alternative 21: 45.6% accurate, 2.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 7.8 \cdot 10^{+17}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= x 7.8e+17)
   (+ (* b c) (* (* k -27.0) j))
   (* t (* y (* (* x 18.0) z)))))
assert(y < z);
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 <= 7.8e+17) {
		tmp = (b * c) + ((k * -27.0) * j);
	} else {
		tmp = t * (y * ((x * 18.0) * z));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 (x <= 7.8d+17) then
        tmp = (b * c) + ((k * (-27.0d0)) * j)
    else
        tmp = t * (y * ((x * 18.0d0) * z))
    end if
    code = tmp
end function
assert y < z;
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 <= 7.8e+17) {
		tmp = (b * c) + ((k * -27.0) * j);
	} else {
		tmp = t * (y * ((x * 18.0) * z));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if x <= 7.8e+17:
		tmp = (b * c) + ((k * -27.0) * j)
	else:
		tmp = t * (y * ((x * 18.0) * z))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (x <= 7.8e+17)
		tmp = Float64(Float64(b * c) + Float64(Float64(k * -27.0) * j));
	else
		tmp = Float64(t * Float64(y * Float64(Float64(x * 18.0) * z)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (x <= 7.8e+17)
		tmp = (b * c) + ((k * -27.0) * j);
	else
		tmp = t * (y * ((x * 18.0) * z));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 7.8e+17], N[(N[(b * c), $MachinePrecision] + N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(N[(x * 18.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.8 \cdot 10^{+17}:\\
\;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 7.8e17

    1. Initial program 88.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. Simplified91.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. Taylor expanded in b around inf 56.8%

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

    if 7.8e17 < x

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l*73.5%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+73.5%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--75.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*78.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*78.5%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 60.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 53.0%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    7. Taylor expanded in x around inf 39.7%

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

        \[\leadsto t \cdot \color{blue}{\left(\left(18 \cdot x\right) \cdot \left(y \cdot z\right)\right)} \]
      2. *-commutative39.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 7.8 \cdot 10^{+17}:\\ \;\;\;\;b \cdot c + \left(k \cdot -27\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\ \end{array} \]

Alternative 22: 45.6% accurate, 2.8× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 7.8 \cdot 10^{+17}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= x 7.8e+17) (- (* b c) (* 27.0 (* k j))) (* t (* y (* (* x 18.0) z)))))
assert(y < z);
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 <= 7.8e+17) {
		tmp = (b * c) - (27.0 * (k * j));
	} else {
		tmp = t * (y * ((x * 18.0) * z));
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 (x <= 7.8d+17) then
        tmp = (b * c) - (27.0d0 * (k * j))
    else
        tmp = t * (y * ((x * 18.0d0) * z))
    end if
    code = tmp
end function
assert y < z;
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 <= 7.8e+17) {
		tmp = (b * c) - (27.0 * (k * j));
	} else {
		tmp = t * (y * ((x * 18.0) * z));
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if x <= 7.8e+17:
		tmp = (b * c) - (27.0 * (k * j))
	else:
		tmp = t * (y * ((x * 18.0) * z))
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (x <= 7.8e+17)
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(k * j)));
	else
		tmp = Float64(t * Float64(y * Float64(Float64(x * 18.0) * z)));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (x <= 7.8e+17)
		tmp = (b * c) - (27.0 * (k * j));
	else
		tmp = t * (y * ((x * 18.0) * z));
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 7.8e+17], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(N[(x * 18.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.8 \cdot 10^{+17}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 7.8e17

    1. Initial program 88.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. Step-by-step derivation
      1. associate-*l*87.8%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+87.8%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--88.8%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*89.3%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*89.3%

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

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

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

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

    if 7.8e17 < x

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l*73.5%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+73.5%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--75.2%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*78.5%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*78.5%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 60.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 53.0%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    7. Taylor expanded in x around inf 39.7%

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

        \[\leadsto t \cdot \color{blue}{\left(\left(18 \cdot x\right) \cdot \left(y \cdot z\right)\right)} \]
      2. *-commutative39.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 7.8 \cdot 10^{+17}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(k \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(\left(x \cdot 18\right) \cdot z\right)\right)\\ \end{array} \]

Alternative 23: 30.8% accurate, 3.4× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+125} \lor \neg \left(t \leq 9.6 \cdot 10^{+154}\right):\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \end{array} \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= t -7.5e+125) (not (<= t 9.6e+154)))
   (* t (* a -4.0))
   (* -27.0 (* k j))))
assert(y < z);
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 ((t <= -7.5e+125) || !(t <= 9.6e+154)) {
		tmp = t * (a * -4.0);
	} else {
		tmp = -27.0 * (k * j);
	}
	return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((t <= (-7.5d+125)) .or. (.not. (t <= 9.6d+154))) then
        tmp = t * (a * (-4.0d0))
    else
        tmp = (-27.0d0) * (k * j)
    end if
    code = tmp
end function
assert y < z;
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 ((t <= -7.5e+125) || !(t <= 9.6e+154)) {
		tmp = t * (a * -4.0);
	} else {
		tmp = -27.0 * (k * j);
	}
	return tmp;
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (t <= -7.5e+125) or not (t <= 9.6e+154):
		tmp = t * (a * -4.0)
	else:
		tmp = -27.0 * (k * j)
	return tmp
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((t <= -7.5e+125) || !(t <= 9.6e+154))
		tmp = Float64(t * Float64(a * -4.0));
	else
		tmp = Float64(-27.0 * Float64(k * j));
	end
	return tmp
end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((t <= -7.5e+125) || ~((t <= 9.6e+154)))
		tmp = t * (a * -4.0);
	else
		tmp = -27.0 * (k * j);
	end
	tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -7.5e+125], N[Not[LessEqual[t, 9.6e+154]], $MachinePrecision]], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+125} \lor \neg \left(t \leq 9.6 \cdot 10^{+154}\right):\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.5000000000000006e125 or 9.60000000000000059e154 < t

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l*73.7%

        \[\leadsto \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) - \color{blue}{j \cdot \left(27 \cdot k\right)} \]
      2. associate--l+73.7%

        \[\leadsto \color{blue}{\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) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      3. distribute-rgt-out--78.6%

        \[\leadsto \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      4. associate-*l*78.6%

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - j \cdot \left(27 \cdot k\right) \]
      5. associate-*l*78.6%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - j \cdot \left(27 \cdot k\right)} \]
    4. Taylor expanded in i around 0 88.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)} - j \cdot \left(27 \cdot k\right) \]
    5. Taylor expanded in j around 0 82.5%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    7. Taylor expanded in x around 0 44.4%

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

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

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

    if -7.5000000000000006e125 < t < 9.60000000000000059e154

    1. Initial program 88.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. Simplified91.4%

      \[\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. Taylor expanded in j around inf 30.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+125} \lor \neg \left(t \leq 9.6 \cdot 10^{+154}\right):\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \end{array} \]

Alternative 24: 23.8% accurate, 6.2× speedup?

\[\begin{array}{l} [y, z] = \mathsf{sort}([y, z])\\ \\ -27 \cdot \left(k \cdot j\right) \end{array} \]
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k) :precision binary64 (* -27.0 (* k j)))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return -27.0 * (k * j);
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = (-27.0d0) * (k * j)
end function
assert y < z;
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 -27.0 * (k * j);
}
[y, z] = sort([y, z])
def code(x, y, z, t, a, b, c, i, j, k):
	return -27.0 * (k * j)
y, z = sort([y, z])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(-27.0 * Float64(k * j))
end
y, z = num2cell(sort([y, z])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = -27.0 * (k * j);
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
-27 \cdot \left(k \cdot j\right)
\end{array}
Derivation
  1. Initial program 84.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.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. Taylor expanded in j around inf 26.2%

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

    \[\leadsto -27 \cdot \left(k \cdot j\right) \]

Developer target: 89.3% accurate, 0.9× 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 2023318 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :herbie-target
  (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)))