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

Percentage Accurate: 90.1% → 95.3%
Time: 21.4s
Alternatives: 17
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 90.1% accurate, 1.0× speedup?

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

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

Alternative 1: 95.3% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_1 \cdot 2\\

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


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

    1. Initial program 78.6%

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

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

    if -inf.0 < (+.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 91.5%

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

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

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

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

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

Alternative 2: 95.1% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 79.6%

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

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

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.9999999999999997e303

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

    if 4.9999999999999997e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    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. Taylor expanded in x around 0 94.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 simplification95.2%

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

Alternative 3: 96.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

Alternative 4: 49.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ t_3 := \left(x \cdot y\right) \cdot 2\\ t_4 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -5.8 \cdot 10^{+57}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -1.8 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -3.4 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.15 \cdot 10^{-176}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-237}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5.9 \cdot 10^{+23}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 2 \cdot 10^{+67}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t)))
        (t_2 (* -2.0 (* a (* c i))))
        (t_3 (* (* x y) 2.0))
        (t_4 (* -2.0 (* c (* c (* b i))))))
   (if (<= c -1.15e+204)
     t_4
     (if (<= c -1.1e+180)
       t_2
       (if (<= c -5.8e+57)
         t_4
         (if (<= c -1.8e-17)
           t_1
           (if (<= c -3.4e-19)
             t_2
             (if (<= c -2.15e-176)
               t_3
               (if (<= c -8.6e-237)
                 t_1
                 (if (<= c 5.9e+23)
                   t_3
                   (if (<= c 2e+67)
                     (* -2.0 (* c (* a i)))
                     (* -2.0 (* c (* b (* c i)))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (a * (c * i));
	double t_3 = (x * y) * 2.0;
	double t_4 = -2.0 * (c * (c * (b * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_4;
	} else if (c <= -1.1e+180) {
		tmp = t_2;
	} else if (c <= -5.8e+57) {
		tmp = t_4;
	} else if (c <= -1.8e-17) {
		tmp = t_1;
	} else if (c <= -3.4e-19) {
		tmp = t_2;
	} else if (c <= -2.15e-176) {
		tmp = t_3;
	} else if (c <= -8.6e-237) {
		tmp = t_1;
	} else if (c <= 5.9e+23) {
		tmp = t_3;
	} else if (c <= 2e+67) {
		tmp = -2.0 * (c * (a * i));
	} else {
		tmp = -2.0 * (c * (b * (c * i)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (-2.0d0) * (a * (c * i))
    t_3 = (x * y) * 2.0d0
    t_4 = (-2.0d0) * (c * (c * (b * i)))
    if (c <= (-1.15d+204)) then
        tmp = t_4
    else if (c <= (-1.1d+180)) then
        tmp = t_2
    else if (c <= (-5.8d+57)) then
        tmp = t_4
    else if (c <= (-1.8d-17)) then
        tmp = t_1
    else if (c <= (-3.4d-19)) then
        tmp = t_2
    else if (c <= (-2.15d-176)) then
        tmp = t_3
    else if (c <= (-8.6d-237)) then
        tmp = t_1
    else if (c <= 5.9d+23) then
        tmp = t_3
    else if (c <= 2d+67) then
        tmp = (-2.0d0) * (c * (a * i))
    else
        tmp = (-2.0d0) * (c * (b * (c * i)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (a * (c * i));
	double t_3 = (x * y) * 2.0;
	double t_4 = -2.0 * (c * (c * (b * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_4;
	} else if (c <= -1.1e+180) {
		tmp = t_2;
	} else if (c <= -5.8e+57) {
		tmp = t_4;
	} else if (c <= -1.8e-17) {
		tmp = t_1;
	} else if (c <= -3.4e-19) {
		tmp = t_2;
	} else if (c <= -2.15e-176) {
		tmp = t_3;
	} else if (c <= -8.6e-237) {
		tmp = t_1;
	} else if (c <= 5.9e+23) {
		tmp = t_3;
	} else if (c <= 2e+67) {
		tmp = -2.0 * (c * (a * i));
	} else {
		tmp = -2.0 * (c * (b * (c * i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = -2.0 * (a * (c * i))
	t_3 = (x * y) * 2.0
	t_4 = -2.0 * (c * (c * (b * i)))
	tmp = 0
	if c <= -1.15e+204:
		tmp = t_4
	elif c <= -1.1e+180:
		tmp = t_2
	elif c <= -5.8e+57:
		tmp = t_4
	elif c <= -1.8e-17:
		tmp = t_1
	elif c <= -3.4e-19:
		tmp = t_2
	elif c <= -2.15e-176:
		tmp = t_3
	elif c <= -8.6e-237:
		tmp = t_1
	elif c <= 5.9e+23:
		tmp = t_3
	elif c <= 2e+67:
		tmp = -2.0 * (c * (a * i))
	else:
		tmp = -2.0 * (c * (b * (c * i)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(-2.0 * Float64(a * Float64(c * i)))
	t_3 = Float64(Float64(x * y) * 2.0)
	t_4 = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i))))
	tmp = 0.0
	if (c <= -1.15e+204)
		tmp = t_4;
	elseif (c <= -1.1e+180)
		tmp = t_2;
	elseif (c <= -5.8e+57)
		tmp = t_4;
	elseif (c <= -1.8e-17)
		tmp = t_1;
	elseif (c <= -3.4e-19)
		tmp = t_2;
	elseif (c <= -2.15e-176)
		tmp = t_3;
	elseif (c <= -8.6e-237)
		tmp = t_1;
	elseif (c <= 5.9e+23)
		tmp = t_3;
	elseif (c <= 2e+67)
		tmp = Float64(-2.0 * Float64(c * Float64(a * i)));
	else
		tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = -2.0 * (a * (c * i));
	t_3 = (x * y) * 2.0;
	t_4 = -2.0 * (c * (c * (b * i)));
	tmp = 0.0;
	if (c <= -1.15e+204)
		tmp = t_4;
	elseif (c <= -1.1e+180)
		tmp = t_2;
	elseif (c <= -5.8e+57)
		tmp = t_4;
	elseif (c <= -1.8e-17)
		tmp = t_1;
	elseif (c <= -3.4e-19)
		tmp = t_2;
	elseif (c <= -2.15e-176)
		tmp = t_3;
	elseif (c <= -8.6e-237)
		tmp = t_1;
	elseif (c <= 5.9e+23)
		tmp = t_3;
	elseif (c <= 2e+67)
		tmp = -2.0 * (c * (a * i));
	else
		tmp = -2.0 * (c * (b * (c * i)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$4 = N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$4, If[LessEqual[c, -1.1e+180], t$95$2, If[LessEqual[c, -5.8e+57], t$95$4, If[LessEqual[c, -1.8e-17], t$95$1, If[LessEqual[c, -3.4e-19], t$95$2, If[LessEqual[c, -2.15e-176], t$95$3, If[LessEqual[c, -8.6e-237], t$95$1, If[LessEqual[c, 5.9e+23], t$95$3, If[LessEqual[c, 2e+67], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -5.8 \cdot 10^{+57}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;c \leq -1.8 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -3.4 \cdot 10^{-19}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -2.15 \cdot 10^{-176}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq -8.6 \cdot 10^{-237}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 5.9 \cdot 10^{+23}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -1.14999999999999995e204 or -1.1e180 < c < -5.8000000000000003e57

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)\right)}\right) \]
      2. expm1-udef39.9%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)} - 1\right)}\right) \]
      3. associate-*r*36.3%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot i}\right)} - 1\right)\right) \]
      4. *-commutative36.3%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(c \cdot b\right)} \cdot i\right)} - 1\right)\right) \]
      5. associate-*l*39.9%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{c \cdot \left(b \cdot i\right)}\right)} - 1\right)\right) \]
    7. Applied egg-rr39.9%

      \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)} - 1\right)}\right) \]
    8. Step-by-step derivation
      1. expm1-def40.1%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)\right)}\right) \]
      2. expm1-log1p70.3%

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

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

    if -1.14999999999999995e204 < c < -1.1e180 or -1.79999999999999997e-17 < c < -3.4000000000000002e-19

    1. Initial program 76.2%

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

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

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

    if -5.8000000000000003e57 < c < -1.79999999999999997e-17 or -2.15000000000000006e-176 < c < -8.59999999999999965e-237

    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. Taylor expanded in z around inf 66.0%

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

    if -3.4000000000000002e-19 < c < -2.15000000000000006e-176 or -8.59999999999999965e-237 < c < 5.89999999999999987e23

    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. Taylor expanded in x around inf 53.0%

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

    if 5.89999999999999987e23 < c < 1.99999999999999997e67

    1. Initial program 90.8%

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

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

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

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

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

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

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

    if 1.99999999999999997e67 < c

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -5.8 \cdot 10^{+57}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.8 \cdot 10^{-17}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -3.4 \cdot 10^{-19}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.15 \cdot 10^{-176}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-237}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 5.9 \cdot 10^{+23}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 2 \cdot 10^{+67}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 5: 48.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ t_3 := \left(x \cdot y\right) \cdot 2\\ t_4 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{+57}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -3.1 \cdot 10^{-15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -2.2 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.65 \cdot 10^{-173}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -9.2 \cdot 10^{-237}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{+25}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.9 \cdot 10^{+67}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t)))
        (t_2 (* -2.0 (* a (* c i))))
        (t_3 (* (* x y) 2.0))
        (t_4 (* -2.0 (* c (* c (* b i))))))
   (if (<= c -1.15e+204)
     t_4
     (if (<= c -1.1e+180)
       t_2
       (if (<= c -2.8e+57)
         t_4
         (if (<= c -3.1e-15)
           t_1
           (if (<= c -2.2e-19)
             t_2
             (if (<= c -2.65e-173)
               t_3
               (if (<= c -9.2e-237)
                 t_1
                 (if (<= c 1.2e+25)
                   t_3
                   (if (<= c 1.9e+67)
                     (* -2.0 (* c (* a i)))
                     (* -2.0 (* (* b c) (* c i))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (a * (c * i));
	double t_3 = (x * y) * 2.0;
	double t_4 = -2.0 * (c * (c * (b * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_4;
	} else if (c <= -1.1e+180) {
		tmp = t_2;
	} else if (c <= -2.8e+57) {
		tmp = t_4;
	} else if (c <= -3.1e-15) {
		tmp = t_1;
	} else if (c <= -2.2e-19) {
		tmp = t_2;
	} else if (c <= -2.65e-173) {
		tmp = t_3;
	} else if (c <= -9.2e-237) {
		tmp = t_1;
	} else if (c <= 1.2e+25) {
		tmp = t_3;
	} else if (c <= 1.9e+67) {
		tmp = -2.0 * (c * (a * i));
	} else {
		tmp = -2.0 * ((b * c) * (c * i));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (-2.0d0) * (a * (c * i))
    t_3 = (x * y) * 2.0d0
    t_4 = (-2.0d0) * (c * (c * (b * i)))
    if (c <= (-1.15d+204)) then
        tmp = t_4
    else if (c <= (-1.1d+180)) then
        tmp = t_2
    else if (c <= (-2.8d+57)) then
        tmp = t_4
    else if (c <= (-3.1d-15)) then
        tmp = t_1
    else if (c <= (-2.2d-19)) then
        tmp = t_2
    else if (c <= (-2.65d-173)) then
        tmp = t_3
    else if (c <= (-9.2d-237)) then
        tmp = t_1
    else if (c <= 1.2d+25) then
        tmp = t_3
    else if (c <= 1.9d+67) then
        tmp = (-2.0d0) * (c * (a * i))
    else
        tmp = (-2.0d0) * ((b * c) * (c * i))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (a * (c * i));
	double t_3 = (x * y) * 2.0;
	double t_4 = -2.0 * (c * (c * (b * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_4;
	} else if (c <= -1.1e+180) {
		tmp = t_2;
	} else if (c <= -2.8e+57) {
		tmp = t_4;
	} else if (c <= -3.1e-15) {
		tmp = t_1;
	} else if (c <= -2.2e-19) {
		tmp = t_2;
	} else if (c <= -2.65e-173) {
		tmp = t_3;
	} else if (c <= -9.2e-237) {
		tmp = t_1;
	} else if (c <= 1.2e+25) {
		tmp = t_3;
	} else if (c <= 1.9e+67) {
		tmp = -2.0 * (c * (a * i));
	} else {
		tmp = -2.0 * ((b * c) * (c * i));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = -2.0 * (a * (c * i))
	t_3 = (x * y) * 2.0
	t_4 = -2.0 * (c * (c * (b * i)))
	tmp = 0
	if c <= -1.15e+204:
		tmp = t_4
	elif c <= -1.1e+180:
		tmp = t_2
	elif c <= -2.8e+57:
		tmp = t_4
	elif c <= -3.1e-15:
		tmp = t_1
	elif c <= -2.2e-19:
		tmp = t_2
	elif c <= -2.65e-173:
		tmp = t_3
	elif c <= -9.2e-237:
		tmp = t_1
	elif c <= 1.2e+25:
		tmp = t_3
	elif c <= 1.9e+67:
		tmp = -2.0 * (c * (a * i))
	else:
		tmp = -2.0 * ((b * c) * (c * i))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(-2.0 * Float64(a * Float64(c * i)))
	t_3 = Float64(Float64(x * y) * 2.0)
	t_4 = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i))))
	tmp = 0.0
	if (c <= -1.15e+204)
		tmp = t_4;
	elseif (c <= -1.1e+180)
		tmp = t_2;
	elseif (c <= -2.8e+57)
		tmp = t_4;
	elseif (c <= -3.1e-15)
		tmp = t_1;
	elseif (c <= -2.2e-19)
		tmp = t_2;
	elseif (c <= -2.65e-173)
		tmp = t_3;
	elseif (c <= -9.2e-237)
		tmp = t_1;
	elseif (c <= 1.2e+25)
		tmp = t_3;
	elseif (c <= 1.9e+67)
		tmp = Float64(-2.0 * Float64(c * Float64(a * i)));
	else
		tmp = Float64(-2.0 * Float64(Float64(b * c) * Float64(c * i)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = -2.0 * (a * (c * i));
	t_3 = (x * y) * 2.0;
	t_4 = -2.0 * (c * (c * (b * i)));
	tmp = 0.0;
	if (c <= -1.15e+204)
		tmp = t_4;
	elseif (c <= -1.1e+180)
		tmp = t_2;
	elseif (c <= -2.8e+57)
		tmp = t_4;
	elseif (c <= -3.1e-15)
		tmp = t_1;
	elseif (c <= -2.2e-19)
		tmp = t_2;
	elseif (c <= -2.65e-173)
		tmp = t_3;
	elseif (c <= -9.2e-237)
		tmp = t_1;
	elseif (c <= 1.2e+25)
		tmp = t_3;
	elseif (c <= 1.9e+67)
		tmp = -2.0 * (c * (a * i));
	else
		tmp = -2.0 * ((b * c) * (c * i));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$4 = N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$4, If[LessEqual[c, -1.1e+180], t$95$2, If[LessEqual[c, -2.8e+57], t$95$4, If[LessEqual[c, -3.1e-15], t$95$1, If[LessEqual[c, -2.2e-19], t$95$2, If[LessEqual[c, -2.65e-173], t$95$3, If[LessEqual[c, -9.2e-237], t$95$1, If[LessEqual[c, 1.2e+25], t$95$3, If[LessEqual[c, 1.9e+67], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -2.8 \cdot 10^{+57}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;c \leq -3.1 \cdot 10^{-15}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -2.2 \cdot 10^{-19}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -2.65 \cdot 10^{-173}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq -9.2 \cdot 10^{-237}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -1.14999999999999995e204 or -1.1e180 < c < -2.8e57

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)\right)}\right) \]
      2. expm1-udef39.9%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)} - 1\right)}\right) \]
      3. associate-*r*36.3%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot i}\right)} - 1\right)\right) \]
      4. *-commutative36.3%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(c \cdot b\right)} \cdot i\right)} - 1\right)\right) \]
      5. associate-*l*39.9%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{c \cdot \left(b \cdot i\right)}\right)} - 1\right)\right) \]
    7. Applied egg-rr39.9%

      \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)} - 1\right)}\right) \]
    8. Step-by-step derivation
      1. expm1-def40.1%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)\right)}\right) \]
      2. expm1-log1p70.3%

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

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

    if -1.14999999999999995e204 < c < -1.1e180 or -3.0999999999999999e-15 < c < -2.1999999999999998e-19

    1. Initial program 76.2%

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

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

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

    if -2.8e57 < c < -3.0999999999999999e-15 or -2.64999999999999982e-173 < c < -9.20000000000000046e-237

    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. Taylor expanded in z around inf 66.0%

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

    if -2.1999999999999998e-19 < c < -2.64999999999999982e-173 or -9.20000000000000046e-237 < c < 1.19999999999999998e25

    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. Taylor expanded in x around inf 53.0%

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

    if 1.19999999999999998e25 < c < 1.9000000000000001e67

    1. Initial program 90.8%

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

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

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

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

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

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

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

    if 1.9000000000000001e67 < c

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)\right)}\right) \]
      2. expm1-udef30.8%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)} - 1\right)}\right) \]
      3. associate-*r*32.4%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot i}\right)} - 1\right)\right) \]
      4. *-commutative32.4%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(c \cdot b\right)} \cdot i\right)} - 1\right)\right) \]
      5. associate-*l*30.8%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{c \cdot \left(b \cdot i\right)}\right)} - 1\right)\right) \]
    7. Applied egg-rr30.8%

      \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)} - 1\right)}\right) \]
    8. Step-by-step derivation
      1. expm1-def36.7%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)\right)}\right) \]
      2. expm1-log1p74.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{+57}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -3.1 \cdot 10^{-15}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -2.2 \cdot 10^{-19}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.65 \cdot 10^{-173}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq -9.2 \cdot 10^{-237}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{+25}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.9 \cdot 10^{+67}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \]

