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

Percentage Accurate: 85.1% → 92.1%
Time: 22.2s
Alternatives: 21
Speedup: 1.0×

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 21 alternatives:

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

Initial Program: 85.1% accurate, 1.0× speedup?

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

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

Alternative 1: 92.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \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 (* x (+ (* (* 18.0 y) (* z t)) (* i -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = x * (((18.0 * y) * (z * t)) + (i * -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 = x * (((18.0 * y) * (z * t)) + (i * -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(x * Float64(Float64(Float64(18.0 * y) * Float64(z * t)) + Float64(i * -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 = x * (((18.0 * y) * (z * t)) + (i * -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[(x * N[(N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(i * -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}:\\
\;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \cdot -4\right)\\


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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 52.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-134}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-298}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\

\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+20} \lor \neg \left(t_2 \leq 4 \cdot 10^{+44}\right) \land t_2 \leq 10^{+113}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j 27) k) < -2e143 or 4e20 < (*.f64 (*.f64 j 27) k) < 4.0000000000000004e44 or 1e113 < (*.f64 (*.f64 j 27) k)

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e143 < (*.f64 (*.f64 j 27) k) < -2.00000000000000008e-134 or -9.99999999999999912e-299 < (*.f64 (*.f64 j 27) k) < 4e20 or 4.0000000000000004e44 < (*.f64 (*.f64 j 27) k) < 1e113

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000008e-134 < (*.f64 (*.f64 j 27) k) < -9.99999999999999912e-299

    1. Initial program 89.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}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Taylor expanded in t around inf 74.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{+143}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{-134}:\\ \;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;\left(j \cdot 27\right) \cdot k \leq -1 \cdot 10^{-298}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\ \mathbf{elif}\;\left(j \cdot 27\right) \cdot k \leq 4 \cdot 10^{+20} \lor \neg \left(\left(j \cdot 27\right) \cdot k \leq 4 \cdot 10^{+44}\right) \land \left(j \cdot 27\right) \cdot k \leq 10^{+113}:\\ \;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\ \end{array} \]

Alternative 3: 48.9% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-259}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\

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

\mathbf{elif}\;j \cdot 27 \leq 2 \cdot 10^{-88}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 j 27) < -1.99999999999999988e166

    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. Taylor expanded in x around 0 84.3%

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

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

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

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

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

    if -1.99999999999999988e166 < (*.f64 j 27) < -4.99999999999999961e80 or -1.0000000000000001e-259 < (*.f64 j 27) < 4.9999999999999997e-246

    1. Initial program 84.1%

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

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

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

    if -4.99999999999999961e80 < (*.f64 j 27) < -1.0000000000000001e-259

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

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

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

    if 4.9999999999999997e-246 < (*.f64 j 27) < 1.99999999999999987e-88

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

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

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

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

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

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

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

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

        \[\leadsto c \cdot b - 4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      2. *-commutative59.8%

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

        \[\leadsto c \cdot b - \color{blue}{t \cdot \left(a \cdot 4\right)} \]
    8. Simplified59.8%

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

    if 1.99999999999999987e-88 < (*.f64 j 27)

    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. Taylor expanded in x around 0 91.2%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} - \left(j \cdot 27\right) \cdot k \]
    6. Step-by-step derivation
      1. sub-neg49.4%

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

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

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

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

Alternative 4: 81.5% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq -1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.79999999999999971e187 or -1.0199999999999999e175 < y < -1.0000000000000001e50

    1. Initial program 87.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l-87.8%

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

        \[\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
    3. Simplified84.0%

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

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

    if -4.79999999999999971e187 < y < -1.0199999999999999e175

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

    if -1.0000000000000001e50 < y < 7.7999999999999998e-187

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

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

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

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

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

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

    if 7.7999999999999998e-187 < y

    1. Initial program 85.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+187}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \cdot -4\right)\\ \mathbf{elif}\;y \leq -1 \cdot 10^{+50}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-187}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 5: 86.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+220}:\\ \;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= y -8e+220)
   (- (+ (* b c) (* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))) (* 27.0 (* j k)))
   (-
    (+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (* 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) {
	double tmp;
	if (y <= -8e+220) {
		tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
	} else {
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((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 (y <= (-8d+220)) then
        tmp = ((b * c) + (t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0))))) - (27.0d0 * (j * k))
    else
        tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + (b * c)) - ((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 (y <= -8e+220) {
		tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
	} else {
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((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 y <= -8e+220:
		tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k))
	else:
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((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 (y <= -8e+220)
		tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0)))) - Float64(27.0 * Float64(j * k)));
	else
		tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(b * c)) - 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 (y <= -8e+220)
		tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
	else
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((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[LessEqual[y, -8e+220], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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}\;y \leq -8 \cdot 10^{+220}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{else}:\\
\;\;\;\;\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)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8e220

    1. Initial program 78.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. associate--l-78.8%

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

        \[\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
    3. Simplified72.2%

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

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

    if -8e220 < y

    1. Initial program 89.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified89.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. Recombined 2 regimes into one program.
  4. Final simplification89.2%

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

Alternative 6: 87.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq 8 \cdot 10^{+140}:\\ \;\;\;\;\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)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\right) - 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 (<= i 8e+140)
   (-
    (+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (* b c))
    (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
   (-
    (- (+ (* b c) (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))) (* 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 (i <= 8e+140) {
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else {
		tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (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 (i <= 8d+140) then
        tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + (b * c)) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
    else
        tmp = (((b * c) + (x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i)))) - (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 (i <= 8e+140) {
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	} else {
		tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (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 i <= 8e+140:
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)))
	else:
		tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (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 (i <= 8e+140)
		tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))));
	else
		tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)))) - 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 (i <= 8e+140)
		tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
	else
		tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (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[i, 8e+140], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;i \leq 8 \cdot 10^{+140}:\\
\;\;\;\;\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)\\

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

    1. Initial program 90.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified90.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)} \]

    if 8.00000000000000047e140 < i

    1. Initial program 74.9%

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

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

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

