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

Percentage Accurate: 90.5% → 96.2%
Time: 19.1s
Alternatives: 17
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 90.5% accurate, 1.0× speedup?

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

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

Alternative 1: 96.2% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 97.2%

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

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

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

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

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

    1. Initial program 0.0%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot \left(x + \frac{t \cdot z}{y}\right)\right)} \]
    5. Taylor expanded in t around inf 50.0%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-/l*64.3%

        \[\leadsto 2 \cdot \left(t \cdot \left(z + \color{blue}{x \cdot \frac{y}{t}}\right)\right) \]
    7. Simplified64.3%

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

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

Alternative 2: 72.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;c \leq -1.1 \cdot 10^{-185}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq -2.02 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 5.6 \cdot 10^{-126}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq 6.4 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 820000000000 \lor \neg \left(c \leq 1.35 \cdot 10^{+161}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.9000000000000002e-22 or 8.2e11 < c < 1.3499999999999999e161

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

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

    if -2.9000000000000002e-22 < c < -1.1e-185 or -2.0199999999999999e-221 < c < 5.59999999999999983e-126

    1. Initial program 95.7%

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

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

    if -1.1e-185 < c < -2.0199999999999999e-221 or 5.59999999999999983e-126 < c < 6.3999999999999998e-59

    1. Initial program 96.1%

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

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

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

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

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

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

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

    if 6.3999999999999998e-59 < c < 8.2e11 or 1.3499999999999999e161 < c

    1. Initial program 91.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.9 \cdot 10^{-22}:\\ \;\;\;\;2 \cdot \left(\left(\left(a + b \cdot c\right) \cdot i\right) \cdot \left(-c\right)\right)\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{-185}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq -2.02 \cdot 10^{-221}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 5.6 \cdot 10^{-126}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 6.4 \cdot 10^{-59}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 820000000000 \lor \neg \left(c \leq 1.35 \cdot 10^{+161}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(a + b \cdot c\right) \cdot i\right) \cdot \left(-c\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 92.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 97.2%

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

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

    1. Initial program 0.0%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot \left(x + \frac{t \cdot z}{y}\right)\right)} \]
    5. Taylor expanded in t around inf 50.0%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-/l*64.3%

        \[\leadsto 2 \cdot \left(t \cdot \left(z + \color{blue}{x \cdot \frac{y}{t}}\right)\right) \]
    7. Simplified64.3%

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

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

Alternative 4: 96.2% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 97.2%

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define99.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. +-commutative99.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. Applied egg-rr99.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) \]

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

    1. Initial program 0.0%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot \left(x + \frac{t \cdot z}{y}\right)\right)} \]
    5. Taylor expanded in t around inf 50.0%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-/l*64.3%

        \[\leadsto 2 \cdot \left(t \cdot \left(z + \color{blue}{x \cdot \frac{y}{t}}\right)\right) \]
    7. Simplified64.3%

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

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

Alternative 5: 73.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;c \leq -2.4 \cdot 10^{-186}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;c \leq 2 \cdot 10^{-119}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -9.4999999999999994e-22 or 1.15e-9 < c

    1. Initial program 86.9%

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

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

    if -9.4999999999999994e-22 < c < -2.40000000000000003e-186 or -1.20000000000000012e-221 < c < 2.00000000000000003e-119

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

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

    if -2.40000000000000003e-186 < c < -1.20000000000000012e-221

    1. Initial program 99.7%

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

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

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

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

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

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

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

    if 2.00000000000000003e-119 < c < 1.15e-9

    1. Initial program 96.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9.5 \cdot 10^{-22}:\\ \;\;\;\;2 \cdot \left(\left(\left(a + b \cdot c\right) \cdot i\right) \cdot \left(-c\right)\right)\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{-186}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq -1.2 \cdot 10^{-221}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 2 \cdot 10^{-119}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-9}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(a + b \cdot c\right) \cdot i\right) \cdot \left(-c\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 55.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{+92}:\\
\;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\

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

\mathbf{elif}\;a \leq 2.05 \cdot 10^{+221} \lor \neg \left(a \leq 1.02 \cdot 10^{+300}\right):\\
\;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.80000000000000022e92

    1. Initial program 92.5%

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

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

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

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

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

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

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

    if -7.80000000000000022e92 < a < 3.5999999999999998e179

    1. Initial program 94.0%

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

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

    if 3.5999999999999998e179 < a < 2.04999999999999985e221 or 1.02000000000000002e300 < a

    1. Initial program 85.4%

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

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

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

    if 2.04999999999999985e221 < a < 1.02000000000000002e300

    1. Initial program 76.2%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot \left(x + \frac{t \cdot z}{y}\right)\right)} \]
    5. Taylor expanded in t around inf 53.8%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-/l*58.3%

        \[\leadsto 2 \cdot \left(t \cdot \left(z + \color{blue}{x \cdot \frac{y}{t}}\right)\right) \]
    7. Simplified58.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+92}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+179}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{+221} \lor \neg \left(a \leq 1.02 \cdot 10^{+300}\right):\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t \cdot \left(z + x \cdot \frac{y}{t}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+185} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+97}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -9.9999999999999998e184 or 2.0000000000000001e97 < (*.f64 x y)

    1. Initial program 85.8%

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

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

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

    if -9.9999999999999998e184 < (*.f64 x y) < 2.0000000000000001e97

    1. Initial program 94.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+185} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+97}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\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} \]
  5. Add Preprocessing

Alternative 8: 84.7% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.8000000000000001e92

    1. Initial program 92.5%

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

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

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

    if -5.8000000000000001e92 < a < 1.25000000000000002e115

    1. Initial program 94.9%

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

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

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

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

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

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

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

    if 1.25000000000000002e115 < a

    1. Initial program 78.9%

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

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

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

