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

Percentage Accurate: 85.2% → 91.0%
Time: 35.0s
Alternatives: 29
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 29 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 91.0% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, z \cdot \left(y \cdot t\right), i \cdot -4\right), b \cdot c\right) - j \cdot \left(27 \cdot k\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 97.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 \]

    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. Simplified20.8%

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv0.0%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*4.2%

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

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

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

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

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

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

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

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

Alternative 2: 91.8% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\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 97.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 \]

    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. Simplified20.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 37.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(i \cdot -4\right)\\ t_2 := 18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -5.1 \cdot 10^{+63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -5100:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -9.6 \cdot 10^{-76}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{-195}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{+21}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+55}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.45 \cdot 10^{+82}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* x (* z (* y t))))))
   (if (<= (* b c) -6.2e+114)
     (* b c)
     (if (<= (* b c) -5.1e+63)
       t_1
       (if (<= (* b c) -5100.0)
         t_2
         (if (<= (* b c) -9.5e-29)
           t_1
           (if (<= (* b c) -9.6e-76)
             (* k (* j -27.0))
             (if (<= (* b c) 0.0)
               t_2
               (if (<= (* b c) 1.2e-195)
                 t_1
                 (if (<= (* b c) 1.4e+21)
                   (* (* j k) -27.0)
                   (if (<= (* b c) 2.3e+55)
                     (* t (* a -4.0))
                     (if (<= (* b c) 1.45e+82)
                       (* 18.0 (* t (* x (* y z))))
                       (* b c)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double t_2 = 18.0 * (x * (z * (y * t)));
	double tmp;
	if ((b * c) <= -6.2e+114) {
		tmp = b * c;
	} else if ((b * c) <= -5.1e+63) {
		tmp = t_1;
	} else if ((b * c) <= -5100.0) {
		tmp = t_2;
	} else if ((b * c) <= -9.5e-29) {
		tmp = t_1;
	} else if ((b * c) <= -9.6e-76) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 0.0) {
		tmp = t_2;
	} else if ((b * c) <= 1.2e-195) {
		tmp = t_1;
	} else if ((b * c) <= 1.4e+21) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 2.3e+55) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 1.45e+82) {
		tmp = 18.0 * (t * (x * (y * z)));
	} else {
		tmp = b * c;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (i * (-4.0d0))
    t_2 = 18.0d0 * (x * (z * (y * t)))
    if ((b * c) <= (-6.2d+114)) then
        tmp = b * c
    else if ((b * c) <= (-5.1d+63)) then
        tmp = t_1
    else if ((b * c) <= (-5100.0d0)) then
        tmp = t_2
    else if ((b * c) <= (-9.5d-29)) then
        tmp = t_1
    else if ((b * c) <= (-9.6d-76)) then
        tmp = k * (j * (-27.0d0))
    else if ((b * c) <= 0.0d0) then
        tmp = t_2
    else if ((b * c) <= 1.2d-195) then
        tmp = t_1
    else if ((b * c) <= 1.4d+21) then
        tmp = (j * k) * (-27.0d0)
    else if ((b * c) <= 2.3d+55) then
        tmp = t * (a * (-4.0d0))
    else if ((b * c) <= 1.45d+82) then
        tmp = 18.0d0 * (t * (x * (y * z)))
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double t_2 = 18.0 * (x * (z * (y * t)));
	double tmp;
	if ((b * c) <= -6.2e+114) {
		tmp = b * c;
	} else if ((b * c) <= -5.1e+63) {
		tmp = t_1;
	} else if ((b * c) <= -5100.0) {
		tmp = t_2;
	} else if ((b * c) <= -9.5e-29) {
		tmp = t_1;
	} else if ((b * c) <= -9.6e-76) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 0.0) {
		tmp = t_2;
	} else if ((b * c) <= 1.2e-195) {
		tmp = t_1;
	} else if ((b * c) <= 1.4e+21) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 2.3e+55) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 1.45e+82) {
		tmp = 18.0 * (t * (x * (y * z)));
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (i * -4.0)
	t_2 = 18.0 * (x * (z * (y * t)))
	tmp = 0
	if (b * c) <= -6.2e+114:
		tmp = b * c
	elif (b * c) <= -5.1e+63:
		tmp = t_1
	elif (b * c) <= -5100.0:
		tmp = t_2
	elif (b * c) <= -9.5e-29:
		tmp = t_1
	elif (b * c) <= -9.6e-76:
		tmp = k * (j * -27.0)
	elif (b * c) <= 0.0:
		tmp = t_2
	elif (b * c) <= 1.2e-195:
		tmp = t_1
	elif (b * c) <= 1.4e+21:
		tmp = (j * k) * -27.0
	elif (b * c) <= 2.3e+55:
		tmp = t * (a * -4.0)
	elif (b * c) <= 1.45e+82:
		tmp = 18.0 * (t * (x * (y * z)))
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(i * -4.0))
	t_2 = Float64(18.0 * Float64(x * Float64(z * Float64(y * t))))
	tmp = 0.0
	if (Float64(b * c) <= -6.2e+114)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -5.1e+63)
		tmp = t_1;
	elseif (Float64(b * c) <= -5100.0)
		tmp = t_2;
	elseif (Float64(b * c) <= -9.5e-29)
		tmp = t_1;
	elseif (Float64(b * c) <= -9.6e-76)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (Float64(b * c) <= 0.0)
		tmp = t_2;
	elseif (Float64(b * c) <= 1.2e-195)
		tmp = t_1;
	elseif (Float64(b * c) <= 1.4e+21)
		tmp = Float64(Float64(j * k) * -27.0);
	elseif (Float64(b * c) <= 2.3e+55)
		tmp = Float64(t * Float64(a * -4.0));
	elseif (Float64(b * c) <= 1.45e+82)
		tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z))));
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (i * -4.0);
	t_2 = 18.0 * (x * (z * (y * t)));
	tmp = 0.0;
	if ((b * c) <= -6.2e+114)
		tmp = b * c;
	elseif ((b * c) <= -5.1e+63)
		tmp = t_1;
	elseif ((b * c) <= -5100.0)
		tmp = t_2;
	elseif ((b * c) <= -9.5e-29)
		tmp = t_1;
	elseif ((b * c) <= -9.6e-76)
		tmp = k * (j * -27.0);
	elseif ((b * c) <= 0.0)
		tmp = t_2;
	elseif ((b * c) <= 1.2e-195)
		tmp = t_1;
	elseif ((b * c) <= 1.4e+21)
		tmp = (j * k) * -27.0;
	elseif ((b * c) <= 2.3e+55)
		tmp = t * (a * -4.0);
	elseif ((b * c) <= 1.45e+82)
		tmp = 18.0 * (t * (x * (y * z)));
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+114], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.1e+63], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5100.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -9.5e-29], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -9.6e-76], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.2e-195], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.4e+21], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+55], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.45e+82], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq -5.1 \cdot 10^{+63}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -5100:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-29}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{-195}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+55}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if (*.f64 b c) < -6.2000000000000001e114 or 1.4500000000000001e82 < (*.f64 b c)

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

    if -6.2000000000000001e114 < (*.f64 b c) < -5.0999999999999998e63 or -5100 < (*.f64 b c) < -9.50000000000000023e-29 or -0.0 < (*.f64 b c) < 1.2e-195

    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. Simplified91.3%

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

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

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

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

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

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

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

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

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

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

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

    if -5.0999999999999998e63 < (*.f64 b c) < -5100 or -9.60000000000000053e-76 < (*.f64 b c) < -0.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 18 \cdot \left(x \cdot \color{blue}{\left(z \cdot \left(t \cdot y\right)\right)}\right) \]
    10. Simplified42.5%

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

    if -9.50000000000000023e-29 < (*.f64 b c) < -9.60000000000000053e-76

    1. Initial program 80.6%

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

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv80.6%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*86.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative54.5%

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

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

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    10. Simplified54.6%

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

    if 1.2e-195 < (*.f64 b c) < 1.4e21

    1. Initial program 94.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. Simplified86.6%

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

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

    if 1.4e21 < (*.f64 b c) < 2.29999999999999987e55

    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. Simplified100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) \]
      2. distribute-lft-neg-in61.4%

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(a \cdot 4\right)} \]
      6. distribute-rgt-neg-in61.4%

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(a \cdot 4\right) \cdot 1}\right) \]
      8. *-rgt-identity61.4%

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

        \[\leadsto t \cdot \left(-\color{blue}{4 \cdot a}\right) \]
      10. distribute-lft-neg-in61.4%

        \[\leadsto t \cdot \color{blue}{\left(\left(-4\right) \cdot a\right)} \]
      11. metadata-eval61.4%

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

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

    if 2.29999999999999987e55 < (*.f64 b c) < 1.4500000000000001e82

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -5.1 \cdot 10^{+63}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5100:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-29}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -9.6 \cdot 10^{-76}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 0:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{-195}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{+21}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+55}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.45 \cdot 10^{+82}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 4: 37.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(i \cdot -4\right)\\ t_2 := 18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -4.4 \cdot 10^{+63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -2100:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{-72}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq 2.8 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{+22}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+80}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* x (* z (* y t))))))
   (if (<= (* b c) -6.2e+114)
     (* b c)
     (if (<= (* b c) -4.4e+63)
       t_1
       (if (<= (* b c) -2100.0)
         t_2
         (if (<= (* b c) -3.8e-25)
           t_1
           (if (<= (* b c) -5.5e-72)
             (* k (* j -27.0))
             (if (<= (* b c) 0.0)
               t_2
               (if (<= (* b c) 2.8e-190)
                 t_1
                 (if (<= (* b c) 5.5e+22)
                   (* (* j k) -27.0)
                   (if (<= (* b c) 9.8e+54)
                     (* t (* a -4.0))
                     (if (<= (* b c) 2.7e+80)
                       (* 18.0 (* (* y z) (* x t)))
                       (* b c)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double t_2 = 18.0 * (x * (z * (y * t)));
	double tmp;
	if ((b * c) <= -6.2e+114) {
		tmp = b * c;
	} else if ((b * c) <= -4.4e+63) {
		tmp = t_1;
	} else if ((b * c) <= -2100.0) {
		tmp = t_2;
	} else if ((b * c) <= -3.8e-25) {
		tmp = t_1;
	} else if ((b * c) <= -5.5e-72) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 0.0) {
		tmp = t_2;
	} else if ((b * c) <= 2.8e-190) {
		tmp = t_1;
	} else if ((b * c) <= 5.5e+22) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 9.8e+54) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 2.7e+80) {
		tmp = 18.0 * ((y * z) * (x * t));
	} else {
		tmp = b * c;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (i * (-4.0d0))
    t_2 = 18.0d0 * (x * (z * (y * t)))
    if ((b * c) <= (-6.2d+114)) then
        tmp = b * c
    else if ((b * c) <= (-4.4d+63)) then
        tmp = t_1
    else if ((b * c) <= (-2100.0d0)) then
        tmp = t_2
    else if ((b * c) <= (-3.8d-25)) then
        tmp = t_1
    else if ((b * c) <= (-5.5d-72)) then
        tmp = k * (j * (-27.0d0))
    else if ((b * c) <= 0.0d0) then
        tmp = t_2
    else if ((b * c) <= 2.8d-190) then
        tmp = t_1
    else if ((b * c) <= 5.5d+22) then
        tmp = (j * k) * (-27.0d0)
    else if ((b * c) <= 9.8d+54) then
        tmp = t * (a * (-4.0d0))
    else if ((b * c) <= 2.7d+80) then
        tmp = 18.0d0 * ((y * z) * (x * t))
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double t_2 = 18.0 * (x * (z * (y * t)));
	double tmp;
	if ((b * c) <= -6.2e+114) {
		tmp = b * c;
	} else if ((b * c) <= -4.4e+63) {
		tmp = t_1;
	} else if ((b * c) <= -2100.0) {
		tmp = t_2;
	} else if ((b * c) <= -3.8e-25) {
		tmp = t_1;
	} else if ((b * c) <= -5.5e-72) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 0.0) {
		tmp = t_2;
	} else if ((b * c) <= 2.8e-190) {
		tmp = t_1;
	} else if ((b * c) <= 5.5e+22) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 9.8e+54) {
		tmp = t * (a * -4.0);
	} else if ((b * c) <= 2.7e+80) {
		tmp = 18.0 * ((y * z) * (x * t));
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (i * -4.0)
	t_2 = 18.0 * (x * (z * (y * t)))
	tmp = 0
	if (b * c) <= -6.2e+114:
		tmp = b * c
	elif (b * c) <= -4.4e+63:
		tmp = t_1
	elif (b * c) <= -2100.0:
		tmp = t_2
	elif (b * c) <= -3.8e-25:
		tmp = t_1
	elif (b * c) <= -5.5e-72:
		tmp = k * (j * -27.0)
	elif (b * c) <= 0.0:
		tmp = t_2
	elif (b * c) <= 2.8e-190:
		tmp = t_1
	elif (b * c) <= 5.5e+22:
		tmp = (j * k) * -27.0
	elif (b * c) <= 9.8e+54:
		tmp = t * (a * -4.0)
	elif (b * c) <= 2.7e+80:
		tmp = 18.0 * ((y * z) * (x * t))
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(i * -4.0))
	t_2 = Float64(18.0 * Float64(x * Float64(z * Float64(y * t))))
	tmp = 0.0
	if (Float64(b * c) <= -6.2e+114)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -4.4e+63)
		tmp = t_1;
	elseif (Float64(b * c) <= -2100.0)
		tmp = t_2;
	elseif (Float64(b * c) <= -3.8e-25)
		tmp = t_1;
	elseif (Float64(b * c) <= -5.5e-72)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (Float64(b * c) <= 0.0)
		tmp = t_2;
	elseif (Float64(b * c) <= 2.8e-190)
		tmp = t_1;
	elseif (Float64(b * c) <= 5.5e+22)
		tmp = Float64(Float64(j * k) * -27.0);
	elseif (Float64(b * c) <= 9.8e+54)
		tmp = Float64(t * Float64(a * -4.0));
	elseif (Float64(b * c) <= 2.7e+80)
		tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)));
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (i * -4.0);
	t_2 = 18.0 * (x * (z * (y * t)));
	tmp = 0.0;
	if ((b * c) <= -6.2e+114)
		tmp = b * c;
	elseif ((b * c) <= -4.4e+63)
		tmp = t_1;
	elseif ((b * c) <= -2100.0)
		tmp = t_2;
	elseif ((b * c) <= -3.8e-25)
		tmp = t_1;
	elseif ((b * c) <= -5.5e-72)
		tmp = k * (j * -27.0);
	elseif ((b * c) <= 0.0)
		tmp = t_2;
	elseif ((b * c) <= 2.8e-190)
		tmp = t_1;
	elseif ((b * c) <= 5.5e+22)
		tmp = (j * k) * -27.0;
	elseif ((b * c) <= 9.8e+54)
		tmp = t * (a * -4.0);
	elseif ((b * c) <= 2.7e+80)
		tmp = 18.0 * ((y * z) * (x * t));
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+114], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.4e+63], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2100.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -3.8e-25], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5.5e-72], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2.8e-190], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5.5e+22], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.8e+54], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.7e+80], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq -4.4 \cdot 10^{+63}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -2100:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-25}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{-72}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq 2.8 \cdot 10^{-190}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if (*.f64 b c) < -6.2000000000000001e114 or 2.69999999999999983e80 < (*.f64 b c)

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

    if -6.2000000000000001e114 < (*.f64 b c) < -4.3999999999999997e63 or -2100 < (*.f64 b c) < -3.7999999999999998e-25 or -0.0 < (*.f64 b c) < 2.80000000000000005e-190

    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. Simplified91.3%

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999997e63 < (*.f64 b c) < -2100 or -5.49999999999999994e-72 < (*.f64 b c) < -0.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 18 \cdot \left(x \cdot \color{blue}{\left(z \cdot \left(t \cdot y\right)\right)}\right) \]
    10. Simplified42.5%

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

    if -3.7999999999999998e-25 < (*.f64 b c) < -5.49999999999999994e-72

    1. Initial program 80.6%

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

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv80.6%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*86.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative54.5%

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

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

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    10. Simplified54.6%

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

    if 2.80000000000000005e-190 < (*.f64 b c) < 5.50000000000000021e22

    1. Initial program 94.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. Simplified86.6%

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

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

    if 5.50000000000000021e22 < (*.f64 b c) < 9.80000000000000002e54

    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. Simplified100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) \]
      2. distribute-lft-neg-in61.4%

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(a \cdot 4\right)} \]
      6. distribute-rgt-neg-in61.4%

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(a \cdot 4\right) \cdot 1}\right) \]
      8. *-rgt-identity61.4%

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

        \[\leadsto t \cdot \left(-\color{blue}{4 \cdot a}\right) \]
      10. distribute-lft-neg-in61.4%

        \[\leadsto t \cdot \color{blue}{\left(\left(-4\right) \cdot a\right)} \]
      11. metadata-eval61.4%

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

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

    if 9.80000000000000002e54 < (*.f64 b c) < 2.69999999999999983e80

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 18 \cdot \left(\left(y \cdot z\right) \cdot \color{blue}{\left(x \cdot t\right)}\right) \]
    7. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -4.4 \cdot 10^{+63}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -2100:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-25}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{-72}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 0:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 2.8 \cdot 10^{-190}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{+22}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+80}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 5: 79.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 4 \cdot \left(x \cdot i\right)\\ t_2 := x \cdot \left(y \cdot z\right)\\ t_3 := \left(j \cdot 27\right) \cdot k\\ t_4 := 4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;t_3 \leq -2 \cdot 10^{+120}:\\ \;\;\;\;\left(b \cdot c + \left(18 \cdot t\right) \cdot t_2\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{-277}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\right) - t_1\\ \mathbf{elif}\;t_3 \leq 10^{-35} \lor \neg \left(t_3 \leq 10^{+114}\right):\\ \;\;\;\;\left(b \cdot c - \left(t_4 + t_1\right)\right) - t_3\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot t_2\right)\right) - t_4\right) - t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* 4.0 (* x i)))
        (t_2 (* x (* y z)))
        (t_3 (* (* j 27.0) k))
        (t_4 (* 4.0 (* t a))))
   (if (<= t_3 -2e+120)
     (- (+ (* b c) (* (* 18.0 t) t_2)) (+ (* j (* 27.0 k)) (* x (* 4.0 i))))
     (if (<= t_3 2e-277)
       (- (+ (* b c) (* t (- (* 18.0 t_2) (* a 4.0)))) t_1)
       (if (or (<= t_3 1e-35) (not (<= t_3 1e+114)))
         (- (- (* b c) (+ t_4 t_1)) t_3)
         (- (- (+ (* b c) (* 18.0 (* t t_2))) t_4) t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 4.0 * (x * i);
	double t_2 = x * (y * z);
	double t_3 = (j * 27.0) * k;
	double t_4 = 4.0 * (t * a);
	double tmp;
	if (t_3 <= -2e+120) {
		tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i)));
	} else if (t_3 <= 2e-277) {
		tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1;
	} else if ((t_3 <= 1e-35) || !(t_3 <= 1e+114)) {
		tmp = ((b * c) - (t_4 + t_1)) - t_3;
	} else {
		tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = 4.0d0 * (x * i)
    t_2 = x * (y * z)
    t_3 = (j * 27.0d0) * k
    t_4 = 4.0d0 * (t * a)
    if (t_3 <= (-2d+120)) then
        tmp = ((b * c) + ((18.0d0 * t) * t_2)) - ((j * (27.0d0 * k)) + (x * (4.0d0 * i)))
    else if (t_3 <= 2d-277) then
        tmp = ((b * c) + (t * ((18.0d0 * t_2) - (a * 4.0d0)))) - t_1
    else if ((t_3 <= 1d-35) .or. (.not. (t_3 <= 1d+114))) then
        tmp = ((b * c) - (t_4 + t_1)) - t_3
    else
        tmp = (((b * c) + (18.0d0 * (t * t_2))) - t_4) - t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = 4.0 * (x * i);
	double t_2 = x * (y * z);
	double t_3 = (j * 27.0) * k;
	double t_4 = 4.0 * (t * a);
	double tmp;
	if (t_3 <= -2e+120) {
		tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i)));
	} else if (t_3 <= 2e-277) {
		tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1;
	} else if ((t_3 <= 1e-35) || !(t_3 <= 1e+114)) {
		tmp = ((b * c) - (t_4 + t_1)) - t_3;
	} else {
		tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = 4.0 * (x * i)
	t_2 = x * (y * z)
	t_3 = (j * 27.0) * k
	t_4 = 4.0 * (t * a)
	tmp = 0
	if t_3 <= -2e+120:
		tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i)))
	elif t_3 <= 2e-277:
		tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1
	elif (t_3 <= 1e-35) or not (t_3 <= 1e+114):
		tmp = ((b * c) - (t_4 + t_1)) - t_3
	else:
		tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(4.0 * Float64(x * i))
	t_2 = Float64(x * Float64(y * z))
	t_3 = Float64(Float64(j * 27.0) * k)
	t_4 = Float64(4.0 * Float64(t * a))
	tmp = 0.0
	if (t_3 <= -2e+120)
		tmp = Float64(Float64(Float64(b * c) + Float64(Float64(18.0 * t) * t_2)) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(4.0 * i))));
	elseif (t_3 <= 2e-277)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * t_2) - Float64(a * 4.0)))) - t_1);
	elseif ((t_3 <= 1e-35) || !(t_3 <= 1e+114))
		tmp = Float64(Float64(Float64(b * c) - Float64(t_4 + t_1)) - t_3);
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_2))) - t_4) - t_3);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = 4.0 * (x * i);
	t_2 = x * (y * z);
	t_3 = (j * 27.0) * k;
	t_4 = 4.0 * (t * a);
	tmp = 0.0;
	if (t_3 <= -2e+120)
		tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i)));
	elseif (t_3 <= 2e-277)
		tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1;
	elseif ((t_3 <= 1e-35) || ~((t_3 <= 1e+114)))
		tmp = ((b * c) - (t_4 + t_1)) - t_3;
	else
		tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3;
	end
	tmp_2 = tmp;