Alternative 7: 65.6% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;a \cdot 4 \leq 2 \cdot 10^{-9}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 4) < -3.9999999999999998e60 or 2.00000000000000012e-9 < (*.f64 a 4)

    1. Initial program 87.2%

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

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

    if -3.9999999999999998e60 < (*.f64 a 4) < -1.00000000000000008e-86

    1. Initial program 84.3%

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

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

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

    if -1.00000000000000008e-86 < (*.f64 a 4) < 2.00000000000000012e-9

    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. Taylor expanded in t around 0 74.1%

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

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

Alternative 8: 65.6% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 4) < -3.9999999999999998e60 or 2.00000000000000012e-9 < (*.f64 a 4)

    1. Initial program 87.2%

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

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

    if -3.9999999999999998e60 < (*.f64 a 4) < -1.00000000000000008e-86

    1. Initial program 84.3%

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

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

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

    if -1.00000000000000008e-86 < (*.f64 a 4) < 2.00000000000000012e-9

    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. Taylor expanded in t around 0 74.1%

      \[\leadsto \color{blue}{\left(c \cdot b - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. sub-neg74.1%

        \[\leadsto \color{blue}{\left(c \cdot b - 4 \cdot \left(i \cdot x\right)\right) + \left(-\left(j \cdot 27\right) \cdot k\right)} \]
      2. cancel-sign-sub-inv74.1%

        \[\leadsto \color{blue}{\left(c \cdot b + \left(-4\right) \cdot \left(i \cdot x\right)\right)} + \left(-\left(j \cdot 27\right) \cdot k\right) \]
      3. metadata-eval74.1%

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

        \[\leadsto \left(c \cdot b + -4 \cdot \left(i \cdot x\right)\right) + \left(-\color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    4. Applied egg-rr74.1%

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

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

Alternative 9: 76.8% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 87.6%

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

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

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

    if -8.00000000000000032e-108 < z < 5.8999999999999997e156

    1. Initial program 90.6%

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

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

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

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

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

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

    if 5.8999999999999997e156 < z

    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. Taylor expanded in x around 0 79.9%

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

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

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

Alternative 10: 74.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.38 \cdot 10^{+240}:\\ \;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \cdot -4\right)\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+165}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;x \leq -49000 \lor \neg \left(x \leq 6.2 \cdot 10^{-41}\right):\\ \;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - j \cdot \left(27 \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= x -1.38e+240)
   (* x (+ (* (* 18.0 y) (* z t)) (* i -4.0)))
   (if (<= x -1.35e+165)
     (- (* b c) (* 4.0 (+ (* t a) (* x i))))
     (if (or (<= x -49000.0) (not (<= x 6.2e-41)))
       (+ (* b c) (* x (- (* 18.0 (* y (* z t))) (* 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 <= -1.38e+240) {
		tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
	} else if (x <= -1.35e+165) {
		tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
	} else if ((x <= -49000.0) || !(x <= 6.2e-41)) {
		tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (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 <= (-1.38d+240)) then
        tmp = x * (((18.0d0 * y) * (z * t)) + (i * (-4.0d0)))
    else if (x <= (-1.35d+165)) then
        tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
    else if ((x <= (-49000.0d0)) .or. (.not. (x <= 6.2d-41))) then
        tmp = (b * c) + (x * ((18.0d0 * (y * (z * t))) - (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 <= -1.38e+240) {
		tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
	} else if (x <= -1.35e+165) {
		tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
	} else if ((x <= -49000.0) || !(x <= 6.2e-41)) {
		tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (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 <= -1.38e+240:
		tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0))
	elif x <= -1.35e+165:
		tmp = (b * c) - (4.0 * ((t * a) + (x * i)))
	elif (x <= -49000.0) or not (x <= 6.2e-41):
		tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (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 <= -1.38e+240)
		tmp = Float64(x * Float64(Float64(Float64(18.0 * y) * Float64(z * t)) + Float64(i * -4.0)));
	elseif (x <= -1.35e+165)
		tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i))));
	elseif ((x <= -49000.0) || !(x <= 6.2e-41))
		tmp = Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))));
	else
		tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - 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 (x <= -1.38e+240)
		tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
	elseif (x <= -1.35e+165)
		tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
	elseif ((x <= -49000.0) || ~((x <= 6.2e-41)))
		tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (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, -1.38e+240], N[(x * N[(N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e+165], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -49000.0], N[Not[LessEqual[x, 6.2e-41]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -49000 \lor \neg \left(x \leq 6.2 \cdot 10^{-41}\right):\\
\;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.3799999999999999e240

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

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

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

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

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

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

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

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

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

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

    if -1.3799999999999999e240 < x < -1.35e165

    1. Initial program 68.8%

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

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

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

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

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

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

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

    if -1.35e165 < x < -49000 or 6.20000000000000001e-41 < x

    1. Initial program 84.1%

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

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

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

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

    if -49000 < x < 6.20000000000000001e-41

    1. Initial program 98.3%

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

      \[\leadsto \color{blue}{\left(c \cdot b - 4 \cdot \left(a \cdot t\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Step-by-step derivation
      1. sub-neg84.7%

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

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

        \[\leadsto \left(c \cdot b - 4 \cdot \left(t \cdot a\right)\right) + \left(-\color{blue}{j \cdot \left(27 \cdot k\right)}\right) \]
    4. Applied egg-rr84.7%

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

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

Alternative 11: 57.5% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;k \leq 7 \cdot 10^{+25}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;k \leq 2.3 \cdot 10^{+92}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;k \leq 4.6 \cdot 10^{+150}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if k < -9e-78

    1. Initial program 89.2%

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

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

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

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

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

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

    if -9e-78 < k < 6.99999999999999999e25 or 2.29999999999999998e92 < k < 4.60000000000000002e150

    1. Initial program 90.1%

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

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

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

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

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

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

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

    if 6.99999999999999999e25 < k < 2.29999999999999998e92

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(i \cdot x\right) - \color{blue}{\left(j \cdot 27\right) \cdot k} \]
      9. cancel-sign-sub-inv71.1%

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

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

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

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

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

    if 4.60000000000000002e150 < k < 3.10000000000000016e233

    1. Initial program 64.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. Simplified73.2%

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

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

    if 3.10000000000000016e233 < k

    1. Initial program 91.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -9 \cdot 10^{-78}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;k \leq 7 \cdot 10^{+25}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;k \leq 2.3 \cdot 10^{+92}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \leq 4.6 \cdot 10^{+150}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;k \leq 3.1 \cdot 10^{+233}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \end{array} \]

Alternative 12: 78.9% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 89.0%

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

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

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

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

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

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

    if 9.59999999999999979e148 < t

    1. Initial program 86.8%

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

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

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

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

Alternative 13: 50.1% accurate, 1.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.12e14

    1. Initial program 84.2%

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

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

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

    if -1.12e14 < c < -5.3e-248

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

    if -5.3e-248 < c < 1e-51

    1. Initial program 87.3%

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

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

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

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

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

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

    if 1e-51 < c < 2.1e133

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(i \cdot x\right) - \color{blue}{\left(j \cdot 27\right) \cdot k} \]
      9. cancel-sign-sub-inv48.1%

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

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

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

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

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

    if 2.1e133 < c

    1. Initial program 83.5%

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

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

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

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

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

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

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

      \[\leadsto c \cdot b - \color{blue}{4 \cdot \left(a \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutative60.0%

        \[\leadsto c \cdot b - 4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      2. *-commutative60.0%

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

        \[\leadsto c \cdot b - \color{blue}{t \cdot \left(a \cdot 4\right)} \]
    8. Simplified60.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.12 \cdot 10^{+14}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \leq -5.3 \cdot 10^{-248}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;c \leq 10^{-51}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{+133}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\ \end{array} \]

Alternative 14: 64.1% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -1 \cdot 10^{+213}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -9.99999999999999984e212

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \left(i \cdot x\right) - \color{blue}{\left(j \cdot 27\right) \cdot k} \]
      9. cancel-sign-sub-inv76.2%

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

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

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

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

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

    if -9.99999999999999984e212 < i < 3.2e146

    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. Taylor expanded in x around 0 71.2%

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

    if 3.2e146 < i

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 48.7% accurate, 1.8× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 3.7 \cdot 10^{+220}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.60000000000000011e-67 or 1.29999999999999998e64 < t < 3.7e220

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

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

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

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

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

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

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

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

    if -1.60000000000000011e-67 < t < 2.3000000000000001e-152

    1. Initial program 87.4%

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

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

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

    if 2.3000000000000001e-152 < t < 1.29999999999999998e64

    1. Initial program 95.3%

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

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

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

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

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

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

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

      \[\leadsto c \cdot b - \color{blue}{4 \cdot \left(a \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-commutative54.0%

        \[\leadsto c \cdot b - 4 \cdot \color{blue}{\left(t \cdot a\right)} \]
      2. *-commutative54.0%

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

        \[\leadsto c \cdot b - \color{blue}{t \cdot \left(a \cdot 4\right)} \]
    8. Simplified54.0%

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

    if 3.7e220 < t

    1. Initial program 83.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-67}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-152}:\\ \;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+64}:\\ \;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+220}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(18 \cdot y\right) \cdot \left(t \cdot \left(x \cdot z\right)\right)\\ \end{array} \]

Alternative 16: 32.5% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;c \leq -7.5 \cdot 10^{-253}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 4 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 1.45 \cdot 10^{-50}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 2.1 \cdot 10^{+133}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.2e12 or 2.1e133 < c

    1. Initial program 84.0%

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

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

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

    if -3.2e12 < c < -7.49999999999999987e-253 or 3.9999999999999998e-126 < c < 1.45000000000000004e-50

    1. Initial program 94.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.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. Taylor expanded in a around inf 38.7%

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

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

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

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

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

    if -7.49999999999999987e-253 < c < 3.9999999999999998e-126 or 1.45000000000000004e-50 < c < 2.1e133

    1. Initial program 88.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3200000000000:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq -7.5 \cdot 10^{-253}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;c \leq 4 \cdot 10^{-126}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{-50}:\\ \;\;\;\;t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{+133}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 17: 43.1% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+91} \lor \neg \left(b \leq 2.8 \cdot 10^{-40}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.50000000000000033e91 or 2.8e-40 < b

    1. Initial program 88.4%

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

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

    if -7.50000000000000033e91 < b < 2.8e-40

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.5 \cdot 10^{+91} \lor \neg \left(b \leq 2.8 \cdot 10^{-40}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 18: 48.8% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+52} \lor \neg \left(b \leq 1.6 \cdot 10^{-105}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5e52 or 1.59999999999999991e-105 < b

    1. Initial program 88.4%

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

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

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

    if -5e52 < b < 1.59999999999999991e-105

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+52} \lor \neg \left(b \leq 1.6 \cdot 10^{-105}\right):\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 19: 49.3% accurate, 2.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -2.2999999999999999e168

    1. Initial program 93.4%

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

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

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

    if -2.2999999999999999e168 < i < 1.7500000000000001e27

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7500000000000001e27 < i

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.3 \cdot 10^{+168}:\\ \;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;i \leq 1.75 \cdot 10^{+27}:\\ \;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]

Alternative 20: 31.0% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -4.6 \cdot 10^{-179}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 2.2 \cdot 10^{+133}:\\ \;\;\;\;k \cdot \left(j \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 (<= c -4.6e-179) (* b c) (if (<= c 2.2e+133) (* k (* j -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 (c <= -4.6e-179) {
		tmp = b * c;
	} else if (c <= 2.2e+133) {
		tmp = k * (j * -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 (c <= (-4.6d-179)) then
        tmp = b * c
    else if (c <= 2.2d+133) then
        tmp = k * (j * (-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 (c <= -4.6e-179) {
		tmp = b * c;
	} else if (c <= 2.2e+133) {
		tmp = k * (j * -27.0);
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if c <= -4.6e-179:
		tmp = b * c
	elif c <= 2.2e+133:
		tmp = k * (j * -27.0)
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (c <= -4.6e-179)
		tmp = Float64(b * c);
	elseif (c <= 2.2e+133)
		tmp = Float64(k * Float64(j * -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 (c <= -4.6e-179)
		tmp = b * c;
	elseif (c <= 2.2e+133)
		tmp = k * (j * -27.0);
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -4.6e-179], N[(b * c), $MachinePrecision], If[LessEqual[c, 2.2e+133], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.6 \cdot 10^{-179}:\\
\;\;\;\;b \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -4.59999999999999975e-179 or 2.2e133 < c

    1. Initial program 87.9%

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

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

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

    if -4.59999999999999975e-179 < c < 2.2e133

    1. Initial program 89.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.6 \cdot 10^{-179}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;c \leq 2.2 \cdot 10^{+133}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]

Alternative 21: 24.5% accurate, 10.3× speedup?

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

\\
b \cdot c
\end{array}
Derivation
  1. Initial program 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. Simplified88.4%

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

    \[\leadsto \color{blue}{c \cdot b} \]
  4. Final simplification23.2%

    \[\leadsto b \cdot c \]

Developer target: 89.1% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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