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

Percentage Accurate: 89.5% → 95.2%
Time: 17.7s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 89.5% accurate, 1.0× speedup?

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

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

Alternative 1: 95.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) - \left(c \cdot t\_1\right) \cdot i \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}:\\ \;\;\;\;t \cdot \left(2 \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)) (* (* c t_1) i)) INFINITY)
     (* 2.0 (- (fma x y (* z t)) (* t_1 (* c i))))
     (* t (* 2.0 (+ 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)) - ((c * t_1) * i)) <= ((double) INFINITY)) {
		tmp = 2.0 * (fma(x, y, (z * t)) - (t_1 * (c * i)));
	} else {
		tmp = t * (2.0 * (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(Float64(c * t_1) * i)) <= Inf)
		tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(t_1 * Float64(c * i))));
	else
		tmp = Float64(t * Float64(2.0 * 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[(N[(c * t$95$1), $MachinePrecision] * i), $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[(t * N[(2.0 * 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) - \left(c \cdot t\_1\right) \cdot i \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}:\\
\;\;\;\;t \cdot \left(2 \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 93.4%

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
    4. 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 c around 0 41.7%

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

      \[\leadsto \color{blue}{t \cdot \left(2 \cdot z + 2 \cdot \frac{x \cdot y}{t}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-out66.7%

        \[\leadsto t \cdot \color{blue}{\left(2 \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
      2. associate-/l*75.0%

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

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

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

Alternative 2: 94.1% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 78.3%

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

        \[\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*95.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. Simplified95.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-define92.6%

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

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

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

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

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

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

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

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

    1. Initial program 98.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

    if 4.00000000000000023e258 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 60.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 90.8%

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

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

Alternative 3: 95.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 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\ \;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(2 \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 (* (* c t_1) i)) INFINITY)
     (* 2.0 (- t_2 (* t_1 (* c i))))
     (* t (* 2.0 (+ 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 - ((c * t_1) * i)) <= ((double) INFINITY)) {
		tmp = 2.0 * (t_2 - (t_1 * (c * i)));
	} else {
		tmp = t * (2.0 * (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 - ((c * t_1) * i)) <= Double.POSITIVE_INFINITY) {
		tmp = 2.0 * (t_2 - (t_1 * (c * i)));
	} else {
		tmp = t * (2.0 * (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 - ((c * t_1) * i)) <= math.inf:
		tmp = 2.0 * (t_2 - (t_1 * (c * i)))
	else:
		tmp = t * (2.0 * (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(Float64(c * t_1) * i)) <= Inf)
		tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i))));
	else
		tmp = Float64(t * Float64(2.0 * 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 - ((c * t_1) * i)) <= Inf)
		tmp = 2.0 * (t_2 - (t_1 * (c * i)));
	else
		tmp = t * (2.0 * (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[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(2.0 * 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 - \left(c \cdot t\_1\right) \cdot i \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - t\_1 \cdot \left(c \cdot i\right)\right)\\

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

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

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

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

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

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

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

      \[\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 c around 0 41.7%

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

      \[\leadsto \color{blue}{t \cdot \left(2 \cdot z + 2 \cdot \frac{x \cdot y}{t}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-out66.7%

        \[\leadsto t \cdot \color{blue}{\left(2 \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
      2. associate-/l*75.0%

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

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

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

Alternative 4: 80.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 z t) < -2e120

    1. Initial program 86.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 inf 91.1%

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

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

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

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

    if -2e120 < (*.f64 z t) < -4.00000000000000026e-152

    1. Initial program 83.5%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. fma-define83.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*90.5%

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

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

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

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

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

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

    if -4.00000000000000026e-152 < (*.f64 z t) < 4e13

    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 z around 0 94.4%

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

    if 4e13 < (*.f64 z t)

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

Alternative 5: 82.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;c \leq 2.6 \cdot 10^{+20} \lor \neg \left(c \leq 5.8 \cdot 10^{+52}\right) \land c \leq 5.2 \cdot 10^{+123}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\

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


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

    1. Initial program 80.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 i around inf 85.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 -2.3500000000000001e73 < c < 2.6e20 or 5.8e52 < c < 5.19999999999999971e123

    1. Initial program 95.2%

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

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

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

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

    if 2.6e20 < c < 5.8e52 or 5.19999999999999971e123 < c

    1. Initial program 76.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 z around 0 92.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 a around 0 83.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.35 \cdot 10^{+73}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+20} \lor \neg \left(c \leq 5.8 \cdot 10^{+52}\right) \land c \leq 5.2 \cdot 10^{+123}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 85.3% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;c \leq 5.5 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(\frac{x \cdot y}{i} - c \cdot t\_1\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.32e-74 or 2.6999999999999998e69 < c

    1. Initial program 79.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 86.7%

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

    if -1.32e-74 < c < 4.2e14

    1. Initial program 99.0%

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

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

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

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

    if 4.2e14 < c < 5.49999999999999996e52

    1. Initial program 87.5%

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

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

    if 5.49999999999999996e52 < c < 2.6999999999999998e69

    1. Initial program 87.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.32 \cdot 10^{-74}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 4.2 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(\frac{x \cdot y}{i} - c \cdot \left(a + b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{+69}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\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 7: 85.0% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.2e-73 or 6.79999999999999973e69 < c

    1. Initial program 79.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 86.7%

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

    if -2.2e-73 < c < 2.6e20

    1. Initial program 99.0%

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

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

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

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

    if 2.6e20 < c < 6.2e52

    1. Initial program 87.5%

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

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

    if 6.2e52 < c < 6.79999999999999973e69

    1. Initial program 87.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.2 \cdot 10^{-73}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 6.8 \cdot 10^{+69}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\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 8: 84.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;c \leq 2.6 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;c \leq 1.3 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -3.4999999999999998e-73

    1. Initial program 86.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 84.8%

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

    if -3.4999999999999998e-73 < c < 2.6e20 or 8.3999999999999999e52 < c < 1.29999999999999996e71

    1. Initial program 97.6%

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

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

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

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

    if 2.6e20 < c < 8.3999999999999999e52

    1. Initial program 87.5%

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

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

    if 1.29999999999999996e71 < c

    1. Initial program 74.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. Step-by-step derivation
      1. fma-define74.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*91.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.5 \cdot 10^{-73}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq 8.4 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{+71}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 85.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;c \leq 6.4 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;c \leq 1.3 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.4999999999999998e-73 or 1.29999999999999996e71 < c

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

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

    if -3.4999999999999998e-73 < c < 6.4e18 or 8.1999999999999999e52 < c < 1.29999999999999996e71

    1. Initial program 97.6%

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

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

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

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

    if 6.4e18 < c < 8.1999999999999999e52

    1. Initial program 87.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.5 \cdot 10^{-73}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 6.4 \cdot 10^{+18}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq 8.2 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{+71}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - a \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 10: 67.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -1.9999999999999999e214

    1. Initial program 86.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 86.2%

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

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

    if -1.9999999999999999e214 < (*.f64 x y) < 10

    1. Initial program 90.0%

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

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

    if 10 < (*.f64 x y) < 4.9999999999999998e216

    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 z around 0 82.7%

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

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

    if 4.9999999999999998e216 < (*.f64 x y)

    1. Initial program 76.4%

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

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

      \[\leadsto \color{blue}{x \cdot \left(2 \cdot y + 2 \cdot \frac{t \cdot z}{x}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-out88.3%

        \[\leadsto x \cdot \color{blue}{\left(2 \cdot \left(y + \frac{t \cdot z}{x}\right)\right)} \]
      2. associate-/l*96.3%

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

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

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

Alternative 11: 83.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+22} \lor \neg \left(z \cdot t \leq 40000000000000\right):\\
\;\;\;\;2 \cdot \left(t \cdot \left(z + x \cdot \frac{y}{t}\right) - \left(b \cdot c\right) \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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -1e22 or 4e13 < (*.f64 z t)

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1e22 < (*.f64 z t) < 4e13

    1. Initial program 92.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 z around 0 92.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 2 regimes into one program.
  4. Final simplification89.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+22} \lor \neg \left(z \cdot t \leq 40000000000000\right):\\ \;\;\;\;2 \cdot \left(t \cdot \left(z + x \cdot \frac{y}{t}\right) - \left(b \cdot c\right) \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 12: 85.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.2 \cdot 10^{-73} \lor \neg \left(c \leq 3.3 \cdot 10^{+18}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.2e-73 or 3.3e18 < c

    1. Initial program 80.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 84.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.2e-73 < c < 3.3e18

    1. Initial program 99.0%

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

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

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

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

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

Alternative 13: 72.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -3.19999999999999979e-87 or 4.05000000000000019e71 < c

    1. Initial program 80.8%

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

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

    if -3.19999999999999979e-87 < c < 4.05000000000000019e71

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

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

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

Alternative 14: 37.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;z \leq -9 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-182}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-61}:\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t))))
   (if (<= z -9e+63)
     t_1
     (if (<= z -6e-182)
       (* (* x y) 2.0)
       (if (<= z 4.4e-61) (* (* c i) (* a -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 (z <= -9e+63) {
		tmp = t_1;
	} else if (z <= -6e-182) {
		tmp = (x * y) * 2.0;
	} else if (z <= 4.4e-61) {
		tmp = (c * i) * (a * -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 (z <= (-9d+63)) then
        tmp = t_1
    else if (z <= (-6d-182)) then
        tmp = (x * y) * 2.0d0
    else if (z <= 4.4d-61) then
        tmp = (c * i) * (a * (-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 (z <= -9e+63) {
		tmp = t_1;
	} else if (z <= -6e-182) {
		tmp = (x * y) * 2.0;
	} else if (z <= 4.4e-61) {
		tmp = (c * i) * (a * -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 z <= -9e+63:
		tmp = t_1
	elif z <= -6e-182:
		tmp = (x * y) * 2.0
	elif z <= 4.4e-61:
		tmp = (c * i) * (a * -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 (z <= -9e+63)
		tmp = t_1;
	elseif (z <= -6e-182)
		tmp = Float64(Float64(x * y) * 2.0);
	elseif (z <= 4.4e-61)
		tmp = Float64(Float64(c * i) * Float64(a * -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 (z <= -9e+63)
		tmp = t_1;
	elseif (z <= -6e-182)
		tmp = (x * y) * 2.0;
	elseif (z <= 4.4e-61)
		tmp = (c * i) * (a * -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[z, -9e+63], t$95$1, If[LessEqual[z, -6e-182], N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[z, 4.4e-61], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.00000000000000034e63 or 4.40000000000000017e-61 < z

    1. Initial program 87.3%

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

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

    if -9.00000000000000034e63 < z < -6.0000000000000003e-182

    1. Initial program 89.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 inf 30.8%

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

    if -6.0000000000000003e-182 < z < 4.40000000000000017e-61

    1. Initial program 91.1%

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

        \[\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.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. Simplified98.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-define98.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. +-commutative98.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-rr98.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) \]
    7. Taylor expanded in a around inf 39.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 60.7% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.9e15 or 3.89999999999999983e-66 < z

    1. Initial program 87.7%

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

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

    if -3.9e15 < z < 3.89999999999999983e-66

    1. Initial program 90.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 a around inf 71.8%

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

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

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

Alternative 16: 60.8% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1e11

    1. Initial program 85.5%

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

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

      \[\leadsto \color{blue}{t \cdot \left(2 \cdot z + 2 \cdot \frac{x \cdot y}{t}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-out61.1%

        \[\leadsto t \cdot \color{blue}{\left(2 \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
      2. associate-/l*59.8%

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

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

      \[\leadsto \color{blue}{z \cdot \left(2 \cdot t + 2 \cdot \frac{x \cdot y}{z}\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-out62.5%

        \[\leadsto z \cdot \color{blue}{\left(2 \cdot \left(t + \frac{x \cdot y}{z}\right)\right)} \]
      2. associate-/l*63.9%

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

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

    if -2.1e11 < z < 4.79999999999999967e-62

    1. Initial program 90.5%

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

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

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

    if 4.79999999999999967e-62 < z

    1. Initial program 89.7%

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

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

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

Alternative 17: 59.9% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.35e73

    1. Initial program 84.8%

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

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

      \[\leadsto \color{blue}{t \cdot \left(2 \cdot z + 2 \cdot \frac{x \cdot y}{t}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-out61.3%

        \[\leadsto t \cdot \color{blue}{\left(2 \cdot \left(z + \frac{x \cdot y}{t}\right)\right)} \]
      2. associate-/l*59.7%

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

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

    if -1.35e73 < z < 3.7e-65

    1. Initial program 90.4%

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

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

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

    if 3.7e-65 < z

    1. Initial program 89.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 55.3%

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

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

Alternative 18: 43.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.9999999999999998e165 or 1e10 < (*.f64 x y)

    1. Initial program 87.8%

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

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

    if -1.9999999999999998e165 < (*.f64 x y) < 1e10

    1. Initial program 89.7%

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

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

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

Alternative 19: 57.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4000000000000003e162 < a < 3.6000000000000002e180

    1. Initial program 90.2%

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

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

    if 3.6000000000000002e180 < a

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 29.2% accurate, 3.8× speedup?

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

\\
2 \cdot \left(z \cdot t\right)
\end{array}
Derivation
  1. Initial program 89.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 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: 93.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 2024085 
(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))))