end
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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+120], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(18.0 * t), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e-277], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[Or[LessEqual[t$95$3, 1e-35], N[Not[LessEqual[t$95$3, 1e+114]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(t$95$4 + t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-277}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\right) - t_1\\

\mathbf{elif}\;t_3 \leq 10^{-35} \lor \neg \left(t_3 \leq 10^{+114}\right):\\
\;\;\;\;\left(b \cdot c - \left(t_4 + t_1\right)\right) - t_3\\

\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot t_2\right)\right) - t_4\right) - t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j 27) k) < -2e120

    1. Initial program 94.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. Simplified97.3%

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv94.4%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*94.2%

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

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

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

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

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

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

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

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

    if -2e120 < (*.f64 (*.f64 j 27) k) < 1.99999999999999994e-277

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

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

    if 1.99999999999999994e-277 < (*.f64 (*.f64 j 27) k) < 1.00000000000000001e-35 or 1e114 < (*.f64 (*.f64 j 27) k)

    1. Initial program 82.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. Taylor expanded in y around 0 91.0%

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

    if 1.00000000000000001e-35 < (*.f64 (*.f64 j 27) k) < 1e114

    1. Initial program 93.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. Taylor expanded in i around 0 99.9%

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

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

Alternative 6: 37.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(i \cdot -4\right)\\ t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+115}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.16 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-16}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -2.4 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-74}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 0:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{+56}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 2.5 \cdot 10^{+82}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* t (* x (* y z))))))
   (if (<= (* b c) -2.3e+115)
     (* b c)
     (if (<= (* b c) -1.16e+64)
       t_1
       (if (<= (* b c) -3.8e-16)
         t_2
         (if (<= (* b c) -2.4e-26)
           t_1
           (if (<= (* b c) -7e-74)
             (* k (* j -27.0))
             (if (<= (* b c) 0.0)
               t_2
               (if (<= (* b c) 1.95e-190)
                 t_1
                 (if (<= (* b c) 1.7e+56)
                   (* (* j k) -27.0)
                   (if (<= (* b c) 2.5e+82) t_2 (* b c))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double t_2 = 18.0 * (t * (x * (y * z)));
	double tmp;
	if ((b * c) <= -2.3e+115) {
		tmp = b * c;
	} else if ((b * c) <= -1.16e+64) {
		tmp = t_1;
	} else if ((b * c) <= -3.8e-16) {
		tmp = t_2;
	} else if ((b * c) <= -2.4e-26) {
		tmp = t_1;
	} else if ((b * c) <= -7e-74) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 0.0) {
		tmp = t_2;
	} else if ((b * c) <= 1.95e-190) {
		tmp = t_1;
	} else if ((b * c) <= 1.7e+56) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 2.5e+82) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (i * (-4.0d0))
    t_2 = 18.0d0 * (t * (x * (y * z)))
    if ((b * c) <= (-2.3d+115)) then
        tmp = b * c
    else if ((b * c) <= (-1.16d+64)) then
        tmp = t_1
    else if ((b * c) <= (-3.8d-16)) then
        tmp = t_2
    else if ((b * c) <= (-2.4d-26)) then
        tmp = t_1
    else if ((b * c) <= (-7d-74)) then
        tmp = k * (j * (-27.0d0))
    else if ((b * c) <= 0.0d0) then
        tmp = t_2
    else if ((b * c) <= 1.95d-190) then
        tmp = t_1
    else if ((b * c) <= 1.7d+56) then
        tmp = (j * k) * (-27.0d0)
    else if ((b * c) <= 2.5d+82) then
        tmp = t_2
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double t_2 = 18.0 * (t * (x * (y * z)));
	double tmp;
	if ((b * c) <= -2.3e+115) {
		tmp = b * c;
	} else if ((b * c) <= -1.16e+64) {
		tmp = t_1;
	} else if ((b * c) <= -3.8e-16) {
		tmp = t_2;
	} else if ((b * c) <= -2.4e-26) {
		tmp = t_1;
	} else if ((b * c) <= -7e-74) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 0.0) {
		tmp = t_2;
	} else if ((b * c) <= 1.95e-190) {
		tmp = t_1;
	} else if ((b * c) <= 1.7e+56) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 2.5e+82) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (i * -4.0)
	t_2 = 18.0 * (t * (x * (y * z)))
	tmp = 0
	if (b * c) <= -2.3e+115:
		tmp = b * c
	elif (b * c) <= -1.16e+64:
		tmp = t_1
	elif (b * c) <= -3.8e-16:
		tmp = t_2
	elif (b * c) <= -2.4e-26:
		tmp = t_1
	elif (b * c) <= -7e-74:
		tmp = k * (j * -27.0)
	elif (b * c) <= 0.0:
		tmp = t_2
	elif (b * c) <= 1.95e-190:
		tmp = t_1
	elif (b * c) <= 1.7e+56:
		tmp = (j * k) * -27.0
	elif (b * c) <= 2.5e+82:
		tmp = t_2
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(i * -4.0))
	t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))
	tmp = 0.0
	if (Float64(b * c) <= -2.3e+115)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -1.16e+64)
		tmp = t_1;
	elseif (Float64(b * c) <= -3.8e-16)
		tmp = t_2;
	elseif (Float64(b * c) <= -2.4e-26)
		tmp = t_1;
	elseif (Float64(b * c) <= -7e-74)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (Float64(b * c) <= 0.0)
		tmp = t_2;
	elseif (Float64(b * c) <= 1.95e-190)
		tmp = t_1;
	elseif (Float64(b * c) <= 1.7e+56)
		tmp = Float64(Float64(j * k) * -27.0);
	elseif (Float64(b * c) <= 2.5e+82)
		tmp = t_2;
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (i * -4.0);
	t_2 = 18.0 * (t * (x * (y * z)));
	tmp = 0.0;
	if ((b * c) <= -2.3e+115)
		tmp = b * c;
	elseif ((b * c) <= -1.16e+64)
		tmp = t_1;
	elseif ((b * c) <= -3.8e-16)
		tmp = t_2;
	elseif ((b * c) <= -2.4e-26)
		tmp = t_1;
	elseif ((b * c) <= -7e-74)
		tmp = k * (j * -27.0);
	elseif ((b * c) <= 0.0)
		tmp = t_2;
	elseif ((b * c) <= 1.95e-190)
		tmp = t_1;
	elseif ((b * c) <= 1.7e+56)
		tmp = (j * k) * -27.0;
	elseif ((b * c) <= 2.5e+82)
		tmp = t_2;
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.3e+115], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.16e+64], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -3.8e-16], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -2.4e-26], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7e-74], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.95e-190], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.7e+56], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.5e+82], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+115}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq -1.16 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-16}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq -2.4 \cdot 10^{-26}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-74}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{-190}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 2.5 \cdot 10^{+82}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -2.30000000000000004e115 or 2.50000000000000008e82 < (*.f64 b c)

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000004e115 < (*.f64 b c) < -1.16e64 or -3.80000000000000012e-16 < (*.f64 b c) < -2.4000000000000001e-26 or -0.0 < (*.f64 b c) < 1.94999999999999997e-190

    1. Initial program 93.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. Simplified93.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.16e64 < (*.f64 b c) < -3.80000000000000012e-16 or -7.00000000000000029e-74 < (*.f64 b c) < -0.0 or 1.7e56 < (*.f64 b c) < 2.50000000000000008e82

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e-26 < (*.f64 b c) < -7.00000000000000029e-74

    1. Initial program 80.6%

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

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv80.6%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*86.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative54.5%

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

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

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    10. Simplified54.6%

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

    if 1.94999999999999997e-190 < (*.f64 b c) < 1.7e56

    1. Initial program 95.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. Simplified88.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+115}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.16 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-16}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq -2.4 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-74}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 0:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{-190}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{+56}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 2.5 \cdot 10^{+82}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 7: 78.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-277}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\right) - t_3\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-35} \lor \neg \left(t_1 \leq 200000000\right):\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t_3\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j 27) k) < -2e120

    1. Initial program 94.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. Taylor expanded in i around 0 94.4%

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

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

    if -2e120 < (*.f64 (*.f64 j 27) k) < 1.99999999999999994e-277

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

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

    if 1.99999999999999994e-277 < (*.f64 (*.f64 j 27) k) < 4.99999999999999964e-35 or 2e8 < (*.f64 (*.f64 j 27) k)

    1. Initial program 84.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. Taylor expanded in y around 0 90.1%

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

    if 4.99999999999999964e-35 < (*.f64 (*.f64 j 27) k) < 2e8

    1. Initial program 92.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. Taylor expanded in i around 0 99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 79.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(y \cdot z\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ t_3 := j \cdot \left(27 \cdot k\right)\\ t_4 := 4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+120}:\\ \;\;\;\;\left(b \cdot c + \left(18 \cdot t\right) \cdot t_1\right) - \left(t_3 + x \cdot \left(4 \cdot i\right)\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{-277}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\right) - t_4\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{-35} \lor \neg \left(t_2 \leq 200000000\right):\\ \;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t_4\right)\right) - t_2\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - t_3\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (* y z)))
        (t_2 (* (* j 27.0) k))
        (t_3 (* j (* 27.0 k)))
        (t_4 (* 4.0 (* x i))))
   (if (<= t_2 -2e+120)
     (- (+ (* b c) (* (* 18.0 t) t_1)) (+ t_3 (* x (* 4.0 i))))
     (if (<= t_2 2e-277)
       (- (+ (* b c) (* t (- (* 18.0 t_1) (* a 4.0)))) t_4)
       (if (or (<= t_2 5e-35) (not (<= t_2 200000000.0)))
         (- (- (* b c) (+ (* 4.0 (* t a)) t_4)) t_2)
         (+ (* 18.0 (* y (* z (* x t)))) (- (* b c) t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (y * z);
	double t_2 = (j * 27.0) * k;
	double t_3 = j * (27.0 * k);
	double t_4 = 4.0 * (x * i);
	double tmp;
	if (t_2 <= -2e+120) {
		tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i)));
	} else if (t_2 <= 2e-277) {
		tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4;
	} else if ((t_2 <= 5e-35) || !(t_2 <= 200000000.0)) {
		tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2;
	} else {
		tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = x * (y * z)
    t_2 = (j * 27.0d0) * k
    t_3 = j * (27.0d0 * k)
    t_4 = 4.0d0 * (x * i)
    if (t_2 <= (-2d+120)) then
        tmp = ((b * c) + ((18.0d0 * t) * t_1)) - (t_3 + (x * (4.0d0 * i)))
    else if (t_2 <= 2d-277) then
        tmp = ((b * c) + (t * ((18.0d0 * t_1) - (a * 4.0d0)))) - t_4
    else if ((t_2 <= 5d-35) .or. (.not. (t_2 <= 200000000.0d0))) then
        tmp = ((b * c) - ((4.0d0 * (t * a)) + t_4)) - t_2
    else
        tmp = (18.0d0 * (y * (z * (x * t)))) + ((b * c) - t_3)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (y * z);
	double t_2 = (j * 27.0) * k;
	double t_3 = j * (27.0 * k);
	double t_4 = 4.0 * (x * i);
	double tmp;
	if (t_2 <= -2e+120) {
		tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i)));
	} else if (t_2 <= 2e-277) {
		tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4;
	} else if ((t_2 <= 5e-35) || !(t_2 <= 200000000.0)) {
		tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2;
	} else {
		tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (y * z)
	t_2 = (j * 27.0) * k
	t_3 = j * (27.0 * k)
	t_4 = 4.0 * (x * i)
	tmp = 0
	if t_2 <= -2e+120:
		tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i)))
	elif t_2 <= 2e-277:
		tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4
	elif (t_2 <= 5e-35) or not (t_2 <= 200000000.0):
		tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2
	else:
		tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3)
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(y * z))
	t_2 = Float64(Float64(j * 27.0) * k)
	t_3 = Float64(j * Float64(27.0 * k))
	t_4 = Float64(4.0 * Float64(x * i))
	tmp = 0.0
	if (t_2 <= -2e+120)
		tmp = Float64(Float64(Float64(b * c) + Float64(Float64(18.0 * t) * t_1)) - Float64(t_3 + Float64(x * Float64(4.0 * i))));
	elseif (t_2 <= 2e-277)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0)))) - t_4);
	elseif ((t_2 <= 5e-35) || !(t_2 <= 200000000.0))
		tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + t_4)) - t_2);
	else
		tmp = Float64(Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))) + Float64(Float64(b * c) - t_3));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (y * z);
	t_2 = (j * 27.0) * k;
	t_3 = j * (27.0 * k);
	t_4 = 4.0 * (x * i);
	tmp = 0.0;
	if (t_2 <= -2e+120)
		tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i)));
	elseif (t_2 <= 2e-277)
		tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4;
	elseif ((t_2 <= 5e-35) || ~((t_2 <= 200000000.0)))
		tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2;
	else
		tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3);
	end
	tmp_2 = tmp;
