Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A

Percentage Accurate: 90.1% → 96.5%
Time: 13.1s
Alternatives: 13
Speedup: 0.5×

Specification

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

\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\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 13 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: 90.1% accurate, 1.0× speedup?

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

\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}

Alternative 1: 96.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot c\\ \mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot t_1\right) \cdot i \leq \infty:\\ \;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - t_1 \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (* b c))))
   (if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
     (* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
     (* 2.0 (* c (* t_1 (- i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (b * c);
	double tmp;
	if ((((x * y) + (z * t)) - ((c * t_1) * i)) <= ((double) INFINITY)) {
		tmp = 2.0 * (fma(x, y, (z * t)) - (t_1 * (c * i)));
	} else {
		tmp = 2.0 * (c * (t_1 * -i));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(b * c))
	tmp = 0.0
	if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * t_1) * i)) <= Inf)
		tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(t_1 * Float64(c * i))));
	else
		tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - \left(c \cdot t_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - t_1 \cdot \left(c \cdot i\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\


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

    1. Initial program 95.6%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*98.7%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
      2. fma-def98.7%

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(x, y, z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    3. Simplified98.7%

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]

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

    1. Initial program 0.0%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in i around inf 80.3%

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

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

Alternative 2: 95.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot c\\ t_2 := \left(c \cdot t_1\right) \cdot i\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 5 \cdot 10^{+290}\right):\\ \;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2\right) \cdot 2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (* b c))) (t_2 (* (* c t_1) i)))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 5e+290)))
     (* 2.0 (* c (* t_1 (- i))))
     (* (- (+ (* x y) (* z t)) t_2) 2.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (b * c);
	double t_2 = (c * t_1) * i;
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 5e+290)) {
		tmp = 2.0 * (c * (t_1 * -i));
	} else {
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (b * c);
	double t_2 = (c * t_1) * i;
	double tmp;
	if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 5e+290)) {
		tmp = 2.0 * (c * (t_1 * -i));
	} else {
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (b * c)
	t_2 = (c * t_1) * i
	tmp = 0
	if (t_2 <= -math.inf) or not (t_2 <= 5e+290):
		tmp = 2.0 * (c * (t_1 * -i))
	else:
		tmp = (((x * y) + (z * t)) - t_2) * 2.0
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(b * c))
	t_2 = Float64(Float64(c * t_1) * i)
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 5e+290))
		tmp = Float64(2.0 * Float64(c * Float64(t_1 * Float64(-i))));
	else
		tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2) * 2.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = a + (b * c);
	t_2 = (c * t_1) * i;
	tmp = 0.0;
	if ((t_2 <= -Inf) || ~((t_2 <= 5e+290)))
		tmp = 2.0 * (c * (t_1 * -i));
	else
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 5e+290]], $MachinePrecision]], N[(2.0 * N[(c * N[(t$95$1 * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(c \cdot t_1\right) \cdot i\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 5 \cdot 10^{+290}\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2\right) \cdot 2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0 or 4.9999999999999998e290 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 75.7%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in i around inf 94.2%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\right)} \]

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.9999999999999998e290

    1. Initial program 99.2%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq -\infty \lor \neg \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq 5 \cdot 10^{+290}\right):\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right) \cdot 2\\ \end{array} \]

