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

Percentage Accurate: 89.9% → 97.3%
Time: 19.1s
Alternatives: 18
Speedup: 0.6×

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 18 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: 89.9% 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: 97.3% 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 - c \cdot \left(i \cdot \frac{\mathsf{fma}\left(c, b, a\right)}{y}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (* b c))))
   (if (<= (- (+ (* x y) (* z t)) (* (* c t_1) i)) INFINITY)
     (* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
     (* 2.0 (* y (- x (* c (* i (/ (fma c b a) 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 * (i * (fma(c, b, a) / 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(c * Float64(i * Float64(fma(c, b, a) / 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[(c * N[(i * N[(N[(c * b + a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $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 - c \cdot \left(i \cdot \frac{\mathsf{fma}\left(c, b, a\right)}{y}\right)\right)\right)\\


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

    1. Initial program 95.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. Step-by-step derivation
      1. fma-define95.0%

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

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

      \[\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 z around 0 38.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 94.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(a + b \cdot c\right)\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\ \;\;\;\;2 \cdot \left(y \cdot \left(x - c \cdot \left(i \cdot \frac{\mathsf{fma}\left(c, b, a\right)}{y}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_1 \cdot i\right) \cdot 2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* c (+ a (* b c)))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+302)))
     (* 2.0 (* y (- x (* c (* i (/ (fma c b a) y))))))
     (* (- (+ (* x y) (* z t)) (* t_1 i)) 2.0))))
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));
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+302)) {
		tmp = 2.0 * (y * (x - (c * (i * (fma(c, b, a) / y)))));
	} else {
		tmp = (((x * y) + (z * t)) - (t_1 * i)) * 2.0;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(c * Float64(a + Float64(b * c)))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+302))
		tmp = Float64(2.0 * Float64(y * Float64(x - Float64(c * Float64(i * Float64(fma(c, b, a) / y))))));
	else
		tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_1 * i)) * 2.0);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+302]], $MachinePrecision]], N[(2.0 * N[(y * N[(x - N[(c * N[(i * N[(N[(c * b + a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot \left(a + b \cdot c\right)\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;2 \cdot \left(y \cdot \left(x - c \cdot \left(i \cdot \frac{\mathsf{fma}\left(c, b, a\right)}{y}\right)\right)\right)\\

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


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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(y \cdot \left(x - c \cdot \frac{i \cdot \left(\color{blue}{c \cdot b} + a\right)}{y}\right)\right) \]
      6. fma-undefine90.4%

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

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

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

    if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 5e302

    1. Initial program 98.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. Recombined 2 regimes into one program.
  4. Final simplification96.2%

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

Alternative 3: 93.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot c\\ t_2 := c \cdot t\_1\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\left(c \cdot \left(b \cdot \left(c \cdot i\right) + a \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+258}:\\ \;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t\_2 \cdot i\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t\_1 \cdot i\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)))
   (if (<= t_2 (- INFINITY))
     (* (* c (+ (* b (* c i)) (* a i))) -2.0)
     (if (<= t_2 5e+258)
       (* (- (+ (* x y) (* z t)) (* t_2 i)) 2.0)
       (* 2.0 (- (* x y) (* c (* t_1 i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (b * c);
	double t_2 = c * t_1;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = (c * ((b * (c * i)) + (a * i))) * -2.0;
	} else if (t_2 <= 5e+258) {
		tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
	} else {
		tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (b * c);
	double t_2 = c * t_1;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = (c * ((b * (c * i)) + (a * i))) * -2.0;
	} else if (t_2 <= 5e+258) {
		tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
	} else {
		tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (b * c)
	t_2 = c * t_1
	tmp = 0
	if t_2 <= -math.inf:
		tmp = (c * ((b * (c * i)) + (a * i))) * -2.0
	elif t_2 <= 5e+258:
		tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0
	else:
		tmp = 2.0 * ((x * y) - (c * (t_1 * i)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(b * c))
	t_2 = Float64(c * t_1)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(Float64(c * Float64(Float64(b * Float64(c * i)) + Float64(a * i))) * -2.0);
	elseif (t_2 <= 5e+258)
		tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_2 * i)) * 2.0);
	else
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(t_1 * i))));
	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;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = (c * ((b * (c * i)) + (a * i))) * -2.0;
	elseif (t_2 <= 5e+258)
		tmp = (((x * y) + (z * t)) - (t_2 * i)) * 2.0;
	else
		tmp = 2.0 * ((x * y) - (c * (t_1 * i)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(c * N[(N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[t$95$2, 5e+258], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * i), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 66.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 z around 0 81.5%

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

      \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
    5. Step-by-step derivation
      1. distribute-rgt-in81.5%

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(b \cdot \left(c \cdot i\right) + a \cdot i\right)}\right) \]
    6. Applied egg-rr86.4%

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

    if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 5e258

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

    if 5e258 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 78.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 z around 0 93.1%

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

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

Alternative 4: 37.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ t_3 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;a \leq -1.06 \cdot 10^{+142}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-182}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-261}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{-86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-45}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t)))
        (t_2 (* -2.0 (* i (* a c))))
        (t_3 (* (* x y) 2.0)))
   (if (<= a -1.06e+142)
     t_2
     (if (<= a -2.8e-182)
       t_1
       (if (<= a 1.9e-261)
         t_3
         (if (<= a 6.3e-86)
           t_1
           (if (<= a 5.4e-45) t_3 (if (<= a 4.3e+80) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (i * (a * c));
	double t_3 = (x * y) * 2.0;
	double tmp;
	if (a <= -1.06e+142) {
		tmp = t_2;
	} else if (a <= -2.8e-182) {
		tmp = t_1;
	} else if (a <= 1.9e-261) {
		tmp = t_3;
	} else if (a <= 6.3e-86) {
		tmp = t_1;
	} else if (a <= 5.4e-45) {
		tmp = t_3;
	} else if (a <= 4.3e+80) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (-2.0d0) * (i * (a * c))
    t_3 = (x * y) * 2.0d0
    if (a <= (-1.06d+142)) then
        tmp = t_2
    else if (a <= (-2.8d-182)) then
        tmp = t_1
    else if (a <= 1.9d-261) then
        tmp = t_3
    else if (a <= 6.3d-86) then
        tmp = t_1
    else if (a <= 5.4d-45) then
        tmp = t_3
    else if (a <= 4.3d+80) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (i * (a * c));
	double t_3 = (x * y) * 2.0;
	double tmp;
	if (a <= -1.06e+142) {
		tmp = t_2;
	} else if (a <= -2.8e-182) {
		tmp = t_1;
	} else if (a <= 1.9e-261) {
		tmp = t_3;
	} else if (a <= 6.3e-86) {
		tmp = t_1;
	} else if (a <= 5.4e-45) {
		tmp = t_3;
	} else if (a <= 4.3e+80) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = -2.0 * (i * (a * c))
	t_3 = (x * y) * 2.0
	tmp = 0
	if a <= -1.06e+142:
		tmp = t_2
	elif a <= -2.8e-182:
		tmp = t_1
	elif a <= 1.9e-261:
		tmp = t_3
	elif a <= 6.3e-86:
		tmp = t_1
	elif a <= 5.4e-45:
		tmp = t_3
	elif a <= 4.3e+80:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(-2.0 * Float64(i * Float64(a * c)))
	t_3 = Float64(Float64(x * y) * 2.0)
	tmp = 0.0
	if (a <= -1.06e+142)
		tmp = t_2;
	elseif (a <= -2.8e-182)
		tmp = t_1;
	elseif (a <= 1.9e-261)
		tmp = t_3;
	elseif (a <= 6.3e-86)
		tmp = t_1;
	elseif (a <= 5.4e-45)
		tmp = t_3;
	elseif (a <= 4.3e+80)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = -2.0 * (i * (a * c));
	t_3 = (x * y) * 2.0;
	tmp = 0.0;
	if (a <= -1.06e+142)
		tmp = t_2;
	elseif (a <= -2.8e-182)
		tmp = t_1;
	elseif (a <= 1.9e-261)
		tmp = t_3;
	elseif (a <= 6.3e-86)
		tmp = t_1;
	elseif (a <= 5.4e-45)
		tmp = t_3;
	elseif (a <= 4.3e+80)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[a, -1.06e+142], t$95$2, If[LessEqual[a, -2.8e-182], t$95$1, If[LessEqual[a, 1.9e-261], t$95$3, If[LessEqual[a, 6.3e-86], t$95$1, If[LessEqual[a, 5.4e-45], t$95$3, If[LessEqual[a, 4.3e+80], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-261}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 6.3 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-45}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.06e142 or 4.30000000000000004e80 < a

    1. Initial program 91.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 z around 0 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e142 < a < -2.79999999999999993e-182 or 1.9e-261 < a < 6.2999999999999999e-86 or 5.3999999999999997e-45 < a < 4.30000000000000004e80

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

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

    if -2.79999999999999993e-182 < a < 1.9e-261 or 6.2999999999999999e-86 < a < 5.3999999999999997e-45

    1. Initial program 86.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 x around inf 44.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.06 \cdot 10^{+142}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-182}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-261}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{-86}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-45}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+80}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 37.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -3.5 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 7.2 \cdot 10^{-264}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 5.5 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.99999999999999957e139

    1. Initial program 89.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 a around inf 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999957e139 < a < -3.49999999999999983e-182 or 7.2000000000000004e-264 < a < 8.19999999999999959e-86 or 5.50000000000000031e-49 < a < 1.1999999999999999e78

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

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

    if -3.49999999999999983e-182 < a < 7.2000000000000004e-264 or 8.19999999999999959e-86 < a < 5.50000000000000031e-49

    1. Initial program 86.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 x around inf 44.7%

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

    if 1.1999999999999999e78 < a

    1. Initial program 92.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 z around 0 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+139}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-182}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-264}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-86}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-49}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+78}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 59.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ t_2 := 2 \cdot \left(z \cdot \left(t - \left(c \cdot i\right) \cdot \frac{a}{z}\right)\right)\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{+29}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-272}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-170}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;z \leq 0.156:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (- (* x y) (* a (* c i)))))
        (t_2 (* 2.0 (* z (- t (* (* c i) (/ a z)))))))
   (if (<= z -6.5e+29)
     t_2
     (if (<= z -1.6e-272)
       t_1
       (if (<= z 7.8e-170)
         (* -2.0 (* c (* (+ a (* b c)) i)))
         (if (<= z 0.156) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - (a * (c * i)));
	double t_2 = 2.0 * (z * (t - ((c * i) * (a / z))));
	double tmp;
	if (z <= -6.5e+29) {
		tmp = t_2;
	} else if (z <= -1.6e-272) {
		tmp = t_1;
	} else if (z <= 7.8e-170) {
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	} else if (z <= 0.156) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) - (a * (c * i)))
    t_2 = 2.0d0 * (z * (t - ((c * i) * (a / z))))
    if (z <= (-6.5d+29)) then
        tmp = t_2
    else if (z <= (-1.6d-272)) then
        tmp = t_1
    else if (z <= 7.8d-170) then
        tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
    else if (z <= 0.156d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - (a * (c * i)));
	double t_2 = 2.0 * (z * (t - ((c * i) * (a / z))));
	double tmp;
	if (z <= -6.5e+29) {
		tmp = t_2;
	} else if (z <= -1.6e-272) {
		tmp = t_1;
	} else if (z <= 7.8e-170) {
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	} else if (z <= 0.156) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) - (a * (c * i)))
	t_2 = 2.0 * (z * (t - ((c * i) * (a / z))))
	tmp = 0
	if z <= -6.5e+29:
		tmp = t_2
	elif z <= -1.6e-272:
		tmp = t_1
	elif z <= 7.8e-170:
		tmp = -2.0 * (c * ((a + (b * c)) * i))
	elif z <= 0.156:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i))))
	t_2 = Float64(2.0 * Float64(z * Float64(t - Float64(Float64(c * i) * Float64(a / z)))))
	tmp = 0.0
	if (z <= -6.5e+29)
		tmp = t_2;
	elseif (z <= -1.6e-272)
		tmp = t_1;
	elseif (z <= 7.8e-170)
		tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)));
	elseif (z <= 0.156)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) - (a * (c * i)));
	t_2 = 2.0 * (z * (t - ((c * i) * (a / z))));
	tmp = 0.0;
	if (z <= -6.5e+29)
		tmp = t_2;
	elseif (z <= -1.6e-272)
		tmp = t_1;
	elseif (z <= 7.8e-170)
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	elseif (z <= 0.156)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * N[(t - N[(N[(c * i), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+29], t$95$2, If[LessEqual[z, -1.6e-272], t$95$1, If[LessEqual[z, 7.8e-170], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.156], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{-170}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

\mathbf{elif}\;z \leq 0.156:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.49999999999999971e29 or 0.156 < z

    1. Initial program 91.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 x around 0 80.6%

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(-a \cdot \left(c \cdot i\right)\right)\right)} \]
      3. sub-neg71.4%

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

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

        \[\leadsto 2 \cdot \left(t \cdot z - \color{blue}{c \cdot \left(i \cdot a\right)}\right) \]
    6. Simplified66.9%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z - c \cdot \left(i \cdot a\right)\right)} \]
    7. Taylor expanded in z around inf 73.1%

      \[\leadsto 2 \cdot \color{blue}{\left(z \cdot \left(t + -1 \cdot \frac{a \cdot \left(c \cdot i\right)}{z}\right)\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg73.1%

        \[\leadsto 2 \cdot \left(z \cdot \left(t + \color{blue}{\left(-\frac{a \cdot \left(c \cdot i\right)}{z}\right)}\right)\right) \]
      2. unsub-neg73.1%

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

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

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

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

    if -6.49999999999999971e29 < z < -1.6e-272 or 7.80000000000000042e-170 < z < 0.156

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(-a \cdot \left(c \cdot i\right)\right)\right)} \]
      3. sub-neg65.4%

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

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

    if -1.6e-272 < z < 7.80000000000000042e-170

    1. Initial program 79.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 z around 0 76.5%

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

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

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