end
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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+120], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(18.0 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-277], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision], If[Or[LessEqual[t$95$2, 5e-35], N[Not[LessEqual[t$95$2, 200000000.0]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-277}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\right) - t_4\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-35} \lor \neg \left(t_2 \leq 200000000\right):\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t_4\right)\right) - t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j 27) k) < -2e120

    1. Initial program 94.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. Simplified97.3%

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv94.4%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*94.2%

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

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

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

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

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

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

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

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

    if -2e120 < (*.f64 (*.f64 j 27) k) < 1.99999999999999994e-277

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

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

    if 1.99999999999999994e-277 < (*.f64 (*.f64 j 27) k) < 4.99999999999999964e-35 or 2e8 < (*.f64 (*.f64 j 27) k)

    1. Initial program 84.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. Taylor expanded in y around 0 90.1%

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

    if 4.99999999999999964e-35 < (*.f64 (*.f64 j 27) k) < 2e8

    1. Initial program 92.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. Taylor expanded in i around 0 99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+45} \lor \neg \left(j \cdot 27 \leq -5 \cdot 10^{-194} \lor \neg \left(j \cdot 27 \leq -5 \cdot 10^{-243}\right) \land j \cdot 27 \leq 10^{-110}\right):\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 j 27) < -1.9999999999999999e45 or -5.0000000000000002e-194 < (*.f64 j 27) < -5e-243 or 1.0000000000000001e-110 < (*.f64 j 27)

    1. Initial program 88.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. Taylor expanded in i around 0 80.6%

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e45 < (*.f64 j 27) < -5.0000000000000002e-194 or -5e-243 < (*.f64 j 27) < 1.0000000000000001e-110

    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. Taylor expanded in y around 0 78.6%

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

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

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

