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

Percentage Accurate: 90.0% → 94.9%
Time: 14.1s
Alternatives: 17
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 90.0% accurate, 1.0× speedup?

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

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

Alternative 1: 94.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 80.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 94.9%

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

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

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

    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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.9%

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

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

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

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


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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

Alternative 3: 73.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ t_3 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{if}\;c \leq -1.15 \cdot 10^{+44}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{+14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.4 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 10^{-88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 3.95 \cdot 10^{+34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{+47}:\\ \;\;\;\;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 (- (* z t) (* c (* a i)))))
        (t_2 (* 2.0 (+ (* z t) (* x y))))
        (t_3 (* -2.0 (* c (* (+ a (* b c)) i)))))
   (if (<= c -1.15e+44)
     t_3
     (if (<= c -2.4e+14)
       t_2
       (if (<= c -1.4e-61)
         t_1
         (if (<= c 1e-88)
           t_2
           (if (<= c 3.95e+34) t_1 (if (<= c 1.5e+47) 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 * ((z * t) - (c * (a * i)));
	double t_2 = 2.0 * ((z * t) + (x * y));
	double t_3 = -2.0 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -1.15e+44) {
		tmp = t_3;
	} else if (c <= -2.4e+14) {
		tmp = t_2;
	} else if (c <= -1.4e-61) {
		tmp = t_1;
	} else if (c <= 1e-88) {
		tmp = t_2;
	} else if (c <= 3.95e+34) {
		tmp = t_1;
	} else if (c <= 1.5e+47) {
		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 * ((z * t) - (c * (a * i)))
    t_2 = 2.0d0 * ((z * t) + (x * y))
    t_3 = (-2.0d0) * (c * ((a + (b * c)) * i))
    if (c <= (-1.15d+44)) then
        tmp = t_3
    else if (c <= (-2.4d+14)) then
        tmp = t_2
    else if (c <= (-1.4d-61)) then
        tmp = t_1
    else if (c <= 1d-88) then
        tmp = t_2
    else if (c <= 3.95d+34) then
        tmp = t_1
    else if (c <= 1.5d+47) 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 * ((z * t) - (c * (a * i)));
	double t_2 = 2.0 * ((z * t) + (x * y));
	double t_3 = -2.0 * (c * ((a + (b * c)) * i));
	double tmp;
	if (c <= -1.15e+44) {
		tmp = t_3;
	} else if (c <= -2.4e+14) {
		tmp = t_2;
	} else if (c <= -1.4e-61) {
		tmp = t_1;
	} else if (c <= 1e-88) {
		tmp = t_2;
	} else if (c <= 3.95e+34) {
		tmp = t_1;
	} else if (c <= 1.5e+47) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((z * t) - (c * (a * i)))
	t_2 = 2.0 * ((z * t) + (x * y))
	t_3 = -2.0 * (c * ((a + (b * c)) * i))
	tmp = 0
	if c <= -1.15e+44:
		tmp = t_3
	elif c <= -2.4e+14:
		tmp = t_2
	elif c <= -1.4e-61:
		tmp = t_1
	elif c <= 1e-88:
		tmp = t_2
	elif c <= 3.95e+34:
		tmp = t_1
	elif c <= 1.5e+47:
		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(z * t) - Float64(c * Float64(a * i))))
	t_2 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y)))
	t_3 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)))
	tmp = 0.0
	if (c <= -1.15e+44)
		tmp = t_3;
	elseif (c <= -2.4e+14)
		tmp = t_2;
	elseif (c <= -1.4e-61)
		tmp = t_1;
	elseif (c <= 1e-88)
		tmp = t_2;
	elseif (c <= 3.95e+34)
		tmp = t_1;
	elseif (c <= 1.5e+47)
		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 * ((z * t) - (c * (a * i)));
	t_2 = 2.0 * ((z * t) + (x * y));
	t_3 = -2.0 * (c * ((a + (b * c)) * i));
	tmp = 0.0;
	if (c <= -1.15e+44)
		tmp = t_3;
	elseif (c <= -2.4e+14)
		tmp = t_2;
	elseif (c <= -1.4e-61)
		tmp = t_1;
	elseif (c <= 1e-88)
		tmp = t_2;
	elseif (c <= 3.95e+34)
		tmp = t_1;
	elseif (c <= 1.5e+47)
		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[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $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.15e+44], t$95$3, If[LessEqual[c, -2.4e+14], t$95$2, If[LessEqual[c, -1.4e-61], t$95$1, If[LessEqual[c, 1e-88], t$95$2, If[LessEqual[c, 3.95e+34], t$95$1, If[LessEqual[c, 1.5e+47], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -2.4 \cdot 10^{+14}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -1.4 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 3.95 \cdot 10^{+34}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.5 \cdot 10^{+47}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.15000000000000002e44 or 1.5000000000000001e47 < c

    1. Initial program 81.5%

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

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

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

    if -1.15000000000000002e44 < c < -2.4e14 or -1.4000000000000001e-61 < c < 9.99999999999999934e-89 or 3.94999999999999999e34 < c < 1.5000000000000001e47

    1. Initial program 97.8%

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

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

    if -2.4e14 < c < -1.4000000000000001e-61 or 9.99999999999999934e-89 < c < 3.94999999999999999e34

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{+44}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq -1.4 \cdot 10^{-61}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 10^{-88}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq 3.95 \cdot 10^{+34}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 4: 73.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ t_2 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ t_3 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;c \leq -7.4 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -9.4 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.3 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.06 \cdot 10^{-88}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 4.1 \cdot 10^{+35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{+47}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (- (* z t) (* c (* a i)))))
        (t_2 (* -2.0 (* c (* (+ a (* b c)) i))))
        (t_3 (* 2.0 (+ (* z t) (* x y)))))
   (if (<= c -7.4e+51)
     t_2
     (if (<= c -9.4e+14)
       (* 2.0 (- (* x y) (* c (* i (* b c)))))
       (if (<= c -1.3e-61)
         t_1
         (if (<= c 1.06e-88)
           t_3
           (if (<= c 4.1e+35) t_1 (if (<= c 1.45e+47) t_3 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((z * t) - (c * (a * i)));
	double t_2 = -2.0 * (c * ((a + (b * c)) * i));
	double t_3 = 2.0 * ((z * t) + (x * y));
	double tmp;
	if (c <= -7.4e+51) {
		tmp = t_2;
	} else if (c <= -9.4e+14) {
		tmp = 2.0 * ((x * y) - (c * (i * (b * c))));
	} else if (c <= -1.3e-61) {
		tmp = t_1;
	} else if (c <= 1.06e-88) {
		tmp = t_3;
	} else if (c <= 4.1e+35) {
		tmp = t_1;
	} else if (c <= 1.45e+47) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = 2.0d0 * ((z * t) - (c * (a * i)))
    t_2 = (-2.0d0) * (c * ((a + (b * c)) * i))
    t_3 = 2.0d0 * ((z * t) + (x * y))
    if (c <= (-7.4d+51)) then
        tmp = t_2
    else if (c <= (-9.4d+14)) then
        tmp = 2.0d0 * ((x * y) - (c * (i * (b * c))))
    else if (c <= (-1.3d-61)) then
        tmp = t_1
    else if (c <= 1.06d-88) then
        tmp = t_3
    else if (c <= 4.1d+35) then
        tmp = t_1
    else if (c <= 1.45d+47) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((z * t) - (c * (a * i)));
	double t_2 = -2.0 * (c * ((a + (b * c)) * i));
	double t_3 = 2.0 * ((z * t) + (x * y));
	double tmp;
	if (c <= -7.4e+51) {
		tmp = t_2;
	} else if (c <= -9.4e+14) {
		tmp = 2.0 * ((x * y) - (c * (i * (b * c))));
	} else if (c <= -1.3e-61) {
		tmp = t_1;
	} else if (c <= 1.06e-88) {
		tmp = t_3;
	} else if (c <= 4.1e+35) {
		tmp = t_1;
	} else if (c <= 1.45e+47) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((z * t) - (c * (a * i)))
	t_2 = -2.0 * (c * ((a + (b * c)) * i))
	t_3 = 2.0 * ((z * t) + (x * y))
	tmp = 0
	if c <= -7.4e+51:
		tmp = t_2
	elif c <= -9.4e+14:
		tmp = 2.0 * ((x * y) - (c * (i * (b * c))))
	elif c <= -1.3e-61:
		tmp = t_1
	elif c <= 1.06e-88:
		tmp = t_3
	elif c <= 4.1e+35:
		tmp = t_1
	elif c <= 1.45e+47:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))))
	t_2 = Float64(-2.0 * Float64(c * Float64(Float64(a + Float64(b * c)) * i)))
	t_3 = Float64(2.0 * Float64(Float64(z * t) + Float64(x * y)))
	tmp = 0.0
	if (c <= -7.4e+51)
		tmp = t_2;
	elseif (c <= -9.4e+14)
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(i * Float64(b * c)))));
	elseif (c <= -1.3e-61)
		tmp = t_1;
	elseif (c <= 1.06e-88)
		tmp = t_3;
	elseif (c <= 4.1e+35)
		tmp = t_1;
	elseif (c <= 1.45e+47)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((z * t) - (c * (a * i)));
	t_2 = -2.0 * (c * ((a + (b * c)) * i));
	t_3 = 2.0 * ((z * t) + (x * y));
	tmp = 0.0;
	if (c <= -7.4e+51)
		tmp = t_2;
	elseif (c <= -9.4e+14)
		tmp = 2.0 * ((x * y) - (c * (i * (b * c))));
	elseif (c <= -1.3e-61)
		tmp = t_1;
	elseif (c <= 1.06e-88)
		tmp = t_3;
	elseif (c <= 4.1e+35)
		tmp = t_1;
	elseif (c <= 1.45e+47)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $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]}, Block[{t$95$3 = N[(2.0 * N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.4e+51], t$95$2, If[LessEqual[c, -9.4e+14], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.3e-61], t$95$1, If[LessEqual[c, 1.06e-88], t$95$3, If[LessEqual[c, 4.1e+35], t$95$1, If[LessEqual[c, 1.45e+47], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -1.3 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.06 \cdot 10^{-88}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 4.1 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.45 \cdot 10^{+47}:\\
\;\;\;\;t_3\\

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


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

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

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

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

    if -7.4000000000000005e51 < c < -9.4e14

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4e14 < c < -1.30000000000000005e-61 or 1.06e-88 < c < 4.0999999999999998e35

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000005e-61 < c < 1.06e-88 or 4.0999999999999998e35 < c < 1.4499999999999999e47

    1. Initial program 98.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -7.4 \cdot 10^{+51}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -9.4 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.3 \cdot 10^{-61}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.06 \cdot 10^{-88}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq 4.1 \cdot 10^{+35}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 5: 79.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -8.5 \cdot 10^{+43} \lor \neg \left(c \leq -1.16 \cdot 10^{+27}\right) \land \left(c \leq -1.35 \cdot 10^{-61} \lor \neg \left(c \leq 1.1 \cdot 10^{-88}\right)\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(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 -8.5e+43)
         (and (not (<= c -1.16e+27))
              (or (<= c -1.35e-61) (not (<= c 1.1e-88)))))
   (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))
   (* 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 <= -8.5e+43) || (!(c <= -1.16e+27) && ((c <= -1.35e-61) || !(c <= 1.1e-88)))) {
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	} 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 <= (-8.5d+43)) .or. (.not. (c <= (-1.16d+27))) .and. (c <= (-1.35d-61)) .or. (.not. (c <= 1.1d-88))) then
        tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
    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 <= -8.5e+43) || (!(c <= -1.16e+27) && ((c <= -1.35e-61) || !(c <= 1.1e-88)))) {
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	} else {
		tmp = 2.0 * ((z * t) + (x * y));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (c <= -8.5e+43) or (not (c <= -1.16e+27) and ((c <= -1.35e-61) or not (c <= 1.1e-88))):
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)))
	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 <= -8.5e+43) || (!(c <= -1.16e+27) && ((c <= -1.35e-61) || !(c <= 1.1e-88))))
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i))));
	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 <= -8.5e+43) || (~((c <= -1.16e+27)) && ((c <= -1.35e-61) || ~((c <= 1.1e-88)))))
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	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, -8.5e+43], And[N[Not[LessEqual[c, -1.16e+27]], $MachinePrecision], Or[LessEqual[c, -1.35e-61], N[Not[LessEqual[c, 1.1e-88]], $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[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.5 \cdot 10^{+43} \lor \neg \left(c \leq -1.16 \cdot 10^{+27}\right) \land \left(c \leq -1.35 \cdot 10^{-61} \lor \neg \left(c \leq 1.1 \cdot 10^{-88}\right)\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(z \cdot t + x \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -8.5e43 or -1.16e27 < c < -1.34999999999999997e-61 or 1.10000000000000002e-88 < c

    1. Initial program 86.7%

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

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

    if -8.5e43 < c < -1.16e27 or -1.34999999999999997e-61 < c < 1.10000000000000002e-88

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -8.5 \cdot 10^{+43} \lor \neg \left(c \leq -1.16 \cdot 10^{+27}\right) \land \left(c \leq -1.35 \cdot 10^{-61} \lor \neg \left(c \leq 1.1 \cdot 10^{-88}\right)\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(z \cdot t + x \cdot y\right)\\ \end{array} \]

Alternative 6: 86.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\ t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\ t_3 := z \cdot t + x \cdot y\\ \mathbf{if}\;c \leq -8.5 \cdot 10^{+43}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.4 \cdot 10^{+27}:\\ \;\;\;\;2 \cdot t_3\\ \mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(t_3 - i \cdot \left(a \cdot c\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)))
        (t_2 (* 2.0 (- (* z t) t_1)))
        (t_3 (+ (* z t) (* x y))))
   (if (<= c -8.5e+43)
     t_2
     (if (<= c -1.4e+27)
       (* 2.0 t_3)
       (if (<= c -3.05e-46)
         t_2
         (if (<= c 1.45e+47)
           (* 2.0 (- t_3 (* i (* a c))))
           (* 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 t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (z * t) + (x * y);
	double tmp;
	if (c <= -8.5e+43) {
		tmp = t_2;
	} else if (c <= -1.4e+27) {
		tmp = 2.0 * t_3;
	} else if (c <= -3.05e-46) {
		tmp = t_2;
	} else if (c <= 1.45e+47) {
		tmp = 2.0 * (t_3 - (i * (a * c)));
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = c * ((a + (b * c)) * i)
    t_2 = 2.0d0 * ((z * t) - t_1)
    t_3 = (z * t) + (x * y)
    if (c <= (-8.5d+43)) then
        tmp = t_2
    else if (c <= (-1.4d+27)) then
        tmp = 2.0d0 * t_3
    else if (c <= (-3.05d-46)) then
        tmp = t_2
    else if (c <= 1.45d+47) then
        tmp = 2.0d0 * (t_3 - (i * (a * c)))
    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 t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (z * t) + (x * y);
	double tmp;
	if (c <= -8.5e+43) {
		tmp = t_2;
	} else if (c <= -1.4e+27) {
		tmp = 2.0 * t_3;
	} else if (c <= -3.05e-46) {
		tmp = t_2;
	} else if (c <= 1.45e+47) {
		tmp = 2.0 * (t_3 - (i * (a * c)));
	} 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)
	t_2 = 2.0 * ((z * t) - t_1)
	t_3 = (z * t) + (x * y)
	tmp = 0
	if c <= -8.5e+43:
		tmp = t_2
	elif c <= -1.4e+27:
		tmp = 2.0 * t_3
	elif c <= -3.05e-46:
		tmp = t_2
	elif c <= 1.45e+47:
		tmp = 2.0 * (t_3 - (i * (a * c)))
	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))
	t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1))
	t_3 = Float64(Float64(z * t) + Float64(x * y))
	tmp = 0.0
	if (c <= -8.5e+43)
		tmp = t_2;
	elseif (c <= -1.4e+27)
		tmp = Float64(2.0 * t_3);
	elseif (c <= -3.05e-46)
		tmp = t_2;
	elseif (c <= 1.45e+47)
		tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(a * c))));
	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);
	t_2 = 2.0 * ((z * t) - t_1);
	t_3 = (z * t) + (x * y);
	tmp = 0.0;
	if (c <= -8.5e+43)
		tmp = t_2;
	elseif (c <= -1.4e+27)
		tmp = 2.0 * t_3;
	elseif (c <= -3.05e-46)
		tmp = t_2;
	elseif (c <= 1.45e+47)
		tmp = 2.0 * (t_3 - (i * (a * c)));
	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]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.5e+43], t$95$2, If[LessEqual[c, -1.4e+27], N[(2.0 * t$95$3), $MachinePrecision], If[LessEqual[c, -3.05e-46], t$95$2, If[LessEqual[c, 1.45e+47], N[(2.0 * N[(t$95$3 - N[(i * N[(a * c), $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)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
t_3 := z \cdot t + x \cdot y\\
\mathbf{if}\;c \leq -8.5 \cdot 10^{+43}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -1.4 \cdot 10^{+27}:\\
\;\;\;\;2 \cdot t_3\\

\mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -8.5e43 or -1.4e27 < c < -3.05000000000000018e-46

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

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

    if -8.5e43 < c < -1.4e27

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

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

    if -3.05000000000000018e-46 < c < 1.4499999999999999e47

    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. Step-by-step derivation
      1. associate-*l*99.1%

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

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

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

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

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

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

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

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

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

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

    if 1.4499999999999999e47 < c

    1. Initial program 77.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -8.5 \cdot 10^{+43}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1.4 \cdot 10^{+27}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 7: 86.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\ t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\ t_3 := z \cdot t + x \cdot y\\ \mathbf{if}\;c \leq -1.9 \cdot 10^{+52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(t_3 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 3.35 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(t_3 - i \cdot \left(a \cdot c\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)))
        (t_2 (* 2.0 (- (* z t) t_1)))
        (t_3 (+ (* z t) (* x y))))
   (if (<= c -1.9e+52)
     t_2
     (if (<= c -1.6e+14)
       (* 2.0 (- t_3 (* c (* c (* b i)))))
       (if (<= c -3.05e-46)
         t_2
         (if (<= c 3.35e+47)
           (* 2.0 (- t_3 (* i (* a c))))
           (* 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 t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (z * t) + (x * y);
	double tmp;
	if (c <= -1.9e+52) {
		tmp = t_2;
	} else if (c <= -1.6e+14) {
		tmp = 2.0 * (t_3 - (c * (c * (b * i))));
	} else if (c <= -3.05e-46) {
		tmp = t_2;
	} else if (c <= 3.35e+47) {
		tmp = 2.0 * (t_3 - (i * (a * c)));
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = c * ((a + (b * c)) * i)
    t_2 = 2.0d0 * ((z * t) - t_1)
    t_3 = (z * t) + (x * y)
    if (c <= (-1.9d+52)) then
        tmp = t_2
    else if (c <= (-1.6d+14)) then
        tmp = 2.0d0 * (t_3 - (c * (c * (b * i))))
    else if (c <= (-3.05d-46)) then
        tmp = t_2
    else if (c <= 3.35d+47) then
        tmp = 2.0d0 * (t_3 - (i * (a * c)))
    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 t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (z * t) + (x * y);
	double tmp;
	if (c <= -1.9e+52) {
		tmp = t_2;
	} else if (c <= -1.6e+14) {
		tmp = 2.0 * (t_3 - (c * (c * (b * i))));
	} else if (c <= -3.05e-46) {
		tmp = t_2;
	} else if (c <= 3.35e+47) {
		tmp = 2.0 * (t_3 - (i * (a * c)));
	} 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)
	t_2 = 2.0 * ((z * t) - t_1)
	t_3 = (z * t) + (x * y)
	tmp = 0
	if c <= -1.9e+52:
		tmp = t_2
	elif c <= -1.6e+14:
		tmp = 2.0 * (t_3 - (c * (c * (b * i))))
	elif c <= -3.05e-46:
		tmp = t_2
	elif c <= 3.35e+47:
		tmp = 2.0 * (t_3 - (i * (a * c)))
	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))
	t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1))
	t_3 = Float64(Float64(z * t) + Float64(x * y))
	tmp = 0.0
	if (c <= -1.9e+52)
		tmp = t_2;
	elseif (c <= -1.6e+14)
		tmp = Float64(2.0 * Float64(t_3 - Float64(c * Float64(c * Float64(b * i)))));
	elseif (c <= -3.05e-46)
		tmp = t_2;
	elseif (c <= 3.35e+47)
		tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(a * c))));
	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);
	t_2 = 2.0 * ((z * t) - t_1);
	t_3 = (z * t) + (x * y);
	tmp = 0.0;
	if (c <= -1.9e+52)
		tmp = t_2;
	elseif (c <= -1.6e+14)
		tmp = 2.0 * (t_3 - (c * (c * (b * i))));
	elseif (c <= -3.05e-46)
		tmp = t_2;
	elseif (c <= 3.35e+47)
		tmp = 2.0 * (t_3 - (i * (a * c)));
	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]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.9e+52], t$95$2, If[LessEqual[c, -1.6e+14], N[(2.0 * N[(t$95$3 - N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.05e-46], t$95$2, If[LessEqual[c, 3.35e+47], N[(2.0 * N[(t$95$3 - N[(i * N[(a * c), $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)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
t_3 := z \cdot t + x \cdot y\\
\mathbf{if}\;c \leq -1.9 \cdot 10^{+52}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -1.6 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot \left(t_3 - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\

\mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.9e52 or -1.6e14 < c < -3.05000000000000018e-46

    1. Initial program 87.0%

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

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

    if -1.9e52 < c < -1.6e14

    1. Initial program 90.8%

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

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

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

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

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

    if -3.05000000000000018e-46 < c < 3.34999999999999986e47

    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. Step-by-step derivation
      1. associate-*l*99.1%

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

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

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

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

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

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

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

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

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

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

    if 3.34999999999999986e47 < c

    1. Initial program 77.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.9 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -3.05 \cdot 10^{-46}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 3.35 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 8: 86.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\ t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\ t_3 := z \cdot t + x \cdot y\\ \mathbf{if}\;c \leq -1 \cdot 10^{+52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -45000000000000:\\ \;\;\;\;2 \cdot \left(t_3 - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -2.9 \cdot 10^{-50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 6 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(t_3 - i \cdot \left(a \cdot c\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)))
        (t_2 (* 2.0 (- (* z t) t_1)))
        (t_3 (+ (* z t) (* x y))))
   (if (<= c -1e+52)
     t_2
     (if (<= c -45000000000000.0)
       (* 2.0 (- t_3 (* (* c i) (* b c))))
       (if (<= c -2.9e-50)
         t_2
         (if (<= c 6e+47)
           (* 2.0 (- t_3 (* i (* a c))))
           (* 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 t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (z * t) + (x * y);
	double tmp;
	if (c <= -1e+52) {
		tmp = t_2;
	} else if (c <= -45000000000000.0) {
		tmp = 2.0 * (t_3 - ((c * i) * (b * c)));
	} else if (c <= -2.9e-50) {
		tmp = t_2;
	} else if (c <= 6e+47) {
		tmp = 2.0 * (t_3 - (i * (a * c)));
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = c * ((a + (b * c)) * i)
    t_2 = 2.0d0 * ((z * t) - t_1)
    t_3 = (z * t) + (x * y)
    if (c <= (-1d+52)) then
        tmp = t_2
    else if (c <= (-45000000000000.0d0)) then
        tmp = 2.0d0 * (t_3 - ((c * i) * (b * c)))
    else if (c <= (-2.9d-50)) then
        tmp = t_2
    else if (c <= 6d+47) then
        tmp = 2.0d0 * (t_3 - (i * (a * c)))
    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 t_2 = 2.0 * ((z * t) - t_1);
	double t_3 = (z * t) + (x * y);
	double tmp;
	if (c <= -1e+52) {
		tmp = t_2;
	} else if (c <= -45000000000000.0) {
		tmp = 2.0 * (t_3 - ((c * i) * (b * c)));
	} else if (c <= -2.9e-50) {
		tmp = t_2;
	} else if (c <= 6e+47) {
		tmp = 2.0 * (t_3 - (i * (a * c)));
	} 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)
	t_2 = 2.0 * ((z * t) - t_1)
	t_3 = (z * t) + (x * y)
	tmp = 0
	if c <= -1e+52:
		tmp = t_2
	elif c <= -45000000000000.0:
		tmp = 2.0 * (t_3 - ((c * i) * (b * c)))
	elif c <= -2.9e-50:
		tmp = t_2
	elif c <= 6e+47:
		tmp = 2.0 * (t_3 - (i * (a * c)))
	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))
	t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1))
	t_3 = Float64(Float64(z * t) + Float64(x * y))
	tmp = 0.0
	if (c <= -1e+52)
		tmp = t_2;
	elseif (c <= -45000000000000.0)
		tmp = Float64(2.0 * Float64(t_3 - Float64(Float64(c * i) * Float64(b * c))));
	elseif (c <= -2.9e-50)
		tmp = t_2;
	elseif (c <= 6e+47)
		tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(a * c))));
	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);
	t_2 = 2.0 * ((z * t) - t_1);
	t_3 = (z * t) + (x * y);
	tmp = 0.0;
	if (c <= -1e+52)
		tmp = t_2;
	elseif (c <= -45000000000000.0)
		tmp = 2.0 * (t_3 - ((c * i) * (b * c)));
	elseif (c <= -2.9e-50)
		tmp = t_2;
	elseif (c <= 6e+47)
		tmp = 2.0 * (t_3 - (i * (a * c)));
	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]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1e+52], t$95$2, If[LessEqual[c, -45000000000000.0], N[(2.0 * N[(t$95$3 - N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.9e-50], t$95$2, If[LessEqual[c, 6e+47], N[(2.0 * N[(t$95$3 - N[(i * N[(a * c), $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)\\
t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\
t_3 := z \cdot t + x \cdot y\\
\mathbf{if}\;c \leq -1 \cdot 10^{+52}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -45000000000000:\\
\;\;\;\;2 \cdot \left(t_3 - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\

\mathbf{elif}\;c \leq -2.9 \cdot 10^{-50}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -9.9999999999999999e51 or -4.5e13 < c < -2.90000000000000008e-50

    1. Initial program 87.0%

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

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

    if -9.9999999999999999e51 < c < -4.5e13

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

    if -2.90000000000000008e-50 < c < 6.0000000000000003e47

    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. Step-by-step derivation
      1. associate-*l*99.1%

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000003e47 < c

    1. Initial program 77.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -45000000000000:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -2.9 \cdot 10^{-50}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 6 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - i \cdot \left(a \cdot c\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 9: 48.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;c \leq -8.8 \cdot 10^{+14}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq 4.8 \cdot 10^{-204}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 1.6 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.0000000000000001e44 or 1.6e47 < c

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0000000000000001e44 < c < -8.8e14 or 4.8e-204 < c < 1.94999999999999987e-82

    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 x around inf 58.4%

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

    if -8.8e14 < c < -6.4000000000000005e-14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4000000000000005e-14 < c < 4.8e-204 or 1.94999999999999987e-82 < c < 1.6e47

    1. Initial program 97.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1 \cdot 10^{+44}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq -6.4 \cdot 10^{-14}:\\ \;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 4.8 \cdot 10^{-204}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.95 \cdot 10^{-82}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.6 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 10: 48.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;c \leq -1.9 \cdot 10^{+16}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq 5.6 \cdot 10^{-202}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 1.9 \cdot 10^{+48}:\\
\;\;\;\;t_1\\

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000002e44 < c < -1.9e16 or 5.6000000000000002e-202 < c < 1.09999999999999993e-82

    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 x around inf 58.4%

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

    if -1.9e16 < c < -6.5999999999999995e-19

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5999999999999995e-19 < c < 5.6000000000000002e-202 or 1.09999999999999993e-82 < c < 1.9e48

    1. Initial program 97.9%

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

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

    if 1.9e48 < c

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{+44}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -1.9 \cdot 10^{+16}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq -6.6 \cdot 10^{-19}:\\ \;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 5.6 \cdot 10^{-202}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{-82}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.9 \cdot 10^{+48}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 11: 73.8% accurate, 1.0× speedup?

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

\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 < -9e43 or -1.2e24 < c < -1.54999999999999997e-61 or 1.9000000000000002e47 < c

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

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

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

    if -9e43 < c < -1.2e24 or -1.54999999999999997e-61 < c < 1.9000000000000002e47

    1. Initial program 98.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9 \cdot 10^{+43} \lor \neg \left(c \leq -1.2 \cdot 10^{+24}\right) \land \left(c \leq -1.55 \cdot 10^{-61} \lor \neg \left(c \leq 1.9 \cdot 10^{+47}\right)\right):\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \end{array} \]

Alternative 12: 68.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{if}\;c \leq -9.5 \cdot 10^{+43}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -1400000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -3.45 \cdot 10^{-15}:\\ \;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (+ (* z t) (* x y)))))
   (if (<= c -9.5e+43)
     (* -2.0 (* c (* i (* b c))))
     (if (<= c -1400000000.0)
       t_1
       (if (<= c -3.45e-15)
         (* i (* -2.0 (* a c)))
         (if (<= c 1.8e+58) t_1 (* -2.0 (* 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 = 2.0 * ((z * t) + (x * y));
	double tmp;
	if (c <= -9.5e+43) {
		tmp = -2.0 * (c * (i * (b * c)));
	} else if (c <= -1400000000.0) {
		tmp = t_1;
	} else if (c <= -3.45e-15) {
		tmp = i * (-2.0 * (a * c));
	} else if (c <= 1.8e+58) {
		tmp = t_1;
	} else {
		tmp = -2.0 * (c * (c * (b * i)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * ((z * t) + (x * y))
    if (c <= (-9.5d+43)) then
        tmp = (-2.0d0) * (c * (i * (b * c)))
    else if (c <= (-1400000000.0d0)) then
        tmp = t_1
    else if (c <= (-3.45d-15)) then
        tmp = i * ((-2.0d0) * (a * c))
    else if (c <= 1.8d+58) then
        tmp = t_1
    else
        tmp = (-2.0d0) * (c * (c * (b * i)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((z * t) + (x * y));
	double tmp;
	if (c <= -9.5e+43) {
		tmp = -2.0 * (c * (i * (b * c)));
	} else if (c <= -1400000000.0) {
		tmp = t_1;
	} else if (c <= -3.45e-15) {
		tmp = i * (-2.0 * (a * c));
	} else if (c <= 1.8e+58) {
		tmp = t_1;
	} else {
		tmp = -2.0 * (c * (c * (b * i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((z * t) + (x * y))
	tmp = 0
	if c <= -9.5e+43:
		tmp = -2.0 * (c * (i * (b * c)))
	elif c <= -1400000000.0:
		tmp = t_1
	elif c <= -3.45e-15:
		tmp = i * (-2.0 * (a * c))
	elif c <= 1.8e+58:
		tmp = t_1
	else:
		tmp = -2.0 * (c * (c * (b * i)))
	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 (c <= -9.5e+43)
		tmp = Float64(-2.0 * Float64(c * Float64(i * Float64(b * c))));
	elseif (c <= -1400000000.0)
		tmp = t_1;
	elseif (c <= -3.45e-15)
		tmp = Float64(i * Float64(-2.0 * Float64(a * c)));
	elseif (c <= 1.8e+58)
		tmp = t_1;
	else
		tmp = Float64(-2.0 * Float64(c * Float64(c * Float64(b * i))));
	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 (c <= -9.5e+43)
		tmp = -2.0 * (c * (i * (b * c)));
	elseif (c <= -1400000000.0)
		tmp = t_1;
	elseif (c <= -3.45e-15)
		tmp = i * (-2.0 * (a * c));
	elseif (c <= 1.8e+58)
		tmp = t_1;
	else
		tmp = -2.0 * (c * (c * (b * i)));
	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[c, -9.5e+43], N[(-2.0 * N[(c * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1400000000.0], t$95$1, If[LessEqual[c, -3.45e-15], N[(i * N[(-2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.8e+58], t$95$1, N[(-2.0 * N[(c * N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -1400000000:\\
\;\;\;\;t_1\\

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000004e43 < c < -1.4e9 or -3.45000000000000005e-15 < c < 1.79999999999999998e58

    1. Initial program 97.1%

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

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

    if -1.4e9 < c < -3.45000000000000005e-15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.79999999999999998e58 < c

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9.5 \cdot 10^{+43}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -1400000000:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq -3.45 \cdot 10^{-15}:\\ \;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{+58}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 13: 68.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;c \leq -2150000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 8.2 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -1.36000000000000005e44 < c < -2.15e9 or -1.12e-13 < c < 8.2000000000000002e47

    1. Initial program 97.7%

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

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

    if -2.15e9 < c < -1.12e-13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000002e47 < c

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.36 \cdot 10^{+44}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -2150000000:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{elif}\;c \leq -1.12 \cdot 10^{-13}:\\ \;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 8.2 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-2 \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 14: 37.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-237}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.86e6 or 3.40000000000000006e37 < t

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

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

    if -1.86e6 < t < -1.8999999999999999e-130 or -9.00000000000000019e-237 < t < 3.40000000000000006e37

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-130 < t < -9.00000000000000019e-237

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1860000:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-130}:\\ \;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-237}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+37}:\\ \;\;\;\;i \cdot \left(-2 \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 15: 33.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+232} \lor \neg \left(z \leq -2.85 \cdot 10^{+21}\right) \land z \leq 6 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e232 or -2.85e21 < z < 5.9999999999999997e-75

    1. Initial program 87.7%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*92.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-def92.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. Simplified92.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-def92.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. +-commutative92.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-rr92.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 41.2%

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

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

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

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

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

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

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

    if -1.1e232 < z < -2.85e21 or 5.9999999999999997e-75 < z

    1. Initial program 93.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+232} \lor \neg \left(z \leq -2.85 \cdot 10^{+21}\right) \land z \leq 6 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 16: 38.1% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+179} \lor \neg \left(x \leq 2.85 \cdot 10^{+51}\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 -2.3e+179) (not (<= x 2.85e+51)))
   (* 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 <= -2.3e+179) || !(x <= 2.85e+51)) {
		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 <= (-2.3d+179)) .or. (.not. (x <= 2.85d+51))) 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 <= -2.3e+179) || !(x <= 2.85e+51)) {
		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 <= -2.3e+179) or not (x <= 2.85e+51):
		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 <= -2.3e+179) || !(x <= 2.85e+51))
		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 <= -2.3e+179) || ~((x <= 2.85e+51)))
		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, -2.3e+179], N[Not[LessEqual[x, 2.85e+51]], $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 -2.3 \cdot 10^{+179} \lor \neg \left(x \leq 2.85 \cdot 10^{+51}\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 < -2.29999999999999994e179 or 2.8500000000000001e51 < x

    1. Initial program 89.6%

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

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

    if -2.29999999999999994e179 < x < 2.8500000000000001e51

    1. Initial program 90.9%

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

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

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

Alternative 17: 29.3% accurate, 3.8× speedup?

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

\\
2 \cdot \left(z \cdot t\right)
\end{array}
Derivation
  1. Initial program 90.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 27.3%

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

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

Developer target: 94.2% accurate, 1.0× speedup?

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

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

Reproduce

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