Alternative 6: 85.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ t_2 := 2 \cdot \left(x \cdot y + \left(z \cdot t - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{if}\;c \leq -1.8 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -4 \cdot 10^{-113}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 1.55 \cdot 10^{-168}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 10^{-57}:\\ \;\;\;\;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 (- (* x y) (* c (* (+ a (* b c)) i)))))
        (t_2 (* 2.0 (+ (* x y) (- (* z t) (* (* b c) (* c i)))))))
   (if (<= c -1.8e+134)
     t_1
     (if (<= c -4e-113)
       t_2
       (if (<= c 1.55e-168)
         (* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
         (if (<= c 1e-57) 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 * ((x * y) - (c * ((a + (b * c)) * i)));
	double t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))));
	double tmp;
	if (c <= -1.8e+134) {
		tmp = t_1;
	} else if (c <= -4e-113) {
		tmp = t_2;
	} else if (c <= 1.55e-168) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	} else if (c <= 1e-57) {
		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 * ((x * y) - (c * ((a + (b * c)) * i)))
    t_2 = 2.0d0 * ((x * y) + ((z * t) - ((b * c) * (c * i))))
    if (c <= (-1.8d+134)) then
        tmp = t_1
    else if (c <= (-4d-113)) then
        tmp = t_2
    else if (c <= 1.55d-168) then
        tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
    else if (c <= 1d-57) 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 * ((x * y) - (c * ((a + (b * c)) * i)));
	double t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))));
	double tmp;
	if (c <= -1.8e+134) {
		tmp = t_1;
	} else if (c <= -4e-113) {
		tmp = t_2;
	} else if (c <= 1.55e-168) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	} else if (c <= 1e-57) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) - (c * ((a + (b * c)) * i)))
	t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))))
	tmp = 0
	if c <= -1.8e+134:
		tmp = t_1
	elif c <= -4e-113:
		tmp = t_2
	elif c <= 1.55e-168:
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)))
	elif c <= 1e-57:
		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(Float64(x * y) - Float64(c * Float64(Float64(a + Float64(b * c)) * i))))
	t_2 = Float64(2.0 * Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(Float64(b * c) * Float64(c * i)))))
	tmp = 0.0
	if (c <= -1.8e+134)
		tmp = t_1;
	elseif (c <= -4e-113)
		tmp = t_2;
	elseif (c <= 1.55e-168)
		tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c))));
	elseif (c <= 1e-57)
		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 * ((x * y) - (c * ((a + (b * c)) * i)));
	t_2 = 2.0 * ((x * y) + ((z * t) - ((b * c) * (c * i))));
	tmp = 0.0;
	if (c <= -1.8e+134)
		tmp = t_1;
	elseif (c <= -4e-113)
		tmp = t_2;
	elseif (c <= 1.55e-168)
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	elseif (c <= 1e-57)
		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[(N[(x * y), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.8e+134], t$95$1, If[LessEqual[c, -4e-113], t$95$2, If[LessEqual[c, 1.55e-168], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1e-57], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -4 \cdot 10^{-113}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq 10^{-57}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.79999999999999994e134 or 9.99999999999999955e-58 < c

    1. Initial program 83.8%

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

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

    if -1.79999999999999994e134 < c < -3.99999999999999991e-113 or 1.55e-168 < c < 9.99999999999999955e-58

    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. Taylor expanded in a around 0 93.8%

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

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

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

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

    if -3.99999999999999991e-113 < c < 1.55e-168

    1. Initial program 98.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.8 \cdot 10^{+134}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -4 \cdot 10^{-113}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq 1.55 \cdot 10^{-168}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 10^{-57}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 7: 85.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;c \leq -1.15 \cdot 10^{-112}:\\
\;\;\;\;2 \cdot \left(t_2 - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -3.49999999999999997e142 or 1.25e-57 < c

    1. Initial program 84.3%

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

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

    if -3.49999999999999997e142 < c < -1.14999999999999995e-112

    1. Initial program 90.6%

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

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

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

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

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

    if -1.14999999999999995e-112 < c < 1.4499999999999999e-168

    1. Initial program 98.5%

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

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

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

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

    if 1.4499999999999999e-168 < c < 1.25e-57

    1. Initial program 95.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.5 \cdot 10^{+142}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1.15 \cdot 10^{-112}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{-168}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{-57}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 8: 49.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-237}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.6 \cdot 10^{+27}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 6.8 \cdot 10^{+66}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \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 (* b (* c i))))))
   (if (<= c -1.15e+204)
     t_1
     (if (<= c -1.1e+180)
       (* -2.0 (* a (* c i)))
       (if (<= c -2.4e+58)
         t_1
         (if (<= c -8.6e-237)
           (* 2.0 (* z t))
           (if (<= c 1.6e+27)
             (* (* x y) 2.0)
             (if (<= c 6.8e+66) (* -2.0 (* c (* a 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 * (b * (c * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_1;
	} else if (c <= -1.1e+180) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= -2.4e+58) {
		tmp = t_1;
	} else if (c <= -8.6e-237) {
		tmp = 2.0 * (z * t);
	} else if (c <= 1.6e+27) {
		tmp = (x * y) * 2.0;
	} else if (c <= 6.8e+66) {
		tmp = -2.0 * (c * (a * 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 * (b * (c * i)))
    if (c <= (-1.15d+204)) then
        tmp = t_1
    else if (c <= (-1.1d+180)) then
        tmp = (-2.0d0) * (a * (c * i))
    else if (c <= (-2.4d+58)) then
        tmp = t_1
    else if (c <= (-8.6d-237)) then
        tmp = 2.0d0 * (z * t)
    else if (c <= 1.6d+27) then
        tmp = (x * y) * 2.0d0
    else if (c <= 6.8d+66) then
        tmp = (-2.0d0) * (c * (a * 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 * (b * (c * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_1;
	} else if (c <= -1.1e+180) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= -2.4e+58) {
		tmp = t_1;
	} else if (c <= -8.6e-237) {
		tmp = 2.0 * (z * t);
	} else if (c <= 1.6e+27) {
		tmp = (x * y) * 2.0;
	} else if (c <= 6.8e+66) {
		tmp = -2.0 * (c * (a * i));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = -2.0 * (c * (b * (c * i)))
	tmp = 0
	if c <= -1.15e+204:
		tmp = t_1
	elif c <= -1.1e+180:
		tmp = -2.0 * (a * (c * i))
	elif c <= -2.4e+58:
		tmp = t_1
	elif c <= -8.6e-237:
		tmp = 2.0 * (z * t)
	elif c <= 1.6e+27:
		tmp = (x * y) * 2.0
	elif c <= 6.8e+66:
		tmp = -2.0 * (c * (a * 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(b * Float64(c * i))))
	tmp = 0.0
	if (c <= -1.15e+204)
		tmp = t_1;
	elseif (c <= -1.1e+180)
		tmp = Float64(-2.0 * Float64(a * Float64(c * i)));
	elseif (c <= -2.4e+58)
		tmp = t_1;
	elseif (c <= -8.6e-237)
		tmp = Float64(2.0 * Float64(z * t));
	elseif (c <= 1.6e+27)
		tmp = Float64(Float64(x * y) * 2.0);
	elseif (c <= 6.8e+66)
		tmp = Float64(-2.0 * Float64(c * Float64(a * 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 * (b * (c * i)));
	tmp = 0.0;
	if (c <= -1.15e+204)
		tmp = t_1;
	elseif (c <= -1.1e+180)
		tmp = -2.0 * (a * (c * i));
	elseif (c <= -2.4e+58)
		tmp = t_1;
	elseif (c <= -8.6e-237)
		tmp = 2.0 * (z * t);
	elseif (c <= 1.6e+27)
		tmp = (x * y) * 2.0;
	elseif (c <= 6.8e+66)
		tmp = -2.0 * (c * (a * 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[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$1, If[LessEqual[c, -1.1e+180], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.4e+58], t$95$1, If[LessEqual[c, -8.6e-237], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.6e+27], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[c, 6.8e+66], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq -2.4 \cdot 10^{+58}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 1.6 \cdot 10^{+27}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.14999999999999995e204 or -1.1e180 < c < -2.4e58 or 6.8000000000000006e66 < c

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

    if -1.14999999999999995e204 < c < -1.1e180

    1. Initial program 71.5%

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

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

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

    if -2.4e58 < c < -8.59999999999999965e-237

    1. Initial program 97.8%

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

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

    if -8.59999999999999965e-237 < c < 1.60000000000000008e27

    1. Initial program 97.5%

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

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

    if 1.60000000000000008e27 < c < 6.8000000000000006e66

    1. Initial program 90.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{+58}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-237}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.6 \cdot 10^{+27}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 6.8 \cdot 10^{+66}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 9: 68.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\ t_2 := -2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{+88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 1.85 \cdot 10^{+28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.06 \cdot 10^{+48}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 9.2 \cdot 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (+ (* x y) (* z t)) 2.0)) (t_2 (* -2.0 (* c (* c (* b i))))))
   (if (<= c -1.15e+204)
     t_2
     (if (<= c -1.1e+180)
       (* -2.0 (* a (* c i)))
       (if (<= c -2.8e+88)
         t_2
         (if (<= c 1.85e+28)
           t_1
           (if (<= c 1.06e+48)
             (* -2.0 (* c (* a i)))
             (if (<= c 9.2e+61) t_1 (* -2.0 (* (* b c) (* c i)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = -2.0 * (c * (c * (b * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_2;
	} else if (c <= -1.1e+180) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= -2.8e+88) {
		tmp = t_2;
	} else if (c <= 1.85e+28) {
		tmp = t_1;
	} else if (c <= 1.06e+48) {
		tmp = -2.0 * (c * (a * i));
	} else if (c <= 9.2e+61) {
		tmp = t_1;
	} else {
		tmp = -2.0 * ((b * c) * (c * i));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((x * y) + (z * t)) * 2.0d0
    t_2 = (-2.0d0) * (c * (c * (b * i)))
    if (c <= (-1.15d+204)) then
        tmp = t_2
    else if (c <= (-1.1d+180)) then
        tmp = (-2.0d0) * (a * (c * i))
    else if (c <= (-2.8d+88)) then
        tmp = t_2
    else if (c <= 1.85d+28) then
        tmp = t_1
    else if (c <= 1.06d+48) then
        tmp = (-2.0d0) * (c * (a * i))
    else if (c <= 9.2d+61) then
        tmp = t_1
    else
        tmp = (-2.0d0) * ((b * c) * (c * i))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = -2.0 * (c * (c * (b * i)));
	double tmp;
	if (c <= -1.15e+204) {
		tmp = t_2;
	} else if (c <= -1.1e+180) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= -2.8e+88) {
		tmp = t_2;
	} else if (c <= 1.85e+28) {
		tmp = t_1;
	} else if (c <= 1.06e+48) {
		tmp = -2.0 * (c * (a * i));
	} else if (c <= 9.2e+61) {
		tmp = t_1;
	} else {
		tmp = -2.0 * ((b * c) * (c * i));
	}
	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 * (c * (b * i)))
	tmp = 0
	if c <= -1.15e+204:
		tmp = t_2
	elif c <= -1.1e+180:
		tmp = -2.0 * (a * (c * i))
	elif c <= -2.8e+88:
		tmp = t_2
	elif c <= 1.85e+28:
		tmp = t_1
	elif c <= 1.06e+48:
		tmp = -2.0 * (c * (a * i))
	elif c <= 9.2e+61:
		tmp = t_1
	else:
		tmp = -2.0 * ((b * c) * (c * i))
	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(c * Float64(b * i))))
	tmp = 0.0
	if (c <= -1.15e+204)
		tmp = t_2;
	elseif (c <= -1.1e+180)
		tmp = Float64(-2.0 * Float64(a * Float64(c * i)));
	elseif (c <= -2.8e+88)
		tmp = t_2;
	elseif (c <= 1.85e+28)
		tmp = t_1;
	elseif (c <= 1.06e+48)
		tmp = Float64(-2.0 * Float64(c * Float64(a * i)));
	elseif (c <= 9.2e+61)
		tmp = t_1;
	else
		tmp = Float64(-2.0 * Float64(Float64(b * c) * Float64(c * i)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = ((x * y) + (z * t)) * 2.0;
	t_2 = -2.0 * (c * (c * (b * i)));
	tmp = 0.0;
	if (c <= -1.15e+204)
		tmp = t_2;
	elseif (c <= -1.1e+180)
		tmp = -2.0 * (a * (c * i));
	elseif (c <= -2.8e+88)
		tmp = t_2;
	elseif (c <= 1.85e+28)
		tmp = t_1;
	elseif (c <= 1.06e+48)
		tmp = -2.0 * (c * (a * i));
	elseif (c <= 9.2e+61)
		tmp = t_1;
	else
		tmp = -2.0 * ((b * c) * (c * i));
	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[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+204], t$95$2, If[LessEqual[c, -1.1e+180], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.8e+88], t$95$2, If[LessEqual[c, 1.85e+28], t$95$1, If[LessEqual[c, 1.06e+48], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.2e+61], t$95$1, N[(-2.0 * N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\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(c \cdot \left(b \cdot i\right)\right)\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq -2.8 \cdot 10^{+88}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 1.85 \cdot 10^{+28}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 9.2 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.14999999999999995e204 or -1.1e180 < c < -2.79999999999999989e88

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)\right)}\right) \]
      2. expm1-udef43.3%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)} - 1\right)}\right) \]
      3. associate-*r*41.3%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot i}\right)} - 1\right)\right) \]
      4. *-commutative41.3%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(c \cdot b\right)} \cdot i\right)} - 1\right)\right) \]
      5. associate-*l*43.3%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{c \cdot \left(b \cdot i\right)}\right)} - 1\right)\right) \]
    7. Applied egg-rr43.3%

      \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)} - 1\right)}\right) \]
    8. Step-by-step derivation
      1. expm1-def43.5%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)\right)}\right) \]
      2. expm1-log1p75.3%

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

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

    if -1.14999999999999995e204 < c < -1.1e180

    1. Initial program 71.5%

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

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

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

    if -2.79999999999999989e88 < c < 1.85e28 or 1.06e48 < c < 9.1999999999999998e61

    1. Initial program 97.1%

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

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

    if 1.85e28 < c < 1.06e48

    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. Taylor expanded in x around 0 100.0%

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

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

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

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

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

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

    if 9.1999999999999998e61 < c

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)\right)}\right) \]
      2. expm1-udef31.0%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)} - 1\right)}\right) \]
      3. associate-*r*32.4%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot i}\right)} - 1\right)\right) \]
      4. *-commutative32.4%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(c \cdot b\right)} \cdot i\right)} - 1\right)\right) \]
      5. associate-*l*31.0%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{c \cdot \left(b \cdot i\right)}\right)} - 1\right)\right) \]
    7. Applied egg-rr31.0%

      \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)} - 1\right)}\right) \]
    8. Step-by-step derivation
      1. expm1-def36.5%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)\right)}\right) \]
      2. expm1-log1p72.4%

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(\left(b \cdot c\right) \cdot \color{blue}{\left(i \cdot c\right)}\right) \]
    12. Simplified75.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{+204}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+180}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{+88}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq 1.85 \cdot 10^{+28}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.06 \cdot 10^{+48}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 9.2 \cdot 10^{+61}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \]