Alternative 10: 66.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{-194}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{-243}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\

\mathbf{elif}\;j \cdot 27 \leq 10^{-110}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 j 27) < -1.9999999999999999e45 or 1.0000000000000001e-110 < (*.f64 j 27)

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e45 < (*.f64 j 27) < -5.0000000000000002e-194 or -5e-243 < (*.f64 j 27) < 1.0000000000000001e-110

    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. Taylor expanded in y around 0 78.6%

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

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

    if -5.0000000000000002e-194 < (*.f64 j 27) < -5e-243

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+45}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{-194}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{-243}:\\ \;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;j \cdot 27 \leq 10^{-110}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\ \end{array} \]

Alternative 11: 53.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ t_2 := b \cdot c + t_1\\ t_3 := j \cdot \left(k \cdot -27\right)\\ t_4 := t_3 + -4 \cdot \left(x \cdot i\right)\\ \mathbf{if}\;b \cdot c \leq -3.4 \cdot 10^{+115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot c \leq -1.22 \cdot 10^{-76}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \cdot c \leq -3.85 \cdot 10^{-146}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 1.56 \cdot 10^{-286}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+54}:\\ \;\;\;\;t_1 + t_3\\ \mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+86}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\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 (* -4.0 (* t a)))
        (t_2 (+ (* b c) t_1))
        (t_3 (* j (* k -27.0)))
        (t_4 (+ t_3 (* -4.0 (* x i)))))
   (if (<= (* b c) -3.4e+115)
     t_2
     (if (<= (* b c) -1.22e-76)
       t_4
       (if (<= (* b c) -3.85e-146)
         (* 18.0 (* x (* z (* y t))))
         (if (<= (* b c) 1.56e-286)
           t_4
           (if (<= (* b c) 1.15e+54)
             (+ t_1 t_3)
             (if (<= (* b c) 2.3e+86) (* 18.0 (* (* y z) (* x t))) 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 = -4.0 * (t * a);
	double t_2 = (b * c) + t_1;
	double t_3 = j * (k * -27.0);
	double t_4 = t_3 + (-4.0 * (x * i));
	double tmp;
	if ((b * c) <= -3.4e+115) {
		tmp = t_2;
	} else if ((b * c) <= -1.22e-76) {
		tmp = t_4;
	} else if ((b * c) <= -3.85e-146) {
		tmp = 18.0 * (x * (z * (y * t)));
	} else if ((b * c) <= 1.56e-286) {
		tmp = t_4;
	} else if ((b * c) <= 1.15e+54) {
		tmp = t_1 + t_3;
	} else if ((b * c) <= 2.3e+86) {
		tmp = 18.0 * ((y * z) * (x * t));
	} 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) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = (-4.0d0) * (t * a)
    t_2 = (b * c) + t_1
    t_3 = j * (k * (-27.0d0))
    t_4 = t_3 + ((-4.0d0) * (x * i))
    if ((b * c) <= (-3.4d+115)) then
        tmp = t_2
    else if ((b * c) <= (-1.22d-76)) then
        tmp = t_4
    else if ((b * c) <= (-3.85d-146)) then
        tmp = 18.0d0 * (x * (z * (y * t)))
    else if ((b * c) <= 1.56d-286) then
        tmp = t_4
    else if ((b * c) <= 1.15d+54) then
        tmp = t_1 + t_3
    else if ((b * c) <= 2.3d+86) then
        tmp = 18.0d0 * ((y * z) * (x * t))
    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 = -4.0 * (t * a);
	double t_2 = (b * c) + t_1;
	double t_3 = j * (k * -27.0);
	double t_4 = t_3 + (-4.0 * (x * i));
	double tmp;
	if ((b * c) <= -3.4e+115) {
		tmp = t_2;
	} else if ((b * c) <= -1.22e-76) {
		tmp = t_4;
	} else if ((b * c) <= -3.85e-146) {
		tmp = 18.0 * (x * (z * (y * t)));
	} else if ((b * c) <= 1.56e-286) {
		tmp = t_4;
	} else if ((b * c) <= 1.15e+54) {
		tmp = t_1 + t_3;
	} else if ((b * c) <= 2.3e+86) {
		tmp = 18.0 * ((y * z) * (x * t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = -4.0 * (t * a)
	t_2 = (b * c) + t_1
	t_3 = j * (k * -27.0)
	t_4 = t_3 + (-4.0 * (x * i))
	tmp = 0
	if (b * c) <= -3.4e+115:
		tmp = t_2
	elif (b * c) <= -1.22e-76:
		tmp = t_4
	elif (b * c) <= -3.85e-146:
		tmp = 18.0 * (x * (z * (y * t)))
	elif (b * c) <= 1.56e-286:
		tmp = t_4
	elif (b * c) <= 1.15e+54:
		tmp = t_1 + t_3
	elif (b * c) <= 2.3e+86:
		tmp = 18.0 * ((y * z) * (x * t))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-4.0 * Float64(t * a))
	t_2 = Float64(Float64(b * c) + t_1)
	t_3 = Float64(j * Float64(k * -27.0))
	t_4 = Float64(t_3 + Float64(-4.0 * Float64(x * i)))
	tmp = 0.0
	if (Float64(b * c) <= -3.4e+115)
		tmp = t_2;
	elseif (Float64(b * c) <= -1.22e-76)
		tmp = t_4;
	elseif (Float64(b * c) <= -3.85e-146)
		tmp = Float64(18.0 * Float64(x * Float64(z * Float64(y * t))));
	elseif (Float64(b * c) <= 1.56e-286)
		tmp = t_4;
	elseif (Float64(b * c) <= 1.15e+54)
		tmp = Float64(t_1 + t_3);
	elseif (Float64(b * c) <= 2.3e+86)
		tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = -4.0 * (t * a);
	t_2 = (b * c) + t_1;
	t_3 = j * (k * -27.0);
	t_4 = t_3 + (-4.0 * (x * i));
	tmp = 0.0;
	if ((b * c) <= -3.4e+115)
		tmp = t_2;
	elseif ((b * c) <= -1.22e-76)
		tmp = t_4;
	elseif ((b * c) <= -3.85e-146)
		tmp = 18.0 * (x * (z * (y * t)));
	elseif ((b * c) <= 1.56e-286)
		tmp = t_4;
	elseif ((b * c) <= 1.15e+54)
		tmp = t_1 + t_3;
	elseif ((b * c) <= 2.3e+86)
		tmp = 18.0 * ((y * z) * (x * t));
	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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.4e+115], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -1.22e-76], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], -3.85e-146], N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.56e-286], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], 1.15e+54], N[(t$95$1 + t$95$3), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+86], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \cdot c \leq -1.22 \cdot 10^{-76}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \cdot c \leq -3.85 \cdot 10^{-146}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\

