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

Percentage Accurate: 90.0% → 96.4%
Time: 20.8s
Alternatives: 15
Speedup: 0.9×

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 15 alternatives:

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

Initial Program: 90.0% accurate, 1.0× speedup?

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

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

Alternative 1: 96.4% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(i \cdot \left(\left(-a\right) - b \cdot c\right)\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 95.3%

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

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

    1. Initial program 0.0%

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\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) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i \leq \infty:\\ \;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(i \cdot \left(\left(-a\right) - b \cdot c\right)\right)\right)\\ \end{array} \]

Alternative 2: 43.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \cdot y \leq -1.08 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq -3.9 \cdot 10^{-106}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 9.6 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 8.2 \cdot 10^{+44}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 7.3 \cdot 10^{+109}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -2.10000000000000001e80 or 7.2999999999999998e109 < (*.f64 x y)

    1. Initial program 90.0%

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

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

    if -2.10000000000000001e80 < (*.f64 x y) < -1.0800000000000001e-69 or -3.9000000000000001e-106 < (*.f64 x y) < 9.5999999999999996e-234 or 8.1999999999999993e44 < (*.f64 x y) < 7.2999999999999998e109

    1. Initial program 91.7%

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

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

    if -1.0800000000000001e-69 < (*.f64 x y) < -3.9000000000000001e-106 or 9.5999999999999996e-234 < (*.f64 x y) < 8.1999999999999993e44

    1. Initial program 92.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 48.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.1 \cdot 10^{+80}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq -1.08 \cdot 10^{-69}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq -3.9 \cdot 10^{-106}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 9.6 \cdot 10^{-234}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 8.2 \cdot 10^{+44}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 7.3 \cdot 10^{+109}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]

Alternative 3: 43.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \cdot y \leq -9.8 \cdot 10^{-79}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq 8.8 \cdot 10^{-234}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq 9.4 \cdot 10^{+107}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -7.99999999999999941e75 or 9.4000000000000002e107 < (*.f64 x y)

    1. Initial program 90.0%

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

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

    if -7.99999999999999941e75 < (*.f64 x y) < -9.8000000000000001e-79 or -1.3500000000000001e-101 < (*.f64 x y) < 8.7999999999999996e-234 or 3.5000000000000001e54 < (*.f64 x y) < 9.4000000000000002e107

    1. Initial program 91.7%

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

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

    if -9.8000000000000001e-79 < (*.f64 x y) < -1.3500000000000001e-101

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.7999999999999996e-234 < (*.f64 x y) < 3.5000000000000001e54

    1. Initial program 90.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 44.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -8 \cdot 10^{+75}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq -9.8 \cdot 10^{-79}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq -1.35 \cdot 10^{-101}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 8.8 \cdot 10^{-234}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{+54}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 9.4 \cdot 10^{+107}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]