Alternative 3: 96.5% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\right)\right)\\


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

    1. Initial program 95.6%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*98.7%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
      2. fma-def98.7%

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(x, y, z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    3. Simplified98.7%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(x \cdot y + z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
      2. +-commutative98.7%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(z \cdot t + x \cdot y\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    5. Applied egg-rr98.7%

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

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

    1. Initial program 0.0%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in i around inf 80.3%

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

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

Alternative 4: 85.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot t\\ t_2 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{if}\;c \leq -1.2 \cdot 10^{+122}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 22500:\\ \;\;\;\;2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{+186}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* x y) (* z t))) (t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
   (if (<= c -1.2e+122)
     t_2
     (if (<= c 22500.0)
       (* 2.0 (- t_1 (* i (* a c))))
       (if (<= c 1.5e+186) (* 2.0 (- t_1 (* c (* b (* c i))))) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (x * y) + (z * t);
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -1.2e+122) {
		tmp = t_2;
	} else if (c <= 22500.0) {
		tmp = 2.0 * (t_1 - (i * (a * c)));
	} else if (c <= 1.5e+186) {
		tmp = 2.0 * (t_1 - (c * (b * (c * i))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x * y) + (z * t)
    t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
    if (c <= (-1.2d+122)) then
        tmp = t_2
    else if (c <= 22500.0d0) then
        tmp = 2.0d0 * (t_1 - (i * (a * c)))
    else if (c <= 1.5d+186) then
        tmp = 2.0d0 * (t_1 - (c * (b * (c * i))))
    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 t_1 = (x * y) + (z * t);
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -1.2e+122) {
		tmp = t_2;
	} else if (c <= 22500.0) {
		tmp = 2.0 * (t_1 - (i * (a * c)));
	} else if (c <= 1.5e+186) {
		tmp = 2.0 * (t_1 - (c * (b * (c * i))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * y) + (z * t)
	t_2 = 2.0 * (c * ((a + (b * c)) * -i))
	tmp = 0
	if c <= -1.2e+122:
		tmp = t_2
	elif c <= 22500.0:
		tmp = 2.0 * (t_1 - (i * (a * c)))
	elif c <= 1.5e+186:
		tmp = 2.0 * (t_1 - (c * (b * (c * i))))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * y) + Float64(z * t))
	t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i))))
	tmp = 0.0
	if (c <= -1.2e+122)
		tmp = t_2;
	elseif (c <= 22500.0)
		tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(a * c))));
	elseif (c <= 1.5e+186)
		tmp = Float64(2.0 * Float64(t_1 - Float64(c * Float64(b * Float64(c * i)))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (x * y) + (z * t);
	t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	tmp = 0.0;
	if (c <= -1.2e+122)
		tmp = t_2;
	elseif (c <= 22500.0)
		tmp = 2.0 * (t_1 - (i * (a * c)));
	elseif (c <= 1.5e+186)
		tmp = 2.0 * (t_1 - (c * (b * (c * i))));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.2e+122], t$95$2, If[LessEqual[c, 22500.0], N[(2.0 * N[(t$95$1 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.5e+186], N[(2.0 * N[(t$95$1 - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq 22500:\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\

\mathbf{elif}\;c \leq 1.5 \cdot 10^{+186}:\\
\;\;\;\;2 \cdot \left(t_1 - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.2000000000000001e122 or 1.49999999999999991e186 < c

    1. Initial program 71.7%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in i around inf 92.6%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\right)} \]

    if -1.2000000000000001e122 < c < 22500

    1. Initial program 98.6%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 91.8%

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

    if 22500 < c < 1.49999999999999991e186

    1. Initial program 89.3%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around 0 82.8%

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\color{blue}{\left(c \cdot b\right)} \cdot c\right) \cdot i\right) \]
    3. Step-by-step derivation
      1. expm1-log1p-u42.1%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(c \cdot b\right) \cdot c\right) \cdot i\right)\right)}\right) \]
      2. expm1-udef42.1%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(e^{\mathsf{log1p}\left(\left(\left(c \cdot b\right) \cdot c\right) \cdot i\right)} - 1\right)}\right) \]
      3. associate-*l*42.4%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(e^{\mathsf{log1p}\left(\color{blue}{\left(c \cdot b\right) \cdot \left(c \cdot i\right)}\right)} - 1\right)\right) \]
      4. *-commutative42.4%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right)} \cdot \left(c \cdot i\right)\right)} - 1\right)\right) \]
    4. Applied egg-rr42.4%

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)} - 1\right)}\right) \]
    5. Step-by-step derivation
      1. expm1-def42.4%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)}\right) \]
      2. expm1-log1p83.1%

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - c \cdot \color{blue}{\left(b \cdot \left(c \cdot i\right)\right)}\right) \]
    6. Simplified85.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.2 \cdot 10^{+122}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq 22500:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{+186}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \end{array} \]