\mathbf{elif}\;b \cdot c \leq 1.56 \cdot 10^{-286}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+54}:\\
\;\;\;\;t_1 + t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -3.4000000000000001e115 or 2.2999999999999999e86 < (*.f64 b c)

    1. Initial program 84.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. Simplified86.0%

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

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

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

    if -3.4000000000000001e115 < (*.f64 b c) < -1.22e-76 or -3.84999999999999998e-146 < (*.f64 b c) < 1.56e-286

    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. Simplified89.0%

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

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

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

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

    if -1.22e-76 < (*.f64 b c) < -3.84999999999999998e-146

    1. Initial program 88.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. Simplified88.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 18 \cdot \left(\left(y \cdot z\right) \cdot \color{blue}{\left(x \cdot t\right)}\right) \]
    7. Simplified87.4%

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

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

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

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

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

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

        \[\leadsto 18 \cdot \left(x \cdot \color{blue}{\left(z \cdot \left(t \cdot y\right)\right)}\right) \]
    10. Simplified87.4%

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

    if 1.56e-286 < (*.f64 b c) < 1.14999999999999997e54

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

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

    if 1.14999999999999997e54 < (*.f64 b c) < 2.2999999999999999e86

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3.4 \cdot 10^{+115}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -1.22 \cdot 10^{-76}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -3.85 \cdot 10^{-146}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 1.56 \cdot 10^{-286}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+54}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+86}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 12: 87.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-101} \lor \neg \left(t \leq 7.5 \cdot 10^{-289}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.0000000000000001e-101 or 7.49999999999999998e-289 < t

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

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

    if -5.0000000000000001e-101 < t < 7.49999999999999998e-289

    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. Taylor expanded in y around 0 94.8%

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

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

Alternative 13: 36.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq -2.25 \cdot 10^{-66}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot c \leq 9.5 \cdot 10^{+18}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 2.85 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (* i -4.0))))
   (if (<= (* b c) -6.2e+114)
     (* b c)
     (if (<= (* b c) -2e-30)
       t_1
       (if (<= (* b c) -2.25e-66)
         (* k (* j -27.0))
         (if (<= (* b c) 3.4e-196)
           t_1
           (if (<= (* b c) 9.5e+18)
             (* (* j k) -27.0)
             (if (<= (* b c) 2.85e+156) (* t (* a -4.0)) (* b c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double tmp;
	if ((b * c) <= -6.2e+114) {
		tmp = b * c;
	} else if ((b * c) <= -2e-30) {
		tmp = t_1;
	} else if ((b * c) <= -2.25e-66) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 3.4e-196) {
		tmp = t_1;
	} else if ((b * c) <= 9.5e+18) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 2.85e+156) {
		tmp = t * (a * -4.0);
	} else {
		tmp = b * c;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (i * (-4.0d0))
    if ((b * c) <= (-6.2d+114)) then
        tmp = b * c
    else if ((b * c) <= (-2d-30)) then
        tmp = t_1
    else if ((b * c) <= (-2.25d-66)) then
        tmp = k * (j * (-27.0d0))
    else if ((b * c) <= 3.4d-196) then
        tmp = t_1
    else if ((b * c) <= 9.5d+18) then
        tmp = (j * k) * (-27.0d0)
    else if ((b * c) <= 2.85d+156) then
        tmp = t * (a * (-4.0d0))
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * (i * -4.0);
	double tmp;
	if ((b * c) <= -6.2e+114) {
		tmp = b * c;
	} else if ((b * c) <= -2e-30) {
		tmp = t_1;
	} else if ((b * c) <= -2.25e-66) {
		tmp = k * (j * -27.0);
	} else if ((b * c) <= 3.4e-196) {
		tmp = t_1;
	} else if ((b * c) <= 9.5e+18) {
		tmp = (j * k) * -27.0;
	} else if ((b * c) <= 2.85e+156) {
		tmp = t * (a * -4.0);
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = x * (i * -4.0)
	tmp = 0
	if (b * c) <= -6.2e+114:
		tmp = b * c
	elif (b * c) <= -2e-30:
		tmp = t_1
	elif (b * c) <= -2.25e-66:
		tmp = k * (j * -27.0)
	elif (b * c) <= 3.4e-196:
		tmp = t_1
	elif (b * c) <= 9.5e+18:
		tmp = (j * k) * -27.0
	elif (b * c) <= 2.85e+156:
		tmp = t * (a * -4.0)
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * Float64(i * -4.0))
	tmp = 0.0
	if (Float64(b * c) <= -6.2e+114)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -2e-30)
		tmp = t_1;
	elseif (Float64(b * c) <= -2.25e-66)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (Float64(b * c) <= 3.4e-196)
		tmp = t_1;
	elseif (Float64(b * c) <= 9.5e+18)
		tmp = Float64(Float64(j * k) * -27.0);
	elseif (Float64(b * c) <= 2.85e+156)
		tmp = Float64(t * Float64(a * -4.0));
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = x * (i * -4.0);
	tmp = 0.0;
	if ((b * c) <= -6.2e+114)
		tmp = b * c;
	elseif ((b * c) <= -2e-30)
		tmp = t_1;
	elseif ((b * c) <= -2.25e-66)
		tmp = k * (j * -27.0);
	elseif ((b * c) <= 3.4e-196)
		tmp = t_1;
	elseif ((b * c) <= 9.5e+18)
		tmp = (j * k) * -27.0;
	elseif ((b * c) <= 2.85e+156)
		tmp = t * (a * -4.0);
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+114], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-30], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.25e-66], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.4e-196], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 9.5e+18], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.85e+156], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-30}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot c \leq -2.25 \cdot 10^{-66}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{-196}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot c \leq 2.85 \cdot 10^{+156}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -6.2000000000000001e114 or 2.84999999999999999e156 < (*.f64 b c)

    1. Initial program 84.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. Simplified86.5%

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

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

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

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

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

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

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

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

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

    if -6.2000000000000001e114 < (*.f64 b c) < -2e-30 or -2.2499999999999999e-66 < (*.f64 b c) < 3.4e-196

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-30 < (*.f64 b c) < -2.2499999999999999e-66

    1. Initial program 84.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. Simplified84.4%

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv84.1%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*91.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative59.4%

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

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

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    10. Simplified59.5%

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

    if 3.4e-196 < (*.f64 b c) < 9.5e18

    1. Initial program 94.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. Simplified86.6%

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

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

    if 9.5e18 < (*.f64 b c) < 2.84999999999999999e156

    1. Initial program 90.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. Simplified86.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) \]
      2. distribute-lft-neg-in38.3%

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(a \cdot 4\right)} \]
      6. distribute-rgt-neg-in38.3%

        \[\leadsto \color{blue}{t \cdot \left(-a \cdot 4\right)} \]
      7. *-rgt-identity38.3%

        \[\leadsto t \cdot \left(-\color{blue}{\left(a \cdot 4\right) \cdot 1}\right) \]
      8. *-rgt-identity38.3%

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

        \[\leadsto t \cdot \left(-\color{blue}{4 \cdot a}\right) \]
      10. distribute-lft-neg-in38.3%

        \[\leadsto t \cdot \color{blue}{\left(\left(-4\right) \cdot a\right)} \]
      11. metadata-eval38.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-30}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -2.25 \cdot 10^{-66}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{-196}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 9.5 \cdot 10^{+18}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;b \cdot c \leq 2.85 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 14: 60.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -1.15 \cdot 10^{+209}:\\ \;\;\;\;t \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot z\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;j \leq -4.8 \cdot 10^{+191} \lor \neg \left(j \leq -2.1 \cdot 10^{+147}\right) \land \left(j \leq -2.2 \cdot 10^{+123} \lor \neg \left(j \leq -9 \cdot 10^{+53}\right) \land j \leq 4.6 \cdot 10^{-55}\right):\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= j -1.15e+209)
   (- (* t (* (* 18.0 y) (* x z))) (* j (* 27.0 k)))
   (if (or (<= j -4.8e+191)
           (and (not (<= j -2.1e+147))
                (or (<= j -2.2e+123)
                    (and (not (<= j -9e+53)) (<= j 4.6e-55)))))
     (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i))))
     (+ (* 18.0 (* x (* y (* z t)))) (* j (* k -27.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (j <= -1.15e+209) {
		tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k));
	} else if ((j <= -4.8e+191) || (!(j <= -2.1e+147) && ((j <= -2.2e+123) || (!(j <= -9e+53) && (j <= 4.6e-55))))) {
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
	} else {
		tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: tmp
    if (j <= (-1.15d+209)) then
        tmp = (t * ((18.0d0 * y) * (x * z))) - (j * (27.0d0 * k))
    else if ((j <= (-4.8d+191)) .or. (.not. (j <= (-2.1d+147))) .and. (j <= (-2.2d+123)) .or. (.not. (j <= (-9d+53))) .and. (j <= 4.6d-55)) then
        tmp = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
    else
        tmp = (18.0d0 * (x * (y * (z * t)))) + (j * (k * (-27.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (j <= -1.15e+209) {
		tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k));
	} else if ((j <= -4.8e+191) || (!(j <= -2.1e+147) && ((j <= -2.2e+123) || (!(j <= -9e+53) && (j <= 4.6e-55))))) {
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
	} else {
		tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if j <= -1.15e+209:
		tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k))
	elif (j <= -4.8e+191) or (not (j <= -2.1e+147) and ((j <= -2.2e+123) or (not (j <= -9e+53) and (j <= 4.6e-55)))):
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))
	else:
		tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (j <= -1.15e+209)
		tmp = Float64(Float64(t * Float64(Float64(18.0 * y) * Float64(x * z))) - Float64(j * Float64(27.0 * k)));
	elseif ((j <= -4.8e+191) || (!(j <= -2.1e+147) && ((j <= -2.2e+123) || (!(j <= -9e+53) && (j <= 4.6e-55)))))
		tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i))));
	else
		tmp = Float64(Float64(18.0 * Float64(x * Float64(y * Float64(z * t)))) + Float64(j * Float64(k * -27.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (j <= -1.15e+209)
		tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k));
	elseif ((j <= -4.8e+191) || (~((j <= -2.1e+147)) && ((j <= -2.2e+123) || (~((j <= -9e+53)) && (j <= 4.6e-55)))))
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
	else
		tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -1.15e+209], N[(N[(t * N[(N[(18.0 * y), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -4.8e+191], And[N[Not[LessEqual[j, -2.1e+147]], $MachinePrecision], Or[LessEqual[j, -2.2e+123], And[N[Not[LessEqual[j, -9e+53]], $MachinePrecision], LessEqual[j, 4.6e-55]]]]], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.15 \cdot 10^{+209}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot z\right)\right) - j \cdot \left(27 \cdot k\right)\\

\mathbf{elif}\;j \leq -4.8 \cdot 10^{+191} \lor \neg \left(j \leq -2.1 \cdot 10^{+147}\right) \land \left(j \leq -2.2 \cdot 10^{+123} \lor \neg \left(j \leq -9 \cdot 10^{+53}\right) \land j \leq 4.6 \cdot 10^{-55}\right):\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.15000000000000005e209

    1. Initial program 83.2%

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

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv83.2%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*66.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} - j \cdot \left(27 \cdot k\right) \]
    9. Step-by-step derivation
      1. *-commutative75.0%

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

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

        \[\leadsto t \cdot \color{blue}{\left(x \cdot \left(\left(y \cdot z\right) \cdot 18\right)\right)} - j \cdot \left(27 \cdot k\right) \]
      4. *-commutative75.0%

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

        \[\leadsto t \cdot \left(x \cdot \color{blue}{\left(z \cdot \left(y \cdot 18\right)\right)}\right) - j \cdot \left(27 \cdot k\right) \]
      6. *-commutative75.0%

        \[\leadsto t \cdot \color{blue}{\left(\left(z \cdot \left(y \cdot 18\right)\right) \cdot x\right)} - j \cdot \left(27 \cdot k\right) \]
      7. *-commutative75.0%

        \[\leadsto t \cdot \left(\color{blue}{\left(\left(y \cdot 18\right) \cdot z\right)} \cdot x\right) - j \cdot \left(27 \cdot k\right) \]
      8. associate-*l*69.7%

        \[\leadsto t \cdot \color{blue}{\left(\left(y \cdot 18\right) \cdot \left(z \cdot x\right)\right)} - j \cdot \left(27 \cdot k\right) \]
    10. Simplified69.7%

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

    if -1.15000000000000005e209 < j < -4.79999999999999972e191 or -2.10000000000000006e147 < j < -2.19999999999999992e123 or -9.0000000000000004e53 < j < 4.60000000000000023e-55

    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. Taylor expanded in y around 0 78.0%

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

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

    if -4.79999999999999972e191 < j < -2.10000000000000006e147 or -2.19999999999999992e123 < j < -9.0000000000000004e53 or 4.60000000000000023e-55 < j

    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. Simplified87.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.15 \cdot 10^{+209}:\\ \;\;\;\;t \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot z\right)\right) - j \cdot \left(27 \cdot k\right)\\ \mathbf{elif}\;j \leq -4.8 \cdot 10^{+191} \lor \neg \left(j \leq -2.1 \cdot 10^{+147}\right) \land \left(j \leq -2.2 \cdot 10^{+123} \lor \neg \left(j \leq -9 \cdot 10^{+53}\right) \land j \leq 4.6 \cdot 10^{-55}\right):\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\ \end{array} \]

