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

Percentage Accurate: 89.5% → 96.0%
Time: 14.0s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 89.5% accurate, 1.0× speedup?

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

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

Alternative 1: 96.0% 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(x \cdot \left(y - a \cdot \left(i \cdot \frac{c}{x}\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 (* x (- y (* a (* i (/ c x)))))))))
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 * (x * (y - (a * (i * (c / x)))));
	}
	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(x * Float64(y - Float64(a * Float64(i * Float64(c / x))))));
	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[(x * N[(y - N[(a * N[(i * N[(c / x), $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(x \cdot \left(y - a \cdot \left(i \cdot \frac{c}{x}\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 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. Step-by-step derivation
      1. fma-define94.6%

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

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

      \[\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 a around inf 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 71.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(\left(b \cdot c\right) \cdot i\right)\\ t_2 := 2 \cdot \left(z \cdot t - t\_1\right)\\ t_3 := \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{if}\;c \leq -5.6 \cdot 10^{+122}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;c \leq -2 \cdot 10^{+51}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1700000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq -9.2 \cdot 10^{-23}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-22}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.05 \cdot 10^{+64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{+181}:\\ \;\;\;\;2 \cdot \left(x \cdot \left(y - a \cdot \left(i \cdot \frac{c}{x}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* c (* (* b c) i)))
        (t_2 (* 2.0 (- (* z t) t_1)))
        (t_3 (* (* c (* (+ a (* b c)) i)) -2.0)))
   (if (<= c -5.6e+122)
     t_3
     (if (<= c -2e+51)
       (* 2.0 (- (* x y) (* a (* c i))))
       (if (<= c -1700000000000.0)
         t_2
         (if (<= c -9.2e-23)
           (* 2.0 (- (* x y) t_1))
           (if (<= c 1.75e-22)
             (* (+ (* x y) (* z t)) 2.0)
             (if (<= c 1.05e+64)
               t_2
               (if (<= c 6.2e+181)
                 (* 2.0 (* x (- y (* a (* i (/ c x))))))
                 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = c * ((b * c) * i);
	double t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (c * ((a + (b * c)) * i)) * -2.0;
	double tmp;
	if (c <= -5.6e+122) {
		tmp = t_3;
	} else if (c <= -2e+51) {
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	} else if (c <= -1700000000000.0) {
		tmp = t_2;
	} else if (c <= -9.2e-23) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if (c <= 1.75e-22) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (c <= 1.05e+64) {
		tmp = t_2;
	} else if (c <= 6.2e+181) {
		tmp = 2.0 * (x * (y - (a * (i * (c / x)))));
	} else {
		tmp = t_3;
	}
	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 = c * ((b * c) * i)
    t_2 = 2.0d0 * ((z * t) - t_1)
    t_3 = (c * ((a + (b * c)) * i)) * (-2.0d0)
    if (c <= (-5.6d+122)) then
        tmp = t_3
    else if (c <= (-2d+51)) then
        tmp = 2.0d0 * ((x * y) - (a * (c * i)))
    else if (c <= (-1700000000000.0d0)) then
        tmp = t_2
    else if (c <= (-9.2d-23)) then
        tmp = 2.0d0 * ((x * y) - t_1)
    else if (c <= 1.75d-22) then
        tmp = ((x * y) + (z * t)) * 2.0d0
    else if (c <= 1.05d+64) then
        tmp = t_2
    else if (c <= 6.2d+181) then
        tmp = 2.0d0 * (x * (y - (a * (i * (c / x)))))
    else
        tmp = t_3
    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 * ((b * c) * i);
	double t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (c * ((a + (b * c)) * i)) * -2.0;
	double tmp;
	if (c <= -5.6e+122) {
		tmp = t_3;
	} else if (c <= -2e+51) {
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	} else if (c <= -1700000000000.0) {
		tmp = t_2;
	} else if (c <= -9.2e-23) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if (c <= 1.75e-22) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (c <= 1.05e+64) {
		tmp = t_2;
	} else if (c <= 6.2e+181) {
		tmp = 2.0 * (x * (y - (a * (i * (c / x)))));
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = c * ((b * c) * i)
	t_2 = 2.0 * ((z * t) - t_1)
	t_3 = (c * ((a + (b * c)) * i)) * -2.0
	tmp = 0
	if c <= -5.6e+122:
		tmp = t_3
	elif c <= -2e+51:
		tmp = 2.0 * ((x * y) - (a * (c * i)))
	elif c <= -1700000000000.0:
		tmp = t_2
	elif c <= -9.2e-23:
		tmp = 2.0 * ((x * y) - t_1)
	elif c <= 1.75e-22:
		tmp = ((x * y) + (z * t)) * 2.0
	elif c <= 1.05e+64:
		tmp = t_2
	elif c <= 6.2e+181:
		tmp = 2.0 * (x * (y - (a * (i * (c / x)))))
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(c * Float64(Float64(b * c) * i))
	t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1))
	t_3 = Float64(Float64(c * Float64(Float64(a + Float64(b * c)) * i)) * -2.0)
	tmp = 0.0
	if (c <= -5.6e+122)
		tmp = t_3;
	elseif (c <= -2e+51)
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i))));
	elseif (c <= -1700000000000.0)
		tmp = t_2;
	elseif (c <= -9.2e-23)
		tmp = Float64(2.0 * Float64(Float64(x * y) - t_1));
	elseif (c <= 1.75e-22)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0);
	elseif (c <= 1.05e+64)
		tmp = t_2;
	elseif (c <= 6.2e+181)
		tmp = Float64(2.0 * Float64(x * Float64(y - Float64(a * Float64(i * Float64(c / x))))));
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = c * ((b * c) * i);
	t_2 = 2.0 * ((z * t) - t_1);
	t_3 = (c * ((a + (b * c)) * i)) * -2.0;
	tmp = 0.0;
	if (c <= -5.6e+122)
		tmp = t_3;
	elseif (c <= -2e+51)
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	elseif (c <= -1700000000000.0)
		tmp = t_2;
	elseif (c <= -9.2e-23)
		tmp = 2.0 * ((x * y) - t_1);
	elseif (c <= 1.75e-22)
		tmp = ((x * y) + (z * t)) * 2.0;
	elseif (c <= 1.05e+64)
		tmp = t_2;
	elseif (c <= 6.2e+181)
		tmp = 2.0 * (x * (y - (a * (i * (c / x)))));
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -5.6e+122], t$95$3, If[LessEqual[c, -2e+51], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1700000000000.0], t$95$2, If[LessEqual[c, -9.2e-23], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.75e-22], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 1.05e+64], t$95$2, If[LessEqual[c, 6.2e+181], N[(2.0 * N[(x * N[(y - N[(a * N[(i * N[(c / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -1700000000000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq -9.2 \cdot 10^{-23}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\

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

\mathbf{elif}\;c \leq 1.05 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -5.5999999999999999e122 or 6.19999999999999978e181 < c

    1. Initial program 78.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 i around inf 87.0%

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

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

    if -5.5999999999999999e122 < c < -2e51

    1. Initial program 48.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 a around inf 54.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. *-commutative54.5%

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

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

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

    if -2e51 < c < -1.7e12 or 1.75000000000000003e-22 < c < 1.05e64

    1. Initial program 99.7%

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

      \[\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 81.7%

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

    if -1.7e12 < c < -9.2000000000000004e-23

    1. Initial program 90.0%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 80.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 a around 0 80.4%

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

    if -9.2000000000000004e-23 < c < 1.75000000000000003e-22

    1. Initial program 98.8%

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

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

    if 1.05e64 < c < 6.19999999999999978e181

    1. Initial program 96.2%

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

      \[\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. *-commutative81.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -5.6 \cdot 10^{+122}:\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -2 \cdot 10^{+51}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1700000000000:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -9.2 \cdot 10^{-23}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-22}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.05 \cdot 10^{+64}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{+181}:\\ \;\;\;\;2 \cdot \left(x \cdot \left(y - a \cdot \left(i \cdot \frac{c}{x}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 93.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+149}:\\
\;\;\;\;\left(t\_1 - t\_3 \cdot i\right) \cdot 2\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_1 - c \cdot \left(c \cdot \left(b \cdot i + \frac{a \cdot i}{c}\right)\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 72.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 90.8%

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

    if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 2.0000000000000001e149

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

    if 2.0000000000000001e149 < (*.f64 (+.f64 a (*.f64 b c)) c)

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

      \[\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 c around inf 91.0%

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

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

Alternative 4: 71.8% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -4.3999999999999998e95 or 1.24999999999999993e182 < c

    1. Initial program 74.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 i around inf 84.0%

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

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

    if -4.3999999999999998e95 < c < 1.00999999999999995e-19

    1. Initial program 95.6%

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

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

    if 1.00999999999999995e-19 < c < 2.5e64

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

      \[\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 80.8%

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

    if 2.5e64 < c < 1.24999999999999993e182

    1. Initial program 96.2%

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

      \[\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. *-commutative81.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 95.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot t\\ \mathbf{if}\;i \leq -8 \cdot 10^{-83} \lor \neg \left(i \leq 1.4 \cdot 10^{-47}\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(a \cdot i + b \cdot \left(c \cdot i\right)\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 -8e-83) (not (<= i 1.4e-47)))
     (* (- t_1 (* (* c (+ a (* b c))) i)) 2.0)
     (* 2.0 (- t_1 (* c (+ (* a i) (* 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 ((i <= -8e-83) || !(i <= 1.4e-47)) {
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
	} else {
		tmp = 2.0 * (t_1 - (c * ((a * i) + (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 ((i <= (-8d-83)) .or. (.not. (i <= 1.4d-47))) then
        tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0d0
    else
        tmp = 2.0d0 * (t_1 - (c * ((a * i) + (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 ((i <= -8e-83) || !(i <= 1.4e-47)) {
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
	} else {
		tmp = 2.0 * (t_1 - (c * ((a * i) + (b * (c * i)))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * y) + (z * t)
	tmp = 0
	if (i <= -8e-83) or not (i <= 1.4e-47):
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0
	else:
		tmp = 2.0 * (t_1 - (c * ((a * i) + (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 ((i <= -8e-83) || !(i <= 1.4e-47))
		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(a * i) + Float64(b * Float64(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 ((i <= -8e-83) || ~((i <= 1.4e-47)))
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
	else
		tmp = 2.0 * (t_1 - (c * ((a * i) + (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[Or[LessEqual[i, -8e-83], N[Not[LessEqual[i, 1.4e-47]], $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[(a * i), $MachinePrecision] + N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;i \leq -8 \cdot 10^{-83} \lor \neg \left(i \leq 1.4 \cdot 10^{-47}\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(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -8.0000000000000003e-83 or 1.39999999999999996e-47 < i

    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

    if -8.0000000000000003e-83 < i < 1.39999999999999996e-47

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -8 \cdot 10^{-83} \lor \neg \left(i \leq 1.4 \cdot 10^{-47}\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(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 90.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot y + z \cdot t\\ \mathbf{if}\;t\_1 \leq 10^{+290}:\\ \;\;\;\;\left(t\_1 - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot \left(t + x \cdot \frac{y}{z}\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 (<= t_1 1e+290)
     (* (- t_1 (* (* c (+ a (* b c))) i)) 2.0)
     (* 2.0 (* z (+ t (* x (/ y z))))))))
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 (t_1 <= 1e+290) {
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
	} else {
		tmp = 2.0 * (z * (t + (x * (y / z))));
	}
	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 (t_1 <= 1d+290) then
        tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0d0
    else
        tmp = 2.0d0 * (z * (t + (x * (y / z))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (x * y) + (z * t);
	double tmp;
	if (t_1 <= 1e+290) {
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
	} else {
		tmp = 2.0 * (z * (t + (x * (y / z))));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * y) + (z * t)
	tmp = 0
	if t_1 <= 1e+290:
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0
	else:
		tmp = 2.0 * (z * (t + (x * (y / z))))
	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 (t_1 <= 1e+290)
		tmp = Float64(Float64(t_1 - Float64(Float64(c * Float64(a + Float64(b * c))) * i)) * 2.0);
	else
		tmp = Float64(2.0 * Float64(z * Float64(t + Float64(x * Float64(y / z)))));
	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 (t_1 <= 1e+290)
		tmp = (t_1 - ((c * (a + (b * c))) * i)) * 2.0;
	else
		tmp = 2.0 * (z * (t + (x * (y / z))));
	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[t$95$1, 1e+290], 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[(z * N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (*.f64 x y) (*.f64 z t)) < 1.00000000000000006e290

    1. Initial program 92.5%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Add Preprocessing

    if 1.00000000000000006e290 < (+.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 72.1%

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

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + x \cdot y\right)} \]
    4. Taylor expanded in z around inf 90.7%

      \[\leadsto 2 \cdot \color{blue}{\left(z \cdot \left(t + \frac{x \cdot y}{z}\right)\right)} \]
    5. Step-by-step derivation
      1. associate-/l*93.0%

        \[\leadsto 2 \cdot \left(z \cdot \left(t + \color{blue}{x \cdot \frac{y}{z}}\right)\right) \]
    6. Simplified93.0%

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

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

Alternative 7: 79.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+47}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\

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

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


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

    1. Initial program 87.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 85.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 a around 0 83.5%

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

    if -1e47 < (*.f64 x y) < 5e128

    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 x around 0 85.6%

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

    if 5e128 < (*.f64 x y)

    1. Initial program 82.8%

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

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

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

Alternative 8: 80.5% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 87.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 85.7%

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

    if -1e47 < (*.f64 x y) < 5e128

    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 x around 0 85.6%

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

    if 5e128 < (*.f64 x y)

    1. Initial program 82.8%

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

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

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

Alternative 9: 86.2% 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 -6.6 \cdot 10^{+100}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\ \mathbf{elif}\;c \leq 1.18 \cdot 10^{-19}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - a \cdot \left(c \cdot i\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 -6.6e+100)
     (* 2.0 (- (* x y) t_1))
     (if (<= c 1.18e-19)
       (* 2.0 (- (+ (* x y) (* z t)) (* a (* c i))))
       (* 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 <= -6.6e+100) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if (c <= 1.18e-19) {
		tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
	} 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 <= (-6.6d+100)) then
        tmp = 2.0d0 * ((x * y) - t_1)
    else if (c <= 1.18d-19) then
        tmp = 2.0d0 * (((x * y) + (z * t)) - (a * (c * i)))
    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 <= -6.6e+100) {
		tmp = 2.0 * ((x * y) - t_1);
	} else if (c <= 1.18e-19) {
		tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
	} 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 <= -6.6e+100:
		tmp = 2.0 * ((x * y) - t_1)
	elif c <= 1.18e-19:
		tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)))
	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 <= -6.6e+100)
		tmp = Float64(2.0 * Float64(Float64(x * y) - t_1));
	elseif (c <= 1.18e-19)
		tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(a * Float64(c * i))));
	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 <= -6.6e+100)
		tmp = 2.0 * ((x * y) - t_1);
	elseif (c <= 1.18e-19)
		tmp = 2.0 * (((x * y) + (z * t)) - (a * (c * i)));
	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, -6.6e+100], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.18e-19], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(c * i), $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 -6.6 \cdot 10^{+100}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\

\mathbf{elif}\;c \leq 1.18 \cdot 10^{-19}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - a \cdot \left(c \cdot i\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 < -6.6000000000000002e100

    1. Initial program 73.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 86.8%

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

    if -6.6000000000000002e100 < c < 1.17999999999999993e-19

    1. Initial program 95.6%

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

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

    if 1.17999999999999993e-19 < c

    1. Initial program 87.1%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 86.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 simplification89.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -6.6 \cdot 10^{+100}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.18 \cdot 10^{-19}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - 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 10: 74.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -8.6e95 or 3.9e7 < c

    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 i around inf 77.9%

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

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

    if -8.6e95 < c < 3.9e7

    1. Initial program 95.6%

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

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

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

Alternative 11: 37.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+105}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.59999999999999994e-63 or 3.9999999999999998e105 < t

    1. Initial program 84.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 inf 50.0%

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

    if -1.59999999999999994e-63 < t < -6.59999999999999979e-202

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

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

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

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

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

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

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

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

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

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

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

    if -6.59999999999999979e-202 < t < 3.9999999999999998e105

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-63}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-202}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+105}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 56.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -5.3999999999999997e224 or 2.99999999999999984e108 < i

    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 58.3%

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999997e224 < i < 2.99999999999999984e108

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

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

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

Alternative 13: 38.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.18 \cdot 10^{-117} \lor \neg \left(t \leq 2.4 \cdot 10^{+105}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.18e-117 or 2.39999999999999975e105 < t

    1. Initial program 86.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 48.6%

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

    if -1.18e-117 < t < 2.39999999999999975e105

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

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

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

Alternative 14: 28.7% 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 89.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 inf 30.7%

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

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

Developer target: 93.9% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024078 
(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))))