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

Percentage Accurate: 85.2% → 91.0%
Time: 33.2s
Alternatives: 25
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 25 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.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}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\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 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (((((((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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double 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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	}
	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 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $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}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\


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

    1. Initial program 97.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. Add Preprocessing

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

    1. Initial program 0.0%

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

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

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

    \[\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}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 54.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t\_1 + x \cdot \left(i \cdot -4\right)\\ t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+101}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-126}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ t_1 (* x (* i -4.0))))
        (t_3 (+ t_1 (* -4.0 (* t a)))))
   (if (<= (* b c) -1e+164)
     (+ (* b c) t_1)
     (if (<= (* b c) -2e+101)
       t_2
       (if (<= (* b c) -2e+22)
         (* t (+ (* a -4.0) (/ (* b c) t)))
         (if (<= (* b c) -2e-126)
           t_2
           (if (<= (* b c) 5e-274)
             t_3
             (if (<= (* b c) 2e-54)
               t_2
               (if (<= (* b c) 5e+160)
                 t_3
                 (- (* b c) (* 27.0 (* j 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 * (k * -27.0);
	double t_2 = t_1 + (x * (i * -4.0));
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+101) {
		tmp = t_2;
	} else if ((b * c) <= -2e+22) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -2e-126) {
		tmp = t_2;
	} else if ((b * c) <= 5e-274) {
		tmp = t_3;
	} else if ((b * c) <= 2e-54) {
		tmp = t_2;
	} else if ((b * c) <= 5e+160) {
		tmp = t_3;
	} else {
		tmp = (b * c) - (27.0 * (j * 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 * (k * (-27.0d0))
    t_2 = t_1 + (x * (i * (-4.0d0)))
    t_3 = t_1 + ((-4.0d0) * (t * a))
    if ((b * c) <= (-1d+164)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= (-2d+101)) then
        tmp = t_2
    else if ((b * c) <= (-2d+22)) then
        tmp = t * ((a * (-4.0d0)) + ((b * c) / t))
    else if ((b * c) <= (-2d-126)) then
        tmp = t_2
    else if ((b * c) <= 5d-274) then
        tmp = t_3
    else if ((b * c) <= 2d-54) then
        tmp = t_2
    else if ((b * c) <= 5d+160) then
        tmp = t_3
    else
        tmp = (b * c) - (27.0d0 * (j * 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 * (k * -27.0);
	double t_2 = t_1 + (x * (i * -4.0));
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+101) {
		tmp = t_2;
	} else if ((b * c) <= -2e+22) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -2e-126) {
		tmp = t_2;
	} else if ((b * c) <= 5e-274) {
		tmp = t_3;
	} else if ((b * c) <= 2e-54) {
		tmp = t_2;
	} else if ((b * c) <= 5e+160) {
		tmp = t_3;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (x * (i * -4.0))
	t_3 = t_1 + (-4.0 * (t * a))
	tmp = 0
	if (b * c) <= -1e+164:
		tmp = (b * c) + t_1
	elif (b * c) <= -2e+101:
		tmp = t_2
	elif (b * c) <= -2e+22:
		tmp = t * ((a * -4.0) + ((b * c) / t))
	elif (b * c) <= -2e-126:
		tmp = t_2
	elif (b * c) <= 5e-274:
		tmp = t_3
	elif (b * c) <= 2e-54:
		tmp = t_2
	elif (b * c) <= 5e+160:
		tmp = t_3
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(t_1 + Float64(x * Float64(i * -4.0)))
	t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (Float64(b * c) <= -1e+164)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= -2e+101)
		tmp = t_2;
	elseif (Float64(b * c) <= -2e+22)
		tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(Float64(b * c) / t)));
	elseif (Float64(b * c) <= -2e-126)
		tmp = t_2;
	elseif (Float64(b * c) <= 5e-274)
		tmp = t_3;
	elseif (Float64(b * c) <= 2e-54)
		tmp = t_2;
	elseif (Float64(b * c) <= 5e+160)
		tmp = t_3;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (x * (i * -4.0));
	t_3 = t_1 + (-4.0 * (t * a));
	tmp = 0.0;
	if ((b * c) <= -1e+164)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= -2e+101)
		tmp = t_2;
	elseif ((b * c) <= -2e+22)
		tmp = t * ((a * -4.0) + ((b * c) / t));
	elseif ((b * c) <= -2e-126)
		tmp = t_2;
	elseif ((b * c) <= 5e-274)
		tmp = t_3;
	elseif ((b * c) <= 2e-54)
		tmp = t_2;
	elseif ((b * c) <= 5e+160)
		tmp = t_3;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+164], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+101], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -2e+22], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-126], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 5e-274], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 2e-54], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 5e+160], t$95$3, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-126}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -1e164

    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. 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. Add Preprocessing
    4. Taylor expanded in b around inf 77.1%

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

    if -1e164 < (*.f64 b c) < -2e101 or -2e22 < (*.f64 b c) < -1.9999999999999999e-126 or 5e-274 < (*.f64 b c) < 2.0000000000000001e-54

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

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

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

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

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

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

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

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

    if -2e101 < (*.f64 b c) < -2e22

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    6. Taylor expanded in t around inf 62.4%

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

    if -1.9999999999999999e-126 < (*.f64 b c) < 5e-274 or 2.0000000000000001e-54 < (*.f64 b c) < 5.0000000000000002e160

    1. Initial program 91.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. Simplified91.8%

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

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

    if 5.0000000000000002e160 < (*.f64 b c)

    1. Initial program 81.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+101}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-126}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 54.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t\_1 + -4 \cdot \left(t \cdot a\right)\\ t_3 := t\_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+101}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \cdot c \leq -5000:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-126}:\\ \;\;\;\;i \cdot \left(-27 \cdot \frac{j \cdot k}{i} + x \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ t_1 (* -4.0 (* t a))))
        (t_3 (+ t_1 (* x (* i -4.0)))))
   (if (<= (* b c) -1e+164)
     (+ (* b c) t_1)
     (if (<= (* b c) -2e+101)
       t_3
       (if (<= (* b c) -5000.0)
         (* t (+ (* a -4.0) (/ (* b c) t)))
         (if (<= (* b c) -2e-126)
           (* i (+ (* -27.0 (/ (* j k) i)) (* x -4.0)))
           (if (<= (* b c) 5e-274)
             t_2
             (if (<= (* b c) 2e-54)
               t_3
               (if (<= (* b c) 5e+160)
                 t_2
                 (- (* b c) (* 27.0 (* j 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double t_3 = t_1 + (x * (i * -4.0));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+101) {
		tmp = t_3;
	} else if ((b * c) <= -5000.0) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -2e-126) {
		tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
	} else if ((b * c) <= 5e-274) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_3;
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * 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 * (k * (-27.0d0))
    t_2 = t_1 + ((-4.0d0) * (t * a))
    t_3 = t_1 + (x * (i * (-4.0d0)))
    if ((b * c) <= (-1d+164)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= (-2d+101)) then
        tmp = t_3
    else if ((b * c) <= (-5000.0d0)) then
        tmp = t * ((a * (-4.0d0)) + ((b * c) / t))
    else if ((b * c) <= (-2d-126)) then
        tmp = i * (((-27.0d0) * ((j * k) / i)) + (x * (-4.0d0)))
    else if ((b * c) <= 5d-274) then
        tmp = t_2
    else if ((b * c) <= 2d-54) then
        tmp = t_3
    else if ((b * c) <= 5d+160) then
        tmp = t_2
    else
        tmp = (b * c) - (27.0d0 * (j * 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double t_3 = t_1 + (x * (i * -4.0));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+101) {
		tmp = t_3;
	} else if ((b * c) <= -5000.0) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -2e-126) {
		tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
	} else if ((b * c) <= 5e-274) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_3;
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (-4.0 * (t * a))
	t_3 = t_1 + (x * (i * -4.0))
	tmp = 0
	if (b * c) <= -1e+164:
		tmp = (b * c) + t_1
	elif (b * c) <= -2e+101:
		tmp = t_3
	elif (b * c) <= -5000.0:
		tmp = t * ((a * -4.0) + ((b * c) / t))
	elif (b * c) <= -2e-126:
		tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0))
	elif (b * c) <= 5e-274:
		tmp = t_2
	elif (b * c) <= 2e-54:
		tmp = t_3
	elif (b * c) <= 5e+160:
		tmp = t_2
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	t_3 = Float64(t_1 + Float64(x * Float64(i * -4.0)))
	tmp = 0.0
	if (Float64(b * c) <= -1e+164)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= -2e+101)
		tmp = t_3;
	elseif (Float64(b * c) <= -5000.0)
		tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(Float64(b * c) / t)));
	elseif (Float64(b * c) <= -2e-126)
		tmp = Float64(i * Float64(Float64(-27.0 * Float64(Float64(j * k) / i)) + Float64(x * -4.0)));
	elseif (Float64(b * c) <= 5e-274)
		tmp = t_2;
	elseif (Float64(b * c) <= 2e-54)
		tmp = t_3;
	elseif (Float64(b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (-4.0 * (t * a));
	t_3 = t_1 + (x * (i * -4.0));
	tmp = 0.0;
	if ((b * c) <= -1e+164)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= -2e+101)
		tmp = t_3;
	elseif ((b * c) <= -5000.0)
		tmp = t * ((a * -4.0) + ((b * c) / t));
	elseif ((b * c) <= -2e-126)
		tmp = i * ((-27.0 * ((j * k) / i)) + (x * -4.0));
	elseif ((b * c) <= 5e-274)
		tmp = t_2;
	elseif ((b * c) <= 2e-54)
		tmp = t_3;
	elseif ((b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+164], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+101], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -5000.0], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-126], N[(i * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e-274], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2e-54], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 5e+160], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+101}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq -5000:\\
