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

Percentage Accurate: 89.8% → 94.7%
Time: 15.9s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 89.8% 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.7% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 65.3%

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x - 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) < 4.9999999999999997e303

    1. Initial program 98.6%

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

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

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

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

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

Alternative 2: 94.2% accurate, 0.2× speedup?

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

\\
2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Derivation
  1. Initial program 88.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. Step-by-step derivation
    1. associate-*l*92.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-def93.4%

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

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

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

Alternative 3: 74.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{if}\;c \leq -3 \cdot 10^{+144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{+98}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -8 \cdot 10^{+79} \lor \neg \left(c \leq -4.6 \cdot 10^{+61} \lor \neg \left(c \leq -3 \cdot 10^{-25}\right) \land \left(c \leq 4.2 \cdot 10^{-72} \lor \neg \left(c \leq 2.9 \cdot 10^{-51}\right) \land c \leq 11500000\right)\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (* c (* (+ a (* b c)) i)) -2.0)))
   (if (<= c -3e+144)
     t_1
     (if (<= c -8.6e+98)
       (* 2.0 (- (* z t) (* c (* a i))))
       (if (or (<= c -8e+79)
               (not
                (or (<= c -4.6e+61)
                    (and (not (<= c -3e-25))
                         (or (<= c 4.2e-72)
                             (and (not (<= c 2.9e-51)) (<= c 11500000.0)))))))
         t_1
         (* 2.0 (+ (* x y) (* z t))))))))
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)) * -2.0;
	double tmp;
	if (c <= -3e+144) {
		tmp = t_1;
	} else if (c <= -8.6e+98) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if ((c <= -8e+79) || !((c <= -4.6e+61) || (!(c <= -3e-25) && ((c <= 4.2e-72) || (!(c <= 2.9e-51) && (c <= 11500000.0)))))) {
		tmp = t_1;
	} else {
		tmp = 2.0 * ((x * y) + (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) :: t_1
    real(8) :: tmp
    t_1 = (c * ((a + (b * c)) * i)) * (-2.0d0)
    if (c <= (-3d+144)) then
        tmp = t_1
    else if (c <= (-8.6d+98)) then
        tmp = 2.0d0 * ((z * t) - (c * (a * i)))
    else if ((c <= (-8d+79)) .or. (.not. (c <= (-4.6d+61)) .or. (.not. (c <= (-3d-25))) .and. (c <= 4.2d-72) .or. (.not. (c <= 2.9d-51)) .and. (c <= 11500000.0d0))) then
        tmp = t_1
    else
        tmp = 2.0d0 * ((x * y) + (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 t_1 = (c * ((a + (b * c)) * i)) * -2.0;
	double tmp;
	if (c <= -3e+144) {
		tmp = t_1;
	} else if (c <= -8.6e+98) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if ((c <= -8e+79) || !((c <= -4.6e+61) || (!(c <= -3e-25) && ((c <= 4.2e-72) || (!(c <= 2.9e-51) && (c <= 11500000.0)))))) {
		tmp = t_1;
	} else {
		tmp = 2.0 * ((x * y) + (z * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (c * ((a + (b * c)) * i)) * -2.0
	tmp = 0
	if c <= -3e+144:
		tmp = t_1
	elif c <= -8.6e+98:
		tmp = 2.0 * ((z * t) - (c * (a * i)))
	elif (c <= -8e+79) or not ((c <= -4.6e+61) or (not (c <= -3e-25) and ((c <= 4.2e-72) or (not (c <= 2.9e-51) and (c <= 11500000.0))))):
		tmp = t_1
	else:
		tmp = 2.0 * ((x * y) + (z * t))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(c * Float64(Float64(a + Float64(b * c)) * i)) * -2.0)
	tmp = 0.0
	if (c <= -3e+144)
		tmp = t_1;
	elseif (c <= -8.6e+98)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))));
	elseif ((c <= -8e+79) || !((c <= -4.6e+61) || (!(c <= -3e-25) && ((c <= 4.2e-72) || (!(c <= 2.9e-51) && (c <= 11500000.0))))))
		tmp = t_1;
	else
		tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (c * ((a + (b * c)) * i)) * -2.0;
	tmp = 0.0;
	if (c <= -3e+144)
		tmp = t_1;
	elseif (c <= -8.6e+98)
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	elseif ((c <= -8e+79) || ~(((c <= -4.6e+61) || (~((c <= -3e-25)) && ((c <= 4.2e-72) || (~((c <= 2.9e-51)) && (c <= 11500000.0)))))))
		tmp = t_1;
	else
		tmp = 2.0 * ((x * y) + (z * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -3e+144], t$95$1, If[LessEqual[c, -8.6e+98], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, -8e+79], N[Not[Or[LessEqual[c, -4.6e+61], And[N[Not[LessEqual[c, -3e-25]], $MachinePrecision], Or[LessEqual[c, 4.2e-72], And[N[Not[LessEqual[c, 2.9e-51]], $MachinePrecision], LessEqual[c, 11500000.0]]]]]], $MachinePrecision]], t$95$1, N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -8 \cdot 10^{+79} \lor \neg \left(c \leq -4.6 \cdot 10^{+61} \lor \neg \left(c \leq -3 \cdot 10^{-25}\right) \land \left(c \leq 4.2 \cdot 10^{-72} \lor \neg \left(c \leq 2.9 \cdot 10^{-51}\right) \land c \leq 11500000\right)\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.9999999999999999e144 or -8.6000000000000003e98 < c < -7.99999999999999974e79 or -4.5999999999999999e61 < c < -2.9999999999999998e-25 or 4.2e-72 < c < 2.89999999999999973e-51 or 1.15e7 < c

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

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

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

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

      \[\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 c around inf 66.3%

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

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

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

        \[\leadsto 2 \cdot \left(\left(-\color{blue}{c \cdot c}\right) \cdot \left(i \cdot b\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right) \]
      4. distribute-lft-neg-in66.3%

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

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

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(c \cdot \color{blue}{\left(b \cdot i\right)}\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right) \]
      7. associate-*r*73.4%

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

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

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i\right) + \color{blue}{\left(-c\right) \cdot \left(a \cdot i\right)}\right) \]
      10. distribute-lft-in79.3%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i + a \cdot i\right)\right)} \]
      11. distribute-rgt-in80.9%

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

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(i \cdot \color{blue}{\left(a + c \cdot b\right)}\right)\right) \]
      13. *-commutative80.9%

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

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\left(-c\right) \cdot i\right) \cdot \left(a + b \cdot c\right)\right)} \]
      15. distribute-lft-neg-in80.2%

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot \left(c \cdot \left(-i\right)\right)\right) \]
    8. Simplified80.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{fma}\left(c, b, a\right) \cdot \left(c \cdot \left(-i\right)\right)\right)} \]
    9. Taylor expanded in i around 0 80.9%

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

    if -2.9999999999999999e144 < c < -8.6000000000000003e98

    1. Initial program 90.4%

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

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

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

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

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

    if -7.99999999999999974e79 < c < -4.5999999999999999e61 or -2.9999999999999998e-25 < c < 4.2e-72 or 2.89999999999999973e-51 < c < 1.15e7

    1. Initial program 97.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3 \cdot 10^{+144}:\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{+98}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -8 \cdot 10^{+79} \lor \neg \left(c \leq -4.6 \cdot 10^{+61} \lor \neg \left(c \leq -3 \cdot 10^{-25}\right) \land \left(c \leq 4.2 \cdot 10^{-72} \lor \neg \left(c \leq 2.9 \cdot 10^{-51}\right) \land c \leq 11500000\right)\right):\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \end{array} \]

