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

Percentage Accurate: 90.2% → 96.7%
Time: 15.3s
Alternatives: 14
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 14 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.2% 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.7% 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(y \cdot \left(x - \frac{c \cdot \left(t\_1 \cdot i\right)}{y}\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 (* y (- x (/ (* c (* t_1 i)) y)))))))
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 * (y * (x - ((c * (t_1 * i)) / y)));
	}
	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(y * Float64(x - Float64(Float64(c * Float64(t_1 * i)) / y))));
	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[(y * N[(x - N[(N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $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(y \cdot \left(x - \frac{c \cdot \left(t\_1 \cdot i\right)}{y}\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 94.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. fma-define94.8%

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

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

      \[\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. Add Preprocessing

    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. Add Preprocessing
    3. Taylor expanded in y around inf 45.5%

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

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

    \[\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(y \cdot \left(x - \frac{c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)}{y}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 93.8% accurate, 0.4× 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:\\ \;\;\;\;2 \cdot \left(y \cdot \left(x - \frac{c \cdot \left(t\_1 \cdot i\right)}{y}\right)\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+257}:\\ \;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_2\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(\left(c \cdot i\right) \cdot \left(c + \frac{a}{b}\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 (* (* c t_1) i)))
   (if (<= t_2 (- INFINITY))
     (* 2.0 (* y (- x (/ (* c (* t_1 i)) y))))
     (if (<= t_2 2e+257)
       (* (- (+ (* x y) (* z t)) t_2) 2.0)
       (* 2.0 (- (* z t) (* b (* (* c i) (+ c (/ a b))))))))))
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)) {
		tmp = 2.0 * (y * (x - ((c * (t_1 * i)) / y)));
	} else if (t_2 <= 2e+257) {
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	} else {
		tmp = 2.0 * ((z * t) - (b * ((c * i) * (c + (a / b)))));
	}
	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) {
		tmp = 2.0 * (y * (x - ((c * (t_1 * i)) / y)));
	} else if (t_2 <= 2e+257) {
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	} else {
		tmp = 2.0 * ((z * t) - (b * ((c * i) * (c + (a / b)))));
	}
	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:
		tmp = 2.0 * (y * (x - ((c * (t_1 * i)) / y)))
	elif t_2 <= 2e+257:
		tmp = (((x * y) + (z * t)) - t_2) * 2.0
	else:
		tmp = 2.0 * ((z * t) - (b * ((c * i) * (c + (a / b)))))
	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))
		tmp = Float64(2.0 * Float64(y * Float64(x - Float64(Float64(c * Float64(t_1 * i)) / y))));
	elseif (t_2 <= 2e+257)
		tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2) * 2.0);
	else
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(b * Float64(Float64(c * i) * Float64(c + Float64(a / b))))));
	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)
		tmp = 2.0 * (y * (x - ((c * (t_1 * i)) / y)));
	elseif (t_2 <= 2e+257)
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	else
		tmp = 2.0 * ((z * t) - (b * ((c * i) * (c + (a / b)))));
	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[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(y * N[(x - N[(N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+257], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(b * N[(N[(c * i), $MachinePrecision] * N[(c + N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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:\\
\;\;\;\;2 \cdot \left(y \cdot \left(x - \frac{c \cdot \left(t\_1 \cdot i\right)}{y}\right)\right)\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+257}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_2\right) \cdot 2\\

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


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

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in y around inf 89.5%

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

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

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.00000000000000006e257

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

    if 2.00000000000000006e257 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 79.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. Step-by-step derivation
      1. fma-define81.7%

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define87.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. +-commutative87.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) \]
    6. Applied egg-rr87.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) \]
    7. Taylor expanded in c around 0 85.4%

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

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

        \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(b \cdot \color{blue}{\mathsf{fma}\left(c, i, \frac{a \cdot i}{b}\right)}\right)\right) \]
      2. associate-/l*87.6%

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

      \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \color{blue}{\left(b \cdot \mathsf{fma}\left(c, i, a \cdot \frac{i}{b}\right)\right)}\right) \]
    11. Taylor expanded in x around 0 81.3%

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

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

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \color{blue}{\mathsf{fma}\left(c, i, \frac{a \cdot i}{b}\right)}\right) \]
      3. associate-*r/83.6%

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \mathsf{fma}\left(c, i, \color{blue}{a \cdot \frac{i}{b}}\right)\right) \]
      4. fma-undefine79.4%

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \color{blue}{\left(c \cdot i + a \cdot \frac{i}{b}\right)}\right) \]
      5. *-commutative79.4%

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \left(\color{blue}{i \cdot c} + a \cdot \frac{i}{b}\right)\right) \]
      6. associate-*r/77.5%

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \left(i \cdot c + \color{blue}{\frac{a \cdot i}{b}}\right)\right) \]
      7. *-commutative77.5%

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \left(i \cdot c + \frac{\color{blue}{i \cdot a}}{b}\right)\right) \]
      8. associate-/l*81.5%

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \left(i \cdot c + \color{blue}{i \cdot \frac{a}{b}}\right)\right) \]
      9. distribute-lft-in87.7%

        \[\leadsto 2 \cdot \left(t \cdot z - \left(b \cdot c\right) \cdot \color{blue}{\left(i \cdot \left(c + \frac{a}{b}\right)\right)}\right) \]
      10. associate-*r*91.6%

        \[\leadsto 2 \cdot \left(t \cdot z - \color{blue}{b \cdot \left(c \cdot \left(i \cdot \left(c + \frac{a}{b}\right)\right)\right)}\right) \]
      11. associate-*r*91.6%

        \[\leadsto 2 \cdot \left(t \cdot z - b \cdot \color{blue}{\left(\left(c \cdot i\right) \cdot \left(c + \frac{a}{b}\right)\right)}\right) \]
      12. *-commutative91.6%

        \[\leadsto 2 \cdot \left(t \cdot z - b \cdot \left(\color{blue}{\left(i \cdot c\right)} \cdot \left(c + \frac{a}{b}\right)\right)\right) \]
    13. Simplified91.6%

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

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