Alternative 10: 68.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y + z \cdot t\right) \cdot 2\\ t_2 := \left(b \cdot -2\right) \cdot \left(i \cdot \left(c \cdot c\right)\right)\\ \mathbf{if}\;c \leq -1.2 \cdot 10^{+204}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -5.8 \cdot 10^{+177}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -3 \cdot 10^{+82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 3.3 \cdot 10^{+28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.65 \cdot 10^{+48}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 4.9 \cdot 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (+ (* x y) (* z t)) 2.0)) (t_2 (* (* b -2.0) (* i (* c c)))))
   (if (<= c -1.2e+204)
     t_2
     (if (<= c -5.8e+177)
       (* -2.0 (* a (* c i)))
       (if (<= c -3e+82)
         t_2
         (if (<= c 3.3e+28)
           t_1
           (if (<= c 2.65e+48)
             (* -2.0 (* c (* a i)))
             (if (<= c 4.9e+61) t_1 (* -2.0 (* (* b c) (* c i)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = (b * -2.0) * (i * (c * c));
	double tmp;
	if (c <= -1.2e+204) {
		tmp = t_2;
	} else if (c <= -5.8e+177) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= -3e+82) {
		tmp = t_2;
	} else if (c <= 3.3e+28) {
		tmp = t_1;
	} else if (c <= 2.65e+48) {
		tmp = -2.0 * (c * (a * i));
	} else if (c <= 4.9e+61) {
		tmp = t_1;
	} else {
		tmp = -2.0 * ((b * c) * (c * i));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((x * y) + (z * t)) * 2.0d0
    t_2 = (b * (-2.0d0)) * (i * (c * c))
    if (c <= (-1.2d+204)) then
        tmp = t_2
    else if (c <= (-5.8d+177)) then
        tmp = (-2.0d0) * (a * (c * i))
    else if (c <= (-3d+82)) then
        tmp = t_2
    else if (c <= 3.3d+28) then
        tmp = t_1
    else if (c <= 2.65d+48) then
        tmp = (-2.0d0) * (c * (a * i))
    else if (c <= 4.9d+61) then
        tmp = t_1
    else
        tmp = (-2.0d0) * ((b * c) * (c * i))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((x * y) + (z * t)) * 2.0;
	double t_2 = (b * -2.0) * (i * (c * c));
	double tmp;
	if (c <= -1.2e+204) {
		tmp = t_2;
	} else if (c <= -5.8e+177) {
		tmp = -2.0 * (a * (c * i));
	} else if (c <= -3e+82) {
		tmp = t_2;
	} else if (c <= 3.3e+28) {
		tmp = t_1;
	} else if (c <= 2.65e+48) {
		tmp = -2.0 * (c * (a * i));
	} else if (c <= 4.9e+61) {
		tmp = t_1;
	} else {
		tmp = -2.0 * ((b * c) * (c * i));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = ((x * y) + (z * t)) * 2.0
	t_2 = (b * -2.0) * (i * (c * c))
	tmp = 0
	if c <= -1.2e+204:
		tmp = t_2
	elif c <= -5.8e+177:
		tmp = -2.0 * (a * (c * i))
	elif c <= -3e+82:
		tmp = t_2
	elif c <= 3.3e+28:
		tmp = t_1
	elif c <= 2.65e+48:
		tmp = -2.0 * (c * (a * i))
	elif c <= 4.9e+61:
		tmp = t_1
	else:
		tmp = -2.0 * ((b * c) * (c * i))
	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(Float64(b * -2.0) * Float64(i * Float64(c * c)))
	tmp = 0.0
	if (c <= -1.2e+204)
		tmp = t_2;
	elseif (c <= -5.8e+177)
		tmp = Float64(-2.0 * Float64(a * Float64(c * i)));
	elseif (c <= -3e+82)
		tmp = t_2;
	elseif (c <= 3.3e+28)
		tmp = t_1;
	elseif (c <= 2.65e+48)
		tmp = Float64(-2.0 * Float64(c * Float64(a * i)));
	elseif (c <= 4.9e+61)
		tmp = t_1;
	else
		tmp = Float64(-2.0 * Float64(Float64(b * c) * Float64(c * i)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = ((x * y) + (z * t)) * 2.0;
	t_2 = (b * -2.0) * (i * (c * c));
	tmp = 0.0;
	if (c <= -1.2e+204)
		tmp = t_2;
	elseif (c <= -5.8e+177)
		tmp = -2.0 * (a * (c * i));
	elseif (c <= -3e+82)
		tmp = t_2;
	elseif (c <= 3.3e+28)
		tmp = t_1;
	elseif (c <= 2.65e+48)
		tmp = -2.0 * (c * (a * i));
	elseif (c <= 4.9e+61)
		tmp = t_1;
	else
		tmp = -2.0 * ((b * c) * (c * i));
	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[(N[(b * -2.0), $MachinePrecision] * N[(i * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.2e+204], t$95$2, If[LessEqual[c, -5.8e+177], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3e+82], t$95$2, If[LessEqual[c, 3.3e+28], t$95$1, If[LessEqual[c, 2.65e+48], N[(-2.0 * N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.9e+61], t$95$1, N[(-2.0 * N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -3 \cdot 10^{+82}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 3.3 \cdot 10^{+28}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 4.9 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.2e204 or -5.80000000000000027e177 < c < -2.99999999999999989e82

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-2 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*78.9%

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

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

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

    if -1.2e204 < c < -5.80000000000000027e177

    1. Initial program 68.6%

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

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

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

    if -2.99999999999999989e82 < c < 3.3e28 or 2.65e48 < c < 4.90000000000000025e61

    1. Initial program 97.1%

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

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

    if 3.3e28 < c < 2.65e48

    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. Taylor expanded in x around 0 100.0%

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

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

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

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

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

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

    if 4.90000000000000025e61 < c

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)\right)}\right) \]
      2. expm1-udef31.0%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \left(c \cdot i\right)\right)} - 1\right)}\right) \]
      3. associate-*r*32.4%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot i}\right)} - 1\right)\right) \]
      4. *-commutative32.4%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(c \cdot b\right)} \cdot i\right)} - 1\right)\right) \]
      5. associate-*l*31.0%

        \[\leadsto -2 \cdot \left(c \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{c \cdot \left(b \cdot i\right)}\right)} - 1\right)\right) \]
    7. Applied egg-rr31.0%

      \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)} - 1\right)}\right) \]
    8. Step-by-step derivation
      1. expm1-def36.5%

        \[\leadsto -2 \cdot \left(c \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(c \cdot \left(b \cdot i\right)\right)\right)}\right) \]
      2. expm1-log1p72.4%

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left(\left(b \cdot c\right) \cdot \color{blue}{\left(i \cdot c\right)}\right) \]
    12. Simplified75.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.2 \cdot 10^{+204}:\\ \;\;\;\;\left(b \cdot -2\right) \cdot \left(i \cdot \left(c \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -5.8 \cdot 10^{+177}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -3 \cdot 10^{+82}:\\ \;\;\;\;\left(b \cdot -2\right) \cdot \left(i \cdot \left(c \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 3.3 \cdot 10^{+28}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 2.65 \cdot 10^{+48}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 4.9 \cdot 10^{+61}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \]

Alternative 11: 80.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.4 \cdot 10^{-19} \lor \neg \left(c \leq 1.4 \cdot 10^{-37}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -8.3999999999999996e-19 or 1.4000000000000001e-37 < c

    1. Initial program 85.0%

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

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

    if -8.3999999999999996e-19 < c < 1.4000000000000001e-37

    1. Initial program 97.1%

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

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

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

Alternative 12: 79.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.05 \cdot 10^{+80} \lor \neg \left(c \leq 1.25 \cdot 10^{-57}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - 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.05000000000000001e80 or 1.25e-57 < c

    1. Initial program 84.0%

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

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

    if -1.05000000000000001e80 < c < 1.25e-57

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.05 \cdot 10^{+80} \lor \neg \left(c \leq 1.25 \cdot 10^{-57}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - 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} \]

Alternative 13: 86.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.8 \cdot 10^{+84} \lor \neg \left(c \leq 2.4 \cdot 10^{-27}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.8e84 or 2.40000000000000002e-27 < c

    1. Initial program 83.2%

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

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

    if -1.8e84 < c < 2.40000000000000002e-27

    1. Initial program 96.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. 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) \]
    3. 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) \]
    4. Simplified89.8%

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

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

Alternative 14: 75.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -2.1 \cdot 10^{+80} \lor \neg \left(c \leq 1.55 \cdot 10^{+23}\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 -2.1e+80) (not (<= c 1.55e+23)))
   (* -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 <= -2.1e+80) || !(c <= 1.55e+23)) {
		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 <= (-2.1d+80)) .or. (.not. (c <= 1.55d+23))) 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 <= -2.1e+80) || !(c <= 1.55e+23)) {
		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 <= -2.1e+80) or not (c <= 1.55e+23):
		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 <= -2.1e+80) || !(c <= 1.55e+23))
		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 <= -2.1e+80) || ~((c <= 1.55e+23)))
		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, -2.1e+80], N[Not[LessEqual[c, 1.55e+23]], $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 -2.1 \cdot 10^{+80} \lor \neg \left(c \leq 1.55 \cdot 10^{+23}\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 < -2.10000000000000001e80 or 1.54999999999999985e23 < c

    1. Initial program 82.3%

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

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

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

    if -2.10000000000000001e80 < c < 1.54999999999999985e23

    1. Initial program 97.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.1 \cdot 10^{+80} \lor \neg \left(c \leq 1.55 \cdot 10^{+23}\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} \]

Alternative 15: 39.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y\right) \cdot 2\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;t \leq -2.65 \cdot 10^{-92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+53}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+95}:\\ \;\;\;\;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) 2.0)) (t_2 (* 2.0 (* z t))))
   (if (<= t -2.65e-92)
     t_2
     (if (<= t 4.3e-18)
       t_1
       (if (<= t 1.75e+53)
         (* -2.0 (* a (* c i)))
         (if (<= t 7.5e+95) 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) * 2.0;
	double t_2 = 2.0 * (z * t);
	double tmp;
	if (t <= -2.65e-92) {
		tmp = t_2;
	} else if (t <= 4.3e-18) {
		tmp = t_1;
	} else if (t <= 1.75e+53) {
		tmp = -2.0 * (a * (c * i));
	} else if (t <= 7.5e+95) {
		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) * 2.0d0
    t_2 = 2.0d0 * (z * t)
    if (t <= (-2.65d-92)) then
        tmp = t_2
    else if (t <= 4.3d-18) then
        tmp = t_1
    else if (t <= 1.75d+53) then
        tmp = (-2.0d0) * (a * (c * i))
    else if (t <= 7.5d+95) 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) * 2.0;
	double t_2 = 2.0 * (z * t);
	double tmp;
	if (t <= -2.65e-92) {
		tmp = t_2;
	} else if (t <= 4.3e-18) {
		tmp = t_1;
	} else if (t <= 1.75e+53) {
		tmp = -2.0 * (a * (c * i));
	} else if (t <= 7.5e+95) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (x * y) * 2.0
	t_2 = 2.0 * (z * t)
	tmp = 0
	if t <= -2.65e-92:
		tmp = t_2
	elif t <= 4.3e-18:
		tmp = t_1
	elif t <= 1.75e+53:
		tmp = -2.0 * (a * (c * i))
	elif t <= 7.5e+95:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(x * y) * 2.0)
	t_2 = Float64(2.0 * Float64(z * t))
	tmp = 0.0
	if (t <= -2.65e-92)
		tmp = t_2;
	elseif (t <= 4.3e-18)
		tmp = t_1;
	elseif (t <= 1.75e+53)
		tmp = Float64(-2.0 * Float64(a * Float64(c * i)));
	elseif (t <= 7.5e+95)
		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) * 2.0;
	t_2 = 2.0 * (z * t);
	tmp = 0.0;
	if (t <= -2.65e-92)
		tmp = t_2;
	elseif (t <= 4.3e-18)
		tmp = t_1;
	elseif (t <= 1.75e+53)
		tmp = -2.0 * (a * (c * i));
	elseif (t <= 7.5e+95)
		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[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e-92], t$95$2, If[LessEqual[t, 4.3e-18], t$95$1, If[LessEqual[t, 1.75e+53], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+95], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot y\right) \cdot 2\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{-92}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-18}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+95}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.65000000000000015e-92 or 7.5000000000000001e95 < t

    1. Initial program 85.3%

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

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

    if -2.65000000000000015e-92 < t < 4.3000000000000002e-18 or 1.75000000000000009e53 < t < 7.5000000000000001e95

    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. Taylor expanded in x around inf 39.8%

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

    if 4.3000000000000002e-18 < t < 1.75000000000000009e53

    1. Initial program 100.0%

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

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

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

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

Alternative 16: 40.1% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-92} \lor \neg \left(t \leq 7.2 \cdot 10^{+95}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.30000000000000016e-92 or 7.19999999999999955e95 < t

    1. Initial program 85.3%

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

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

    if -2.30000000000000016e-92 < t < 7.19999999999999955e95

    1. Initial program 94.4%

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

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

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

Alternative 17: 28.9% accurate, 3.8× speedup?

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

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

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

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

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

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

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

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