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

Percentage Accurate: 90.0% → 96.4%
Time: 17.8s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 90.0% accurate, 1.0× speedup?

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

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

Alternative 1: 96.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot c\\ t_2 := x \cdot y + z \cdot t\\ \mathbf{if}\;t\_2 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\ \;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(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 (* (* c t_1) i)) 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 - ((c * t_1) * i)) <= ((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 - ((c * t_1) * i)) <= 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 - ((c * t_1) * i)) <= 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(Float64(c * t_1) * i)) <= Inf)
		tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i))));
	else
		tmp = Float64(-2.0 * Float64(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 - ((c * t_1) * i)) <= 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[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(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 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\

\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(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 95.6%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. fma-define95.6%

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

Alternative 2: 94.6% accurate, 0.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;-2 \cdot t\_2\\


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

    1. Initial program 65.3%

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

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

    if -2.0000000000000001e276 < (*.f64 (+.f64 a (*.f64 b c)) c) < 2.0000000000000002e302

    1. Initial program 98.8%

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

    if 2.0000000000000002e302 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 68.1%

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

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

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

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

Alternative 3: 64.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot \left(-i\right)\right)\\ \mathbf{if}\;i \leq -1.75 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq -4.9 \cdot 10^{-183}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;i \leq 1.35 \cdot 10^{-95}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;i \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;i \leq 2.5 \cdot 10^{+27}:\\ \;\;\;\;2 \cdot \left(z \cdot t - 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 (+ a (* b c))) (- i)))))
   (if (<= i -1.75e+98)
     t_1
     (if (<= i -4.9e-183)
       (* 2.0 (- (* z t) (* c (* b (* c i)))))
       (if (<= i 1.35e-95)
         (* (+ (* x y) (* z t)) 2.0)
         (if (<= i 1.7e-28)
           (* 2.0 (- (* z t) (* b (* c (* c i)))))
           (if (<= i 2.5e+27) (* 2.0 (- (* z t) (* 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 * (a + (b * c))) * -i);
	double tmp;
	if (i <= -1.75e+98) {
		tmp = t_1;
	} else if (i <= -4.9e-183) {
		tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
	} else if (i <= 1.35e-95) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (i <= 1.7e-28) {
		tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
	} else if (i <= 2.5e+27) {
		tmp = 2.0 * ((z * t) - (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 * (a + (b * c))) * -i)
    if (i <= (-1.75d+98)) then
        tmp = t_1
    else if (i <= (-4.9d-183)) then
        tmp = 2.0d0 * ((z * t) - (c * (b * (c * i))))
    else if (i <= 1.35d-95) then
        tmp = ((x * y) + (z * t)) * 2.0d0
    else if (i <= 1.7d-28) then
        tmp = 2.0d0 * ((z * t) - (b * (c * (c * i))))
    else if (i <= 2.5d+27) then
        tmp = 2.0d0 * ((z * t) - (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 * (a + (b * c))) * -i);
	double tmp;
	if (i <= -1.75e+98) {
		tmp = t_1;
	} else if (i <= -4.9e-183) {
		tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
	} else if (i <= 1.35e-95) {
		tmp = ((x * y) + (z * t)) * 2.0;
	} else if (i <= 1.7e-28) {
		tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
	} else if (i <= 2.5e+27) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((c * (a + (b * c))) * -i)
	tmp = 0
	if i <= -1.75e+98:
		tmp = t_1
	elif i <= -4.9e-183:
		tmp = 2.0 * ((z * t) - (c * (b * (c * i))))
	elif i <= 1.35e-95:
		tmp = ((x * y) + (z * t)) * 2.0
	elif i <= 1.7e-28:
		tmp = 2.0 * ((z * t) - (b * (c * (c * i))))
	elif i <= 2.5e+27:
		tmp = 2.0 * ((z * t) - (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(Float64(c * Float64(a + Float64(b * c))) * Float64(-i)))
	tmp = 0.0
	if (i <= -1.75e+98)
		tmp = t_1;
	elseif (i <= -4.9e-183)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(b * Float64(c * i)))));
	elseif (i <= 1.35e-95)
		tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) * 2.0);
	elseif (i <= 1.7e-28)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(b * Float64(c * Float64(c * i)))));
	elseif (i <= 2.5e+27)
		tmp = Float64(2.0 * Float64(Float64(z * t) - 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 * (a + (b * c))) * -i);
	tmp = 0.0;
	if (i <= -1.75e+98)
		tmp = t_1;
	elseif (i <= -4.9e-183)
		tmp = 2.0 * ((z * t) - (c * (b * (c * i))));
	elseif (i <= 1.35e-95)
		tmp = ((x * y) + (z * t)) * 2.0;
	elseif (i <= 1.7e-28)
		tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
	elseif (i <= 2.5e+27)
		tmp = 2.0 * ((z * t) - (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[(N[(c * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.75e+98], t$95$1, If[LessEqual[i, -4.9e-183], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.35e-95], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[i, 1.7e-28], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.5e+27], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;i \leq 2.5 \cdot 10^{+27}:\\
\;\;\;\;2 \cdot \left(z \cdot t - 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 i < -1.75e98 or 2.4999999999999999e27 < i

    1. Initial program 89.2%

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

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

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

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

    if -1.75e98 < i < -4.9e-183

    1. Initial program 90.9%

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

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

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

    if -4.9e-183 < i < 1.35e-95

    1. Initial program 87.2%

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

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

    if 1.35e-95 < i < 1.7e-28

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

    if 1.7e-28 < i < 2.4999999999999999e27

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.75 \cdot 10^{+98}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;i \leq -4.9 \cdot 10^{-183}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;i \leq 1.35 \cdot 10^{-95}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;i \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;i \leq 2.5 \cdot 10^{+27}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot \left(-i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 64.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;i \leq -6.2 \cdot 10^{-181}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;i \leq 7.6 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.85000000000000005e99 or 2.99999999999999978e30 < i

    1. Initial program 89.2%

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

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

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

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

    if -1.85000000000000005e99 < i < -6.20000000000000043e-181 or 1.3e-95 < i < 7.5999999999999999e-31

    1. Initial program 89.1%

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

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

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

    if -6.20000000000000043e-181 < i < 1.3e-95

    1. Initial program 87.2%

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

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

    if 7.5999999999999999e-31 < i < 2.99999999999999978e30

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.85 \cdot 10^{+99}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;i \leq -6.2 \cdot 10^{-181}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;i \leq 1.3 \cdot 10^{-95}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;i \leq 7.6 \cdot 10^{-31}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;i \leq 3 \cdot 10^{+30}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot \left(-i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 37.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;z \leq -1.78 \cdot 10^{+137}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.1 \cdot 10^{+19}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -6.3 \cdot 10^{-221}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-292}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(c \cdot \left(-a\right)\right)\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-32}:\\ \;\;\;\;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 (* z t))) (t_2 (* (* x y) 2.0)))
   (if (<= z -1.78e+137)
     t_1
     (if (<= z -7.1e+19)
       (* -2.0 (* a (* c i)))
       (if (<= z -6.3e-221)
         t_2
         (if (<= z 1.1e-292)
           (* 2.0 (* i (* c (- a))))
           (if (<= z 5.4e-32) 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 * (z * t);
	double t_2 = (x * y) * 2.0;
	double tmp;
	if (z <= -1.78e+137) {
		tmp = t_1;
	} else if (z <= -7.1e+19) {
		tmp = -2.0 * (a * (c * i));
	} else if (z <= -6.3e-221) {
		tmp = t_2;
	} else if (z <= 1.1e-292) {
		tmp = 2.0 * (i * (c * -a));
	} else if (z <= 5.4e-32) {
		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 * (z * t)
    t_2 = (x * y) * 2.0d0
    if (z <= (-1.78d+137)) then
        tmp = t_1
    else if (z <= (-7.1d+19)) then
        tmp = (-2.0d0) * (a * (c * i))
    else if (z <= (-6.3d-221)) then
        tmp = t_2
    else if (z <= 1.1d-292) then
        tmp = 2.0d0 * (i * (c * -a))
    else if (z <= 5.4d-32) 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 * (z * t);
	double t_2 = (x * y) * 2.0;
	double tmp;
	if (z <= -1.78e+137) {
		tmp = t_1;
	} else if (z <= -7.1e+19) {
		tmp = -2.0 * (a * (c * i));
	} else if (z <= -6.3e-221) {
		tmp = t_2;
	} else if (z <= 1.1e-292) {
		tmp = 2.0 * (i * (c * -a));
	} else if (z <= 5.4e-32) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = (x * y) * 2.0
	tmp = 0
	if z <= -1.78e+137:
		tmp = t_1
	elif z <= -7.1e+19:
		tmp = -2.0 * (a * (c * i))
	elif z <= -6.3e-221:
		tmp = t_2
	elif z <= 1.1e-292:
		tmp = 2.0 * (i * (c * -a))
	elif z <= 5.4e-32:
		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(z * t))
	t_2 = Float64(Float64(x * y) * 2.0)
	tmp = 0.0
	if (z <= -1.78e+137)
		tmp = t_1;
	elseif (z <= -7.1e+19)
		tmp = Float64(-2.0 * Float64(a * Float64(c * i)));
	elseif (z <= -6.3e-221)
		tmp = t_2;
	elseif (z <= 1.1e-292)
		tmp = Float64(2.0 * Float64(i * Float64(c * Float64(-a))));
	elseif (z <= 5.4e-32)
		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 * (z * t);
	t_2 = (x * y) * 2.0;
	tmp = 0.0;
	if (z <= -1.78e+137)
		tmp = t_1;
	elseif (z <= -7.1e+19)
		tmp = -2.0 * (a * (c * i));
	elseif (z <= -6.3e-221)
		tmp = t_2;
	elseif (z <= 1.1e-292)
		tmp = 2.0 * (i * (c * -a));
	elseif (z <= 5.4e-32)
		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[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[z, -1.78e+137], t$95$1, If[LessEqual[z, -7.1e+19], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.3e-221], t$95$2, If[LessEqual[z, 1.1e-292], N[(2.0 * N[(i * N[(c * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e-32], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -6.3 \cdot 10^{-221}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 5.4 \cdot 10^{-32}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.77999999999999997e137 or 5.39999999999999962e-32 < z

    1. Initial program 87.3%

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

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

    if -1.77999999999999997e137 < z < -7.1e19

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

    if -7.1e19 < z < -6.29999999999999958e-221 or 1.10000000000000006e-292 < z < 5.39999999999999962e-32

    1. Initial program 92.9%

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

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

    if -6.29999999999999958e-221 < z < 1.10000000000000006e-292

    1. Initial program 84.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.78 \cdot 10^{+137}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;z \leq -7.1 \cdot 10^{+19}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -6.3 \cdot 10^{-221}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-292}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(c \cdot \left(-a\right)\right)\right)\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-32}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 37.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -1.55 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.45 \cdot 10^{-220}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 3.05 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-35}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.50000000000000025e137 or 4.00000000000000003e-35 < z

    1. Initial program 87.3%

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

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

    if -7.50000000000000025e137 < z < -1.55e20 or -2.4500000000000001e-220 < z < 3.04999999999999982e-292

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

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

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

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

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

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

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

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

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

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

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

    if -1.55e20 < z < -2.4500000000000001e-220 or 3.04999999999999982e-292 < z < 4.00000000000000003e-35

    1. Initial program 92.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+137}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+20}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-220}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-292}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-35}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 86.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;c \leq -3.5 \cdot 10^{+22} \lor \neg \left(c \leq 1.7 \cdot 10^{-47}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\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 3 regimes
  2. if c < -1.5500000000000001e164

    1. Initial program 70.8%

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

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

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

    if -1.5500000000000001e164 < c < -3.5e22 or 1.7000000000000001e-47 < c

    1. Initial program 82.0%

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

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

    if -3.5e22 < c < 1.7000000000000001e-47

    1. Initial program 98.4%

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

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

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

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

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

Alternative 8: 86.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;c \leq -2 \cdot 10^{+22} \lor \neg \left(c \leq 6.8 \cdot 10^{-49}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\

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


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

    1. Initial program 70.8%

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

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

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

    if -4e164 < c < -2e22 or 6.8000000000000001e-49 < c

    1. Initial program 82.0%

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

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

    if -2e22 < c < 6.8000000000000001e-49

    1. Initial program 98.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4 \cdot 10^{+164}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2 \cdot 10^{+22} \lor \neg \left(c \leq 6.8 \cdot 10^{-49}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - 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) - a \cdot \left(c \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.3% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -5.8000000000000001e170

    1. Initial program 72.2%

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

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

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

    if -5.8000000000000001e170 < c < -1.15000000000000001e-38

    1. Initial program 90.7%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. fma-define90.7%

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

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

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

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

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

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

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

    if -1.15000000000000001e-38 < c < 2.29999999999999982e-47

    1. Initial program 99.1%

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

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

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

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

    if 2.29999999999999982e-47 < c

    1. Initial program 77.4%

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

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

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

Alternative 10: 85.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;c \leq -1.25 \cdot 10^{-38}:\\
\;\;\;\;2 \cdot \left(t\_1 - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -7.00000000000000038e169

    1. Initial program 72.2%

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

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

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

    if -7.00000000000000038e169 < c < -1.25000000000000008e-38

    1. Initial program 90.7%

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

      \[\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) \]

    if -1.25000000000000008e-38 < c < 5.8000000000000001e-47

    1. Initial program 99.1%

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

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

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

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

    if 5.8000000000000001e-47 < c

    1. Initial program 77.4%

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

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

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

Alternative 11: 72.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -5.9 \cdot 10^{-182} \lor \neg \left(i \leq 5 \cdot 10^{-142}\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 (<= i -5.9e-182) (not (<= i 5e-142)))
   (* 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 ((i <= -5.9e-182) || !(i <= 5e-142)) {
		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 ((i <= (-5.9d-182)) .or. (.not. (i <= 5d-142))) 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 ((i <= -5.9e-182) || !(i <= 5e-142)) {
		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 (i <= -5.9e-182) or not (i <= 5e-142):
		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 ((i <= -5.9e-182) || !(i <= 5e-142))
		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 ((i <= -5.9e-182) || ~((i <= 5e-142)))
		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[i, -5.9e-182], N[Not[LessEqual[i, 5e-142]], $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}\;i \leq -5.9 \cdot 10^{-182} \lor \neg \left(i \leq 5 \cdot 10^{-142}\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 i < -5.89999999999999968e-182 or 5.0000000000000002e-142 < i

    1. Initial program 87.5%

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

    if -5.89999999999999968e-182 < i < 5.0000000000000002e-142

    1. Initial program 93.4%

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

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

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

Alternative 12: 65.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -1 \cdot 10^{+97} \lor \neg \left(i \leq 9500\right):\\
\;\;\;\;2 \cdot \left(\left(c \cdot \left(a + b \cdot c\right)\right) \cdot \left(-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 i < -1.0000000000000001e97 or 9500 < i

    1. Initial program 89.7%

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

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

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

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

    if -1.0000000000000001e97 < i < 9500

    1. Initial program 88.3%

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

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

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

Alternative 13: 75.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.35 \cdot 10^{+25} \lor \neg \left(c \leq 3.2 \cdot 10^{-21}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.35e25 or 3.2000000000000002e-21 < c

    1. Initial program 79.4%

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

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

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

    if -1.35e25 < c < 3.2000000000000002e-21

    1. Initial program 97.7%

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

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

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

Alternative 14: 56.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -5.8 \cdot 10^{+127} \lor \neg \left(i \leq 5.8 \cdot 10^{+74}\right):\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \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 (<= i -5.8e+127) (not (<= i 5.8e+74)))
   (* -2.0 (* a (* 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 ((i <= -5.8e+127) || !(i <= 5.8e+74)) {
		tmp = -2.0 * (a * (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 ((i <= (-5.8d+127)) .or. (.not. (i <= 5.8d+74))) then
        tmp = (-2.0d0) * (a * (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 ((i <= -5.8e+127) || !(i <= 5.8e+74)) {
		tmp = -2.0 * (a * (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 (i <= -5.8e+127) or not (i <= 5.8e+74):
		tmp = -2.0 * (a * (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 ((i <= -5.8e+127) || !(i <= 5.8e+74))
		tmp = Float64(-2.0 * Float64(a * Float64(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 ((i <= -5.8e+127) || ~((i <= 5.8e+74)))
		tmp = -2.0 * (a * (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[i, -5.8e+127], N[Not[LessEqual[i, 5.8e+74]], $MachinePrecision]], N[(-2.0 * N[(a * N[(c * 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}\;i \leq -5.8 \cdot 10^{+127} \lor \neg \left(i \leq 5.8 \cdot 10^{+74}\right):\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \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 i < -5.8000000000000004e127 or 5.8000000000000005e74 < i

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

    if -5.8000000000000004e127 < i < 5.8000000000000005e74

    1. Initial program 88.3%

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

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

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

Alternative 15: 39.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -11000000000000 \lor \neg \left(z \leq 1.85 \cdot 10^{-39}\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 (<= z -11000000000000.0) (not (<= z 1.85e-39)))
   (* 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 ((z <= -11000000000000.0) || !(z <= 1.85e-39)) {
		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 ((z <= (-11000000000000.0d0)) .or. (.not. (z <= 1.85d-39))) 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 ((z <= -11000000000000.0) || !(z <= 1.85e-39)) {
		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 (z <= -11000000000000.0) or not (z <= 1.85e-39):
		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 ((z <= -11000000000000.0) || !(z <= 1.85e-39))
		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 ((z <= -11000000000000.0) || ~((z <= 1.85e-39)))
		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[z, -11000000000000.0], N[Not[LessEqual[z, 1.85e-39]], $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}\;z \leq -11000000000000 \lor \neg \left(z \leq 1.85 \cdot 10^{-39}\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 z < -1.1e13 or 1.85000000000000007e-39 < z

    1. Initial program 86.7%

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

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

    if -1.1e13 < z < 1.85000000000000007e-39

    1. Initial program 91.0%

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

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

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

Alternative 16: 29.0% 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 88.9%

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

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

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

Developer target: 94.2% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024101 
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
  :precision binary64

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

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