Alternative 15: 60.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;j \leq -1.35 \cdot 10^{+209}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + t_1\\ \mathbf{elif}\;j \leq -1.15 \cdot 10^{+123} \lor \neg \left(j \leq -6.5 \cdot 10^{+52}\right) \land j \leq 1.02 \cdot 10^{-55}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= j -1.35e+209)
     (+ (* 18.0 (* t (* x (* y z)))) t_1)
     (if (or (<= j -1.15e+123) (and (not (<= j -6.5e+52)) (<= j 1.02e-55)))
       (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i))))
       (+ (* 18.0 (* x (* y (* z t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if (j <= -1.35e+209) {
		tmp = (18.0 * (t * (x * (y * z)))) + t_1;
	} else if ((j <= -1.15e+123) || (!(j <= -6.5e+52) && (j <= 1.02e-55))) {
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
	} else {
		tmp = (18.0 * (x * (y * (z * t)))) + t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    if (j <= (-1.35d+209)) then
        tmp = (18.0d0 * (t * (x * (y * z)))) + t_1
    else if ((j <= (-1.15d+123)) .or. (.not. (j <= (-6.5d+52))) .and. (j <= 1.02d-55)) then
        tmp = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
    else
        tmp = (18.0d0 * (x * (y * (z * t)))) + t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double tmp;
	if (j <= -1.35e+209) {
		tmp = (18.0 * (t * (x * (y * z)))) + t_1;
	} else if ((j <= -1.15e+123) || (!(j <= -6.5e+52) && (j <= 1.02e-55))) {
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
	} else {
		tmp = (18.0 * (x * (y * (z * t)))) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	tmp = 0
	if j <= -1.35e+209:
		tmp = (18.0 * (t * (x * (y * z)))) + t_1
	elif (j <= -1.15e+123) or (not (j <= -6.5e+52) and (j <= 1.02e-55)):
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))
	else:
		tmp = (18.0 * (x * (y * (z * t)))) + t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	tmp = 0.0
	if (j <= -1.35e+209)
		tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) + t_1);
	elseif ((j <= -1.15e+123) || (!(j <= -6.5e+52) && (j <= 1.02e-55)))
		tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i))));
	else
		tmp = Float64(Float64(18.0 * Float64(x * Float64(y * Float64(z * t)))) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	tmp = 0.0;
	if (j <= -1.35e+209)
		tmp = (18.0 * (t * (x * (y * z)))) + t_1;
	elseif ((j <= -1.15e+123) || (~((j <= -6.5e+52)) && (j <= 1.02e-55)))
		tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
	else
		tmp = (18.0 * (x * (y * (z * t)))) + t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.35e+209], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[Or[LessEqual[j, -1.15e+123], And[N[Not[LessEqual[j, -6.5e+52]], $MachinePrecision], LessEqual[j, 1.02e-55]]], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -1.35 \cdot 10^{+209}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + t_1\\

\mathbf{elif}\;j \leq -1.15 \cdot 10^{+123} \lor \neg \left(j \leq -6.5 \cdot 10^{+52}\right) \land j \leq 1.02 \cdot 10^{-55}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.35e209

    1. Initial program 83.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified88.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 75.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) \]
    4. Step-by-step derivation
      1. *-commutative75.0%

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

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

    if -1.35e209 < j < -1.14999999999999995e123 or -6.49999999999999996e52 < j < 1.02e-55

    1. Initial program 88.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. Taylor expanded in y around 0 76.5%

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

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

    if -1.14999999999999995e123 < j < -6.49999999999999996e52 or 1.02e-55 < j

    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. Simplified86.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)} \]
    3. Taylor expanded in y around inf 49.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) \]
    4. Step-by-step derivation
      1. *-commutative49.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.35 \cdot 10^{+209}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -1.15 \cdot 10^{+123} \lor \neg \left(j \leq -6.5 \cdot 10^{+52}\right) \land j \leq 1.02 \cdot 10^{-55}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\ \end{array} \]