Alternative 5: 85.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot t\\ t_2 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{if}\;c \leq -6.8 \cdot 10^{+124}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 11200:\\ \;\;\;\;2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.04 \cdot 10^{+186}:\\ \;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* x y) (* z t))) (t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
   (if (<= c -6.8e+124)
     t_2
     (if (<= c 11200.0)
       (* 2.0 (- t_1 (* i (* a c))))
       (if (<= c 1.04e+186) (* 2.0 (- t_1 (* c (* c (* b i))))) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (x * y) + (z * t);
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -6.8e+124) {
		tmp = t_2;
	} else if (c <= 11200.0) {
		tmp = 2.0 * (t_1 - (i * (a * c)));
	} else if (c <= 1.04e+186) {
		tmp = 2.0 * (t_1 - (c * (c * (b * i))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x * y) + (z * t)
    t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
    if (c <= (-6.8d+124)) then
        tmp = t_2
    else if (c <= 11200.0d0) then
        tmp = 2.0d0 * (t_1 - (i * (a * c)))
    else if (c <= 1.04d+186) then
        tmp = 2.0d0 * (t_1 - (c * (c * (b * i))))
    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 t_1 = (x * y) + (z * t);
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -6.8e+124) {
		tmp = t_2;
	} else if (c <= 11200.0) {
		tmp = 2.0 * (t_1 - (i * (a * c)));
	} else if (c <= 1.04e+186) {
		tmp = 2.0 * (t_1 - (c * (c * (b * i))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * y) + (z * t)
	t_2 = 2.0 * (c * ((a + (b * c)) * -i))
	tmp = 0
	if c <= -6.8e+124:
		tmp = t_2
	elif c <= 11200.0:
		tmp = 2.0 * (t_1 - (i * (a * c)))
	elif c <= 1.04e+186:
		tmp = 2.0 * (t_1 - (c * (c * (b * i))))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * y) + Float64(z * t))
	t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i))))
	tmp = 0.0
	if (c <= -6.8e+124)
		tmp = t_2;
	elseif (c <= 11200.0)
		tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(a * c))));
	elseif (c <= 1.04e+186)
		tmp = Float64(2.0 * Float64(t_1 - Float64(c * Float64(c * Float64(b * i)))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (x * y) + (z * t);
	t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	tmp = 0.0;
	if (c <= -6.8e+124)
		tmp = t_2;
	elseif (c <= 11200.0)
		tmp = 2.0 * (t_1 - (i * (a * c)));
	elseif (c <= 1.04e+186)
		tmp = 2.0 * (t_1 - (c * (c * (b * i))));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.8e+124], t$95$2, If[LessEqual[c, 11200.0], N[(2.0 * N[(t$95$1 - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.04e+186], N[(2.0 * N[(t$95$1 - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq 11200:\\
\;\;\;\;2 \cdot \left(t_1 - i \cdot \left(a \cdot c\right)\right)\\

\mathbf{elif}\;c \leq 1.04 \cdot 10^{+186}:\\
\;\;\;\;2 \cdot \left(t_1 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -6.8e124 or 1.04e186 < c

    1. Initial program 71.7%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in i around inf 92.6%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\right)} \]

    if -6.8e124 < c < 11200

    1. Initial program 98.6%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 91.8%

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

    if 11200 < c < 1.04e186

    1. Initial program 89.3%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around 0 82.9%

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{{c}^{2} \cdot \left(i \cdot b\right)}\right) \]
    3. Step-by-step derivation
      1. unpow282.9%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot c\right)} \cdot \left(i \cdot b\right)\right) \]
      2. associate-*r*87.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -6.8 \cdot 10^{+124}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq 11200:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.04 \cdot 10^{+186}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \end{array} \]

Alternative 6: 74.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\ t_2 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{if}\;c \leq -1.95 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -5.4 \cdot 10^{-53}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -9 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (+ (* x y) (* z t)) 2.0))
        (t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
   (if (<= c -1.95e+48)
     t_2
     (if (<= c -2e-37)
       t_1
       (if (<= c -5.4e-53)
         t_2
         (if (<= c -9e-75)
           (* 2.0 (- (* z t) (* i (* a c))))
           (if (<= c 2.7e-13) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -1.95e+48) {
		tmp = t_2;
	} else if (c <= -2e-37) {
		tmp = t_1;
	} else if (c <= -5.4e-53) {
		tmp = t_2;
	} else if (c <= -9e-75) {
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	} else if (c <= 2.7e-13) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((x * y) + (z * t)) * 2.0d0
    t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
    if (c <= (-1.95d+48)) then
        tmp = t_2
    else if (c <= (-2d-37)) then
        tmp = t_1
    else if (c <= (-5.4d-53)) then
        tmp = t_2
    else if (c <= (-9d-75)) then
        tmp = 2.0d0 * ((z * t) - (i * (a * c)))
    else if (c <= 2.7d-13) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -1.95e+48) {
		tmp = t_2;
	} else if (c <= -2e-37) {
		tmp = t_1;
	} else if (c <= -5.4e-53) {
		tmp = t_2;
	} else if (c <= -9e-75) {
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	} else if (c <= 2.7e-13) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = ((x * y) + (z * t)) * 2.0
	t_2 = 2.0 * (c * ((a + (b * c)) * -i))
	tmp = 0
	if c <= -1.95e+48:
		tmp = t_2
	elif c <= -2e-37:
		tmp = t_1
	elif c <= -5.4e-53:
		tmp = t_2
	elif c <= -9e-75:
		tmp = 2.0 * ((z * t) - (i * (a * c)))
	elif c <= 2.7e-13:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0)
	t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i))))
	tmp = 0.0
	if (c <= -1.95e+48)
		tmp = t_2;
	elseif (c <= -2e-37)
		tmp = t_1;
	elseif (c <= -5.4e-53)
		tmp = t_2;
	elseif (c <= -9e-75)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(a * c))));
	elseif (c <= 2.7e-13)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = ((x * y) + (z * t)) * 2.0;
	t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	tmp = 0.0;
	if (c <= -1.95e+48)
		tmp = t_2;
	elseif (c <= -2e-37)
		tmp = t_1;
	elseif (c <= -5.4e-53)
		tmp = t_2;
	elseif (c <= -9e-75)
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	elseif (c <= 2.7e-13)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.95e+48], t$95$2, If[LessEqual[c, -2e-37], t$95$1, If[LessEqual[c, -5.4e-53], t$95$2, If[LessEqual[c, -9e-75], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.7e-13], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -5.4 \cdot 10^{-53}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -9 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\

\mathbf{elif}\;c \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.95e48 or -2.00000000000000013e-37 < c < -5.3999999999999998e-53 or 2.70000000000000011e-13 < c

    1. Initial program 81.3%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in i around inf 82.3%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\right)} \]

    if -1.95e48 < c < -2.00000000000000013e-37 or -9.0000000000000006e-75 < c < 2.70000000000000011e-13

    1. Initial program 99.1%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in c around 0 77.9%

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

    if -5.3999999999999998e-53 < c < -9.0000000000000006e-75

    1. Initial program 100.0%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 100.0%

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    3. Taylor expanded in x around 0 85.8%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z - c \cdot \left(a \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*85.8%

        \[\leadsto 2 \cdot \left(t \cdot z - \color{blue}{\left(c \cdot a\right) \cdot i}\right) \]
      2. *-commutative85.8%

        \[\leadsto 2 \cdot \left(t \cdot z - \color{blue}{\left(a \cdot c\right)} \cdot i\right) \]
      3. *-commutative85.8%

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

        \[\leadsto 2 \cdot \left(t \cdot z - i \cdot \color{blue}{\left(c \cdot a\right)}\right) \]
    5. Simplified85.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.95 \cdot 10^{+48}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq -2 \cdot 10^{-37}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq -5.4 \cdot 10^{-53}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq -9 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-13}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \end{array} \]

