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

Percentage Accurate: 89.6% → 95.3%
Time: 25.9s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 89.6% 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.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -9 \cdot 10^{+23}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(z, t, \mathsf{fma}\left(c, \mathsf{fma}\left(b, c, a\right) \cdot \left(-i\right), x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= c -9e+23)
   (* 2.0 (fma z t (fma c (* (fma b c a) (- i)) (* x y))))
   (* 2.0 (- (fma x y (* z t)) (* (+ a (* 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 <= -9e+23) {
		tmp = 2.0 * fma(z, t, fma(c, (fma(b, c, a) * -i), (x * y)));
	} else {
		tmp = 2.0 * (fma(x, y, (z * t)) - ((a + (c * b)) * (c * i)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (c <= -9e+23)
		tmp = Float64(2.0 * fma(z, t, fma(c, Float64(fma(b, c, a) * Float64(-i)), Float64(x * y))));
	else
		tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(a + Float64(c * b)) * Float64(c * i))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[c, -9e+23], N[(2.0 * N[(z * t + N[(c * N[(N[(b * c + a), $MachinePrecision] * (-i)), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -8.99999999999999958e23

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999958e23 < c

    1. Initial program 94.7%

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\mathsf{fma}\left(x, y, z \cdot t\right)} - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]
    3. Simplified97.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.6%

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

Alternative 2: 94.6% accurate, 0.2× speedup?

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

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

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

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

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

Alternative 3: 95.3% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot t_1\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 96.2%

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

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

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

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

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

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

Alternative 4: 93.3% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (+.f64 a (*.f64 b c)) c) < -3.99999999999999974e169 or 9.9999999999999996e274 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 80.3%

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

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

    if -3.99999999999999974e169 < (*.f64 (+.f64 a (*.f64 b c)) c) < 9.9999999999999996e274

    1. Initial program 97.9%

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

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

Alternative 5: 79.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.2499999999999999e23 or 7.2e6 < c

    1. Initial program 85.6%

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

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

    if -2.2499999999999999e23 < c < 7.2e6

    1. Initial program 97.5%

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

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

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

Alternative 6: 87.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -9.2 \cdot 10^{+65} \lor \neg \left(c \leq 1.5 \cdot 10^{+22}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -9.2e65 or 1.5e22 < c

    1. Initial program 84.4%

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

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

    if -9.2e65 < c < 1.5e22

    1. Initial program 97.1%

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

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

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

Alternative 7: 67.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.15000000000000004e138

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

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

    if -1.15000000000000004e138 < x < 1.44999999999999992e-145

    1. Initial program 94.2%

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

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

    if 1.44999999999999992e-145 < x

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

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

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

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

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

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

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

Alternative 8: 75.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.4 \cdot 10^{+64} \lor \neg \left(c \leq 112000000\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -3.4000000000000002e64 or 1.12e8 < c

    1. Initial program 85.7%

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

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

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

    if -3.4000000000000002e64 < c < 1.12e8

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

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

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

Alternative 9: 37.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{-127}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9.6 \cdot 10^{-14}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.9999999999999998e-127 or 1.3800000000000001e164 < y

    1. Initial program 90.6%

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

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

    if -8.9999999999999998e-127 < y < 9.599999999999999e-14

    1. Initial program 92.0%

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

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

    if 9.599999999999999e-14 < y < 1.3800000000000001e164

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(b, c, a\right)}\right)}^{3}} \cdot \left(c \cdot i\right)\right) \]
    6. Taylor expanded in a around inf 36.8%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 37.7% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-261}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+177}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6000000000000001e-114 or 1.2e177 < t

    1. Initial program 88.8%

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

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

    if -1.6000000000000001e-114 < t < 3.0999999999999998e-261 or 2.54999999999999984e-242 < t < 1.2e177

    1. Initial program 94.1%

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

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

    if 3.0999999999999998e-261 < t < 2.54999999999999984e-242

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(b, c, a\right)}}\right)}^{3} \cdot \left(c \cdot i\right)\right) \]
    5. Applied egg-rr98.8%

      \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(b, c, a\right)}\right)}^{3}} \cdot \left(c \cdot i\right)\right) \]
    6. Taylor expanded in a around inf 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-114}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-261}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-242}:\\ \;\;\;\;\left(c \cdot -2\right) \cdot \left(a \cdot i\right)\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+177}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 11: 69.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.9 \cdot 10^{+100} \lor \neg \left(c \leq 2.35 \cdot 10^{+54}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.9e100 or 2.34999999999999996e54 < c

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e100 < c < 2.34999999999999996e54

    1. Initial program 94.9%

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

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

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

Alternative 12: 57.3% accurate, 1.4× speedup?

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

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

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

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


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

    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. associate-*l*96.2%

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(b, c, a\right)}\right)}^{3}} \cdot \left(c \cdot i\right)\right) \]
    6. Taylor expanded in a around inf 60.3%

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

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

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

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

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

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

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

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

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

    if -3.94999999999999993e242 < a < 7.99999999999999963e171

    1. Initial program 93.2%

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

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

    if 7.99999999999999963e171 < a

    1. Initial program 89.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. associate-*l*89.4%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - {\left(\sqrt[3]{\color{blue}{\mathsf{fma}\left(b, c, a\right)}}\right)}^{3} \cdot \left(c \cdot i\right)\right) \]
    5. Applied egg-rr94.4%

      \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{{\left(\sqrt[3]{\mathsf{fma}\left(b, c, a\right)}\right)}^{3}} \cdot \left(c \cdot i\right)\right) \]
    6. Taylor expanded in a around inf 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 69.3% accurate, 1.4× speedup?

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

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

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

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


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

    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. Taylor expanded in b around inf 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4999999999999999e100 < c < 2.90000000000000007e56

    1. Initial program 94.9%

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

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

    if 2.90000000000000007e56 < c

    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. Taylor expanded in b around inf 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 69.4% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6999999999999996e115 < c < 6.5000000000000001e56

    1. Initial program 95.0%

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

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

    if 6.5000000000000001e56 < c

    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. Taylor expanded in b around inf 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 37.9% accurate, 2.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.70000000000000016e-110 or 8.80000000000000029e176 < t

    1. Initial program 88.8%

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

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

    if -3.70000000000000016e-110 < t < 8.80000000000000029e176

    1. Initial program 94.4%

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

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

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

Alternative 16: 29.4% accurate, 3.8× speedup?

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

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

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

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

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

Developer target: 94.2% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023278 
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
  :precision binary64

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

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