Alternative 16: 65.5% accurate, 1.3× speedup?

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

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

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

\mathbf{elif}\;j \leq -2.15 \cdot 10^{+38} \lor \neg \left(j \leq 3.6 \cdot 10^{-151}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -7.2e66 or -3e51 < j < -2.1499999999999998e38 or 3.60000000000000032e-151 < j

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

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

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

    if -7.2e66 < j < -3e51

    1. Initial program 75.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. Simplified75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1499999999999998e38 < j < 3.60000000000000032e-151

    1. Initial program 87.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. Taylor expanded in y around 0 76.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -7.2 \cdot 10^{+66}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;j \leq -3 \cdot 10^{+51}:\\ \;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;j \leq -2.15 \cdot 10^{+38} \lor \neg \left(j \leq 3.6 \cdot 10^{-151}\right):\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \end{array} \]

Alternative 17: 71.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+119}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+155}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.4999999999999997e119 or 3.60000000000000007e155 < t

    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. Simplified93.7%

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

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

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

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

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + \left(-\color{blue}{a \cdot 4}\right)\right) \]
      5. distribute-rgt-neg-in76.4%

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot \color{blue}{-4}\right) \]
    5. Applied egg-rr76.4%

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

    if -6.4999999999999997e119 < t < 2.8e38

    1. Initial program 89.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. Taylor expanded in t around 0 74.8%

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

    if 2.8e38 < t < 4.39999999999999972e118

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.39999999999999972e118 < t < 3.60000000000000007e155

    1. Initial program 71.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. Simplified85.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+119}:\\ \;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+38}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \left(i \cdot -4 + t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+155}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\ \end{array} \]

Alternative 18: 78.1% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 3.20000000000000002e161

    1. Initial program 89.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. Taylor expanded in y around 0 81.7%

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

    if 3.20000000000000002e161 < z

    1. Initial program 81.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. Taylor expanded in i around 0 74.3%

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

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

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

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

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

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

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

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

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

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

