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

Percentage Accurate: 90.3% → 93.4%
Time: 11.9s
Alternatives: 16
Speedup: 0.4×

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

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

Initial Program: 90.3% 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: 93.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1\right)\\

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


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

    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

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

    1. Initial program 81.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 c around 0 94.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) \]

    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 c around 0 6.3%

      \[\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 x around inf 43.8%

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

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

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

Alternative 2: 93.5% accurate, 0.1× speedup?

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

\\
\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) - c \cdot \left(i \cdot \mathsf{fma}\left(b, c, a\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot \left(y - \frac{c \cdot \left(b \cdot \left(c \cdot i\right) + a \cdot i\right)}{x}\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 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. Step-by-step derivation
      1. associate--l+93.6%

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)} \]
      7. fma-define93.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) \]
      8. *-commutative93.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - c \cdot \left(\mathsf{fma}\left(b, c, a\right) \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 c around 0 6.3%

      \[\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 x around inf 43.8%

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

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

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

Alternative 3: 94.6% accurate, 0.4× speedup?

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

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

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


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

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

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

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

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.00000000000000027e265

    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. Recombined 2 regimes into one program.
  4. Final simplification94.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq -\infty \lor \neg \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq 4 \cdot 10^{+265}\right):\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\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 4: 88.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(c \cdot t\_1\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+261} \lor \neg \left(t\_2 \leq 4 \cdot 10^{+265}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(t\_1 \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -9.9999999999999993e260 or 4.00000000000000027e265 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 70.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 88.4%

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

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

    if -9.9999999999999993e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.00000000000000027e265

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

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

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

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

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

Alternative 5: 83.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot c\\ t_2 := c \cdot \left(t\_1 \cdot i\right)\\ t_3 := \left(c \cdot t\_1\right) \cdot i\\ \mathbf{if}\;t\_3 \leq -2 \cdot 10^{-63}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t\_2\right)\\ \mathbf{elif}\;t\_3 \leq 10^{+128}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t\_2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (* b c))) (t_2 (* c (* t_1 i))) (t_3 (* (* c t_1) i)))
   (if (<= t_3 -2e-63)
     (* 2.0 (- (* x y) t_2))
     (if (<= t_3 1e+128)
       (* (+ (* x y) (* z t)) 2.0)
       (* 2.0 (- (* z t) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = a + (b * c);
	double t_2 = c * (t_1 * i);
	double t_3 = (c * t_1) * i;
	double tmp;
	if (t_3 <= -2e-63) {
		tmp = 2.0 * ((x * y) - t_2);
	} else if (t_3 <= 1e+128) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else {
		tmp = 2.0 * ((z * t) - 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 = a + (b * c)
    t_2 = c * (t_1 * i)
    t_3 = (c * t_1) * i
    if (t_3 <= (-2d-63)) then
        tmp = 2.0d0 * ((x * y) - t_2)
    else if (t_3 <= 1d+128) then
        tmp = ((x * y) + (z * t)) * 2.0d0
    else
        tmp = 2.0d0 * ((z * t) - 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 = a + (b * c);
	double t_2 = c * (t_1 * i);
	double t_3 = (c * t_1) * i;
	double tmp;
	if (t_3 <= -2e-63) {
		tmp = 2.0 * ((x * y) - t_2);
	} else if (t_3 <= 1e+128) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else {
		tmp = 2.0 * ((z * t) - t_2);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (b * c)
	t_2 = c * (t_1 * i)
	t_3 = (c * t_1) * i
	tmp = 0
	if t_3 <= -2e-63:
		tmp = 2.0 * ((x * y) - t_2)
	elif t_3 <= 1e+128:
		tmp = ((x * y) + (z * t)) * 2.0
	else:
		tmp = 2.0 * ((z * t) - t_2)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(b * c))
	t_2 = Float64(c * Float64(t_1 * i))
	t_3 = Float64(Float64(c * t_1) * i)
	tmp = 0.0
	if (t_3 <= -2e-63)
		tmp = Float64(2.0 * Float64(Float64(x * y) - t_2));
	elseif (t_3 <= 1e+128)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0);
	else
		tmp = Float64(2.0 * Float64(Float64(z * t) - t_2));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = a + (b * c);
	t_2 = c * (t_1 * i);
	t_3 = (c * t_1) * i;
	tmp = 0.0;
	if (t_3 <= -2e-63)
		tmp = 2.0 * ((x * y) - t_2);
	elseif (t_3 <= 1e+128)
		tmp = ((x * y) + (z * t)) * 2.0;
	else
		tmp = 2.0 * ((z * t) - t_2);
	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 * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-63], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+128], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 78.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 81.8%

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

    if -2.00000000000000013e-63 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.0000000000000001e128

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

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

    if 1.0000000000000001e128 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 81.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 85.0%

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

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

Alternative 6: 73.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{if}\;c \leq -9.6 \cdot 10^{+78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -6.8 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 2.8 \cdot 10^{-107}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 8.6 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 4.2 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \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 (* -2.0 (* c (* (+ a (* b c)) i)))))
   (if (<= c -9.6e+78)
     t_1
     (if (<= c -6.8e-7)
       (* 2.0 (- (* z t) (* c (* (* b c) i))))
       (if (<= c 2.8e-107)
         (* (+ (* x y) (* z t)) 2.0)
         (if (<= c 8.6e-75)
           (* 2.0 (- (* z t) (* c (* a i))))
           (if (<= c 4.2e+47) (* 2.0 (- (* x y) (* a (* 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 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -9.6e+78) {
		tmp = t_1;
	} else if (c <= -6.8e-7) {
		tmp = 2.0 * ((z * t) - (c * ((b * c) * i)));
	} else if (c <= 2.8e-107) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (c <= 8.6e-75) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 4.2e+47) {
		tmp = 2.0 * ((x * y) - (a * (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) * (c * ((a + (b * c)) * i))
    if (c <= (-9.6d+78)) then
        tmp = t_1
    else if (c <= (-6.8d-7)) then
        tmp = 2.0d0 * ((z * t) - (c * ((b * c) * i)))
    else if (c <= 2.8d-107) then
        tmp = ((x * y) + (z * t)) * 2.0d0
    else if (c <= 8.6d-75) then
        tmp = 2.0d0 * ((z * t) - (c * (a * i)))
    else if (c <= 4.2d+47) then
        tmp = 2.0d0 * ((x * y) - (a * (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 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -9.6e+78) {
		tmp = t_1;
	} else if (c <= -6.8e-7) {
		tmp = 2.0 * ((z * t) - (c * ((b * c) * i)));
	} else if (c <= 2.8e-107) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (c <= 8.6e-75) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 4.2e+47) {
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = -2.0 * (c * ((a + (b * c)) * i))
	tmp = 0
	if c <= -9.6e+78:
		tmp = t_1
	elif c <= -6.8e-7:
		tmp = 2.0 * ((z * t) - (c * ((b * c) * i)))
	elif c <= 2.8e-107:
		tmp = ((x * y) + (z * t)) * 2.0
	elif c <= 8.6e-75:
		tmp = 2.0 * ((z * t) - (c * (a * i)))
	elif c <= 4.2e+47:
		tmp = 2.0 * ((x * y) - (a * (c * i)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)))
	tmp = 0.0
	if (c <= -9.6e+78)
		tmp = t_1;
	elseif (c <= -6.8e-7)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(b * c) * i))));
	elseif (c <= 2.8e-107)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0);
	elseif (c <= 8.6e-75)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))));
	elseif (c <= 4.2e+47)
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * 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 * (c * ((a + (b * c)) * i));
	tmp = 0.0;
	if (c <= -9.6e+78)
		tmp = t_1;
	elseif (c <= -6.8e-7)
		tmp = 2.0 * ((z * t) - (c * ((b * c) * i)));
	elseif (c <= 2.8e-107)
		tmp = ((x * y) + (z * t)) * 2.0;
	elseif (c <= 8.6e-75)
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	elseif (c <= 4.2e+47)
		tmp = 2.0 * ((x * y) - (a * (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[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -9.6e+78], t$95$1, If[LessEqual[c, -6.8e-7], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e-107], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 8.6e-75], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.2e+47], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -9.5999999999999994e78 or 4.2e47 < c

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

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

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

    if -9.5999999999999994e78 < c < -6.79999999999999948e-7

    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. Add Preprocessing
    3. Taylor expanded in x around 0 85.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 a around 0 80.6%

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

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

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

    if -6.79999999999999948e-7 < c < 2.7999999999999999e-107

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

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

    if 2.7999999999999999e-107 < c < 8.5999999999999998e-75

    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 a around inf 90.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. *-commutative90.7%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    5. Simplified90.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 x around 0 84.5%

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

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

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

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

    if 8.5999999999999998e-75 < c < 4.2e47

    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 a around inf 84.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. *-commutative84.3%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    5. Simplified84.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 76.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9.6 \cdot 10^{+78}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -6.8 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 2.8 \cdot 10^{-107}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 8.6 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 4.2 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\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 7: 48.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ t_2 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;c \leq -6 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{-299}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-106}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{-79}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{+47}:\\ \;\;\;\;t\_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 (* c (* (* b c) i)))) (t_2 (* (* x y) 2.0)))
   (if (<= c -6e-21)
     t_1
     (if (<= c 3.6e-299)
       (* 2.0 (* z t))
       (if (<= c 1.15e-106)
         t_2
         (if (<= c 3.5e-79)
           (* -2.0 (* a (* c i)))
           (if (<= c 3.5e+47) t_2 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 * (c * ((b * c) * i));
	double t_2 = (x * y) * 2.0;
	double tmp;
	if (c <= -6e-21) {
		tmp = t_1;
	} else if (c <= 3.6e-299) {
		tmp = 2.0 * (z * t);
	} else if (c <= 1.15e-106) {
		tmp = t_2;
	} else if (c <= 3.5e-79) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= 3.5e+47) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (-2.0d0) * (c * ((b * c) * i))
    t_2 = (x * y) * 2.0d0
    if (c <= (-6d-21)) then
        tmp = t_1
    else if (c <= 3.6d-299) then
        tmp = 2.0d0 * (z * t)
    else if (c <= 1.15d-106) then
        tmp = t_2
    else if (c <= 3.5d-79) then
        tmp = (-2.0d0) * (a * (c * i))
    else if (c <= 3.5d+47) then
        tmp = t_2
    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 * (c * ((b * c) * i));
	double t_2 = (x * y) * 2.0;
	double tmp;
	if (c <= -6e-21) {
		tmp = t_1;
	} else if (c <= 3.6e-299) {
		tmp = 2.0 * (z * t);
	} else if (c <= 1.15e-106) {
		tmp = t_2;
	} else if (c <= 3.5e-79) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= 3.5e+47) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = -2.0 * (c * ((b * c) * i))
	t_2 = (x * y) * 2.0
	tmp = 0
	if c <= -6e-21:
		tmp = t_1
	elif c <= 3.6e-299:
		tmp = 2.0 * (z * t)
	elif c <= 1.15e-106:
		tmp = t_2
	elif c <= 3.5e-79:
		tmp = -2.0 * (a * (c * i))
	elif c <= 3.5e+47:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(-2.0 * Float64(c * Float64(Float64(b * c) * i)))
	t_2 = Float64(Float64(x * y) * 2.0)
	tmp = 0.0
	if (c <= -6e-21)
		tmp = t_1;
	elseif (c <= 3.6e-299)
		tmp = Float64(2.0 * Float64(z * t));
	elseif (c <= 1.15e-106)
		tmp = t_2;
	elseif (c <= 3.5e-79)
		tmp = Float64(-2.0 * Float64(a * Float64(c * i)));
	elseif (c <= 3.5e+47)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = -2.0 * (c * ((b * c) * i));
	t_2 = (x * y) * 2.0;
	tmp = 0.0;
	if (c <= -6e-21)
		tmp = t_1;
	elseif (c <= 3.6e-299)
		tmp = 2.0 * (z * t);
	elseif (c <= 1.15e-106)
		tmp = t_2;
	elseif (c <= 3.5e-79)
		tmp = -2.0 * (a * (c * i));
	elseif (c <= 3.5e+47)
		tmp = t_2;
	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[(c * N[(N[(b * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[c, -6e-21], t$95$1, If[LessEqual[c, 3.6e-299], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.15e-106], t$95$2, If[LessEqual[c, 3.5e-79], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.5e+47], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq 3.6 \cdot 10^{-299}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

\mathbf{elif}\;c \leq 1.15 \cdot 10^{-106}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;c \leq 3.5 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -5.99999999999999982e-21 or 3.50000000000000015e47 < c

    1. Initial program 77.6%

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

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

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

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

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

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

    if -5.99999999999999982e-21 < c < 3.6e-299

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

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

    if 3.6e-299 < c < 1.15e-106 or 3.5000000000000003e-79 < c < 3.50000000000000015e47

    1. Initial program 93.7%

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

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

    if 1.15e-106 < c < 3.5000000000000003e-79

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

      \[\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 c around 0 53.8%

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

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

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

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

Alternative 8: 43.2% accurate, 0.6× 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}\;x \cdot y \leq -4.2 \cdot 10^{-27}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq 2.2 \cdot 10^{-171}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{-36}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+27}:\\ \;\;\;\;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 (* (* x y) 2.0)))
   (if (<= (* x y) -4.2e-27)
     t_2
     (if (<= (* x y) 2.2e-171)
       t_1
       (if (<= (* x y) 2.8e-36)
         (* -2.0 (* a (* c i)))
         (if (<= (* x y) 2.1e+27) 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 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.2e-27) {
		tmp = t_2;
	} else if ((x * y) <= 2.2e-171) {
		tmp = t_1;
	} else if ((x * y) <= 2.8e-36) {
		tmp = -2.0 * (a * (c * i));
	} else if ((x * y) <= 2.1e+27) {
		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 = (x * y) * 2.0d0
    if ((x * y) <= (-4.2d-27)) then
        tmp = t_2
    else if ((x * y) <= 2.2d-171) then
        tmp = t_1
    else if ((x * y) <= 2.8d-36) then
        tmp = (-2.0d0) * (a * (c * i))
    else if ((x * y) <= 2.1d+27) 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 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.2e-27) {
		tmp = t_2;
	} else if ((x * y) <= 2.2e-171) {
		tmp = t_1;
	} else if ((x * y) <= 2.8e-36) {
		tmp = -2.0 * (a * (c * i));
	} else if ((x * y) <= 2.1e+27) {
		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 = (x * y) * 2.0
	tmp = 0
	if (x * y) <= -4.2e-27:
		tmp = t_2
	elif (x * y) <= 2.2e-171:
		tmp = t_1
	elif (x * y) <= 2.8e-36:
		tmp = -2.0 * (a * (c * i))
	elif (x * y) <= 2.1e+27:
		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(Float64(x * y) * 2.0)
	tmp = 0.0
	if (Float64(x * y) <= -4.2e-27)
		tmp = t_2;
	elseif (Float64(x * y) <= 2.2e-171)
		tmp = t_1;
	elseif (Float64(x * y) <= 2.8e-36)
		tmp = Float64(-2.0 * Float64(a * Float64(c * i)));
	elseif (Float64(x * y) <= 2.1e+27)
		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 = (x * y) * 2.0;
	tmp = 0.0;
	if ((x * y) <= -4.2e-27)
		tmp = t_2;
	elseif ((x * y) <= 2.2e-171)
		tmp = t_1;
	elseif ((x * y) <= 2.8e-36)
		tmp = -2.0 * (a * (c * i));
	elseif ((x * y) <= 2.1e+27)
		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[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.2e-27], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 2.2e-171], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.8e-36], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.1e+27], t$95$1, t$95$2]]]]]]
\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}\;x \cdot y \leq -4.2 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \cdot y \leq 2.2 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.20000000000000031e-27 or 2.09999999999999995e27 < (*.f64 x y)

    1. Initial program 85.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 inf 56.3%

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

    if -4.20000000000000031e-27 < (*.f64 x y) < 2.2000000000000001e-171 or 2.8000000000000001e-36 < (*.f64 x y) < 2.09999999999999995e27

    1. Initial program 88.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 47.2%

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

    if 2.2000000000000001e-171 < (*.f64 x y) < 2.8000000000000001e-36

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

      \[\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 c around 0 58.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.2 \cdot 10^{-27}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq 2.2 \cdot 10^{-171}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 2.8 \cdot 10^{-36}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{+27}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 42.9% accurate, 0.6× 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}\;x \cdot y \leq -4.2 \cdot 10^{-25}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq 5.5 \cdot 10^{-168}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 1.2 \cdot 10^{-35}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 4.8 \cdot 10^{+29}:\\ \;\;\;\;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 (* (* x y) 2.0)))
   (if (<= (* x y) -4.2e-25)
     t_2
     (if (<= (* x y) 5.5e-168)
       t_1
       (if (<= (* x y) 1.2e-35)
         (* c (* -2.0 (* a i)))
         (if (<= (* x y) 4.8e+29) 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 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.2e-25) {
		tmp = t_2;
	} else if ((x * y) <= 5.5e-168) {
		tmp = t_1;
	} else if ((x * y) <= 1.2e-35) {
		tmp = c * (-2.0 * (a * i));
	} else if ((x * y) <= 4.8e+29) {
		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 = (x * y) * 2.0d0
    if ((x * y) <= (-4.2d-25)) then
        tmp = t_2
    else if ((x * y) <= 5.5d-168) then
        tmp = t_1
    else if ((x * y) <= 1.2d-35) then
        tmp = c * ((-2.0d0) * (a * i))
    else if ((x * y) <= 4.8d+29) 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 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.2e-25) {
		tmp = t_2;
	} else if ((x * y) <= 5.5e-168) {
		tmp = t_1;
	} else if ((x * y) <= 1.2e-35) {
		tmp = c * (-2.0 * (a * i));
	} else if ((x * y) <= 4.8e+29) {
		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 = (x * y) * 2.0
	tmp = 0
	if (x * y) <= -4.2e-25:
		tmp = t_2
	elif (x * y) <= 5.5e-168:
		tmp = t_1
	elif (x * y) <= 1.2e-35:
		tmp = c * (-2.0 * (a * i))
	elif (x * y) <= 4.8e+29:
		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(Float64(x * y) * 2.0)
	tmp = 0.0
	if (Float64(x * y) <= -4.2e-25)
		tmp = t_2;
	elseif (Float64(x * y) <= 5.5e-168)
		tmp = t_1;
	elseif (Float64(x * y) <= 1.2e-35)
		tmp = Float64(c * Float64(-2.0 * Float64(a * i)));
	elseif (Float64(x * y) <= 4.8e+29)
		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 = (x * y) * 2.0;
	tmp = 0.0;
	if ((x * y) <= -4.2e-25)
		tmp = t_2;
	elseif ((x * y) <= 5.5e-168)
		tmp = t_1;
	elseif ((x * y) <= 1.2e-35)
		tmp = c * (-2.0 * (a * i));
	elseif ((x * y) <= 4.8e+29)
		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[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.2e-25], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5.5e-168], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.2e-35], N[(c * N[(-2.0 * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4.8e+29], t$95$1, t$95$2]]]]]]