Alternative 7: 84.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -3 \cdot 10^{+122} \lor \neg \left(c \leq 10^{+41}\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.99999999999999986e122 or 1.00000000000000001e41 < c

    1. Initial program 76.8%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in i around inf 84.8%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)\right)} \]

    if -2.99999999999999986e122 < c < 1.00000000000000001e41

    1. Initial program 98.6%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 90.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3 \cdot 10^{+122} \lor \neg \left(c \leq 10^{+41}\right):\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]

Alternative 8: 68.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\ t_2 := c \cdot \left(b \cdot \left(\left(c \cdot i\right) \cdot -2\right)\right)\\ \mathbf{if}\;c \leq -3.25 \cdot 10^{+122}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -92000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 4.6 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (+ (* x y) (* z t)) 2.0)) (t_2 (* c (* b (* (* c i) -2.0)))))
   (if (<= c -3.25e+122)
     t_2
     (if (<= c -92000000000.0)
       t_1
       (if (<= c -8.8e-75)
         (* 2.0 (- (* z t) (* i (* a c))))
         (if (<= c 4.6e+41) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = c * (b * ((c * i) * -2.0));
	double tmp;
	if (c <= -3.25e+122) {
		tmp = t_2;
	} else if (c <= -92000000000.0) {
		tmp = t_1;
	} else if (c <= -8.8e-75) {
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	} else if (c <= 4.6e+41) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((x * y) + (z * t)) * 2.0d0
    t_2 = c * (b * ((c * i) * (-2.0d0)))
    if (c <= (-3.25d+122)) then
        tmp = t_2
    else if (c <= (-92000000000.0d0)) then
        tmp = t_1
    else if (c <= (-8.8d-75)) then
        tmp = 2.0d0 * ((z * t) - (i * (a * c)))
    else if (c <= 4.6d+41) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = c * (b * ((c * i) * -2.0));
	double tmp;
	if (c <= -3.25e+122) {
		tmp = t_2;
	} else if (c <= -92000000000.0) {
		tmp = t_1;
	} else if (c <= -8.8e-75) {
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	} else if (c <= 4.6e+41) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = ((x * y) + (z * t)) * 2.0
	t_2 = c * (b * ((c * i) * -2.0))
	tmp = 0
	if c <= -3.25e+122:
		tmp = t_2
	elif c <= -92000000000.0:
		tmp = t_1
	elif c <= -8.8e-75:
		tmp = 2.0 * ((z * t) - (i * (a * c)))
	elif c <= 4.6e+41:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0)
	t_2 = Float64(c * Float64(b * Float64(Float64(c * i) * -2.0)))
	tmp = 0.0
	if (c <= -3.25e+122)
		tmp = t_2;
	elseif (c <= -92000000000.0)
		tmp = t_1;
	elseif (c <= -8.8e-75)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(a * c))));
	elseif (c <= 4.6e+41)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = ((x * y) + (z * t)) * 2.0;
	t_2 = c * (b * ((c * i) * -2.0));
	tmp = 0.0;
	if (c <= -3.25e+122)
		tmp = t_2;
	elseif (c <= -92000000000.0)
		tmp = t_1;
	elseif (c <= -8.8e-75)
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	elseif (c <= 4.6e+41)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(b * N[(N[(c * i), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.25e+122], t$95$2, If[LessEqual[c, -92000000000.0], t$95$1, If[LessEqual[c, -8.8e-75], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.6e+41], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -92000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -8.8 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\

\mathbf{elif}\;c \leq 4.6 \cdot 10^{+41}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.24999999999999982e122 or 4.5999999999999997e41 < c

    1. Initial program 76.8%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*85.1%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
      2. fma-def87.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(x, y, z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    3. Simplified87.1%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(x \cdot y + z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
      2. +-commutative85.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(z \cdot t + x \cdot y\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    5. Applied egg-rr85.1%

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg67.4%

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. *-commutative67.4%

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(i \cdot b\right) \cdot {c}^{2}}\right) \]
      3. distribute-rgt-neg-in67.4%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(i \cdot b\right) \cdot \left(-{c}^{2}\right)\right)} \]
      4. unpow267.4%

        \[\leadsto 2 \cdot \left(\left(i \cdot b\right) \cdot \left(-\color{blue}{c \cdot c}\right)\right) \]
      5. distribute-rgt-neg-in67.4%

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

      \[\leadsto 2 \cdot \color{blue}{\left(\left(i \cdot b\right) \cdot \left(c \cdot \left(-c\right)\right)\right)} \]
    9. Taylor expanded in i around 0 67.4%

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

        \[\leadsto \color{blue}{\left({c}^{2} \cdot \left(i \cdot b\right)\right) \cdot -2} \]
      2. unpow267.4%

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)} \cdot -2 \]
      6. *-commutative72.4%

        \[\leadsto \left(c \cdot \color{blue}{\left(b \cdot \left(c \cdot i\right)\right)}\right) \cdot -2 \]
      7. associate-*l*72.4%

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{\left(i \cdot \left(c \cdot b\right)\right)} \cdot -2\right) \]
    11. Simplified71.5%

      \[\leadsto \color{blue}{c \cdot \left(\left(i \cdot \left(c \cdot b\right)\right) \cdot -2\right)} \]
    12. Taylor expanded in c around 0 67.4%

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

        \[\leadsto \color{blue}{\left({c}^{2} \cdot \left(i \cdot b\right)\right) \cdot -2} \]
      2. unpow267.4%

        \[\leadsto \left(\color{blue}{\left(c \cdot c\right)} \cdot \left(i \cdot b\right)\right) \cdot -2 \]
      3. associate-*l*70.4%

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

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

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

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

        \[\leadsto \color{blue}{c \cdot \left(\left(i \cdot \left(c \cdot b\right)\right) \cdot -2\right)} \]
      8. *-commutative71.5%

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

        \[\leadsto c \cdot \left(-2 \cdot \color{blue}{\left(\left(i \cdot c\right) \cdot b\right)}\right) \]
      10. *-commutative72.4%

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-2 \cdot \left(c \cdot i\right)\right) \cdot b\right)} \]
    14. Simplified72.4%

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

    if -3.24999999999999982e122 < c < -9.2e10 or -8.80000000000000022e-75 < c < 4.5999999999999997e41

    1. Initial program 99.2%

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

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

    if -9.2e10 < c < -8.80000000000000022e-75

    1. Initial program 95.0%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 81.1%

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    3. Taylor expanded in x around 0 72.2%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z - c \cdot \left(a \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*68.1%

        \[\leadsto 2 \cdot \left(t \cdot z - \color{blue}{\left(c \cdot a\right) \cdot i}\right) \]
      2. *-commutative68.1%

        \[\leadsto 2 \cdot \left(t \cdot z - \color{blue}{\left(a \cdot c\right)} \cdot i\right) \]
      3. *-commutative68.1%

        \[\leadsto 2 \cdot \left(t \cdot z - \color{blue}{i \cdot \left(a \cdot c\right)}\right) \]
      4. *-commutative68.1%

        \[\leadsto 2 \cdot \left(t \cdot z - i \cdot \color{blue}{\left(c \cdot a\right)}\right) \]
    5. Simplified68.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.25 \cdot 10^{+122}:\\ \;\;\;\;c \cdot \left(b \cdot \left(\left(c \cdot i\right) \cdot -2\right)\right)\\ \mathbf{elif}\;c \leq -92000000000:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 4.6 \cdot 10^{+41}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(b \cdot \left(\left(c \cdot i\right) \cdot -2\right)\right)\\ \end{array} \]