Alternative 19: 59.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.59999999999999997e35 or 1.39999999999999999e-49 < x

    1. Initial program 79.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. Simplified82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.59999999999999997e35 < x < -1.82000000000000004e-287

    1. Initial program 97.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. Taylor expanded in i around 0 80.7%

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

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

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

    if -1.82000000000000004e-287 < x < 1.39999999999999999e-49

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.6 \cdot 10^{+35}:\\ \;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.82 \cdot 10^{-287}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-49}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 20: 36.7% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+111}:\\
\;\;\;\;b \cdot c\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -5.4999999999999998e111 or 2.69999999999999979e158 < (*.f64 b c)

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e111 < (*.f64 b c) < 2.4000000000000001e24

    1. Initial program 89.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. Simplified88.2%

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv89.5%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*87.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative30.0%

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

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

        \[\leadsto \color{blue}{k \cdot \left(j \cdot -27\right)} \]
    10. Simplified30.0%

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

    if 2.4000000000000001e24 < (*.f64 b c) < 2.69999999999999979e158

    1. Initial program 90.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. Simplified86.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) \]
      2. distribute-lft-neg-in38.3%

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

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

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

        \[\leadsto -\color{blue}{t \cdot \left(a \cdot 4\right)} \]
      6. distribute-rgt-neg-in38.3%

        \[\leadsto \color{blue}{t \cdot \left(-a \cdot 4\right)} \]
      7. *-rgt-identity38.3%

        \[\leadsto t \cdot \left(-\color{blue}{\left(a \cdot 4\right) \cdot 1}\right) \]
      8. *-rgt-identity38.3%

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

        \[\leadsto t \cdot \left(-\color{blue}{4 \cdot a}\right) \]
      10. distribute-lft-neg-in38.3%

        \[\leadsto t \cdot \color{blue}{\left(\left(-4\right) \cdot a\right)} \]
      11. metadata-eval38.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+111}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+24}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+158}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 21: 50.9% accurate, 1.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.5e16

    1. Initial program 86.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. Simplified87.6%

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. sub-neg59.3%

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

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

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + \left(-\color{blue}{a \cdot 4}\right)\right) \]
      5. distribute-rgt-neg-in59.3%

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot \color{blue}{-4}\right) \]
    5. Applied egg-rr59.3%

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

    if -2.5e16 < x < -3.04999999999999991e-288

    1. Initial program 96.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. Taylor expanded in i around 0 79.2%

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

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

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

    if -3.04999999999999991e-288 < x < 1.9999999999999999e-36

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

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

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

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

    if 1.9999999999999999e-36 < x

    1. Initial program 74.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. Simplified83.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 i around inf 55.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\ \mathbf{elif}\;x \leq -3.05 \cdot 10^{-288}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-36}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 22: 50.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+19}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.6e19

    1. Initial program 86.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. Simplified87.6%

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

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

    if -4.6e19 < x < -1.19999999999999997e-286

    1. Initial program 96.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. Taylor expanded in i around 0 79.2%

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

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

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

    if -1.19999999999999997e-286 < x < 6.7999999999999998e-39

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

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

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

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

    if 6.7999999999999998e-39 < x

    1. Initial program 74.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. Simplified83.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 i around inf 55.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.6 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;x \leq -1.2 \cdot 10^{-286}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-39}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \end{array} \]

Alternative 23: 39.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-84}:\\
\;\;\;\;18 \cdot \left(t \cdot t_1\right)\\

\mathbf{elif}\;z \leq -1.45 \cdot 10^{-225}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+176}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot t_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.59999999999999964e-84

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

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

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

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

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

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

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

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

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

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

    if -5.59999999999999964e-84 < z < -1.4499999999999999e-225

    1. Initial program 96.6%

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

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv96.6%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*95.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative36.2%

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

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

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

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

    if -1.4499999999999999e-225 < z < 2.5e176

    1. Initial program 93.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. Simplified91.0%

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

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

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

    if 2.5e176 < z

    1. Initial program 79.0%

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. sub-neg59.2%

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

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

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + \left(-\color{blue}{a \cdot 4}\right)\right) \]
      5. distribute-rgt-neg-in59.3%

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot \color{blue}{-4}\right) \]
    5. Applied egg-rr59.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{-84}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-225}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+176}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]

Alternative 24: 49.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{-9}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.56 \cdot 10^{+116}:\\
\;\;\;\;t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.2999999999999999e-9 or 1.56000000000000002e116 < t

    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. Simplified92.7%

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

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

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

    if -2.2999999999999999e-9 < t < 3.4499999999999998e37

    1. Initial program 88.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. Simplified84.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 b around inf 55.4%

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

    if 3.4499999999999998e37 < t < 1.56000000000000002e116

    1. Initial program 84.6%

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. sub-neg68.7%

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

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

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + \left(-\color{blue}{a \cdot 4}\right)\right) \]
      5. distribute-rgt-neg-in68.7%

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot \color{blue}{-4}\right) \]
    5. Applied egg-rr68.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-9}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{+37}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 1.56 \cdot 10^{+116}:\\ \;\;\;\;t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 25: 49.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{-9}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 5 \cdot 10^{+116}:\\
\;\;\;\;t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.2999999999999999e-9 or 5.00000000000000025e116 < t

    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. Simplified92.7%

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

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

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

    if -2.2999999999999999e-9 < t < 1.4e38

    1. Initial program 88.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. Taylor expanded in i around 0 67.7%

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

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

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

    if 1.4e38 < t < 5.00000000000000025e116

    1. Initial program 84.6%

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

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

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
    4. Step-by-step derivation
      1. sub-neg68.7%

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

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

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + \left(-\color{blue}{a \cdot 4}\right)\right) \]
      5. distribute-rgt-neg-in68.7%

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

        \[\leadsto t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot \color{blue}{-4}\right) \]
    5. Applied egg-rr68.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-9}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+38}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+116}:\\ \;\;\;\;t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]

Alternative 26: 37.1% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.2 \cdot 10^{+112} \lor \neg \left(b \cdot c \leq 5.6 \cdot 10^{+75}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -4.1999999999999998e112 or 5.60000000000000023e75 < (*.f64 b c)

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999998e112 < (*.f64 b c) < 5.60000000000000023e75

    1. Initial program 89.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. Simplified88.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 28.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -4.2 \cdot 10^{+112} \lor \neg \left(b \cdot c \leq 5.6 \cdot 10^{+75}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \end{array} \]

Alternative 27: 37.1% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.15 \cdot 10^{+114} \lor \neg \left(b \cdot c \leq 6.8 \cdot 10^{+79}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -2.15e114 or 6.80000000000000063e79 < (*.f64 b c)

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

    if -2.15e114 < (*.f64 b c) < 6.80000000000000063e79

    1. Initial program 89.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. Simplified88.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.15 \cdot 10^{+114} \lor \neg \left(b \cdot c \leq 6.8 \cdot 10^{+79}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]

Alternative 28: 37.1% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+111} \lor \neg \left(b \cdot c \leq 4.1 \cdot 10^{+74}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.5e111 or 4.1e74 < (*.f64 b c)

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

    if -1.5e111 < (*.f64 b c) < 4.1e74

    1. Initial program 89.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. Simplified88.3%

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

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

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      3. cancel-sign-sub-inv89.5%

        \[\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)} + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
      4. associate-*l*88.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    9. Step-by-step derivation
      1. *-commutative28.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+111} \lor \neg \left(b \cdot c \leq 4.1 \cdot 10^{+74}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 29: 23.5% accurate, 10.3× speedup?

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

\\
b \cdot c
\end{array}
Derivation
  1. Initial program 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. Simplified87.6%

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

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

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

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

      \[\leadsto t \cdot \mathsf{fma}\left(y \cdot z, x \cdot 18, -a \cdot 4\right) + \left(b \cdot c - \color{blue}{\mathsf{fma}\left(x, 4 \cdot i, j \cdot \left(27 \cdot k\right)\right)}\right) \]
    5. *-commutative87.6%

      \[\leadsto t \cdot \mathsf{fma}\left(y \cdot z, x \cdot 18, -a \cdot 4\right) + \left(b \cdot c - \mathsf{fma}\left(x, \color{blue}{i \cdot 4}, j \cdot \left(27 \cdot k\right)\right)\right) \]
    6. *-commutative87.6%

      \[\leadsto t \cdot \mathsf{fma}\left(y \cdot z, x \cdot 18, -a \cdot 4\right) + \left(b \cdot c - \mathsf{fma}\left(x, i \cdot 4, j \cdot \color{blue}{\left(k \cdot 27\right)}\right)\right) \]
  4. Applied egg-rr87.6%

    \[\leadsto \color{blue}{t \cdot \mathsf{fma}\left(y \cdot z, x \cdot 18, -a \cdot 4\right) + \left(b \cdot c - \mathsf{fma}\left(x, i \cdot 4, j \cdot \left(k \cdot 27\right)\right)\right)} \]
  5. Taylor expanded in b around inf 26.5%

    \[\leadsto \color{blue}{b \cdot c} \]
  6. Final simplification26.5%

    \[\leadsto b \cdot c \]

Developer target: 89.5% 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 2023322 
(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)))