Alternative 4: 75.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.16 \cdot 10^{+80} \lor \neg \left(c \leq -4.6 \cdot 10^{+61} \lor \neg \left(c \leq -1.25 \cdot 10^{-24}\right) \land \left(c \leq 2.3 \cdot 10^{-71} \lor \neg \left(c \leq 2.6 \cdot 10^{-51}\right) \land c \leq 7000000\right)\right):\\
\;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.15999999999999997e80 or -4.5999999999999999e61 < c < -1.24999999999999995e-24 or 2.2999999999999998e-71 < c < 2.6e-51 or 7e6 < c

    1. Initial program 79.2%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*90.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-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.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. +-commutative90.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-rr90.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 c around inf 64.4%

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

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

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

        \[\leadsto 2 \cdot \left(\left(-\color{blue}{c \cdot c}\right) \cdot \left(i \cdot b\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right) \]
      4. distribute-lft-neg-in64.4%

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

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

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(c \cdot \color{blue}{\left(b \cdot i\right)}\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right) \]
      7. associate-*r*71.0%

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

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i\right) + \color{blue}{\left(-c \cdot \left(a \cdot i\right)\right)}\right) \]
      9. distribute-lft-neg-in71.0%

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i\right) + \color{blue}{\left(-c\right) \cdot \left(a \cdot i\right)}\right) \]
      10. distribute-lft-in77.1%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i + a \cdot i\right)\right)} \]
      11. distribute-rgt-in78.7%

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\left(-c\right) \cdot i\right) \cdot \left(a + b \cdot c\right)\right)} \]
      15. distribute-lft-neg-in77.9%

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

        \[\leadsto 2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot \left(-c \cdot i\right)\right)} \]
      17. distribute-rgt-neg-in77.9%

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(c \cdot b + a\right)} \cdot \left(c \cdot \left(-i\right)\right)\right) \]
      20. fma-def78.0%

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot \left(c \cdot \left(-i\right)\right)\right) \]
    8. Simplified78.0%

      \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{fma}\left(c, b, a\right) \cdot \left(c \cdot \left(-i\right)\right)\right)} \]
    9. Taylor expanded in i around 0 78.7%

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

    if -1.15999999999999997e80 < c < -4.5999999999999999e61 or -1.24999999999999995e-24 < c < 2.2999999999999998e-71 or 2.6e-51 < c < 7e6

    1. Initial program 97.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.16 \cdot 10^{+80} \lor \neg \left(c \leq -4.6 \cdot 10^{+61} \lor \neg \left(c \leq -1.25 \cdot 10^{-24}\right) \land \left(c \leq 2.3 \cdot 10^{-71} \lor \neg \left(c \leq 2.6 \cdot 10^{-51}\right) \land c \leq 7000000\right)\right):\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \end{array} \]