Alternative 9: 38.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-308}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.85 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5000000000000002e-101 or 3.85000000000000006e105 < t

    1. Initial program 88.9%

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

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

    if -1.5000000000000002e-101 < t < -7.4999999999999998e-308 or 8.1999999999999998e-116 < t < 3.85000000000000006e105

    1. Initial program 94.5%

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

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

    if -7.4999999999999998e-308 < t < 8.1999999999999998e-116

    1. Initial program 95.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{-101}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-308}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-116}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;t \leq 3.85 \cdot 10^{+105}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 62.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+98}:\\
\;\;\;\;2 \cdot \left(t \cdot \left(z + x \cdot \frac{y}{t}\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.9999999999999998e98

    1. Initial program 91.8%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot \left(x + \frac{t \cdot z}{y}\right)\right)} \]
    5. Taylor expanded in t around inf 75.7%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-/l*75.6%

        \[\leadsto 2 \cdot \left(t \cdot \left(z + \color{blue}{x \cdot \frac{y}{t}}\right)\right) \]
    7. Simplified75.6%

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

    if -4.9999999999999998e98 < (*.f64 x y) < 4.99999999999999972e57

    1. Initial program 94.1%

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

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

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

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

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

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

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

    if 4.99999999999999972e57 < (*.f64 x y)

    1. Initial program 85.7%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot \left(x + \frac{t \cdot z}{y}\right)\right)} \]
    5. Taylor expanded in x around inf 63.1%

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

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

Alternative 11: 73.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{-33}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+106}:\\ \;\;\;\;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 (<= t -1.7e-33)
     (* 2.0 (- (* z t) (* a (* c i))))
     (if (<= t 2.7e+106) (* 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 (t <= -1.7e-33) {
		tmp = 2.0 * ((z * t) - (a * (c * i)));
	} else if (t <= 2.7e+106) {
		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 (t <= (-1.7d-33)) then
        tmp = 2.0d0 * ((z * t) - (a * (c * i)))
    else if (t <= 2.7d+106) 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 (t <= -1.7e-33) {
		tmp = 2.0 * ((z * t) - (a * (c * i)));
	} else if (t <= 2.7e+106) {
		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 t <= -1.7e-33:
		tmp = 2.0 * ((z * t) - (a * (c * i)))
	elif t <= 2.7e+106:
		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 (t <= -1.7e-33)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i))));
	elseif (t <= 2.7e+106)
		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 (t <= -1.7e-33)
		tmp = 2.0 * ((z * t) - (a * (c * i)));
	elseif (t <= 2.7e+106)
		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[LessEqual[t, -1.7e-33], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+106], 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}\;t \leq -1.7 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+106}:\\
\;\;\;\;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 3 regimes
  2. if t < -1.7e-33

    1. Initial program 91.5%

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

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

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

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

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

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

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

    if -1.7e-33 < t < 2.70000000000000006e106

    1. Initial program 95.6%

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

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

    if 2.70000000000000006e106 < t

    1. Initial program 81.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-33}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+106}:\\ \;\;\;\;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} \]
  5. Add Preprocessing

Alternative 12: 86.4% accurate, 0.8× speedup?

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

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

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

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


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

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

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

    if -2.75e29 < c < 6.9999999999999998e-58

    1. Initial program 96.0%

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

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

    if 6.9999999999999998e-58 < c

    1. Initial program 93.7%

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

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

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

Alternative 13: 55.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq 36000000000 \lor \neg \left(i \leq 5.5 \cdot 10^{+57}\right) \land i \leq 7 \cdot 10^{+168}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < 3.6e10 or 5.5000000000000002e57 < i < 7.0000000000000004e168

    1. Initial program 93.3%

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

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

    if 3.6e10 < i < 5.5000000000000002e57 or 7.0000000000000004e168 < i

    1. Initial program 85.9%

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

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

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

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

Alternative 14: 59.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot i\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-101}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+114}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.39999999999999995e-101

    1. Initial program 93.1%

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + -1 \cdot \left(a \cdot \left(c \cdot i\right)\right)\right)} \]
      2. mul-1-neg63.6%

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

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

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

    if -1.39999999999999995e-101 < t < 4.8e114

    1. Initial program 94.5%

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

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

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

    if 4.8e114 < t

    1. Initial program 81.8%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot \left(x + \frac{t \cdot z}{y}\right)\right)} \]
    5. Taylor expanded in t around inf 64.5%

      \[\leadsto 2 \cdot \color{blue}{\left(t \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-/l*69.0%

        \[\leadsto 2 \cdot \left(t \cdot \left(z + \color{blue}{x \cdot \frac{y}{t}}\right)\right) \]
    7. Simplified69.0%

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

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

Alternative 15: 37.0% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+106}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.0000000000000002e-23 or 1.55e106 < t

    1. Initial program 86.9%

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

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

    if -5.0000000000000002e-23 < t < 1.3e-188

    1. Initial program 94.8%

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

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

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

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

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

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

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

    if 1.3e-188 < t < 1.55e106

    1. Initial program 97.8%

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

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

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

Alternative 16: 39.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{-110} \lor \neg \left(t \leq 1.32 \cdot 10^{+106}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.34999999999999996e-110 or 1.31999999999999999e106 < t

    1. Initial program 88.9%

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

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

    if -2.34999999999999996e-110 < t < 1.31999999999999999e106

    1. Initial program 95.0%

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

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

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

Alternative 17: 30.0% accurate, 3.8× speedup?

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

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

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

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

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

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

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

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