Alternative 4: 48.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := \left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ t_3 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;c \leq -5.2 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.3 \cdot 10^{-288}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 5.3 \cdot 10^{-263}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 4.6 \cdot 10^{-24}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{+40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.85 \cdot 10^{+128} \lor \neg \left(c \leq 3.4 \cdot 10^{+148}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t)))
        (t_2 (* (* b (* c (* c i))) -2.0))
        (t_3 (* (* x y) 2.0)))
   (if (<= c -5.2e+48)
     t_2
     (if (<= c -1e-149)
       t_1
       (if (<= c 2.3e-288)
         t_3
         (if (<= c 5.3e-263)
           t_1
           (if (<= c 4.6e-24)
             t_3
             (if (<= c 1.2e+40)
               t_1
               (if (or (<= c 1.85e+128) (not (<= c 3.4e+148)))
                 t_2
                 (* c (* -2.0 (* a i))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = (b * (c * (c * i))) * -2.0;
	double t_3 = (x * y) * 2.0;
	double tmp;
	if (c <= -5.2e+48) {
		tmp = t_2;
	} else if (c <= -1e-149) {
		tmp = t_1;
	} else if (c <= 2.3e-288) {
		tmp = t_3;
	} else if (c <= 5.3e-263) {
		tmp = t_1;
	} else if (c <= 4.6e-24) {
		tmp = t_3;
	} else if (c <= 1.2e+40) {
		tmp = t_1;
	} else if ((c <= 1.85e+128) || !(c <= 3.4e+148)) {
		tmp = t_2;
	} else {
		tmp = c * (-2.0 * (a * i));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (b * (c * (c * i))) * (-2.0d0)
    t_3 = (x * y) * 2.0d0
    if (c <= (-5.2d+48)) then
        tmp = t_2
    else if (c <= (-1d-149)) then
        tmp = t_1
    else if (c <= 2.3d-288) then
        tmp = t_3
    else if (c <= 5.3d-263) then
        tmp = t_1
    else if (c <= 4.6d-24) then
        tmp = t_3
    else if (c <= 1.2d+40) then
        tmp = t_1
    else if ((c <= 1.85d+128) .or. (.not. (c <= 3.4d+148))) then
        tmp = t_2
    else
        tmp = c * ((-2.0d0) * (a * i))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = (b * (c * (c * i))) * -2.0;
	double t_3 = (x * y) * 2.0;
	double tmp;
	if (c <= -5.2e+48) {
		tmp = t_2;
	} else if (c <= -1e-149) {
		tmp = t_1;
	} else if (c <= 2.3e-288) {
		tmp = t_3;
	} else if (c <= 5.3e-263) {
		tmp = t_1;
	} else if (c <= 4.6e-24) {
		tmp = t_3;
	} else if (c <= 1.2e+40) {
		tmp = t_1;
	} else if ((c <= 1.85e+128) || !(c <= 3.4e+148)) {
		tmp = t_2;
	} else {
		tmp = c * (-2.0 * (a * i));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = (b * (c * (c * i))) * -2.0
	t_3 = (x * y) * 2.0
	tmp = 0
	if c <= -5.2e+48:
		tmp = t_2
	elif c <= -1e-149:
		tmp = t_1
	elif c <= 2.3e-288:
		tmp = t_3
	elif c <= 5.3e-263:
		tmp = t_1
	elif c <= 4.6e-24:
		tmp = t_3
	elif c <= 1.2e+40:
		tmp = t_1
	elif (c <= 1.85e+128) or not (c <= 3.4e+148):
		tmp = t_2
	else:
		tmp = c * (-2.0 * (a * i))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(Float64(b * Float64(c * Float64(c * i))) * -2.0)
	t_3 = Float64(Float64(x * y) * 2.0)
	tmp = 0.0
	if (c <= -5.2e+48)
		tmp = t_2;
	elseif (c <= -1e-149)
		tmp = t_1;
	elseif (c <= 2.3e-288)
		tmp = t_3;
	elseif (c <= 5.3e-263)
		tmp = t_1;
	elseif (c <= 4.6e-24)
		tmp = t_3;
	elseif (c <= 1.2e+40)
		tmp = t_1;
	elseif ((c <= 1.85e+128) || !(c <= 3.4e+148))
		tmp = t_2;
	else
		tmp = Float64(c * Float64(-2.0 * Float64(a * i)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = (b * (c * (c * i))) * -2.0;
	t_3 = (x * y) * 2.0;
	tmp = 0.0;
	if (c <= -5.2e+48)
		tmp = t_2;
	elseif (c <= -1e-149)
		tmp = t_1;
	elseif (c <= 2.3e-288)
		tmp = t_3;
	elseif (c <= 5.3e-263)
		tmp = t_1;
	elseif (c <= 4.6e-24)
		tmp = t_3;
	elseif (c <= 1.2e+40)
		tmp = t_1;
	elseif ((c <= 1.85e+128) || ~((c <= 3.4e+148)))
		tmp = t_2;
	else
		tmp = c * (-2.0 * (a * i));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[c, -5.2e+48], t$95$2, If[LessEqual[c, -1e-149], t$95$1, If[LessEqual[c, 2.3e-288], t$95$3, If[LessEqual[c, 5.3e-263], t$95$1, If[LessEqual[c, 4.6e-24], t$95$3, If[LessEqual[c, 1.2e+40], t$95$1, If[Or[LessEqual[c, 1.85e+128], N[Not[LessEqual[c, 3.4e+148]], $MachinePrecision]], t$95$2, N[(c * N[(-2.0 * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -1 \cdot 10^{-149}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 2.3 \cdot 10^{-288}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 5.3 \cdot 10^{-263}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 4.6 \cdot 10^{-24}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 1.2 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.85 \cdot 10^{+128} \lor \neg \left(c \leq 3.4 \cdot 10^{+148}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -5.1999999999999999e48 or 1.2e40 < c < 1.85e128 or 3.4000000000000003e148 < c

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999999e48 < c < -9.99999999999999979e-150 or 2.3e-288 < c < 5.2999999999999997e-263 or 4.6000000000000002e-24 < c < 1.2e40

    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 z around inf 52.2%

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

    if -9.99999999999999979e-150 < c < 2.3e-288 or 5.2999999999999997e-263 < c < 4.6000000000000002e-24

    1. Initial program 97.7%

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

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

    if 1.85e128 < c < 3.4000000000000003e148

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -5.2 \cdot 10^{+48}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -1 \cdot 10^{-149}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 2.3 \cdot 10^{-288}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 5.3 \cdot 10^{-263}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 4.6 \cdot 10^{-24}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{+40}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.85 \cdot 10^{+128} \lor \neg \left(c \leq 3.4 \cdot 10^{+148}\right):\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\ \end{array} \]

Alternative 5: 84.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{-20} \lor \neg \left(z \cdot t \leq 5 \cdot 10^{-66}\right):\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -9.99999999999999945e-21 or 4.99999999999999962e-66 < (*.f64 z t)

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

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

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

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

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

    if -9.99999999999999945e-21 < (*.f64 z t) < 4.99999999999999962e-66

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

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

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

Alternative 6: 69.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;c \leq 1.95 \cdot 10^{+62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.55 \cdot 10^{+76}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 8.4 \cdot 10^{+95}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -9.1999999999999998e61 or 1.95e62 < c < 1.55000000000000006e76

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999998e61 < c < 1.95e62 or 1.55000000000000006e76 < c < 8.4e95

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

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

    if 8.4e95 < c < 1.6999999999999999e153

    1. Initial program 48.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 32.5%

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

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

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

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

    if 1.6999999999999999e153 < c

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9.2 \cdot 10^{+61}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 1.95 \cdot 10^{+62}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.55 \cdot 10^{+76}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 8.4 \cdot 10^{+95}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot -2\right)\right)\\ \end{array} \]

Alternative 7: 90.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 94.6%

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

    if 2.40000000000000012e100 < c

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

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

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

Alternative 8: 68.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;c \leq 6 \cdot 10^{+62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 4.4 \cdot 10^{+77}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 2.4 \cdot 10^{+100}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.6499999999999999e60 or 6e62 < c < 4.4000000000000001e77 or 3.1999999999999999e148 < c

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6499999999999999e60 < c < 6e62 or 4.4000000000000001e77 < c < 2.40000000000000012e100

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

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

    if 2.40000000000000012e100 < c < 3.1999999999999999e148

    1. Initial program 47.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 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.65 \cdot 10^{+60}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 6 \cdot 10^{+62}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 4.4 \cdot 10^{+77}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 2.4 \cdot 10^{+100}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 3.2 \cdot 10^{+148}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \end{array} \]

Alternative 9: 68.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;c \leq 3.9 \cdot 10^{+62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 5.6 \cdot 10^{+76}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 4.25 \cdot 10^{+99}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -3.50000000000000018e61 or 3.9e62 < c < 5.5999999999999997e76

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.50000000000000018e61 < c < 3.9e62 or 5.5999999999999997e76 < c < 4.24999999999999992e99

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

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

    if 4.24999999999999992e99 < c < 3.1999999999999999e148

    1. Initial program 47.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 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.1999999999999999e148 < c

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.5 \cdot 10^{+61}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 3.9 \cdot 10^{+62}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 5.6 \cdot 10^{+76}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 4.25 \cdot 10^{+99}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{elif}\;c \leq 3.2 \cdot 10^{+148}:\\ \;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot -2\right)\right)\\ \end{array} \]

Alternative 10: 78.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.15000000000000014e33 or 7.4999999999999996e40 < c

    1. Initial program 82.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 87.1%

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

    if -2.15000000000000014e33 < c < 7.4999999999999996e40

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

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

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

Alternative 11: 87.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.6999999999999999e36 or 6.2e41 < c

    1. Initial program 82.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 87.1%

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

    if -1.6999999999999999e36 < c < 6.2e41

    1. Initial program 97.4%

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

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

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

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

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

Alternative 12: 74.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.6 \cdot 10^{+103} \lor \neg \left(c \leq 5.2 \cdot 10^{+42}\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(i \cdot \left(\left(-a\right) - b \cdot c\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -8.59999999999999938e103 or 5.1999999999999998e42 < 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 i around inf 85.9%

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

    if -8.59999999999999938e103 < c < 5.1999999999999998e42

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

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

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

Alternative 13: 72.8% accurate, 1.2× speedup?

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

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

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

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


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

    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 a around 0 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5499999999999999e48 < c < 1.69999999999999994e40

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

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

    if 1.69999999999999994e40 < c

    1. Initial program 77.1%

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

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

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

Alternative 14: 45.1% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.35e81 or 8.3999999999999998e111 < (*.f64 x y)

    1. Initial program 90.0%

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

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

    if -1.35e81 < (*.f64 x y) < 8.3999999999999998e111

    1. Initial program 91.9%

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

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

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

Alternative 15: 30.1% accurate, 3.8× speedup?

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

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

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

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

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

Developer target: 94.3% 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 2023279 
(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))))