Alternative 7: 58.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;x \cdot y \leq -4.3 \cdot 10^{+102}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 8.5 \cdot 10^{+51}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 2.4 \cdot 10^{+240}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\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) -4.3e+102)
     t_1
     (if (<= (* x y) 8.5e+51)
       (* 2.0 (- (* z t) (* c (* a i))))
       (if (<= (* x y) 2.4e+240) (* -2.0 (* c (* (+ a (* b c)) i))) 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) <= -4.3e+102) {
		tmp = t_1;
	} else if ((x * y) <= 8.5e+51) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if ((x * y) <= 2.4e+240) {
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	} 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) <= (-4.3d+102)) then
        tmp = t_1
    else if ((x * y) <= 8.5d+51) then
        tmp = 2.0d0 * ((z * t) - (c * (a * i)))
    else if ((x * y) <= 2.4d+240) then
        tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.3e+102) {
		tmp = t_1;
	} else if ((x * y) <= 8.5e+51) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if ((x * y) <= 2.4e+240) {
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	} 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) <= -4.3e+102:
		tmp = t_1
	elif (x * y) <= 8.5e+51:
		tmp = 2.0 * ((z * t) - (c * (a * i)))
	elif (x * y) <= 2.4e+240:
		tmp = -2.0 * (c * ((a + (b * c)) * i))
	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) <= -4.3e+102)
		tmp = t_1;
	elseif (Float64(x * y) <= 8.5e+51)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))));
	elseif (Float64(x * y) <= 2.4e+240)
		tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)));
	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) <= -4.3e+102)
		tmp = t_1;
	elseif ((x * y) <= 8.5e+51)
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	elseif ((x * y) <= 2.4e+240)
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	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], -4.3e+102], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 8.5e+51], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.4e+240], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $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 -4.3 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.3000000000000001e102 or 2.3999999999999999e240 < (*.f64 x y)

    1. Initial program 79.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 x around inf 71.5%

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

    if -4.3000000000000001e102 < (*.f64 x y) < 8.4999999999999999e51

    1. Initial program 94.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 x around 0 85.5%

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(-a \cdot \left(c \cdot i\right)\right)\right)} \]
      3. sub-neg72.4%

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

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

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

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

    if 8.4999999999999999e51 < (*.f64 x y) < 2.3999999999999999e240

    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 0 85.5%

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

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

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