\;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\

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

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 b c) < -1e164

    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. 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. Add Preprocessing
    4. Taylor expanded in b around inf 77.1%

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

    if -1e164 < (*.f64 b c) < -2e101 or 5e-274 < (*.f64 b c) < 2.0000000000000001e-54

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

    if -2e101 < (*.f64 b c) < -5e3

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    6. Taylor expanded in t around inf 57.7%

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

    if -5e3 < (*.f64 b c) < -1.9999999999999999e-126

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-126 < (*.f64 b c) < 5e-274 or 2.0000000000000001e-54 < (*.f64 b c) < 5.0000000000000002e160

    1. Initial program 91.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. Simplified91.8%

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

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

    if 5.0000000000000002e160 < (*.f64 b c)

    1. Initial program 81.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+101}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5000:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-126}:\\ \;\;\;\;i \cdot \left(-27 \cdot \frac{j \cdot k}{i} + x \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 54.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t\_1 + -4 \cdot \left(t \cdot a\right)\\ t_3 := j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\ \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+104}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ t_1 (* -4.0 (* t a))))
        (t_3 (* j (+ (* k -27.0) (* -4.0 (/ (* x i) j))))))
   (if (<= (* b c) -1e+164)
     (+ (* b c) t_1)
     (if (<= (* b c) -2e+104)
       t_3
       (if (<= (* b c) -2e+22)
         (* t (+ (* a -4.0) (/ (* b c) t)))
         (if (<= (* b c) -5e-74)
           t_3
           (if (<= (* b c) 5e-274)
             t_2
             (if (<= (* b c) 2e-54)
               (+ t_1 (* x (* i -4.0)))
               (if (<= (* b c) 5e+160)
                 t_2
                 (- (* b c) (* 27.0 (* j 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double t_3 = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+104) {
		tmp = t_3;
	} else if ((b * c) <= -2e+22) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -5e-74) {
		tmp = t_3;
	} else if ((b * c) <= 5e-274) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * 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 * (k * (-27.0d0))
    t_2 = t_1 + ((-4.0d0) * (t * a))
    t_3 = j * ((k * (-27.0d0)) + ((-4.0d0) * ((x * i) / j)))
    if ((b * c) <= (-1d+164)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= (-2d+104)) then
        tmp = t_3
    else if ((b * c) <= (-2d+22)) then
        tmp = t * ((a * (-4.0d0)) + ((b * c) / t))
    else if ((b * c) <= (-5d-74)) then
        tmp = t_3
    else if ((b * c) <= 5d-274) then
        tmp = t_2
    else if ((b * c) <= 2d-54) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if ((b * c) <= 5d+160) then
        tmp = t_2
    else
        tmp = (b * c) - (27.0d0 * (j * 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double t_3 = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+104) {
		tmp = t_3;
	} else if ((b * c) <= -2e+22) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -5e-74) {
		tmp = t_3;
	} else if ((b * c) <= 5e-274) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (-4.0 * (t * a))
	t_3 = j * ((k * -27.0) + (-4.0 * ((x * i) / j)))
	tmp = 0
	if (b * c) <= -1e+164:
		tmp = (b * c) + t_1
	elif (b * c) <= -2e+104:
		tmp = t_3
	elif (b * c) <= -2e+22:
		tmp = t * ((a * -4.0) + ((b * c) / t))
	elif (b * c) <= -5e-74:
		tmp = t_3
	elif (b * c) <= 5e-274:
		tmp = t_2
	elif (b * c) <= 2e-54:
		tmp = t_1 + (x * (i * -4.0))
	elif (b * c) <= 5e+160:
		tmp = t_2
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	t_3 = Float64(j * Float64(Float64(k * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / j))))
	tmp = 0.0
	if (Float64(b * c) <= -1e+164)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= -2e+104)
		tmp = t_3;
	elseif (Float64(b * c) <= -2e+22)
		tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(Float64(b * c) / t)));
	elseif (Float64(b * c) <= -5e-74)
		tmp = t_3;
	elseif (Float64(b * c) <= 5e-274)
		tmp = t_2;
	elseif (Float64(b * c) <= 2e-54)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (Float64(b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (-4.0 * (t * a));
	t_3 = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	tmp = 0.0;
	if ((b * c) <= -1e+164)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= -2e+104)
		tmp = t_3;
	elseif ((b * c) <= -2e+22)
		tmp = t * ((a * -4.0) + ((b * c) / t));
	elseif ((b * c) <= -5e-74)
		tmp = t_3;
	elseif ((b * c) <= 5e-274)
		tmp = t_2;
	elseif ((b * c) <= 2e-54)
		tmp = t_1 + (x * (i * -4.0));
	elseif ((b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(N[(k * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+164], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+104], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -2e+22], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-74], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 5e-274], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2e-54], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+160], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+104}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 b c) < -1e164

    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. 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. Add Preprocessing
    4. Taylor expanded in b around inf 77.1%

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

    if -1e164 < (*.f64 b c) < -2e104 or -2e22 < (*.f64 b c) < -4.99999999999999998e-74

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

    if -2e104 < (*.f64 b c) < -2e22

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    6. Taylor expanded in t around inf 65.1%

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

    if -4.99999999999999998e-74 < (*.f64 b c) < 5e-274 or 2.0000000000000001e-54 < (*.f64 b c) < 5.0000000000000002e160

    1. Initial program 92.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. Simplified92.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. Add Preprocessing
    4. Taylor expanded in a around inf 67.3%

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

    if 5e-274 < (*.f64 b c) < 2.0000000000000001e-54

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

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

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

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

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

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

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

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

    if 5.0000000000000002e160 < (*.f64 b c)

    1. Initial program 81.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+104}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 54.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t\_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+104}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\ \;\;\;\;k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* -4.0 (* t a)))))
   (if (<= (* b c) -1e+164)
     (+ (* b c) t_1)
     (if (<= (* b c) -2e+104)
       (* j (+ (* k -27.0) (* -4.0 (/ (* x i) j))))
       (if (<= (* b c) -2e+22)
         (* t (+ (* a -4.0) (/ (* b c) t)))
         (if (<= (* b c) -5e-74)
           (* k (+ (* j -27.0) (* -4.0 (/ (* x i) k))))
           (if (<= (* b c) 5e-274)
             t_2
             (if (<= (* b c) 2e-54)
               (+ t_1 (* x (* i -4.0)))
               (if (<= (* b c) 5e+160)
                 t_2
                 (- (* b c) (* 27.0 (* j 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+104) {
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	} else if ((b * c) <= -2e+22) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -5e-74) {
		tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
	} else if ((b * c) <= 5e-274) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * 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) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = t_1 + ((-4.0d0) * (t * a))
    if ((b * c) <= (-1d+164)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= (-2d+104)) then
        tmp = j * ((k * (-27.0d0)) + ((-4.0d0) * ((x * i) / j)))
    else if ((b * c) <= (-2d+22)) then
        tmp = t * ((a * (-4.0d0)) + ((b * c) / t))
    else if ((b * c) <= (-5d-74)) then
        tmp = k * ((j * (-27.0d0)) + ((-4.0d0) * ((x * i) / k)))
    else if ((b * c) <= 5d-274) then
        tmp = t_2
    else if ((b * c) <= 2d-54) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if ((b * c) <= 5d+160) then
        tmp = t_2
    else
        tmp = (b * c) - (27.0d0 * (j * 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+104) {
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	} else if ((b * c) <= -2e+22) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -5e-74) {
		tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
	} else if ((b * c) <= 5e-274) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (-4.0 * (t * a))
	tmp = 0
	if (b * c) <= -1e+164:
		tmp = (b * c) + t_1
	elif (b * c) <= -2e+104:
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)))
	elif (b * c) <= -2e+22:
		tmp = t * ((a * -4.0) + ((b * c) / t))
	elif (b * c) <= -5e-74:
		tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)))
	elif (b * c) <= 5e-274:
		tmp = t_2
	elif (b * c) <= 2e-54:
		tmp = t_1 + (x * (i * -4.0))
	elif (b * c) <= 5e+160:
		tmp = t_2
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (Float64(b * c) <= -1e+164)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= -2e+104)
		tmp = Float64(j * Float64(Float64(k * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / j))));
	elseif (Float64(b * c) <= -2e+22)
		tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(Float64(b * c) / t)));
	elseif (Float64(b * c) <= -5e-74)
		tmp = Float64(k * Float64(Float64(j * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / k))));
	elseif (Float64(b * c) <= 5e-274)
		tmp = t_2;
	elseif (Float64(b * c) <= 2e-54)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (Float64(b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (-4.0 * (t * a));
	tmp = 0.0;
	if ((b * c) <= -1e+164)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= -2e+104)
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	elseif ((b * c) <= -2e+22)
		tmp = t * ((a * -4.0) + ((b * c) / t));
	elseif ((b * c) <= -5e-74)
		tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
	elseif ((b * c) <= 5e-274)
		tmp = t_2;
	elseif ((b * c) <= 2e-54)
		tmp = t_1 + (x * (i * -4.0));
	elseif ((b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+164], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+104], N[(j * N[(N[(k * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+22], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-74], N[(k * N[(N[(j * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e-274], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2e-54], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+160], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if (*.f64 b c) < -1e164

    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. 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. Add Preprocessing
    4. Taylor expanded in b around inf 77.1%

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

    if -1e164 < (*.f64 b c) < -2e104

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

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

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

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

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

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

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

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

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

    if -2e104 < (*.f64 b c) < -2e22

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c} \]
    6. Taylor expanded in t around inf 65.1%

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

    if -2e22 < (*.f64 b c) < -4.99999999999999998e-74

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

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

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

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

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

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

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

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

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

    if -4.99999999999999998e-74 < (*.f64 b c) < 5e-274 or 2.0000000000000001e-54 < (*.f64 b c) < 5.0000000000000002e160

    1. Initial program 92.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. Simplified92.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. Add Preprocessing
    4. Taylor expanded in a around inf 67.3%

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

    if 5e-274 < (*.f64 b c) < 2.0000000000000001e-54

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

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

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

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

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

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

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

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

    if 5.0000000000000002e160 < (*.f64 b c)

    1. Initial program 81.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+104}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+22}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\ \;\;\;\;k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-274}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 54.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t\_1 + -4 \cdot \left(t \cdot a\right)\\ t_3 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+104}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+72}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{-314}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (+ t_1 (* -4.0 (* t a))))
        (t_3 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
   (if (<= (* b c) -1e+164)
     (+ (* b c) t_1)
     (if (<= (* b c) -2e+104)
       (* j (+ (* k -27.0) (* -4.0 (/ (* x i) j))))
       (if (<= (* b c) -2e+72)
         (* t (+ (* a -4.0) (/ (* b c) t)))
         (if (<= (* b c) -5e-74)
           t_3
           (if (<= (* b c) 6e-314)
             t_2
             (if (<= (* b c) 2e-54)
               t_3
               (if (<= (* b c) 5e+160)
                 t_2
                 (- (* b c) (* 27.0 (* j 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+104) {
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	} else if ((b * c) <= -2e+72) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -5e-74) {
		tmp = t_3;
	} else if ((b * c) <= 6e-314) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_3;
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * 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 * (k * (-27.0d0))
    t_2 = t_1 + ((-4.0d0) * (t * a))
    t_3 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    if ((b * c) <= (-1d+164)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= (-2d+104)) then
        tmp = j * ((k * (-27.0d0)) + ((-4.0d0) * ((x * i) / j)))
    else if ((b * c) <= (-2d+72)) then
        tmp = t * ((a * (-4.0d0)) + ((b * c) / t))
    else if ((b * c) <= (-5d-74)) then
        tmp = t_3
    else if ((b * c) <= 6d-314) then
        tmp = t_2
    else if ((b * c) <= 2d-54) then
        tmp = t_3
    else if ((b * c) <= 5d+160) then
        tmp = t_2
    else
        tmp = (b * c) - (27.0d0 * (j * 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 * (k * -27.0);
	double t_2 = t_1 + (-4.0 * (t * a));
	double t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	double tmp;
	if ((b * c) <= -1e+164) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -2e+104) {
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	} else if ((b * c) <= -2e+72) {
		tmp = t * ((a * -4.0) + ((b * c) / t));
	} else if ((b * c) <= -5e-74) {
		tmp = t_3;
	} else if ((b * c) <= 6e-314) {
		tmp = t_2;
	} else if ((b * c) <= 2e-54) {
		tmp = t_3;
	} else if ((b * c) <= 5e+160) {
		tmp = t_2;
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t_1 + (-4.0 * (t * a))
	t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	tmp = 0
	if (b * c) <= -1e+164:
		tmp = (b * c) + t_1
	elif (b * c) <= -2e+104:
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)))
	elif (b * c) <= -2e+72:
		tmp = t * ((a * -4.0) + ((b * c) / t))
	elif (b * c) <= -5e-74:
		tmp = t_3
	elif (b * c) <= 6e-314:
		tmp = t_2
	elif (b * c) <= 2e-54:
		tmp = t_3
	elif (b * c) <= 5e+160:
		tmp = t_2
	else:
		tmp = (b * c) - (27.0 * (j * k))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	t_3 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))
	tmp = 0.0
	if (Float64(b * c) <= -1e+164)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= -2e+104)
		tmp = Float64(j * Float64(Float64(k * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / j))));
	elseif (Float64(b * c) <= -2e+72)
		tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(Float64(b * c) / t)));
	elseif (Float64(b * c) <= -5e-74)
		tmp = t_3;
	elseif (Float64(b * c) <= 6e-314)
		tmp = t_2;
	elseif (Float64(b * c) <= 2e-54)
		tmp = t_3;
	elseif (Float64(b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = t_1 + (-4.0 * (t * a));
	t_3 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	tmp = 0.0;
	if ((b * c) <= -1e+164)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= -2e+104)
		tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
	elseif ((b * c) <= -2e+72)
		tmp = t * ((a * -4.0) + ((b * c) / t));
	elseif ((b * c) <= -5e-74)
		tmp = t_3;
	elseif ((b * c) <= 6e-314)
		tmp = t_2;
	elseif ((b * c) <= 2e-54)
		tmp = t_3;
	elseif ((b * c) <= 5e+160)
		tmp = t_2;
	else
		tmp = (b * c) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+164], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+104], N[(j * N[(N[(k * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+72], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-74], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 6e-314], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2e-54], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 5e+160], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{-314}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 b c) < -1e164

    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. 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. Add Preprocessing
    4. Taylor expanded in b around inf 77.1%

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

    if -1e164 < (*.f64 b c) < -2e104

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

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

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

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

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

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

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

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

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

    if -2e104 < (*.f64 b c) < -1.99999999999999989e72

    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. 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. Add Preprocessing
    4. Taylor expanded in x around 0 86.3%

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

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

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

    if -1.99999999999999989e72 < (*.f64 b c) < -4.99999999999999998e-74 or 5.99999999978e-314 < (*.f64 b c) < 2.0000000000000001e-54

    1. Initial program 91.3%

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

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

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

    if -4.99999999999999998e-74 < (*.f64 b c) < 5.99999999978e-314 or 2.0000000000000001e-54 < (*.f64 b c) < 5.0000000000000002e160

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

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

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

    if 5.0000000000000002e160 < (*.f64 b c)

    1. Initial program 81.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+164}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+104}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+72}:\\ \;\;\;\;t \cdot \left(a \cdot -4 + \frac{b \cdot c}{t}\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-74}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{-314}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 56.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\ t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{-15}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-231}:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-307}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-80}:\\ \;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+65} \lor \neg \left(t \leq 3.8 \cdot 10^{+87}\right):\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0)))
        (t_2 (* k (+ (* j -27.0) (* -4.0 (/ (* x i) k)))))
        (t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
   (if (<= t -3.7e-15)
     t_3
     (if (<= t -1.1e-231)
       (+ (* b c) t_1)
       (if (<= t -1e-307)
         t_2
         (if (<= t 5.6e-80)
           (+ t_1 (* x (* i -4.0)))
           (if (or (<= t 2.2e+65) (not (<= t 3.8e+87))) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -3.7e-15) {
		tmp = t_3;
	} else if (t <= -1.1e-231) {
		tmp = (b * c) + t_1;
	} else if (t <= -1e-307) {
		tmp = t_2;
	} else if (t <= 5.6e-80) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((t <= 2.2e+65) || !(t <= 3.8e+87)) {
		tmp = t_3;
	} 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) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = k * ((j * (-27.0d0)) + ((-4.0d0) * ((x * i) / k)))
    t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    if (t <= (-3.7d-15)) then
        tmp = t_3
    else if (t <= (-1.1d-231)) then
        tmp = (b * c) + t_1
    else if (t <= (-1d-307)) then
        tmp = t_2
    else if (t <= 5.6d-80) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if ((t <= 2.2d+65) .or. (.not. (t <= 3.8d+87))) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
	double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	double tmp;
	if (t <= -3.7e-15) {
		tmp = t_3;
	} else if (t <= -1.1e-231) {
		tmp = (b * c) + t_1;
	} else if (t <= -1e-307) {
		tmp = t_2;
	} else if (t <= 5.6e-80) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((t <= 2.2e+65) || !(t <= 3.8e+87)) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = k * ((j * -27.0) + (-4.0 * ((x * i) / k)))
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	tmp = 0
	if t <= -3.7e-15:
		tmp = t_3
	elif t <= -1.1e-231:
		tmp = (b * c) + t_1
	elif t <= -1e-307:
		tmp = t_2
	elif t <= 5.6e-80:
		tmp = t_1 + (x * (i * -4.0))
	elif (t <= 2.2e+65) or not (t <= 3.8e+87):
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(k * Float64(Float64(j * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / k))))
	t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))
	tmp = 0.0
	if (t <= -3.7e-15)
		tmp = t_3;
	elseif (t <= -1.1e-231)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (t <= -1e-307)
		tmp = t_2;
	elseif (t <= 5.6e-80)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif ((t <= 2.2e+65) || !(t <= 3.8e+87))
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
	t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	tmp = 0.0;
	if (t <= -3.7e-15)
		tmp = t_3;
	elseif (t <= -1.1e-231)
		tmp = (b * c) + t_1;
	elseif (t <= -1e-307)
		tmp = t_2;
	elseif (t <= 5.6e-80)
		tmp = t_1 + (x * (i * -4.0));
	elseif ((t <= 2.2e+65) || ~((t <= 3.8e+87)))
		tmp = t_3;
	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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(N[(j * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e-15], t$95$3, If[LessEqual[t, -1.1e-231], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -1e-307], t$95$2, If[LessEqual[t, 5.6e-80], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.2e+65], N[Not[LessEqual[t, 3.8e+87]], $MachinePrecision]], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-15}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-231}:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;t \leq -1 \cdot 10^{-307}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+65} \lor \neg \left(t \leq 3.8 \cdot 10^{+87}\right):\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.70000000000000017e-15 or 5.59999999999999978e-80 < t < 2.1999999999999998e65 or 3.80000000000000011e87 < t

    1. Initial program 84.4%

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

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

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

    if -3.70000000000000017e-15 < t < -1.10000000000000005e-231

    1. Initial program 95.6%

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

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

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

    if -1.10000000000000005e-231 < t < -9.99999999999999909e-308 or 2.1999999999999998e65 < t < 3.80000000000000011e87

    1. Initial program 91.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. Simplified95.9%

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

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

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

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

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

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

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

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

    if -9.99999999999999909e-308 < t < 5.59999999999999978e-80

    1. Initial program 97.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. Simplified94.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-15}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-231}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-307}:\\ \;\;\;\;k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-80}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+65} \lor \neg \left(t \leq 3.8 \cdot 10^{+87}\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 82.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+32} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+64}\right):\\