\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}\;x \cdot y \leq -4.2 \cdot 10^{-25}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \cdot y \leq 5.5 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 4.8 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.20000000000000005e-25 or 4.8000000000000002e29 < (*.f64 x y)

    1. Initial program 85.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 inf 56.3%

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

    if -4.20000000000000005e-25 < (*.f64 x y) < 5.4999999999999999e-168 or 1.2000000000000001e-35 < (*.f64 x y) < 4.8000000000000002e29

    1. Initial program 88.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 47.2%

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

    if 5.4999999999999999e-168 < (*.f64 x y) < 1.2000000000000001e-35

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

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

      \[\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 \left(a \cdot \color{blue}{\left(i \cdot c\right)}\right) \cdot -2 \]
      3. associate-*l*53.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.2 \cdot 10^{-25}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq 5.5 \cdot 10^{-168}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 1.2 \cdot 10^{-35}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 4.8 \cdot 10^{+29}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 73.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{if}\;c \leq -1.45 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-106}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 4.2 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \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 (* -2.0 (* c (* (+ a (* b c)) i)))))
   (if (<= c -1.45e-7)
     t_1
     (if (<= c 1.15e-106)
       (* (+ (* x y) (* z t)) 2.0)
       (if (<= c 4.2e-75)
         (* 2.0 (- (* z t) (* c (* a i))))
         (if (<= c 3.5e+47) (* 2.0 (- (* x y) (* a (* 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 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -1.45e-7) {
		tmp = t_1;
	} else if (c <= 1.15e-106) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (c <= 4.2e-75) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 3.5e+47) {
		tmp = 2.0 * ((x * y) - (a * (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) * (c * ((a + (b * c)) * i))
    if (c <= (-1.45d-7)) then
        tmp = t_1
    else if (c <= 1.15d-106) then
        tmp = ((x * y) + (z * t)) * 2.0d0
    else if (c <= 4.2d-75) then
        tmp = 2.0d0 * ((z * t) - (c * (a * i)))
    else if (c <= 3.5d+47) then
        tmp = 2.0d0 * ((x * y) - (a * (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 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -1.45e-7) {
		tmp = t_1;
	} else if (c <= 1.15e-106) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (c <= 4.2e-75) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 3.5e+47) {
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = -2.0 * (c * ((a + (b * c)) * i))
	tmp = 0
	if c <= -1.45e-7:
		tmp = t_1
	elif c <= 1.15e-106:
		tmp = ((x * y) + (z * t)) * 2.0
	elif c <= 4.2e-75:
		tmp = 2.0 * ((z * t) - (c * (a * i)))
	elif c <= 3.5e+47:
		tmp = 2.0 * ((x * y) - (a * (c * i)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)))
	tmp = 0.0
	if (c <= -1.45e-7)
		tmp = t_1;
	elseif (c <= 1.15e-106)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0);
	elseif (c <= 4.2e-75)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))));
	elseif (c <= 3.5e+47)
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * 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 * (c * ((a + (b * c)) * i));
	tmp = 0.0;
	if (c <= -1.45e-7)
		tmp = t_1;
	elseif (c <= 1.15e-106)
		tmp = ((x * y) + (z * t)) * 2.0;
	elseif (c <= 4.2e-75)
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	elseif (c <= 3.5e+47)
		tmp = 2.0 * ((x * y) - (a * (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[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.45e-7], t$95$1, If[LessEqual[c, 1.15e-106], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 4.2e-75], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.5e+47], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.4499999999999999e-7 or 3.50000000000000015e47 < c

    1. Initial program 77.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 i around inf 75.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 75.9%

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

    if -1.4499999999999999e-7 < c < 1.15e-106

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

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

    if 1.15e-106 < c < 4.2000000000000002e-75

    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 a around inf 90.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. *-commutative90.7%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    5. Simplified90.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 x around 0 84.5%

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

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

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

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

    if 4.2000000000000002e-75 < c < 3.50000000000000015e47

    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 a around inf 84.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. *-commutative84.3%

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(c \cdot a\right)} \cdot i\right) \]
    5. Simplified84.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 76.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.45 \cdot 10^{-7}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-106}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 4.2 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\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 11: 74.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;c \leq 1.15 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;c \leq 3 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -8.8000000000000004e-7 or 3.00000000000000023e46 < c

    1. Initial program 77.6%

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

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

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

    if -8.8000000000000004e-7 < c < 1.15e-106 or 1.15000000000000006e-79 < c < 3.00000000000000023e46

    1. Initial program 96.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 81.9%

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

    if 1.15e-106 < c < 1.15000000000000006e-79

    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 a around inf 89.8%

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

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

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

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

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

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

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

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

Alternative 12: 76.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-11} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+71}\right):\\ \;\;\;\;2 \cdot \left(y \cdot \left(x - \frac{a \cdot \left(c \cdot i\right)}{y}\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) -4e-11) (not (<= (* x y) 5e+71)))
   (* 2.0 (* y (- x (/ (* a (* c i)) y))))
   (* 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) <= -4e-11) || !((x * y) <= 5e+71)) {
		tmp = 2.0 * (y * (x - ((a * (c * i)) / y)));
	} 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) <= (-4d-11)) .or. (.not. ((x * y) <= 5d+71))) then
        tmp = 2.0d0 * (y * (x - ((a * (c * i)) / y)))
    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) <= -4e-11) || !((x * y) <= 5e+71)) {
		tmp = 2.0 * (y * (x - ((a * (c * i)) / y)));
	} 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) <= -4e-11) or not ((x * y) <= 5e+71):
		tmp = 2.0 * (y * (x - ((a * (c * i)) / y)))
	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) <= -4e-11) || !(Float64(x * y) <= 5e+71))
		tmp = Float64(2.0 * Float64(y * Float64(x - Float64(Float64(a * Float64(c * i)) / y))));
	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) <= -4e-11) || ~(((x * y) <= 5e+71)))
		tmp = 2.0 * (y * (x - ((a * (c * i)) / y)));
	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], -4e-11], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+71]], $MachinePrecision]], N[(2.0 * N[(y * N[(x - N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] / y), $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 -4 \cdot 10^{-11} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+71}\right):\\
\;\;\;\;2 \cdot \left(y \cdot \left(x - \frac{a \cdot \left(c \cdot i\right)}{y}\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) < -3.99999999999999976e-11 or 4.99999999999999972e71 < (*.f64 x y)

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

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

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

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

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

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

    if -3.99999999999999976e-11 < (*.f64 x y) < 4.99999999999999972e71

    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 x around 0 88.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 2 regimes into one program.
  4. Final simplification81.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-11} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+71}\right):\\ \;\;\;\;2 \cdot \left(y \cdot \left(x - \frac{a \cdot \left(c \cdot i\right)}{y}\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: 74.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.15 \cdot 10^{-7} \lor \neg \left(c \leq 2.15 \cdot 10^{+46}\right):\\
\;\;\;\;-2 \cdot \left(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 2 regimes
  2. if c < -1.14999999999999997e-7 or 2.15000000000000002e46 < c

    1. Initial program 77.6%

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

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

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

    if -1.14999999999999997e-7 < c < 2.15000000000000002e46

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{-7} \lor \neg \left(c \leq 2.15 \cdot 10^{+46}\right):\\ \;\;\;\;-2 \cdot \left(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 14: 68.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.02 \cdot 10^{+110} \lor \neg \left(c \leq 6.8 \cdot 10^{+112}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(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 2 regimes
  2. if c < -1.02e110 or 6.79999999999999987e112 < c

    1. Initial program 72.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 82.7%

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

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

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

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

    if -1.02e110 < c < 6.79999999999999987e112

    1. Initial program 95.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.02 \cdot 10^{+110} \lor \neg \left(c \leq 6.8 \cdot 10^{+112}\right):\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(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 15: 44.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.45 \cdot 10^{-16} \lor \neg \left(x \cdot y \leq 3.8 \cdot 10^{+26}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.4499999999999999e-16 or 3.8000000000000002e26 < (*.f64 x y)

    1. Initial program 85.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 inf 56.3%

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

    if -1.4499999999999999e-16 < (*.f64 x y) < 3.8000000000000002e26

    1. Initial program 89.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 inf 44.5%

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

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

Alternative 16: 29.8% 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 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 inf 30.5%

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

    \[\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 2024096 
(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))))