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

Percentage Accurate: 89.5% → 96.7%
Time: 15.9s
Alternatives: 20
Speedup: 1.0×

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

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

Initial Program: 89.5% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 95.0%

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. associate--l+0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \color{blue}{y \cdot x + -1 \cdot \left(c \cdot \left(i \cdot \left(c \cdot b + a\right)\right)\right)}\right) \]
    5. Taylor expanded in c around inf 83.3%

      \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \color{blue}{-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-neg83.3%

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, \color{blue}{-{c}^{2} \cdot \left(i \cdot b\right)}\right) \]
      2. unpow283.3%

        \[\leadsto 2 \cdot \mathsf{fma}\left(z, t, -\color{blue}{\left(c \cdot c\right)} \cdot \left(i \cdot b\right)\right) \]
    7. Simplified83.3%

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

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

Alternative 2: 94.4% accurate, 0.2× speedup?

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

\\
2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Derivation
  1. Initial program 92.8%

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

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

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

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

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

Alternative 3: 92.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 77.2%

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

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

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

    1. Initial program 96.2%

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

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

Alternative 4: 44.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;c \leq -2.1 \cdot 10^{+78}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -5600000000000:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq -8 \cdot 10^{-92}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -6.2 \cdot 10^{-288}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.25 \cdot 10^{-141}:\\
\;\;\;\;t_2\\

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

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -3.40000000000000018e134 or -2.1000000000000001e78 < c < -5.6e12 or 1.1500000000000001e43 < c

    1. Initial program 85.0%

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. distribute-rgt-neg-in61.3%

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

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

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

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

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

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

    if -3.40000000000000018e134 < c < -2.1000000000000001e78 or -7.9999999999999999e-92 < c < -6.19999999999999967e-288 or 1.99999999999999989e-201 < c < 1.25e-141

    1. Initial program 98.5%

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

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

    if -5.6e12 < c < -7.9999999999999999e-92 or -6.19999999999999967e-288 < c < 1.99999999999999989e-201

    1. Initial program 98.2%

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

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

    if 1.25e-141 < c < 1.1500000000000001e43

    1. Initial program 93.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. Step-by-step derivation
      1. associate-*l*96.8%

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

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

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

        \[\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. +-commutative96.8%

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

      \[\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. Taylor expanded in a around inf 90.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.4 \cdot 10^{+134}:\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -2.1 \cdot 10^{+78}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -5600000000000:\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -8 \cdot 10^{-92}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq -6.2 \cdot 10^{-288}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 2 \cdot 10^{-201}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{-141}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{+43}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\ \end{array} \]

Alternative 5: 72.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;c \leq -1.75 \cdot 10^{-16}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 2.5 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.1999999999999999e161 or 5.80000000000000035e40 < c

    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. Taylor expanded in i around inf 85.0%

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

    if -1.1999999999999999e161 < c < -1.44999999999999996e79

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(z \cdot t + \left(-\color{blue}{a \cdot \left(c \cdot i\right)}\right)\right) \]
    7. Applied egg-rr75.0%

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

    if -1.44999999999999996e79 < c < -1.75000000000000009e-16 or 1.2e-141 < c < 2.5e14

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

    if -1.75000000000000009e-16 < c < 1.2e-141

    1. Initial program 99.0%

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

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

    if 2.5e14 < c < 5.80000000000000035e40

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.2 \cdot 10^{+161}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.45 \cdot 10^{+79}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1.75 \cdot 10^{-16}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{-141}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq 2.5 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 5.8 \cdot 10^{+40}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \end{array} \]