\;\;\;\;b \cdot \left(c + \frac{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)}{b}\right) - 27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.00000000000000005e32 or 2.00000000000000004e64 < (*.f64 b c)

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

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

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

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

    if -1.00000000000000005e32 < (*.f64 b c) < 2.00000000000000004e64

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*93.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--93.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. associate-+l-93.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(a \cdot t\right)\right)} - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right) \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv91.5%

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

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

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

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

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

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

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

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

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

Alternative 9: 69.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+247}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right)\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+104} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 1.75 \cdot 10^{+111}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= x -2.1e+247)
   (* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0)))
   (if (or (<= x -1.35e+104)
           (not
            (or (<= x -8.2e-107)
                (and (not (<= x -1.8e-147)) (<= x 1.75e+111)))))
     (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
     (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j 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 (x <= -2.1e+247) {
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
	} else if ((x <= -1.35e+104) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 1.75e+111)))) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * 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 (x <= (-2.1d+247)) then
        tmp = t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))
    else if ((x <= (-1.35d+104)) .or. (.not. (x <= (-8.2d-107)) .or. (.not. (x <= (-1.8d-147))) .and. (x <= 1.75d+111))) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * 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 (x <= -2.1e+247) {
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
	} else if ((x <= -1.35e+104) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 1.75e+111)))) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if x <= -2.1e+247:
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0))
	elif (x <= -1.35e+104) or not ((x <= -8.2e-107) or (not (x <= -1.8e-147) and (x <= 1.75e+111))):
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	else:
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (x <= -2.1e+247)
		tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0)));
	elseif ((x <= -1.35e+104) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 1.75e+111))))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (x <= -2.1e+247)
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
	elseif ((x <= -1.35e+104) || ~(((x <= -8.2e-107) || (~((x <= -1.8e-147)) && (x <= 1.75e+111)))))
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	else
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.1e+247], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.35e+104], N[Not[Or[LessEqual[x, -8.2e-107], And[N[Not[LessEqual[x, -1.8e-147]], $MachinePrecision], LessEqual[x, 1.75e+111]]]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.35 \cdot 10^{+104} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 1.75 \cdot 10^{+111}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.1e247

    1. Initial program 67.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. Simplified71.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*71.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--67.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. associate-+l-67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} \]
      2. cancel-sign-sub-inv84.0%

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

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

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

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

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

    if -2.1e247 < x < -1.34999999999999992e104 or -8.1999999999999998e-107 < x < -1.80000000000000006e-147 or 1.7500000000000001e111 < x

    1. Initial program 88.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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. Add Preprocessing
    4. Taylor expanded in x around inf 76.2%

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

    if -1.34999999999999992e104 < x < -8.1999999999999998e-107 or -1.80000000000000006e-147 < x < 1.7500000000000001e111

    1. Initial program 92.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+247}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right)\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+104} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 1.75 \cdot 10^{+111}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+247}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right)\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+98} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 8.8 \cdot 10^{+113}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\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 (<= x -2.3e+247)
   (* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0)))
   (if (or (<= x -3.5e+98)
           (not
            (or (<= x -8.2e-107)
                (and (not (<= x -1.8e-147)) (<= x 8.8e+113)))))
     (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
     (- (- (* b c) (* 4.0 (* t a))) (* (* 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 (x <= -2.3e+247) {
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
	} else if ((x <= -3.5e+98) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 8.8e+113)))) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) - (4.0 * (t * a))) - ((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 (x <= (-2.3d+247)) then
        tmp = t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))
    else if ((x <= (-3.5d+98)) .or. (.not. (x <= (-8.2d-107)) .or. (.not. (x <= (-1.8d-147))) .and. (x <= 8.8d+113))) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else
        tmp = ((b * c) - (4.0d0 * (t * a))) - ((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 (x <= -2.3e+247) {
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
	} else if ((x <= -3.5e+98) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 8.8e+113)))) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if x <= -2.3e+247:
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0))
	elif (x <= -3.5e+98) or not ((x <= -8.2e-107) or (not (x <= -1.8e-147) and (x <= 8.8e+113))):
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	else:
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k)
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (x <= -2.3e+247)
		tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0)));
	elseif ((x <= -3.5e+98) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 8.8e+113))))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - 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 (x <= -2.3e+247)
		tmp = t * ((a * -4.0) - ((z * (x * y)) * -18.0));
	elseif ((x <= -3.5e+98) || ~(((x <= -8.2e-107) || (~((x <= -1.8e-147)) && (x <= 8.8e+113)))))
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	else
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.3e+247], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -3.5e+98], N[Not[Or[LessEqual[x, -8.2e-107], And[N[Not[LessEqual[x, -1.8e-147]], $MachinePrecision], LessEqual[x, 8.8e+113]]]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -3.5 \cdot 10^{+98} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 8.8 \cdot 10^{+113}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.29999999999999991e247

    1. Initial program 67.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. Simplified71.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*71.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--67.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. associate-+l-67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} \]
      2. cancel-sign-sub-inv84.0%

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

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

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

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

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

    if -2.29999999999999991e247 < x < -3.5e98 or -8.1999999999999998e-107 < x < -1.80000000000000006e-147 or 8.80000000000000041e113 < x

    1. Initial program 88.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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. Add Preprocessing
    4. Taylor expanded in x around inf 76.2%

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

    if -3.5e98 < x < -8.1999999999999998e-107 or -1.80000000000000006e-147 < x < 8.80000000000000041e113

    1. Initial program 92.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+247}:\\ \;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right)\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+98} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 8.8 \cdot 10^{+113}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 69.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+247}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-18 \cdot \left(z \cdot \left(-x\right)\right) - 4 \cdot \frac{a}{y}\right)\right)\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{+102} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 2.6 \cdot 10^{+113}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\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 (<= x -2.3e+247)
   (* t (* y (- (* -18.0 (* z (- x))) (* 4.0 (/ a y)))))
   (if (or (<= x -4.8e+102)
           (not
            (or (<= x -8.2e-107)
                (and (not (<= x -1.8e-147)) (<= x 2.6e+113)))))
     (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
     (- (- (* b c) (* 4.0 (* t a))) (* (* 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 (x <= -2.3e+247) {
		tmp = t * (y * ((-18.0 * (z * -x)) - (4.0 * (a / y))));
	} else if ((x <= -4.8e+102) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 2.6e+113)))) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) - (4.0 * (t * a))) - ((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 (x <= (-2.3d+247)) then
        tmp = t * (y * (((-18.0d0) * (z * -x)) - (4.0d0 * (a / y))))
    else if ((x <= (-4.8d+102)) .or. (.not. (x <= (-8.2d-107)) .or. (.not. (x <= (-1.8d-147))) .and. (x <= 2.6d+113))) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else
        tmp = ((b * c) - (4.0d0 * (t * a))) - ((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 (x <= -2.3e+247) {
		tmp = t * (y * ((-18.0 * (z * -x)) - (4.0 * (a / y))));
	} else if ((x <= -4.8e+102) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 2.6e+113)))) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if x <= -2.3e+247:
		tmp = t * (y * ((-18.0 * (z * -x)) - (4.0 * (a / y))))
	elif (x <= -4.8e+102) or not ((x <= -8.2e-107) or (not (x <= -1.8e-147) and (x <= 2.6e+113))):
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	else:
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k)
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (x <= -2.3e+247)
		tmp = Float64(t * Float64(y * Float64(Float64(-18.0 * Float64(z * Float64(-x))) - Float64(4.0 * Float64(a / y)))));
	elseif ((x <= -4.8e+102) || !((x <= -8.2e-107) || (!(x <= -1.8e-147) && (x <= 2.6e+113))))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - 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 (x <= -2.3e+247)
		tmp = t * (y * ((-18.0 * (z * -x)) - (4.0 * (a / y))));
	elseif ((x <= -4.8e+102) || ~(((x <= -8.2e-107) || (~((x <= -1.8e-147)) && (x <= 2.6e+113)))))
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	else
		tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.3e+247], N[(t * N[(y * N[(N[(-18.0 * N[(z * (-x)), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -4.8e+102], N[Not[Or[LessEqual[x, -8.2e-107], And[N[Not[LessEqual[x, -1.8e-147]], $MachinePrecision], LessEqual[x, 2.6e+113]]]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+247}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-18 \cdot \left(z \cdot \left(-x\right)\right) - 4 \cdot \frac{a}{y}\right)\right)\\

\mathbf{elif}\;x \leq -4.8 \cdot 10^{+102} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 2.6 \cdot 10^{+113}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.29999999999999991e247

    1. Initial program 67.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. Simplified71.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*71.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--67.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. associate-+l-67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} \]
      2. cancel-sign-sub-inv84.0%

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

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

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

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

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

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

    if -2.29999999999999991e247 < x < -4.79999999999999989e102 or -8.1999999999999998e-107 < x < -1.80000000000000006e-147 or 2.5999999999999999e113 < x

    1. Initial program 88.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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. Add Preprocessing
    4. Taylor expanded in x around inf 76.2%

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

    if -4.79999999999999989e102 < x < -8.1999999999999998e-107 or -1.80000000000000006e-147 < x < 2.5999999999999999e113

    1. Initial program 92.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+247}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-18 \cdot \left(z \cdot \left(-x\right)\right) - 4 \cdot \frac{a}{y}\right)\right)\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{+102} \lor \neg \left(x \leq -8.2 \cdot 10^{-107} \lor \neg \left(x \leq -1.8 \cdot 10^{-147}\right) \land x \leq 2.6 \cdot 10^{+113}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 48.6% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;x \leq -6.5 \cdot 10^{+101}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -3 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 6.6 \cdot 10^{+215}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -6.10000000000000031e262 or -1.12e173 < x < -6.50000000000000016e101 or 6.5999999999999997e215 < x

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*79.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--75.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. associate-+l-75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.10000000000000031e262 < x < -1.12e173

    1. Initial program 88.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. Simplified94.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. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*88.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--88.7%

        \[\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. associate-+l-88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(i \cdot -4\right)} \]
    10. Simplified59.8%

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

    if -6.50000000000000016e101 < x < -3e-52 or -1.64999999999999993e-285 < x < 6.5999999999999997e215

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

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

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

    if -3e-52 < x < -1.64999999999999993e-285

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.1 \cdot 10^{+262}:\\ \;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{+173}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{+101}:\\ \;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq -3 \cdot 10^{-52}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq -1.65 \cdot 10^{-285}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{+215}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.6% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;x \leq -4.1 \cdot 10^{+102}:\\
\;\;\;\;-18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot \left(-t\right)\right)\right)\\