Alternative 8: 55.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{if}\;c \leq -5.5 \cdot 10^{-19}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq -9.5 \cdot 10^{-132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -2.05 \cdot 10^{-221}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 9.2 \cdot 10^{+107}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t))) (t_2 (* -2.0 (* c (* (+ a (* b c)) i)))))
   (if (<= c -5.5e-19)
     t_2
     (if (<= c -9.5e-132)
       t_1
       (if (<= c -2.05e-221) (* (* x y) 2.0) (if (<= c 9.2e+107) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -5.5e-19) {
		tmp = t_2;
	} else if (c <= -9.5e-132) {
		tmp = t_1;
	} else if (c <= -2.05e-221) {
		tmp = (x * y) * 2.0;
	} else if (c <= 9.2e+107) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (-2.0d0) * (c * ((a + (b * c)) * i))
    if (c <= (-5.5d-19)) then
        tmp = t_2
    else if (c <= (-9.5d-132)) then
        tmp = t_1
    else if (c <= (-2.05d-221)) then
        tmp = (x * y) * 2.0d0
    else if (c <= 9.2d+107) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -5.5e-19) {
		tmp = t_2;
	} else if (c <= -9.5e-132) {
		tmp = t_1;
	} else if (c <= -2.05e-221) {
		tmp = (x * y) * 2.0;
	} else if (c <= 9.2e+107) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = -2.0 * (c * ((a + (b * c)) * i))
	tmp = 0
	if c <= -5.5e-19:
		tmp = t_2
	elif c <= -9.5e-132:
		tmp = t_1
	elif c <= -2.05e-221:
		tmp = (x * y) * 2.0
	elif c <= 9.2e+107:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)))
	tmp = 0.0
	if (c <= -5.5e-19)
		tmp = t_2;
	elseif (c <= -9.5e-132)
		tmp = t_1;
	elseif (c <= -2.05e-221)
		tmp = Float64(Float64(x * y) * 2.0);
	elseif (c <= 9.2e+107)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = -2.0 * (c * ((a + (b * c)) * i));
	tmp = 0.0;
	if (c <= -5.5e-19)
		tmp = t_2;
	elseif (c <= -9.5e-132)
		tmp = t_1;
	elseif (c <= -2.05e-221)
		tmp = (x * y) * 2.0;
	elseif (c <= 9.2e+107)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5.5e-19], t$95$2, If[LessEqual[c, -9.5e-132], t$95$1, If[LessEqual[c, -2.05e-221], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 9.2e+107], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -9.5 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -2.05 \cdot 10^{-221}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

\mathbf{elif}\;c \leq 9.2 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -5.4999999999999996e-19 or 9.2000000000000001e107 < c

    1. Initial program 78.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 z around 0 83.9%

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

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

    if -5.4999999999999996e-19 < c < -9.49999999999999987e-132 or -2.04999999999999991e-221 < c < 9.2000000000000001e107

    1. Initial program 97.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 inf 50.7%

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

    if -9.49999999999999987e-132 < c < -2.04999999999999991e-221

    1. Initial program 96.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 x around inf 58.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -5.5 \cdot 10^{-19}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -9.5 \cdot 10^{-132}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -2.05 \cdot 10^{-221}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 9.2 \cdot 10^{+107}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 57.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{+76}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-275}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-172}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;z \leq 0.13:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (- (* x y) (* a (* c i)))))
        (t_2 (* 2.0 (- (* z t) (* c (* a i))))))
   (if (<= z -1.02e+76)
     t_2
     (if (<= z -4.8e-275)
       t_1
       (if (<= z 3.2e-172)
         (* -2.0 (* c (* (+ a (* b c)) i)))
         (if (<= z 0.13) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - (a * (c * i)));
	double t_2 = 2.0 * ((z * t) - (c * (a * i)));
	double tmp;
	if (z <= -1.02e+76) {
		tmp = t_2;
	} else if (z <= -4.8e-275) {
		tmp = t_1;
	} else if (z <= 3.2e-172) {
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	} else if (z <= 0.13) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) - (a * (c * i)))
    t_2 = 2.0d0 * ((z * t) - (c * (a * i)))
    if (z <= (-1.02d+76)) then
        tmp = t_2
    else if (z <= (-4.8d-275)) then
        tmp = t_1
    else if (z <= 3.2d-172) then
        tmp = (-2.0d0) * (c * ((a + (b * c)) * i))
    else if (z <= 0.13d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - (a * (c * i)));
	double t_2 = 2.0 * ((z * t) - (c * (a * i)));
	double tmp;
	if (z <= -1.02e+76) {
		tmp = t_2;
	} else if (z <= -4.8e-275) {
		tmp = t_1;
	} else if (z <= 3.2e-172) {
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	} else if (z <= 0.13) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) - (a * (c * i)))
	t_2 = 2.0 * ((z * t) - (c * (a * i)))
	tmp = 0
	if z <= -1.02e+76:
		tmp = t_2
	elif z <= -4.8e-275:
		tmp = t_1
	elif z <= 3.2e-172:
		tmp = -2.0 * (c * ((a + (b * c)) * i))
	elif z <= 0.13:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i))))
	t_2 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))))
	tmp = 0.0
	if (z <= -1.02e+76)
		tmp = t_2;
	elseif (z <= -4.8e-275)
		tmp = t_1;
	elseif (z <= 3.2e-172)
		tmp = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)));
	elseif (z <= 0.13)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) - (a * (c * i)));
	t_2 = 2.0 * ((z * t) - (c * (a * i)));
	tmp = 0.0;
	if (z <= -1.02e+76)
		tmp = t_2;
	elseif (z <= -4.8e-275)
		tmp = t_1;
	elseif (z <= 3.2e-172)
		tmp = -2.0 * (c * ((a + (b * c)) * i));
	elseif (z <= 0.13)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+76], t$95$2, If[LessEqual[z, -4.8e-275], t$95$1, If[LessEqual[z, 3.2e-172], N[(-2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.13], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-172}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

\mathbf{elif}\;z \leq 0.13:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.02000000000000007e76 or 0.13 < z

    1. Initial program 91.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 x around 0 82.4%

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(-a \cdot \left(c \cdot i\right)\right)\right)} \]
      3. sub-neg73.3%

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

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

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

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

    if -1.02000000000000007e76 < z < -4.79999999999999981e-275 or 3.2000000000000001e-172 < z < 0.13

    1. Initial program 92.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 z around 0 80.0%

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

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

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

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

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

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

    if -4.79999999999999981e-275 < z < 3.2000000000000001e-172

    1. Initial program 78.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 z around 0 78.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+76}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-275}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-172}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;z \leq 0.13:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 95.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -5.0000000000000002e70 or 2e6 < i

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

    if -5.0000000000000002e70 < i < 2e6

    1. Initial program 87.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 c around 0 96.6%

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

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