Alternative 5: 66.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq -6.2 \cdot 10^{+107}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 7.4 \cdot 10^{-96}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.2999999999999999e153

    1. Initial program 90.7%

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

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

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

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

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

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

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

    if -1.2999999999999999e153 < x < -6.20000000000000052e107 or -4.49999999999999979e23 < x < 7.39999999999999972e-96

    1. Initial program 86.3%

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

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

    if -6.20000000000000052e107 < x < -4.49999999999999979e23

    1. Initial program 87.8%

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

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

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

    if 7.39999999999999972e-96 < x

    1. Initial program 89.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+153}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;x \leq -6.2 \cdot 10^{+107}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{+23}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{-96}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]

Alternative 6: 60.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;i \leq 1.6 \cdot 10^{-178}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 8.2 \cdot 10^{-23}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq 2.2 \cdot 10^{+20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 2.25 \cdot 10^{+57}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -3.9000000000000002e87 or 1.6e-178 < i < 8.20000000000000059e-23 or 2.2e20 < i < 2.24999999999999998e57

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

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

      \[\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.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. +-commutative92.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-rr92.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 c around inf 51.4%

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

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

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

        \[\leadsto 2 \cdot \left(\left(-\color{blue}{c \cdot c}\right) \cdot \left(i \cdot b\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right) \]
      4. distribute-lft-neg-in51.4%

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

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

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(c \cdot \color{blue}{\left(b \cdot i\right)}\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right) \]
      7. associate-*r*63.5%

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

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i\right) + \color{blue}{\left(-c \cdot \left(a \cdot i\right)\right)}\right) \]
      9. distribute-lft-neg-in63.5%

        \[\leadsto 2 \cdot \left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i\right) + \color{blue}{\left(-c\right) \cdot \left(a \cdot i\right)}\right) \]
      10. distribute-lft-in69.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(-c\right) \cdot \left(\left(c \cdot b\right) \cdot i + a \cdot i\right)\right)} \]
      11. distribute-rgt-in70.4%

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\left(-c\right) \cdot i\right) \cdot \left(a + b \cdot c\right)\right)} \]
      15. distribute-lft-neg-in69.3%

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

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(c \cdot b + a\right)} \cdot \left(c \cdot \left(-i\right)\right)\right) \]
      20. fma-def69.3%

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot \left(c \cdot \left(-i\right)\right)\right) \]
    8. Simplified69.3%

      \[\leadsto 2 \cdot \color{blue}{\left(\mathsf{fma}\left(c, b, a\right) \cdot \left(c \cdot \left(-i\right)\right)\right)} \]
    9. Taylor expanded in i around 0 70.4%

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

    if -3.9000000000000002e87 < i < 1.6e-178 or 8.20000000000000059e-23 < i < 2.2e20

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

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

    if 2.24999999999999998e57 < i

    1. Initial program 95.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 z around 0 71.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -3.9 \cdot 10^{+87}:\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;i \leq 1.6 \cdot 10^{-178}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;i \leq 8.2 \cdot 10^{-23}:\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;i \leq 2.2 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;i \leq 2.25 \cdot 10^{+57}:\\ \;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\ \end{array} \]