\mathbf{elif}\;x \leq -8.5 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.49999999999999995e263 or 1.2999999999999999e216 < x

    1. Initial program 72.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. Simplified69.6%

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

        \[\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--72.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. associate-+l-72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} \]
      2. cancel-sign-sub-inv75.3%

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

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

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

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

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

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

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

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

    if -1.49999999999999995e263 < x < -5.6000000000000002e175

    1. Initial program 88.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. Simplified94.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. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*88.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--88.7%

        \[\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. associate-+l-88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(i \cdot -4\right)} \]
    10. Simplified59.8%

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

    if -5.6000000000000002e175 < x < -4.1e102

    1. Initial program 84.4%

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

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

        \[\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.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. associate-+l-84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1e102 < x < -8.49999999999999968e-55 or -1.7e-285 < x < 1.2999999999999999e216

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

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

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

    if -8.49999999999999968e-55 < x < -1.7e-285

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+263}:\\ \;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{+102}:\\ \;\;\;\;-18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot \left(-t\right)\right)\right)\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-55}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-285}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+216}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 53.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;b \cdot c \leq -1000000000:\\ \;\;\;\;b \cdot c + t\_1\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-55}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-94}:\\ \;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+160}:\\ \;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= (* b c) -1000000000.0)
     (+ (* b c) t_1)
     (if (<= (* b c) -5e-55)
       (* x (* i -4.0))
       (if (<= (* b c) -2e-94)
         (* -18.0 (* t (* x (* y (- z)))))
         (if (<= (* b c) 5e+160)
           (+ t_1 (* -4.0 (* t a)))
           (- (* b c) (* 27.0 (* j 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 * (k * -27.0);
	double tmp;
	if ((b * c) <= -1000000000.0) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -5e-55) {
		tmp = x * (i * -4.0);
	} else if ((b * c) <= -2e-94) {
		tmp = -18.0 * (t * (x * (y * -z)));
	} else if ((b * c) <= 5e+160) {
		tmp = t_1 + (-4.0 * (t * a));
	} else {
		tmp = (b * c) - (27.0 * (j * 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) :: tmp
    t_1 = j * (k * (-27.0d0))
    if ((b * c) <= (-1000000000.0d0)) then
        tmp = (b * c) + t_1
    else if ((b * c) <= (-5d-55)) then
        tmp = x * (i * (-4.0d0))
    else if ((b * c) <= (-2d-94)) then
        tmp = (-18.0d0) * (t * (x * (y * -z)))
    else if ((b * c) <= 5d+160) then
        tmp = t_1 + ((-4.0d0) * (t * a))
    else
        tmp = (b * c) - (27.0d0 * (j * 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 * (k * -27.0);
	double tmp;
	if ((b * c) <= -1000000000.0) {
		tmp = (b * c) + t_1;
	} else if ((b * c) <= -5e-55) {
		tmp = x * (i * -4.0);
	} else if ((b * c) <= -2e-94) {
		tmp = -18.0 * (t * (x * (y * -z)));
	} else if ((b * c) <= 5e+160) {
		tmp = t_1 + (-4.0 * (t * a));
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	tmp = 0
	if (b * c) <= -1000000000.0:
		tmp = (b * c) + t_1
	elif (b * c) <= -5e-55:
		tmp = x * (i * -4.0)
	elif (b * c) <= -2e-94:
		tmp = -18.0 * (t * (x * (y * -z)))
	elif (b * c) <= 5e+160:
		tmp = t_1 + (-4.0 * (t * a))
	else:
		tmp = (b * c) - (27.0 * (j * k))
	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 (Float64(b * c) <= -1000000000.0)
		tmp = Float64(Float64(b * c) + t_1);
	elseif (Float64(b * c) <= -5e-55)
		tmp = Float64(x * Float64(i * -4.0));
	elseif (Float64(b * c) <= -2e-94)
		tmp = Float64(-18.0 * Float64(t * Float64(x * Float64(y * Float64(-z)))));
	elseif (Float64(b * c) <= 5e+160)
		tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a)));
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	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 ((b * c) <= -1000000000.0)
		tmp = (b * c) + t_1;
	elseif ((b * c) <= -5e-55)
		tmp = x * (i * -4.0);
	elseif ((b * c) <= -2e-94)
		tmp = -18.0 * (t * (x * (y * -z)));
	elseif ((b * c) <= 5e+160)
		tmp = t_1 + (-4.0 * (t * a));
	else
		tmp = (b * c) - (27.0 * (j * k));
	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[N[(b * c), $MachinePrecision], -1000000000.0], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-55], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-94], N[(-18.0 * N[(t * N[(x * N[(y * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+160], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1000000000:\\
\;\;\;\;b \cdot c + t\_1\\

\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-55}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -1e9

    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. Simplified85.2%

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

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

    if -1e9 < (*.f64 b c) < -5.0000000000000002e-55

    1. Initial program 83.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. Simplified83.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*83.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--83.7%

        \[\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. associate-+l-83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(i \cdot -4\right)} \]
    10. Simplified60.1%

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

    if -5.0000000000000002e-55 < (*.f64 b c) < -1.9999999999999999e-94

    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. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*100.0%

        \[\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--100.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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} \]
      2. cancel-sign-sub-inv50.8%

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-94 < (*.f64 b c) < 5.0000000000000002e160

    1. Initial program 92.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. Simplified92.8%

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

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

    if 5.0000000000000002e160 < (*.f64 b c)

    1. Initial program 81.4%

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

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

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

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

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

Alternative 15: 76.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(c + \frac{\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)}{b}\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+242}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.14999999999999993e-88 or 3.80000000000000008e242 < z

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

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

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

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

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

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

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

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

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

    if -1.14999999999999993e-88 < z < 3.40000000000000017e101

    1. Initial program 91.9%

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

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

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

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

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

    if 3.40000000000000017e101 < z < 3.80000000000000008e242

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-88}:\\ \;\;\;\;b \cdot \left(c + \frac{\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)}{b}\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+101}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+242}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;b \cdot \left(c + \frac{\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)}{b}\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 80.5% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.7e6

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

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

      \[\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.7e6 < t < 1.34999999999999997e-78

    1. Initial program 93.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 93.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 \]
    4. Step-by-step derivation
      1. distribute-lft-out93.7%

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

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

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

    if 1.34999999999999997e-78 < t

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1700000:\\ \;\;\;\;\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}\;t \leq 1.35 \cdot 10^{-78}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(c + \frac{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)}{b}\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 86.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 6.1999999999999998e215

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

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

    if 6.1999999999999998e215 < c

    1. Initial program 65.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. Add Preprocessing
    4. Taylor expanded in b around inf 80.3%

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

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

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

Alternative 18: 76.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-72} \lor \neg \left(z \leq 7.4 \cdot 10^{+198}\right):\\
\;\;\;\;b \cdot \left(c + \frac{\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)}{b}\right) - 27 \cdot \left(j \cdot k\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6e-72 or 7.3999999999999996e198 < z

    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. Simplified85.2%

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

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

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

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

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

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

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

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

    if -1.6e-72 < z < 7.3999999999999996e198

    1. Initial program 91.2%

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

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

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

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

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

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

Alternative 19: 45.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -2.7 \cdot 10^{+102}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -2.7 \cdot 10^{+63} \lor \neg \left(j \leq -1.15 \cdot 10^{+35}\right) \land j \leq 5.4 \cdot 10^{-21}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \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 (<= j -2.7e+102)
   (* j (* k -27.0))
   (if (or (<= j -2.7e+63) (and (not (<= j -1.15e+35)) (<= j 5.4e-21)))
     (+ (* b c) (* -4.0 (* t a)))
     (* (* 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 <= -2.7e+102) {
		tmp = j * (k * -27.0);
	} else if ((j <= -2.7e+63) || (!(j <= -1.15e+35) && (j <= 5.4e-21))) {
		tmp = (b * c) + (-4.0 * (t * a));
	} 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 (j <= (-2.7d+102)) then
        tmp = j * (k * (-27.0d0))
    else if ((j <= (-2.7d+63)) .or. (.not. (j <= (-1.15d+35))) .and. (j <= 5.4d-21)) then
        tmp = (b * c) + ((-4.0d0) * (t * a))
    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 (j <= -2.7e+102) {
		tmp = j * (k * -27.0);
	} else if ((j <= -2.7e+63) || (!(j <= -1.15e+35) && (j <= 5.4e-21))) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else {
		tmp = (j * k) * -27.0;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if j <= -2.7e+102:
		tmp = j * (k * -27.0)
	elif (j <= -2.7e+63) or (not (j <= -1.15e+35) and (j <= 5.4e-21)):
		tmp = (b * c) + (-4.0 * (t * a))
	else:
		tmp = (j * k) * -27.0
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (j <= -2.7e+102)
		tmp = Float64(j * Float64(k * -27.0));
	elseif ((j <= -2.7e+63) || (!(j <= -1.15e+35) && (j <= 5.4e-21)))
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	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 (j <= -2.7e+102)
		tmp = j * (k * -27.0);
	elseif ((j <= -2.7e+63) || (~((j <= -1.15e+35)) && (j <= 5.4e-21)))
		tmp = (b * c) + (-4.0 * (t * a));
	else
		tmp = (j * k) * -27.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -2.7e+102], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -2.7e+63], And[N[Not[LessEqual[j, -1.15e+35]], $MachinePrecision], LessEqual[j, 5.4e-21]]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;j \leq -2.7 \cdot 10^{+63} \lor \neg \left(j \leq -1.15 \cdot 10^{+35}\right) \land j \leq 5.4 \cdot 10^{-21}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\

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


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

    1. Initial program 89.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. Simplified94.6%

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

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

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

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

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

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

    if -2.7000000000000001e102 < j < -2.70000000000000017e63 or -1.1499999999999999e35 < j < 5.4000000000000002e-21

    1. Initial program 90.0%

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

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

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

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

    if -2.70000000000000017e63 < j < -1.1499999999999999e35 or 5.4000000000000002e-21 < j

    1. Initial program 87.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.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. Add Preprocessing
    4. Taylor expanded in j around inf 50.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -2.7 \cdot 10^{+102}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;j \leq -2.7 \cdot 10^{+63} \lor \neg \left(j \leq -1.15 \cdot 10^{+35}\right) \land j \leq 5.4 \cdot 10^{-21}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 50.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.52 \cdot 10^{-10}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot \frac{-4}{j}\right)\right)\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.27999999999999993e36 or 2.2000000000000001e138 < a

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

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

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

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

    if -1.27999999999999993e36 < a < 8.20000000000000003e-47 or 1.5199999999999999e-10 < a < 2.2000000000000001e138

    1. Initial program 92.5%

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

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

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

    if 8.20000000000000003e-47 < a < 1.5199999999999999e-10

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto j \cdot \color{blue}{\left(-4 \cdot \frac{i \cdot x}{j}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/59.0%

        \[\leadsto j \cdot \color{blue}{\frac{-4 \cdot \left(i \cdot x\right)}{j}} \]
      2. associate-*r*59.0%

        \[\leadsto j \cdot \frac{\color{blue}{\left(-4 \cdot i\right) \cdot x}}{j} \]
      3. *-commutative59.0%

        \[\leadsto j \cdot \frac{\color{blue}{x \cdot \left(-4 \cdot i\right)}}{j} \]
      4. associate-*r/59.2%

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

        \[\leadsto j \cdot \left(x \cdot \frac{\color{blue}{i \cdot -4}}{j}\right) \]
      6. associate-/l*59.2%

        \[\leadsto j \cdot \left(x \cdot \color{blue}{\left(i \cdot \frac{-4}{j}\right)}\right) \]
    10. Simplified59.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.28 \cdot 10^{+36}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-47}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 1.52 \cdot 10^{-10}:\\ \;\;\;\;j \cdot \left(x \cdot \left(i \cdot \frac{-4}{j}\right)\right)\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+138}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 71.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-72} \lor \neg \left(z \leq 5.5 \cdot 10^{+223}\right):\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6e-72 or 5.4999999999999999e223 < z

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

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

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

        \[\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) \]
    6. Simplified65.8%

      \[\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.6e-72 < z < 5.4999999999999999e223

    1. Initial program 89.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 83.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 \]
    4. Step-by-step derivation
      1. distribute-lft-out83.8%

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

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

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

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