Alternative 11: 48.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{if}\;c \leq -3.2 \cdot 10^{-7}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq -2.7 \cdot 10^{-131}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -1.8 \cdot 10^{-221}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{+108}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t))) (t_2 (* -2.0 (* c (* (* b c) i)))))
   (if (<= c -3.2e-7)
     t_2
     (if (<= c -2.7e-131)
       t_1
       (if (<= c -1.8e-221) (* (* x y) 2.0) (if (<= c 1.35e+108) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (c * ((b * c) * i));
	double tmp;
	if (c <= -3.2e-7) {
		tmp = t_2;
	} else if (c <= -2.7e-131) {
		tmp = t_1;
	} else if (c <= -1.8e-221) {
		tmp = (x * y) * 2.0;
	} else if (c <= 1.35e+108) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (-2.0d0) * (c * ((b * c) * i))
    if (c <= (-3.2d-7)) then
        tmp = t_2
    else if (c <= (-2.7d-131)) then
        tmp = t_1
    else if (c <= (-1.8d-221)) then
        tmp = (x * y) * 2.0d0
    else if (c <= 1.35d+108) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (c * ((b * c) * i));
	double tmp;
	if (c <= -3.2e-7) {
		tmp = t_2;
	} else if (c <= -2.7e-131) {
		tmp = t_1;
	} else if (c <= -1.8e-221) {
		tmp = (x * y) * 2.0;
	} else if (c <= 1.35e+108) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = -2.0 * (c * ((b * c) * i))
	tmp = 0
	if c <= -3.2e-7:
		tmp = t_2
	elif c <= -2.7e-131:
		tmp = t_1
	elif c <= -1.8e-221:
		tmp = (x * y) * 2.0
	elif c <= 1.35e+108:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(-2.0 * Float64(c * Float64(Float64(b * c) * i)))
	tmp = 0.0
	if (c <= -3.2e-7)
		tmp = t_2;
	elseif (c <= -2.7e-131)
		tmp = t_1;
	elseif (c <= -1.8e-221)
		tmp = Float64(Float64(x * y) * 2.0);
	elseif (c <= 1.35e+108)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = -2.0 * (c * ((b * c) * i));
	tmp = 0.0;
	if (c <= -3.2e-7)
		tmp = t_2;
	elseif (c <= -2.7e-131)
		tmp = t_1;
	elseif (c <= -1.8e-221)
		tmp = (x * y) * 2.0;
	elseif (c <= 1.35e+108)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.2e-7], t$95$2, If[LessEqual[c, -2.7e-131], t$95$1, If[LessEqual[c, -1.8e-221], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 1.35e+108], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := -2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -3.2 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq -2.7 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -1.8 \cdot 10^{-221}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

\mathbf{elif}\;c \leq 1.35 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.2000000000000001e-7 or 1.35e108 < c

    1. Initial program 78.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 z around 0 83.6%

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

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

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

    if -3.2000000000000001e-7 < c < -2.70000000000000021e-131 or -1.80000000000000006e-221 < c < 1.35e108

    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 z around inf 50.0%

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

    if -2.70000000000000021e-131 < c < -1.80000000000000006e-221

    1. Initial program 96.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 x around inf 58.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.2 \cdot 10^{-7}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.7 \cdot 10^{-131}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -1.8 \cdot 10^{-221}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{+108}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 78.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.7 \cdot 10^{+116} \lor \neg \left(x \cdot y \leq 4.4 \cdot 10^{+181}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -2.7e116 or 4.4000000000000002e181 < (*.f64 x y)

    1. Initial program 80.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 z around 0 78.3%

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

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

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

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

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

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

    if -2.7e116 < (*.f64 x y) < 4.4000000000000002e181

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.7 \cdot 10^{+116} \lor \neg \left(x \cdot y \leq 4.4 \cdot 10^{+181}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \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 13: 80.2% 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 -4.8 \cdot 10^{+102}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\ \mathbf{elif}\;x \cdot y \leq 2.25 \cdot 10^{+181}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\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 (<= (* x y) -4.8e+102)
     (* 2.0 (- (* x y) t_1))
     (if (<= (* x y) 2.25e+181)
       (* 2.0 (- (* z t) t_1))
       (* 2.0 (- (* x y) (* a (* c i))))))))
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) <= -4.8e+102) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if ((x * y) <= 2.25e+181) {
		tmp = 2.0 * ((z * t) - t_1);
	} else {
		tmp = 2.0 * ((x * y) - (a * (c * 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) :: t_1
    real(8) :: tmp
    t_1 = c * ((a + (b * c)) * i)
    if ((x * y) <= (-4.8d+102)) then
        tmp = 2.0d0 * ((x * y) - t_1)
    else if ((x * y) <= 2.25d+181) then
        tmp = 2.0d0 * ((z * t) - t_1)
    else
        tmp = 2.0d0 * ((x * y) - (a * (c * 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 t_1 = c * ((a + (b * c)) * i);
	double tmp;
	if ((x * y) <= -4.8e+102) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if ((x * y) <= 2.25e+181) {
		tmp = 2.0 * ((z * t) - t_1);
	} else {
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = c * ((a + (b * c)) * i)
	tmp = 0
	if (x * y) <= -4.8e+102:
		tmp = 2.0 * ((x * y) - t_1)
	elif (x * y) <= 2.25e+181:
		tmp = 2.0 * ((z * t) - t_1)
	else:
		tmp = 2.0 * ((x * y) - (a * (c * i)))
	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) <= -4.8e+102)
		tmp = Float64(2.0 * Float64(Float64(x * y) - t_1));
	elseif (Float64(x * y) <= 2.25e+181)
		tmp = Float64(2.0 * Float64(Float64(z * t) - t_1));
	else
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i))));
	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) <= -4.8e+102)
		tmp = 2.0 * ((x * y) - t_1);
	elseif ((x * y) <= 2.25e+181)
		tmp = 2.0 * ((z * t) - t_1);
	else
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	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[LessEqual[N[(x * y), $MachinePrecision], -4.8e+102], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.25e+181], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $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 -4.8 \cdot 10^{+102}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.79999999999999989e102

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

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

    if -4.79999999999999989e102 < (*.f64 x y) < 2.25e181

    1. Initial program 93.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 x around 0 84.9%

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

    if 2.25e181 < (*.f64 x y)

    1. Initial program 70.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 z around 0 75.3%

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(a \cdot \left(c \cdot i\right)\right) + x \cdot y\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg90.0%

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

        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(-a \cdot \left(c \cdot i\right)\right)\right)} \]
      3. sub-neg90.0%

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

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

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