Alternative 7: 76.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{-137} \lor \neg \left(y \leq 1.12 \cdot 10^{+76}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.4999999999999995e-137 or 1.12000000000000005e76 < y

    1. Initial program 87.8%

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

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

    if -7.4999999999999995e-137 < y < 1.12000000000000005e76

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

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

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

Alternative 8: 87.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -8.9999999999999995e-23

    1. Initial program 83.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 0 85.8%

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

    if -8.9999999999999995e-23 < c < 9e6

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

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

    if 9e6 < c

    1. Initial program 73.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 x around 0 85.3%

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

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

Alternative 9: 94.0% accurate, 1.0× speedup?

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

\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Derivation
  1. Initial program 88.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. Step-by-step derivation
    1. associate-*l*92.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-def93.4%

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

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

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

Alternative 10: 68.2% accurate, 1.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.9999999999999999e144 or 5.5000000000000001e60 < c

    1. Initial program 72.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 b around inf 67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999999e144 < c < 1.15e7

    1. Initial program 95.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 68.7%

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

    if 1.15e7 < c < 5.5000000000000001e60

    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 inf 67.7%

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

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

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

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

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

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

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

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

Alternative 11: 68.4% accurate, 1.3× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;c \cdot \left(-2 \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 < -2.9999999999999999e144

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

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

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

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

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

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

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

      \[\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) \]
    7. Taylor expanded in c around inf 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999999e144 < c < 1.1e7

    1. Initial program 95.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 68.7%

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

    if 1.1e7 < c < 6.50000000000000027e55

    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 inf 67.7%

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

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

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

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

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

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

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

    if 6.50000000000000027e55 < c

    1. Initial program 69.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 b around inf 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{-181}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4.9 \cdot 10^{+58}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.1499999999999999e-142 or 4.90000000000000018e58 < y

    1. Initial program 87.4%

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

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

    if -3.1499999999999999e-142 < y < 7.1999999999999998e-181 or 9.99999999999999927e-105 < y < 4.90000000000000018e58

    1. Initial program 87.8%

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

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

    if 7.1999999999999998e-181 < y < 9.99999999999999927e-105

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.15 \cdot 10^{-142}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-181}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;y \leq 10^{-104}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+58}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-152}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+58}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8000000000000003e-136 or 7.19999999999999993e58 < y

    1. Initial program 88.0%

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

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

    if -3.8000000000000003e-136 < y < 4.19999999999999998e-152 or 9.5000000000000002e-105 < y < 7.19999999999999993e58

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

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

    if 4.19999999999999998e-152 < y < 9.5000000000000002e-105

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{-136}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-152}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-105}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+58}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 14: 55.4% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.05 \cdot 10^{+99}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.0499999999999999e99

    1. Initial program 89.2%

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

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

    if 2.0499999999999999e99 < a

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 39.0% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{-136} \lor \neg \left(y \leq 1.75 \cdot 10^{+58}\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 (<= y -2.35e-136) (not (<= y 1.75e+58)))
   (* 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 ((y <= -2.35e-136) || !(y <= 1.75e+58)) {
		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 ((y <= (-2.35d-136)) .or. (.not. (y <= 1.75d+58))) 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 ((y <= -2.35e-136) || !(y <= 1.75e+58)) {
		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 (y <= -2.35e-136) or not (y <= 1.75e+58):
		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 ((y <= -2.35e-136) || !(y <= 1.75e+58))
		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 ((y <= -2.35e-136) || ~((y <= 1.75e+58)))
		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[y, -2.35e-136], N[Not[LessEqual[y, 1.75e+58]], $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}\;y \leq -2.35 \cdot 10^{-136} \lor \neg \left(y \leq 1.75 \cdot 10^{+58}\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 y < -2.35000000000000011e-136 or 1.7499999999999999e58 < y

    1. Initial program 88.0%

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

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

    if -2.35000000000000011e-136 < y < 1.7499999999999999e58

    1. Initial program 88.5%

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

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

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

Alternative 16: 29.2% accurate, 3.8× speedup?

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

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

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

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

Developer target: 94.0% accurate, 1.0× speedup?

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

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

Reproduce

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