Alternative 22: 37.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.6 \cdot 10^{+160}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.95 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.02 \cdot 10^{+153}:\\ \;\;\;\;j \cdot \left(k \cdot -27\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) -8.6e+160)
   (* b c)
   (if (<= (* b c) -1.95e-88)
     (* x (* i -4.0))
     (if (<= (* b c) 1.02e+153) (* j (* k -27.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) <= -8.6e+160) {
		tmp = b * c;
	} else if ((b * c) <= -1.95e-88) {
		tmp = x * (i * -4.0);
	} else if ((b * c) <= 1.02e+153) {
		tmp = j * (k * -27.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) <= (-8.6d+160)) then
        tmp = b * c
    else if ((b * c) <= (-1.95d-88)) then
        tmp = x * (i * (-4.0d0))
    else if ((b * c) <= 1.02d+153) then
        tmp = j * (k * (-27.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) <= -8.6e+160) {
		tmp = b * c;
	} else if ((b * c) <= -1.95e-88) {
		tmp = x * (i * -4.0);
	} else if ((b * c) <= 1.02e+153) {
		tmp = j * (k * -27.0);
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (b * c) <= -8.6e+160:
		tmp = b * c
	elif (b * c) <= -1.95e-88:
		tmp = x * (i * -4.0)
	elif (b * c) <= 1.02e+153:
		tmp = j * (k * -27.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) <= -8.6e+160)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -1.95e-88)
		tmp = Float64(x * Float64(i * -4.0));
	elseif (Float64(b * c) <= 1.02e+153)
		tmp = Float64(j * Float64(k * -27.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) <= -8.6e+160)
		tmp = b * c;
	elseif ((b * c) <= -1.95e-88)
		tmp = x * (i * -4.0);
	elseif ((b * c) <= 1.02e+153)
		tmp = j * (k * -27.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], -8.6e+160], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.95e-88], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.02e+153], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -8.6 \cdot 10^{+160}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;b \cdot c \leq -1.95 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -8.59999999999999978e160 or 1.0199999999999999e153 < (*.f64 b c)

    1. Initial program 81.6%

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*85.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--81.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. associate-+l-81.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.59999999999999978e160 < (*.f64 b c) < -1.94999999999999996e-88

    1. Initial program 90.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. 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. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(i \cdot -4\right)} \]
    10. Simplified38.6%

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

    if -1.94999999999999996e-88 < (*.f64 b c) < 1.0199999999999999e153

    1. Initial program 92.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. Simplified92.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -8.6 \cdot 10^{+160}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.95 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.02 \cdot 10^{+153}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 37.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.1 \cdot 10^{+32} \lor \neg \left(b \cdot c \leq 9.2 \cdot 10^{+151}\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) -1.1e+32) (not (<= (* b c) 9.2e+151)))
   (* 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) <= -1.1e+32) || !((b * c) <= 9.2e+151)) {
		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) <= (-1.1d+32)) .or. (.not. ((b * c) <= 9.2d+151))) 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) <= -1.1e+32) || !((b * c) <= 9.2e+151)) {
		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) <= -1.1e+32) or not ((b * c) <= 9.2e+151):
		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) <= -1.1e+32) || !(Float64(b * c) <= 9.2e+151))
		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) <= -1.1e+32) || ~(((b * c) <= 9.2e+151)))
		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], -1.1e+32], N[Not[LessEqual[N[(b * c), $MachinePrecision], 9.2e+151]], $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 -1.1 \cdot 10^{+32} \lor \neg \left(b \cdot c \leq 9.2 \cdot 10^{+151}\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) < -1.1e32 or 9.2000000000000003e151 < (*.f64 b c)

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*87.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--83.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. associate-+l-83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e32 < (*.f64 b c) < 9.2000000000000003e151

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

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

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

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

Alternative 24: 37.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.15 \cdot 10^{+32} \lor \neg \left(b \cdot c \leq 5 \cdot 10^{+152}\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) -1.15e+32) (not (<= (* b c) 5e+152)))
   (* 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) <= -1.15e+32) || !((b * c) <= 5e+152)) {
		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) <= (-1.15d+32)) .or. (.not. ((b * c) <= 5d+152))) 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) <= -1.15e+32) || !((b * c) <= 5e+152)) {
		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) <= -1.15e+32) or not ((b * c) <= 5e+152):
		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) <= -1.15e+32) || !(Float64(b * c) <= 5e+152))
		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) <= -1.15e+32) || ~(((b * c) <= 5e+152)))
		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], -1.15e+32], N[Not[LessEqual[N[(b * c), $MachinePrecision], 5e+152]], $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 -1.15 \cdot 10^{+32} \lor \neg \left(b \cdot c \leq 5 \cdot 10^{+152}\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) < -1.15e32 or 5e152 < (*.f64 b c)

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

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*87.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--83.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. associate-+l-83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e32 < (*.f64 b c) < 5e152

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

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

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

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

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

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

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

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

Alternative 25: 23.9% 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 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. 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. Add Preprocessing
  4. Step-by-step derivation
    1. associate-*r*91.0%

      \[\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.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. associate-+l-89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 88.9% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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