Alternative 6: 73.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ t_2 := 2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{if}\;c \leq -3.7 \cdot 10^{+145}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -4.9 \cdot 10^{+60}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -6.8 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{-142}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq 58000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 3.2 \cdot 10^{+39}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\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 (- (* x y) (* i (* a c)))))
        (t_2 (* 2.0 (* c (* (+ a (* b c)) (- i))))))
   (if (<= c -3.7e+145)
     t_2
     (if (<= c -4.9e+60)
       (* 2.0 (- (* z t) (* c (* i (* b c)))))
       (if (<= c -6.8e-16)
         t_1
         (if (<= c 1.35e-142)
           (* 2.0 (+ (* z t) (* x y)))
           (if (<= c 58000000000000.0)
             t_1
             (if (<= c 3.2e+39)
               (* 2.0 (- (* z t) (* b (* c (* c 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 * ((x * y) - (i * (a * c)));
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -3.7e+145) {
		tmp = t_2;
	} else if (c <= -4.9e+60) {
		tmp = 2.0 * ((z * t) - (c * (i * (b * c))));
	} else if (c <= -6.8e-16) {
		tmp = t_1;
	} else if (c <= 1.35e-142) {
		tmp = 2.0 * ((z * t) + (x * y));
	} else if (c <= 58000000000000.0) {
		tmp = t_1;
	} else if (c <= 3.2e+39) {
		tmp = 2.0 * ((z * t) - (b * (c * (c * 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 * ((x * y) - (i * (a * c)))
    t_2 = 2.0d0 * (c * ((a + (b * c)) * -i))
    if (c <= (-3.7d+145)) then
        tmp = t_2
    else if (c <= (-4.9d+60)) then
        tmp = 2.0d0 * ((z * t) - (c * (i * (b * c))))
    else if (c <= (-6.8d-16)) then
        tmp = t_1
    else if (c <= 1.35d-142) then
        tmp = 2.0d0 * ((z * t) + (x * y))
    else if (c <= 58000000000000.0d0) then
        tmp = t_1
    else if (c <= 3.2d+39) then
        tmp = 2.0d0 * ((z * t) - (b * (c * (c * 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 * ((x * y) - (i * (a * c)));
	double t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	double tmp;
	if (c <= -3.7e+145) {
		tmp = t_2;
	} else if (c <= -4.9e+60) {
		tmp = 2.0 * ((z * t) - (c * (i * (b * c))));
	} else if (c <= -6.8e-16) {
		tmp = t_1;
	} else if (c <= 1.35e-142) {
		tmp = 2.0 * ((z * t) + (x * y));
	} else if (c <= 58000000000000.0) {
		tmp = t_1;
	} else if (c <= 3.2e+39) {
		tmp = 2.0 * ((z * t) - (b * (c * (c * i))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) - (i * (a * c)))
	t_2 = 2.0 * (c * ((a + (b * c)) * -i))
	tmp = 0
	if c <= -3.7e+145:
		tmp = t_2
	elif c <= -4.9e+60:
		tmp = 2.0 * ((z * t) - (c * (i * (b * c))))
	elif c <= -6.8e-16:
		tmp = t_1
	elif c <= 1.35e-142:
		tmp = 2.0 * ((z * t) + (x * y))
	elif c <= 58000000000000.0:
		tmp = t_1
	elif c <= 3.2e+39:
		tmp = 2.0 * ((z * t) - (b * (c * (c * i))))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(i * Float64(a * c))))
	t_2 = Float64(2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * Float64(-i))))
	tmp = 0.0
	if (c <= -3.7e+145)
		tmp = t_2;
	elseif (c <= -4.9e+60)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(b * c)))));
	elseif (c <= -6.8e-16)
		tmp = t_1;
	elseif (c <= 1.35e-142)
		tmp = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y)));
	elseif (c <= 58000000000000.0)
		tmp = t_1;
	elseif (c <= 3.2e+39)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(b * Float64(c * Float64(c * 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 * ((x * y) - (i * (a * c)));
	t_2 = 2.0 * (c * ((a + (b * c)) * -i));
	tmp = 0.0;
	if (c <= -3.7e+145)
		tmp = t_2;
	elseif (c <= -4.9e+60)
		tmp = 2.0 * ((z * t) - (c * (i * (b * c))));
	elseif (c <= -6.8e-16)
		tmp = t_1;
	elseif (c <= 1.35e-142)
		tmp = 2.0 * ((z * t) + (x * y));
	elseif (c <= 58000000000000.0)
		tmp = t_1;
	elseif (c <= 3.2e+39)
		tmp = 2.0 * ((z * t) - (b * (c * (c * 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[(x * y), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.7e+145], t$95$2, If[LessEqual[c, -4.9e+60], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -6.8e-16], t$95$1, If[LessEqual[c, 1.35e-142], N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 58000000000000.0], t$95$1, If[LessEqual[c, 3.2e+39], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -6.8 \cdot 10^{-16}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 58000000000000:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -3.69999999999999993e145 or 3.19999999999999993e39 < c

    1. Initial program 83.9%

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

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

    if -3.69999999999999993e145 < c < -4.9000000000000003e60

    1. Initial program 88.8%

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

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

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

    if -4.9000000000000003e60 < c < -6.8e-16 or 1.3499999999999999e-142 < c < 5.8e13

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

    if -6.8e-16 < c < 1.3499999999999999e-142

    1. Initial program 99.0%

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

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

    if 5.8e13 < c < 3.19999999999999993e39

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.7 \cdot 10^{+145}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq -4.9 \cdot 10^{+60}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -6.8 \cdot 10^{-16}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{-142}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq 58000000000000:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 3.2 \cdot 10^{+39}:\\ \;\;\;\;2 \cdot \left(z \cdot t - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \end{array} \]

Alternative 7: 72.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;c \leq -7 \cdot 10^{-16}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 3.8 \cdot 10^{+24}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 9.5 \cdot 10^{+40}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.1999999999999999e161 or 9.5000000000000003e40 < c

    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. Taylor expanded in i around inf 85.0%

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

    if -1.1999999999999999e161 < c < -1.0999999999999999e79 or 3.80000000000000015e24 < c < 9.5000000000000003e40

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0999999999999999e79 < c < -7.00000000000000035e-16 or 1.25e-141 < c < 3.80000000000000015e24

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

    if -7.00000000000000035e-16 < c < 1.25e-141

    1. Initial program 99.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.2 \cdot 10^{+161}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{+79}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -7 \cdot 10^{-16}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.25 \cdot 10^{-141}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq 3.8 \cdot 10^{+24}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{+40}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \end{array} \]

Alternative 8: 64.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;c \leq -4100000000000:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq 3.4 \cdot 10^{+53}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\

\mathbf{elif}\;c \leq 3.2 \cdot 10^{+101} \lor \neg \left(c \leq 1.35 \cdot 10^{+240}\right):\\
\;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.2499999999999999e161

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e161 < c < -4.1e12 or 3.20000000000000005e101 < c < 1.3499999999999999e240

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

    if -4.1e12 < c < 3.6e-142

    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. Taylor expanded in c around 0 85.8%

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

    if 3.6e-142 < c < 3.39999999999999998e53

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

    if 3.39999999999999998e53 < c < 3.20000000000000005e101 or 1.3499999999999999e240 < c

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.25 \cdot 10^{+161}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -4100000000000:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{-142}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq 3.4 \cdot 10^{+53}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 3.2 \cdot 10^{+101} \lor \neg \left(c \leq 1.35 \cdot 10^{+240}\right):\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]

Alternative 9: 77.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{+161} \lor \neg \left(x \cdot y \leq 10^{+38}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -4.0000000000000002e161 or 9.99999999999999977e37 < (*.f64 x y)

    1. Initial program 93.3%

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

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

    if -4.0000000000000002e161 < (*.f64 x y) < 9.99999999999999977e37

    1. Initial program 92.5%

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

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

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

Alternative 10: 81.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -5e15 or 2.0000000000000002e-15 < (*.f64 z t)

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

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

    if -5e15 < (*.f64 z t) < 2.0000000000000002e-15

    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. Taylor expanded in z around 0 87.3%

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

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

Alternative 11: 63.0% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -9.9999999999999995e59 or 9.99999999999999977e37 < (*.f64 x y)

    1. Initial program 92.0%

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

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

    if -9.9999999999999995e59 < (*.f64 x y) < 2.00000000000000014e-17

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 2.00000000000000014e-17 < (*.f64 x y) < 9.99999999999999977e37

    1. Initial program 88.5%

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. distribute-rgt-neg-in78.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 63.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -9.99999999999999921e133 or 9.99999999999999977e37 < (*.f64 x y)

    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. Taylor expanded in c around 0 78.3%

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

    if -9.99999999999999921e133 < (*.f64 x y) < 2.00000000000000014e-17

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000014e-17 < (*.f64 x y) < 9.99999999999999977e37

    1. Initial program 88.5%

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. distribute-rgt-neg-in78.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 86.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.25 \cdot 10^{+60} \lor \neg \left(c \leq 3.1 \cdot 10^{+14}\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(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.24999999999999994e60 or 3.1e14 < c

    1. Initial program 84.8%

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

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

    if -1.24999999999999994e60 < c < 3.1e14

    1. Initial program 98.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.25 \cdot 10^{+60} \lor \neg \left(c \leq 3.1 \cdot 10^{+14}\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(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]

Alternative 14: 87.2% accurate, 1.0× 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.2 \cdot 10^{+62}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+40}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* c (* (+ a (* b c)) i))))
   (if (<= c -1.2e+62)
     (* 2.0 (- (* z t) t_1))
     (if (<= c 2.6e+40)
       (* 2.0 (- (+ (* z t) (* x y)) (* a (* c i))))
       (* 2.0 (- (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = c * ((a + (b * c)) * i);
	double tmp;
	if (c <= -1.2e+62) {
		tmp = 2.0 * ((z * t) - t_1);
	} else if (c <= 2.6e+40) {
		tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i)));
	} else {
		tmp = 2.0 * ((x * y) - t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = c * ((a + (b * c)) * i)
    if (c <= (-1.2d+62)) then
        tmp = 2.0d0 * ((z * t) - t_1)
    else if (c <= 2.6d+40) then
        tmp = 2.0d0 * (((z * t) + (x * y)) - (a * (c * i)))
    else
        tmp = 2.0d0 * ((x * y) - t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = c * ((a + (b * c)) * i);
	double tmp;
	if (c <= -1.2e+62) {
		tmp = 2.0 * ((z * t) - t_1);
	} else if (c <= 2.6e+40) {
		tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i)));
	} else {
		tmp = 2.0 * ((x * y) - t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = c * ((a + (b * c)) * i)
	tmp = 0
	if c <= -1.2e+62:
		tmp = 2.0 * ((z * t) - t_1)
	elif c <= 2.6e+40:
		tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i)))
	else:
		tmp = 2.0 * ((x * y) - t_1)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i))
	tmp = 0.0
	if (c <= -1.2e+62)
		tmp = Float64(2.0 * Float64(Float64(z * t) - t_1));
	elseif (c <= 2.6e+40)
		tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(a * Float64(c * i))));
	else
		tmp = Float64(2.0 * Float64(Float64(x * y) - t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = c * ((a + (b * c)) * i);
	tmp = 0.0;
	if (c <= -1.2e+62)
		tmp = 2.0 * ((z * t) - t_1);
	elseif (c <= 2.6e+40)
		tmp = 2.0 * (((z * t) + (x * y)) - (a * (c * i)));
	else
		tmp = 2.0 * ((x * y) - t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.2e+62], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.6e+40], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 84.8%

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

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

    if -1.2e62 < c < 2.6000000000000001e40

    1. Initial program 98.0%

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. fma-def98.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. +-commutative98.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) \]
    5. Applied egg-rr98.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. Taylor expanded in a around inf 94.2%

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

    if 2.6000000000000001e40 < c

    1. Initial program 84.7%

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

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

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

Alternative 15: 94.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 2 \cdot \left(\left(z \cdot t + x \cdot y\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 (- (+ (* z t) (* x y)) (* (+ 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 * (((z * t) + (x * y)) - ((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 * (((z * t) + (x * y)) - ((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 * (((z * t) + (x * y)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i):
	return 2.0 * (((z * t) + (x * y)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i)
	return Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i))))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = 2.0 * (((z * t) + (x * y)) - ((a + (b * c)) * (c * i)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
2 \cdot \left(\left(z \cdot t + x \cdot y\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Derivation
  1. Initial program 92.8%

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

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

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

    \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
  4. Step-by-step derivation
    1. fma-def97.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) \]
  5. 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) \]
  6. Final simplification97.6%

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

Alternative 16: 36.3% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-217}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3500000000000001e107 or 2.99999999999999983e-18 < z

    1. Initial program 93.7%

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

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

    if -1.3500000000000001e107 < z < -7.50000000000000031e-217

    1. Initial program 94.3%

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

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

    if -7.50000000000000031e-217 < z < 2.99999999999999983e-18

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+107}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-217}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-18}:\\ \;\;\;\;\left(c \cdot -2\right) \cdot \left(a \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 17: 67.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -3 \cdot 10^{+141} \lor \neg \left(c \leq 3.2 \cdot 10^{+41}\right):\\
\;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.9999999999999999e141 or 3.2000000000000001e41 < c

    1. Initial program 84.3%

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. distribute-rgt-neg-in62.2%

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

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

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

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

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

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

    if -2.9999999999999999e141 < c < 3.2000000000000001e41

    1. Initial program 97.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3 \cdot 10^{+141} \lor \neg \left(c \leq 3.2 \cdot 10^{+41}\right):\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]

Alternative 18: 68.2% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 83.8%

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. distribute-rgt-neg-in69.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999999e141 < c < 1.15e42

    1. Initial program 97.0%

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

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

    if 1.15e42 < c

    1. Initial program 84.7%

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(-{c}^{2} \cdot \left(i \cdot b\right)\right)} \]
      2. distribute-rgt-neg-in55.2%

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

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

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

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

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

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

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

Alternative 19: 38.9% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+115} \lor \neg \left(x \leq 4.6 \cdot 10^{-83}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.4999999999999997e115 or 4.59999999999999979e-83 < x

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

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

    if -7.4999999999999997e115 < x < 4.59999999999999979e-83

    1. Initial program 92.7%

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

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

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

Alternative 20: 29.4% 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 92.8%

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

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

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

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

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

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