Alternative 14: 60.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+166}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.8000000000000002e-60 or 3.4e166 < y

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(-a \cdot \left(c \cdot i\right)\right)\right)} \]
      3. sub-neg68.1%

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

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

    if -2.8000000000000002e-60 < y < 1.99999999999999997e-261

    1. Initial program 94.4%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(a \cdot \left(c \cdot i\right)\right) + t \cdot z\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg73.6%

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

        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(-a \cdot \left(c \cdot i\right)\right)\right)} \]
      3. sub-neg73.6%

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

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

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

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

    if 1.99999999999999997e-261 < y < 3.4e166

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

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

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

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

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

Alternative 15: 84.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+82}:\\
\;\;\;\;2 \cdot \left(t\_1 - c \cdot \left(b \cdot \left(c \cdot i\right)\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}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.69999999999999964e47

    1. Initial program 93.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 86.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. *-commutative86.1%

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

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

    if -4.69999999999999964e47 < a < 1.69999999999999997e82

    1. Initial program 88.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 c around 0 94.7%

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

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

    if 1.69999999999999997e82 < a

    1. Initial program 91.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 x around 0 87.7%

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

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

Alternative 16: 87.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\ \mathbf{if}\;c \leq -4.8 \cdot 10^{-18}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\ \mathbf{elif}\;c \leq 62:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\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 (<= c -4.8e-18)
     (* 2.0 (- (* x y) t_1))
     (if (<= c 62.0)
       (* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
       (* 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 (c <= -4.8e-18) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if (c <= 62.0) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	} 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 (c <= (-4.8d-18)) then
        tmp = 2.0d0 * ((x * y) - t_1)
    else if (c <= 62.0d0) then
        tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
    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 (c <= -4.8e-18) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if (c <= 62.0) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	} 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 c <= -4.8e-18:
		tmp = 2.0 * ((x * y) - t_1)
	elif c <= 62.0:
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)))
	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 (c <= -4.8e-18)
		tmp = Float64(2.0 * Float64(Float64(x * y) - t_1));
	elseif (c <= 62.0)
		tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c))));
	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 (c <= -4.8e-18)
		tmp = 2.0 * ((x * y) - t_1);
	elseif (c <= 62.0)
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	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[LessEqual[c, -4.8e-18], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 62.0], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $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}\;c \leq -4.8 \cdot 10^{-18}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4.79999999999999988e-18

    1. Initial program 73.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 z around 0 84.9%

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

    if -4.79999999999999988e-18 < c < 62

    1. Initial program 98.6%

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

      \[\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. *-commutative95.5%

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

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

    if 62 < c

    1. Initial program 86.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 x around 0 85.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.8 \cdot 10^{-18}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 62:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\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 17: 44.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -3.4 \cdot 10^{+102} \lor \neg \left(x \cdot y \leq 7 \cdot 10^{+70}\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) -3.4e+102) (not (<= (* x y) 7e+70)))
   (* (* 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) <= -3.4e+102) || !((x * y) <= 7e+70)) {
		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) <= (-3.4d+102)) .or. (.not. ((x * y) <= 7d+70))) 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) <= -3.4e+102) || !((x * y) <= 7e+70)) {
		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) <= -3.4e+102) or not ((x * y) <= 7e+70):
		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) <= -3.4e+102) || !(Float64(x * y) <= 7e+70))
		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) <= -3.4e+102) || ~(((x * y) <= 7e+70)))
		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], -3.4e+102], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7e+70]], $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 -3.4 \cdot 10^{+102} \lor \neg \left(x \cdot y \leq 7 \cdot 10^{+70}\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) < -3.4e102 or 7.00000000000000005e70 < (*.f64 x y)

    1. Initial program 82.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 61.9%

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

    if -3.4e102 < (*.f64 x y) < 7.00000000000000005e70

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

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

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

Alternative 18: 29.6% 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.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 inf 34.7%

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

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

Developer target: 94.2% 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 2024067 
(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))))