Alternative 3: 96.7% 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(y \cdot \left(x - \frac{c \cdot \left(t\_1 \cdot i\right)}{y}\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 (* y (- x (/ (* c (* t_1 i)) y)))))))
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 * (y * (x - ((c * (t_1 * i)) / y)));
	}
	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 * (y * (x - ((c * (t_1 * i)) / y)));
	}
	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 * (y * (x - ((c * (t_1 * i)) / y)))
	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(y * Float64(x - Float64(Float64(c * Float64(t_1 * i)) / y))));
	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 * (y * (x - ((c * (t_1 * i)) / y)));
	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[(y * N[(x - N[(N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $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(y \cdot \left(x - \frac{c \cdot \left(t\_1 \cdot i\right)}{y}\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 94.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. fma-define94.8%

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define98.8%

        \[\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.8%

        \[\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. Applied egg-rr98.8%

      \[\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. Add Preprocessing
    3. Taylor expanded in y around inf 45.5%

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

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

    \[\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(y \cdot \left(x - \frac{c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)}{y}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 78.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{if}\;c \leq -2.4 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -1.75 \cdot 10^{-111}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(x \cdot \frac{y}{i} - a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -2.1 \cdot 10^{-132} \lor \neg \left(c \leq 3.2 \cdot 10^{-28}\right):\\ \;\;\;\;t\_1\\ \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
 (let* ((t_1 (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))))
   (if (<= c -2.4e-44)
     t_1
     (if (<= c -1.75e-111)
       (* 2.0 (* i (- (* x (/ y i)) (* a c))))
       (if (or (<= c -2.1e-132) (not (<= c 3.2e-28)))
         t_1
         (* (+ (* 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 t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	double tmp;
	if (c <= -2.4e-44) {
		tmp = t_1;
	} else if (c <= -1.75e-111) {
		tmp = 2.0 * (i * ((x * (y / i)) - (a * c)));
	} else if ((c <= -2.1e-132) || !(c <= 3.2e-28)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
    if (c <= (-2.4d-44)) then
        tmp = t_1
    else if (c <= (-1.75d-111)) then
        tmp = 2.0d0 * (i * ((x * (y / i)) - (a * c)))
    else if ((c <= (-2.1d-132)) .or. (.not. (c <= 3.2d-28))) then
        tmp = t_1
    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 t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	double tmp;
	if (c <= -2.4e-44) {
		tmp = t_1;
	} else if (c <= -1.75e-111) {
		tmp = 2.0 * (i * ((x * (y / i)) - (a * c)));
	} else if ((c <= -2.1e-132) || !(c <= 3.2e-28)) {
		tmp = t_1;
	} else {
		tmp = ((x * y) + (z * t)) * 2.0;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)))
	tmp = 0
	if c <= -2.4e-44:
		tmp = t_1
	elif c <= -1.75e-111:
		tmp = 2.0 * (i * ((x * (y / i)) - (a * c)))
	elif (c <= -2.1e-132) or not (c <= 3.2e-28):
		tmp = t_1
	else:
		tmp = ((x * y) + (z * t)) * 2.0
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i))))
	tmp = 0.0
	if (c <= -2.4e-44)
		tmp = t_1;
	elseif (c <= -1.75e-111)
		tmp = Float64(2.0 * Float64(i * Float64(Float64(x * Float64(y / i)) - Float64(a * c))));
	elseif ((c <= -2.1e-132) || !(c <= 3.2e-28))
		tmp = t_1;
	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)
	t_1 = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	tmp = 0.0;
	if (c <= -2.4e-44)
		tmp = t_1;
	elseif (c <= -1.75e-111)
		tmp = 2.0 * (i * ((x * (y / i)) - (a * c)));
	elseif ((c <= -2.1e-132) || ~((c <= 3.2e-28)))
		tmp = t_1;
	else
		tmp = ((x * y) + (z * t)) * 2.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.4e-44], t$95$1, If[LessEqual[c, -1.75e-111], N[(2.0 * N[(i * N[(N[(x * N[(y / i), $MachinePrecision]), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, -2.1e-132], N[Not[LessEqual[c, 3.2e-28]], $MachinePrecision]], t$95$1, N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -2.4 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -1.75 \cdot 10^{-111}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(x \cdot \frac{y}{i} - a \cdot c\right)\right)\\

\mathbf{elif}\;c \leq -2.1 \cdot 10^{-132} \lor \neg \left(c \leq 3.2 \cdot 10^{-28}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.40000000000000009e-44 or -1.75e-111 < c < -2.1000000000000001e-132 or 3.19999999999999982e-28 < c

    1. Initial program 84.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. Add Preprocessing
    3. Taylor expanded in x around 0 81.6%

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

    if -2.40000000000000009e-44 < c < -1.75e-111

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in a around inf 98.9%

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(i \cdot \left(\frac{x \cdot y}{i} - a \cdot c\right)\right)} \]
    10. Step-by-step derivation
      1. associate-/l*84.8%

        \[\leadsto 2 \cdot \left(i \cdot \left(\color{blue}{x \cdot \frac{y}{i}} - a \cdot c\right)\right) \]
    11. Simplified84.8%

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

    if -2.1000000000000001e-132 < c < 3.19999999999999982e-28

    1. Initial program 97.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. Add Preprocessing
    3. Taylor expanded in c around 0 83.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.4 \cdot 10^{-44}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1.75 \cdot 10^{-111}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(x \cdot \frac{y}{i} - a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -2.1 \cdot 10^{-132} \lor \neg \left(c \leq 3.2 \cdot 10^{-28}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+114} \lor \neg \left(x \cdot y \leq 500000\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1e114 or 5e5 < (*.f64 x y)

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in z around 0 82.8%

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

    if -1e114 < (*.f64 x y) < 5e5

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in x around 0 82.9%

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

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

Alternative 6: 43.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -6.8 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 2.4 \cdot 10^{-235}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

\mathbf{elif}\;x \cdot y \leq 2.4 \cdot 10^{+36}:\\
\;\;\;\;\left(c \cdot \left(a \cdot i\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -6.8000000000000003e111 or 2.39999999999999992e36 < (*.f64 x y)

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in x around inf 60.1%

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

    if -6.8000000000000003e111 < (*.f64 x y) < 2.40000000000000011e-235

    1. Initial program 94.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. Add Preprocessing
    3. Taylor expanded in z around inf 52.6%

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

    if 2.40000000000000011e-235 < (*.f64 x y) < 2.39999999999999992e36

    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. Step-by-step derivation
      1. fma-define92.2%

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define96.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. +-commutative96.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. Applied egg-rr96.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) \]
    7. Taylor expanded in c around 0 86.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(a \cdot i\right)}\right) \]
    13. Simplified37.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -6.8 \cdot 10^{+111}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq 2.4 \cdot 10^{-235}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 2.4 \cdot 10^{+36}:\\ \;\;\;\;\left(c \cdot \left(a \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 43.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot y\right) \cdot 2\\
\mathbf{if}\;x \cdot y \leq -1.9 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 1.12 \cdot 10^{-234}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -1.90000000000000004e112 or 9.99999999999999954e36 < (*.f64 x y)

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in x around inf 60.1%

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

    if -1.90000000000000004e112 < (*.f64 x y) < 1.11999999999999998e-234

    1. Initial program 94.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. Add Preprocessing
    3. Taylor expanded in z around inf 52.6%

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

    if 1.11999999999999998e-234 < (*.f64 x y) < 9.99999999999999954e36

    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. Step-by-step derivation
      1. fma-define92.2%

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define96.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. +-commutative96.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. Applied egg-rr96.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) \]
    7. Taylor expanded in c around 0 86.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.9 \cdot 10^{+112}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq 1.12 \cdot 10^{-234}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 10^{+37}:\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 62.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.15 \cdot 10^{+71} \lor \neg \left(x \cdot y \leq 1.75 \cdot 10^{+38}\right):\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.1500000000000001e71 or 1.75000000000000001e38 < (*.f64 x 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. Add Preprocessing
    3. Taylor expanded in c around 0 70.0%

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

    if -1.1500000000000001e71 < (*.f64 x y) < 1.75000000000000001e38

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.15 \cdot 10^{+71} \lor \neg \left(x \cdot y \leq 1.75 \cdot 10^{+38}\right):\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -3.4 \cdot 10^{+34} \lor \neg \left(c \leq 6 \cdot 10^{-18}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\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 -3.4e+34) (not (<= c 6e-18)))
   (* 2.0 (- (* x y) (* 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 <= -3.4e+34) || !(c <= 6e-18)) {
		tmp = 2.0 * ((x * y) - (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 <= (-3.4d+34)) .or. (.not. (c <= 6d-18))) then
        tmp = 2.0d0 * ((x * y) - (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 <= -3.4e+34) || !(c <= 6e-18)) {
		tmp = 2.0 * ((x * y) - (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 <= -3.4e+34) or not (c <= 6e-18):
		tmp = 2.0 * ((x * y) - (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 <= -3.4e+34) || !(c <= 6e-18))
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * 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 <= -3.4e+34) || ~((c <= 6e-18)))
		tmp = 2.0 * ((x * y) - (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, -3.4e+34], N[Not[LessEqual[c, 6e-18]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $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.4 \cdot 10^{+34} \lor \neg \left(c \leq 6 \cdot 10^{-18}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\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 < -3.3999999999999999e34 or 5.99999999999999966e-18 < c

    1. Initial program 81.9%

      \[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. Add Preprocessing
    3. Taylor expanded in z around 0 85.4%

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

    if -3.3999999999999999e34 < c < 5.99999999999999966e-18

    1. Initial program 97.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. Add Preprocessing
    3. Taylor expanded in a around inf 93.1%

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

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

      \[\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 simplification89.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.4 \cdot 10^{+34} \lor \neg \left(c \leq 6 \cdot 10^{-18}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\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} \]
  5. Add Preprocessing

Alternative 10: 74.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -2.5 \cdot 10^{+35} \lor \neg \left(c \leq 3.8 \cdot 10^{-16}\right):\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot \left(-2\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.5e+35) (not (<= c 3.8e-16)))
   (* (* c (* (+ a (* 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.5e+35) || !(c <= 3.8e-16)) {
		tmp = (c * ((a + (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.5d+35)) .or. (.not. (c <= 3.8d-16))) then
        tmp = (c * ((a + (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.5e+35) || !(c <= 3.8e-16)) {
		tmp = (c * ((a + (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.5e+35) or not (c <= 3.8e-16):
		tmp = (c * ((a + (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.5e+35) || !(c <= 3.8e-16))
		tmp = Float64(Float64(c * Float64(Float64(a + Float64(b * c)) * i)) * Float64(-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.5e+35) || ~((c <= 3.8e-16)))
		tmp = (c * ((a + (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.5e+35], N[Not[LessEqual[c, 3.8e-16]], $MachinePrecision]], N[(N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $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.5 \cdot 10^{+35} \lor \neg \left(c \leq 3.8 \cdot 10^{-16}\right):\\
\;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot \left(-2\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.50000000000000011e35 or 3.80000000000000012e-16 < c

    1. Initial program 81.9%

      \[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. Add Preprocessing
    3. Taylor expanded in i around inf 75.3%

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

    if -2.50000000000000011e35 < c < 3.80000000000000012e-16

    1. Initial program 97.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. Add Preprocessing
    3. Taylor expanded in c around 0 78.9%

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

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

Alternative 11: 74.0% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 89.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. Step-by-step derivation
      1. fma-define91.6%

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define93.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. +-commutative93.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) \]
    6. Applied egg-rr93.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) \]
    7. Taylor expanded in c around 0 89.3%

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

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

        \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(b \cdot \color{blue}{\mathsf{fma}\left(c, i, \frac{a \cdot i}{b}\right)}\right)\right) \]
      2. associate-/l*85.2%

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

      \[\leadsto 2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \color{blue}{\left(b \cdot \mathsf{fma}\left(c, i, a \cdot \frac{i}{b}\right)\right)}\right) \]
    11. Taylor expanded in i around inf 78.0%

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(b \cdot \left(c \cdot \left(i \cdot \left(c + \frac{a}{b}\right)\right)\right)\right)\right)} \]
    12. Step-by-step derivation
      1. mul-1-neg78.0%

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot c\right) \cdot \left(i \cdot \left(c + \frac{a}{b}\right)\right)}\right) \]
      3. distribute-lft-in70.9%

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

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

        \[\leadsto 2 \cdot \left(-\left(b \cdot c\right) \cdot \left(c \cdot i + \color{blue}{\frac{i \cdot a}{b}}\right)\right) \]
      6. *-commutative66.7%

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

        \[\leadsto 2 \cdot \left(-\left(b \cdot c\right) \cdot \left(c \cdot i + \color{blue}{a \cdot \frac{i}{b}}\right)\right) \]
      8. fma-undefine71.0%

        \[\leadsto 2 \cdot \left(-\left(b \cdot c\right) \cdot \color{blue}{\mathsf{fma}\left(c, i, a \cdot \frac{i}{b}\right)}\right) \]
      9. *-commutative71.0%

        \[\leadsto 2 \cdot \left(-\color{blue}{\mathsf{fma}\left(c, i, a \cdot \frac{i}{b}\right) \cdot \left(b \cdot c\right)}\right) \]
      10. distribute-rgt-neg-in71.0%

        \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{fma}\left(c, i, a \cdot \frac{i}{b}\right) \cdot \left(-b \cdot c\right)\right)} \]
      11. fma-undefine66.7%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(c \cdot i + a \cdot \frac{i}{b}\right)} \cdot \left(-b \cdot c\right)\right) \]
      12. *-commutative66.7%

        \[\leadsto 2 \cdot \left(\left(\color{blue}{i \cdot c} + a \cdot \frac{i}{b}\right) \cdot \left(-b \cdot c\right)\right) \]
      13. associate-*r/66.7%

        \[\leadsto 2 \cdot \left(\left(i \cdot c + \color{blue}{\frac{a \cdot i}{b}}\right) \cdot \left(-b \cdot c\right)\right) \]
      14. *-commutative66.7%

        \[\leadsto 2 \cdot \left(\left(i \cdot c + \frac{\color{blue}{i \cdot a}}{b}\right) \cdot \left(-b \cdot c\right)\right) \]
      15. associate-/l*70.9%

        \[\leadsto 2 \cdot \left(\left(i \cdot c + \color{blue}{i \cdot \frac{a}{b}}\right) \cdot \left(-b \cdot c\right)\right) \]
      16. distribute-lft-in79.4%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(i \cdot \left(c + \frac{a}{b}\right)\right)} \cdot \left(-b \cdot c\right)\right) \]
    13. Simplified79.4%

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

    if -2.24999999999999998e36 < c < 1.14999999999999995e-15

    1. Initial program 97.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. Add Preprocessing
    3. Taylor expanded in c around 0 78.9%

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

    if 1.14999999999999995e-15 < c

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in i around inf 72.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.25 \cdot 10^{+36}:\\ \;\;\;\;2 \cdot \left(\left(b \cdot c\right) \cdot \left(i \cdot \left(\frac{a}{-b} - c\right)\right)\right)\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-15}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot \left(-2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 44.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.3499999999999999e111 or 8.2e9 < (*.f64 x y)

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in x around inf 58.1%

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

    if -1.3499999999999999e111 < (*.f64 x y) < 8.2e9

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in z around inf 43.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.35 \cdot 10^{+111} \lor \neg \left(x \cdot y \leq 8200000000\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 56.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -6 \cdot 10^{+169} \lor \neg \left(i \leq 1.65 \cdot 10^{+121}\right):\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\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 (<= i -6e+169) (not (<= i 1.65e+121)))
   (* (* c i) (* a -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 ((i <= -6e+169) || !(i <= 1.65e+121)) {
		tmp = (c * i) * (a * -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 ((i <= (-6d+169)) .or. (.not. (i <= 1.65d+121))) then
        tmp = (c * i) * (a * (-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 ((i <= -6e+169) || !(i <= 1.65e+121)) {
		tmp = (c * i) * (a * -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 (i <= -6e+169) or not (i <= 1.65e+121):
		tmp = (c * i) * (a * -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 ((i <= -6e+169) || !(i <= 1.65e+121))
		tmp = Float64(Float64(c * i) * Float64(a * -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 ((i <= -6e+169) || ~((i <= 1.65e+121)))
		tmp = (c * i) * (a * -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[i, -6e+169], N[Not[LessEqual[i, 1.65e+121]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -6 \cdot 10^{+169} \lor \neg \left(i \leq 1.65 \cdot 10^{+121}\right):\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\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 i < -5.9999999999999999e169 or 1.6499999999999999e121 < i

    1. Initial program 92.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. Step-by-step derivation
      1. fma-define92.5%

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

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

      \[\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. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define93.9%

        \[\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. +-commutative93.9%

        \[\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. Applied egg-rr93.9%

      \[\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) \]
    7. Taylor expanded in c around 0 66.7%

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

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

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

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

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

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

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

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

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

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

    if -5.9999999999999999e169 < i < 1.6499999999999999e121

    1. Initial program 90.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. Add Preprocessing
    3. Taylor expanded in c around 0 67.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -6 \cdot 10^{+169} \lor \neg \left(i \leq 1.65 \cdot 10^{+121}\right):\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 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.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. Add Preprocessing
  3. Taylor expanded in z around inf 30.8%

    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
  4. Final simplification30.8%

    \[\leadsto 2 \cdot \left(z \cdot t\right) \]
  5. Add Preprocessing

Developer target: 93.9% 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 2024076 
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
  :precision binary64

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

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