Alternative 9: 68.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.7 \cdot 10^{+123} \lor \neg \left(c \leq 9.2 \cdot 10^{+43}\right):\\
\;\;\;\;c \cdot \left(b \cdot \left(\left(c \cdot i\right) \cdot -2\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.70000000000000013e123 or 9.200000000000001e43 < c

    1. Initial program 76.8%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*85.1%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
      2. fma-def87.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(x, y, z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    3. Simplified87.1%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(x \cdot y + z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
      2. +-commutative85.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(z \cdot t + x \cdot y\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    5. Applied egg-rr85.1%

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg67.4%

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. *-commutative67.4%

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(i \cdot b\right) \cdot {c}^{2}}\right) \]
      3. distribute-rgt-neg-in67.4%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(i \cdot b\right) \cdot \left(-{c}^{2}\right)\right)} \]
      4. unpow267.4%

        \[\leadsto 2 \cdot \left(\left(i \cdot b\right) \cdot \left(-\color{blue}{c \cdot c}\right)\right) \]
      5. distribute-rgt-neg-in67.4%

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

      \[\leadsto 2 \cdot \color{blue}{\left(\left(i \cdot b\right) \cdot \left(c \cdot \left(-c\right)\right)\right)} \]
    9. Taylor expanded in i around 0 67.4%

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

        \[\leadsto \color{blue}{\left({c}^{2} \cdot \left(i \cdot b\right)\right) \cdot -2} \]
      2. unpow267.4%

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

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

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

        \[\leadsto \color{blue}{\left(c \cdot \left(\left(c \cdot i\right) \cdot b\right)\right)} \cdot -2 \]
      6. *-commutative72.4%

        \[\leadsto \left(c \cdot \color{blue}{\left(b \cdot \left(c \cdot i\right)\right)}\right) \cdot -2 \]
      7. associate-*l*72.4%

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{\left(i \cdot \left(c \cdot b\right)\right)} \cdot -2\right) \]
    11. Simplified71.5%

      \[\leadsto \color{blue}{c \cdot \left(\left(i \cdot \left(c \cdot b\right)\right) \cdot -2\right)} \]
    12. Taylor expanded in c around 0 67.4%

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

        \[\leadsto \color{blue}{\left({c}^{2} \cdot \left(i \cdot b\right)\right) \cdot -2} \]
      2. unpow267.4%

        \[\leadsto \left(\color{blue}{\left(c \cdot c\right)} \cdot \left(i \cdot b\right)\right) \cdot -2 \]
      3. associate-*l*70.4%

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

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

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

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

        \[\leadsto \color{blue}{c \cdot \left(\left(i \cdot \left(c \cdot b\right)\right) \cdot -2\right)} \]
      8. *-commutative71.5%

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

        \[\leadsto c \cdot \left(-2 \cdot \color{blue}{\left(\left(i \cdot c\right) \cdot b\right)}\right) \]
      10. *-commutative72.4%

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

        \[\leadsto c \cdot \color{blue}{\left(\left(-2 \cdot \left(c \cdot i\right)\right) \cdot b\right)} \]
    14. Simplified72.4%

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

    if -2.70000000000000013e123 < c < 9.200000000000001e43

    1. Initial program 98.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.7 \cdot 10^{+123} \lor \neg \left(c \leq 9.2 \cdot 10^{+43}\right):\\ \;\;\;\;c \cdot \left(b \cdot \left(\left(c \cdot i\right) \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \end{array} \]

Alternative 10: 56.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -4.8 \cdot 10^{+125}:\\ \;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq 1.08 \cdot 10^{+142}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= c -4.8e+125)
   (* (* i (* a c)) (- 2.0))
   (if (<= c 1.08e+142) (* (+ (* x y) (* z t)) 2.0) (* a (* (* c i) -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (c <= -4.8e+125) {
		tmp = (i * (a * c)) * -2.0;
	} else if (c <= 1.08e+142) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else {
		tmp = a * ((c * i) * -2.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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) :: tmp
    if (c <= (-4.8d+125)) then
        tmp = (i * (a * c)) * -2.0d0
    else if (c <= 1.08d+142) then
        tmp = ((x * y) + (z * t)) * 2.0d0
    else
        tmp = a * ((c * i) * (-2.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 tmp;
	if (c <= -4.8e+125) {
		tmp = (i * (a * c)) * -2.0;
	} else if (c <= 1.08e+142) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else {
		tmp = a * ((c * i) * -2.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if c <= -4.8e+125:
		tmp = (i * (a * c)) * -2.0
	elif c <= 1.08e+142:
		tmp = ((x * y) + (z * t)) * 2.0
	else:
		tmp = a * ((c * i) * -2.0)
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (c <= -4.8e+125)
		tmp = Float64(Float64(i * Float64(a * c)) * Float64(-2.0));
	elseif (c <= 1.08e+142)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0);
	else
		tmp = Float64(a * Float64(Float64(c * i) * -2.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (c <= -4.8e+125)
		tmp = (i * (a * c)) * -2.0;
	elseif (c <= 1.08e+142)
		tmp = ((x * y) + (z * t)) * 2.0;
	else
		tmp = a * ((c * i) * -2.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -4.8e+125], N[(N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, 1.08e+142], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(a * N[(N[(c * i), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.8 \cdot 10^{+125}:\\
\;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot \left(-2\right)\\

\mathbf{elif}\;c \leq 1.08 \cdot 10^{+142}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4.7999999999999999e125

    1. Initial program 74.2%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*84.0%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(x, y, z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    3. Simplified89.3%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(x \cdot y + z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
      2. +-commutative84.0%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(z \cdot t + x \cdot y\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    5. Applied egg-rr84.0%

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot a\right)\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg38.1%

        \[\leadsto 2 \cdot \color{blue}{\left(-c \cdot \left(i \cdot a\right)\right)} \]
      2. *-commutative38.1%

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(a \cdot c\right)} \cdot i\right) \]
      5. distribute-lft-neg-out38.3%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(-a \cdot c\right) \cdot i\right)} \]
      6. *-commutative38.3%

        \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(-a \cdot c\right)\right)} \]
      7. distribute-rgt-neg-in38.3%

        \[\leadsto 2 \cdot \left(i \cdot \color{blue}{\left(a \cdot \left(-c\right)\right)}\right) \]
    8. Simplified38.3%

      \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(a \cdot \left(-c\right)\right)\right)} \]

    if -4.7999999999999999e125 < c < 1.08e142

    1. Initial program 96.2%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in c around 0 66.4%

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

    if 1.08e142 < c

    1. Initial program 77.3%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 35.4%

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    3. Taylor expanded in z around 0 36.1%

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x - c \cdot \left(a \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*31.2%

        \[\leadsto 2 \cdot \left(y \cdot x - \color{blue}{\left(c \cdot a\right) \cdot i}\right) \]
      2. *-commutative31.2%

        \[\leadsto 2 \cdot \left(y \cdot x - \color{blue}{\left(a \cdot c\right)} \cdot i\right) \]
      3. *-commutative31.2%

        \[\leadsto 2 \cdot \left(y \cdot x - \color{blue}{i \cdot \left(a \cdot c\right)}\right) \]
      4. *-commutative31.2%

        \[\leadsto 2 \cdot \left(y \cdot x - i \cdot \color{blue}{\left(c \cdot a\right)}\right) \]
    5. Simplified31.2%

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x - i \cdot \left(c \cdot a\right)\right)} \]
    6. Taylor expanded in y around 0 25.7%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot a\right)\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg25.7%

        \[\leadsto 2 \cdot \color{blue}{\left(-c \cdot \left(i \cdot a\right)\right)} \]
      2. associate-*r*32.9%

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(c \cdot i\right) \cdot a}\right) \]
      3. distribute-rgt-neg-in32.9%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(i \cdot c\right)} \cdot \left(-a\right)\right) \]
      5. associate-*r*23.3%

        \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(c \cdot \left(-a\right)\right)\right)} \]
    8. Simplified23.3%

      \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(c \cdot \left(-a\right)\right)\right)} \]
    9. Taylor expanded in i around 0 25.7%

      \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)} \]
    10. Step-by-step derivation
      1. *-commutative25.7%

        \[\leadsto \color{blue}{\left(c \cdot \left(a \cdot i\right)\right) \cdot -2} \]
      2. associate-*r*23.3%

        \[\leadsto \color{blue}{\left(\left(c \cdot a\right) \cdot i\right)} \cdot -2 \]
      3. *-commutative23.3%

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

        \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right)} \cdot -2 \]
      5. associate-*l*32.9%

        \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
    11. Simplified32.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.8 \cdot 10^{+125}:\\ \;\;\;\;\left(i \cdot \left(a \cdot c\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq 1.08 \cdot 10^{+142}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\ \end{array} \]

Alternative 11: 37.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y\right)\\ \mathbf{if}\;y \leq -1.75 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-143}:\\ \;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+78}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* x y))))
   (if (<= y -1.75e-136)
     t_1
     (if (<= y 7.5e-143)
       (* a (* (* c i) -2.0))
       (if (<= y 1.75e+78) (* 2.0 (* z t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (x * y);
	double tmp;
	if (y <= -1.75e-136) {
		tmp = t_1;
	} else if (y <= 7.5e-143) {
		tmp = a * ((c * i) * -2.0);
	} else if (y <= 1.75e+78) {
		tmp = 2.0 * (z * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * (x * y)
    if (y <= (-1.75d-136)) then
        tmp = t_1
    else if (y <= 7.5d-143) then
        tmp = a * ((c * i) * (-2.0d0))
    else if (y <= 1.75d+78) then
        tmp = 2.0d0 * (z * t)
    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 t_1 = 2.0 * (x * y);
	double tmp;
	if (y <= -1.75e-136) {
		tmp = t_1;
	} else if (y <= 7.5e-143) {
		tmp = a * ((c * i) * -2.0);
	} else if (y <= 1.75e+78) {
		tmp = 2.0 * (z * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (x * y)
	tmp = 0
	if y <= -1.75e-136:
		tmp = t_1
	elif y <= 7.5e-143:
		tmp = a * ((c * i) * -2.0)
	elif y <= 1.75e+78:
		tmp = 2.0 * (z * t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(x * y))
	tmp = 0.0
	if (y <= -1.75e-136)
		tmp = t_1;
	elseif (y <= 7.5e-143)
		tmp = Float64(a * Float64(Float64(c * i) * -2.0));
	elseif (y <= 1.75e+78)
		tmp = Float64(2.0 * Float64(z * t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (x * y);
	tmp = 0.0;
	if (y <= -1.75e-136)
		tmp = t_1;
	elseif (y <= 7.5e-143)
		tmp = a * ((c * i) * -2.0);
	elseif (y <= 1.75e+78)
		tmp = 2.0 * (z * t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e-136], t$95$1, If[LessEqual[y, 7.5e-143], N[(a * N[(N[(c * i), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+78], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{-136}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{-143}:\\
\;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+78}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.75000000000000015e-136 or 1.7500000000000001e78 < y

    1. Initial program 87.1%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in x around inf 45.9%

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]

    if -1.75000000000000015e-136 < y < 7.5000000000000003e-143

    1. Initial program 94.4%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 64.6%

      \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    3. Taylor expanded in z around 0 37.4%

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x - c \cdot \left(a \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*41.5%

        \[\leadsto 2 \cdot \left(y \cdot x - \color{blue}{\left(c \cdot a\right) \cdot i}\right) \]
      2. *-commutative41.5%

        \[\leadsto 2 \cdot \left(y \cdot x - \color{blue}{\left(a \cdot c\right)} \cdot i\right) \]
      3. *-commutative41.5%

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

        \[\leadsto 2 \cdot \left(y \cdot x - i \cdot \color{blue}{\left(c \cdot a\right)}\right) \]
    5. Simplified41.5%

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x - i \cdot \left(c \cdot a\right)\right)} \]
    6. Taylor expanded in y around 0 30.5%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot a\right)\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg30.5%

        \[\leadsto 2 \cdot \color{blue}{\left(-c \cdot \left(i \cdot a\right)\right)} \]
      2. associate-*r*40.0%

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(c \cdot i\right) \cdot a}\right) \]
      3. distribute-rgt-neg-in40.0%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(i \cdot c\right)} \cdot \left(-a\right)\right) \]
      5. associate-*r*34.5%

        \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(c \cdot \left(-a\right)\right)\right)} \]
    8. Simplified34.5%

      \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(c \cdot \left(-a\right)\right)\right)} \]
    9. Taylor expanded in i around 0 30.5%

      \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)} \]
    10. Step-by-step derivation
      1. *-commutative30.5%

        \[\leadsto \color{blue}{\left(c \cdot \left(a \cdot i\right)\right) \cdot -2} \]
      2. associate-*r*34.5%

        \[\leadsto \color{blue}{\left(\left(c \cdot a\right) \cdot i\right)} \cdot -2 \]
      3. *-commutative34.5%

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

        \[\leadsto \color{blue}{\left(a \cdot \left(c \cdot i\right)\right)} \cdot -2 \]
      5. associate-*l*40.0%

        \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]
    11. Simplified40.0%

      \[\leadsto \color{blue}{a \cdot \left(\left(c \cdot i\right) \cdot -2\right)} \]

    if 7.5000000000000003e-143 < y < 1.7500000000000001e78

    1. Initial program 92.2%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in z around inf 30.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{-136}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-143}:\\ \;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+78}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 12: 38.4% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{-136} \lor \neg \left(y \leq 2 \cdot 10^{+78}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3e-136 or 2.00000000000000002e78 < y

    1. Initial program 87.1%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in x around inf 45.9%

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]

    if -4.3e-136 < y < 2.00000000000000002e78

    1. Initial program 93.5%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in z around inf 29.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{-136} \lor \neg \left(y \leq 2 \cdot 10^{+78}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 13: 28.9% accurate, 3.8× speedup?

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

\\
2 \cdot \left(z \cdot t\right)
\end{array}
Derivation
  1. Initial program 90.0%

    \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
  2. Taylor expanded in z around inf 24.1%

    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
  3. Final simplification24.1%

    \[\leadsto 2 \cdot \left(z \cdot t\right) \]

Developer target: 94.4% accurate, 1.0× speedup?

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

\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}

Reproduce

?
herbie shell --seed 2023196 
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
  :precision binary64

  :herbie-target
  (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))

  (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))