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

Percentage Accurate: 89.7% → 96.3%
Time: 14.7s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

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

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot c\\ t_2 := x \cdot y + z \cdot t\\ \mathbf{if}\;t_2 - \left(c \cdot t_1\right) \cdot i \leq \infty:\\ \;\;\;\;2 \cdot \left(t_2 - t_1 \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(y, x, \left(-c\right) \cdot \left(i \cdot \left(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))) (t_2 (+ (* x y) (* z t))))
   (if (<= (- t_2 (* (* c t_1) i)) INFINITY)
     (* 2.0 (- t_2 (* t_1 (* c i))))
     (* 2.0 (fma y x (* (- c) (* i (* 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 t_2 = (x * y) + (z * t);
	double tmp;
	if ((t_2 - ((c * t_1) * i)) <= ((double) INFINITY)) {
		tmp = 2.0 * (t_2 - (t_1 * (c * i)));
	} else {
		tmp = 2.0 * fma(y, x, (-c * (i * (b * c))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(b * c))
	t_2 = Float64(Float64(x * y) + Float64(z * t))
	tmp = 0.0
	if (Float64(t_2 - Float64(Float64(c * t_1) * i)) <= Inf)
		tmp = Float64(2.0 * Float64(t_2 - Float64(t_1 * Float64(c * i))));
	else
		tmp = Float64(2.0 * fma(y, x, Float64(Float64(-c) * Float64(i * 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]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(N[(c * t$95$1), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(t$95$1 * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(y * x + N[((-c) * N[(i * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, \left(-c\right) \cdot \left(i \cdot \left(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 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv47.2%

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

        \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(y, x, \left(-c\right) \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)} \]
    9. Applied egg-rr67.2%

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

Alternative 2: 95.6% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

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

    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 b around inf 47.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-2 \cdot \left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.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(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\ \end{array} \]

Alternative 3: 46.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;c \leq -2.8 \cdot 10^{-147}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -5.6 \cdot 10^{-193}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;c \leq 1.4 \cdot 10^{-82}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;c \leq 9 \cdot 10^{+68}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -9500 or 1.35e211 < c

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9500 < c < -2.8e-147 or -5.6000000000000005e-193 < c < -3.0999999999999998e-261 or 1.40000000000000012e-82 < c < 1.2e20

    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 -2.8e-147 < c < -5.6000000000000005e-193 or -3.0999999999999998e-261 < c < 1.40000000000000012e-82 or 1.2e20 < c < 9.0000000000000007e68

    1. Initial program 98.7%

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

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

    if 9.0000000000000007e68 < c < 1.35e211

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -9500:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{-147}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -5.6 \cdot 10^{-193}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq -3.1 \cdot 10^{-261}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-82}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 9 \cdot 10^{+68}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{+211}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 4: 46.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ t_3 := 2 \cdot \left(x \cdot y\right)\\ \mathbf{if}\;c \leq -75000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -9.2 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -6 \cdot 10^{-194}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -4.5 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{-87}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.65 \cdot 10^{+69}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.46 \cdot 10^{+168}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t)))
        (t_2 (* -2.0 (* (* c c) (* b i))))
        (t_3 (* 2.0 (* x y))))
   (if (<= c -75000.0)
     t_2
     (if (<= c -9.2e-147)
       t_1
       (if (<= c -6e-194)
         t_3
         (if (<= c -4.5e-261)
           t_1
           (if (<= c 2.6e-87)
             t_3
             (if (<= c 8.5e+20)
               t_1
               (if (<= c 1.65e+69)
                 t_3
                 (if (<= c 1.46e+168) (* 2.0 (* a (* c (- i)))) t_2))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * ((c * c) * (b * i));
	double t_3 = 2.0 * (x * y);
	double tmp;
	if (c <= -75000.0) {
		tmp = t_2;
	} else if (c <= -9.2e-147) {
		tmp = t_1;
	} else if (c <= -6e-194) {
		tmp = t_3;
	} else if (c <= -4.5e-261) {
		tmp = t_1;
	} else if (c <= 2.6e-87) {
		tmp = t_3;
	} else if (c <= 8.5e+20) {
		tmp = t_1;
	} else if (c <= 1.65e+69) {
		tmp = t_3;
	} else if (c <= 1.46e+168) {
		tmp = 2.0 * (a * (c * -i));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (-2.0d0) * ((c * c) * (b * i))
    t_3 = 2.0d0 * (x * y)
    if (c <= (-75000.0d0)) then
        tmp = t_2
    else if (c <= (-9.2d-147)) then
        tmp = t_1
    else if (c <= (-6d-194)) then
        tmp = t_3
    else if (c <= (-4.5d-261)) then
        tmp = t_1
    else if (c <= 2.6d-87) then
        tmp = t_3
    else if (c <= 8.5d+20) then
        tmp = t_1
    else if (c <= 1.65d+69) then
        tmp = t_3
    else if (c <= 1.46d+168) then
        tmp = 2.0d0 * (a * (c * -i))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * ((c * c) * (b * i));
	double t_3 = 2.0 * (x * y);
	double tmp;
	if (c <= -75000.0) {
		tmp = t_2;
	} else if (c <= -9.2e-147) {
		tmp = t_1;
	} else if (c <= -6e-194) {
		tmp = t_3;
	} else if (c <= -4.5e-261) {
		tmp = t_1;
	} else if (c <= 2.6e-87) {
		tmp = t_3;
	} else if (c <= 8.5e+20) {
		tmp = t_1;
	} else if (c <= 1.65e+69) {
		tmp = t_3;
	} else if (c <= 1.46e+168) {
		tmp = 2.0 * (a * (c * -i));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = -2.0 * ((c * c) * (b * i))
	t_3 = 2.0 * (x * y)
	tmp = 0
	if c <= -75000.0:
		tmp = t_2
	elif c <= -9.2e-147:
		tmp = t_1
	elif c <= -6e-194:
		tmp = t_3
	elif c <= -4.5e-261:
		tmp = t_1
	elif c <= 2.6e-87:
		tmp = t_3
	elif c <= 8.5e+20:
		tmp = t_1
	elif c <= 1.65e+69:
		tmp = t_3
	elif c <= 1.46e+168:
		tmp = 2.0 * (a * (c * -i))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(-2.0 * Float64(Float64(c * c) * Float64(b * i)))
	t_3 = Float64(2.0 * Float64(x * y))
	tmp = 0.0
	if (c <= -75000.0)
		tmp = t_2;
	elseif (c <= -9.2e-147)
		tmp = t_1;
	elseif (c <= -6e-194)
		tmp = t_3;
	elseif (c <= -4.5e-261)
		tmp = t_1;
	elseif (c <= 2.6e-87)
		tmp = t_3;
	elseif (c <= 8.5e+20)
		tmp = t_1;
	elseif (c <= 1.65e+69)
		tmp = t_3;
	elseif (c <= 1.46e+168)
		tmp = Float64(2.0 * Float64(a * Float64(c * Float64(-i))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = -2.0 * ((c * c) * (b * i));
	t_3 = 2.0 * (x * y);
	tmp = 0.0;
	if (c <= -75000.0)
		tmp = t_2;
	elseif (c <= -9.2e-147)
		tmp = t_1;
	elseif (c <= -6e-194)
		tmp = t_3;
	elseif (c <= -4.5e-261)
		tmp = t_1;
	elseif (c <= 2.6e-87)
		tmp = t_3;
	elseif (c <= 8.5e+20)
		tmp = t_1;
	elseif (c <= 1.65e+69)
		tmp = t_3;
	elseif (c <= 1.46e+168)
		tmp = 2.0 * (a * (c * -i));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -75000.0], t$95$2, If[LessEqual[c, -9.2e-147], t$95$1, If[LessEqual[c, -6e-194], t$95$3, If[LessEqual[c, -4.5e-261], t$95$1, If[LessEqual[c, 2.6e-87], t$95$3, If[LessEqual[c, 8.5e+20], t$95$1, If[LessEqual[c, 1.65e+69], t$95$3, If[LessEqual[c, 1.46e+168], N[(2.0 * N[(a * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -9.2 \cdot 10^{-147}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -6 \cdot 10^{-194}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq -4.5 \cdot 10^{-261}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 2.6 \cdot 10^{-87}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 8.5 \cdot 10^{+20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.65 \cdot 10^{+69}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -75000 or 1.45999999999999996e168 < c

    1. Initial program 73.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 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -75000 < c < -9.19999999999999962e-147 or -6e-194 < c < -4.5000000000000001e-261 or 2.60000000000000002e-87 < c < 8.5e20

    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.19999999999999962e-147 < c < -6e-194 or -4.5000000000000001e-261 < c < 2.60000000000000002e-87 or 8.5e20 < c < 1.6499999999999999e69

    1. Initial program 98.7%

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

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

    if 1.6499999999999999e69 < c < 1.45999999999999996e168

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -75000:\\ \;\;\;\;-2 \cdot \left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -9.2 \cdot 10^{-147}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -6 \cdot 10^{-194}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq -4.5 \cdot 10^{-261}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{-87}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.65 \cdot 10^{+69}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.46 \cdot 10^{+168}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \end{array} \]

Alternative 5: 47.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := -2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\ t_3 := 2 \cdot \left(x \cdot y\right)\\ \mathbf{if}\;c \leq -90000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.25 \cdot 10^{-193}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -3.3 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 4 \cdot 10^{-81}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.05 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{+68}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 4.7 \cdot 10^{+167}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t)))
        (t_2 (* -2.0 (* b (* i (* c c)))))
        (t_3 (* 2.0 (* x y))))
   (if (<= c -90000.0)
     t_2
     (if (<= c -2.8e-147)
       t_1
       (if (<= c -1.25e-193)
         t_3
         (if (<= c -3.3e-261)
           t_1
           (if (<= c 4e-81)
             t_3
             (if (<= c 1.05e+20)
               t_1
               (if (<= c 1.8e+68)
                 t_3
                 (if (<= c 4.7e+167) (* 2.0 (* a (* c (- i)))) t_2))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (b * (i * (c * c)));
	double t_3 = 2.0 * (x * y);
	double tmp;
	if (c <= -90000.0) {
		tmp = t_2;
	} else if (c <= -2.8e-147) {
		tmp = t_1;
	} else if (c <= -1.25e-193) {
		tmp = t_3;
	} else if (c <= -3.3e-261) {
		tmp = t_1;
	} else if (c <= 4e-81) {
		tmp = t_3;
	} else if (c <= 1.05e+20) {
		tmp = t_1;
	} else if (c <= 1.8e+68) {
		tmp = t_3;
	} else if (c <= 4.7e+167) {
		tmp = 2.0 * (a * (c * -i));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (-2.0d0) * (b * (i * (c * c)))
    t_3 = 2.0d0 * (x * y)
    if (c <= (-90000.0d0)) then
        tmp = t_2
    else if (c <= (-2.8d-147)) then
        tmp = t_1
    else if (c <= (-1.25d-193)) then
        tmp = t_3
    else if (c <= (-3.3d-261)) then
        tmp = t_1
    else if (c <= 4d-81) then
        tmp = t_3
    else if (c <= 1.05d+20) then
        tmp = t_1
    else if (c <= 1.8d+68) then
        tmp = t_3
    else if (c <= 4.7d+167) then
        tmp = 2.0d0 * (a * (c * -i))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = -2.0 * (b * (i * (c * c)));
	double t_3 = 2.0 * (x * y);
	double tmp;
	if (c <= -90000.0) {
		tmp = t_2;
	} else if (c <= -2.8e-147) {
		tmp = t_1;
	} else if (c <= -1.25e-193) {
		tmp = t_3;
	} else if (c <= -3.3e-261) {
		tmp = t_1;
	} else if (c <= 4e-81) {
		tmp = t_3;
	} else if (c <= 1.05e+20) {
		tmp = t_1;
	} else if (c <= 1.8e+68) {
		tmp = t_3;
	} else if (c <= 4.7e+167) {
		tmp = 2.0 * (a * (c * -i));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = -2.0 * (b * (i * (c * c)))
	t_3 = 2.0 * (x * y)
	tmp = 0
	if c <= -90000.0:
		tmp = t_2
	elif c <= -2.8e-147:
		tmp = t_1
	elif c <= -1.25e-193:
		tmp = t_3
	elif c <= -3.3e-261:
		tmp = t_1
	elif c <= 4e-81:
		tmp = t_3
	elif c <= 1.05e+20:
		tmp = t_1
	elif c <= 1.8e+68:
		tmp = t_3
	elif c <= 4.7e+167:
		tmp = 2.0 * (a * (c * -i))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(-2.0 * Float64(b * Float64(i * Float64(c * c))))
	t_3 = Float64(2.0 * Float64(x * y))
	tmp = 0.0
	if (c <= -90000.0)
		tmp = t_2;
	elseif (c <= -2.8e-147)
		tmp = t_1;
	elseif (c <= -1.25e-193)
		tmp = t_3;
	elseif (c <= -3.3e-261)
		tmp = t_1;
	elseif (c <= 4e-81)
		tmp = t_3;
	elseif (c <= 1.05e+20)
		tmp = t_1;
	elseif (c <= 1.8e+68)
		tmp = t_3;
	elseif (c <= 4.7e+167)
		tmp = Float64(2.0 * Float64(a * Float64(c * Float64(-i))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = -2.0 * (b * (i * (c * c)));
	t_3 = 2.0 * (x * y);
	tmp = 0.0;
	if (c <= -90000.0)
		tmp = t_2;
	elseif (c <= -2.8e-147)
		tmp = t_1;
	elseif (c <= -1.25e-193)
		tmp = t_3;
	elseif (c <= -3.3e-261)
		tmp = t_1;
	elseif (c <= 4e-81)
		tmp = t_3;
	elseif (c <= 1.05e+20)
		tmp = t_1;
	elseif (c <= 1.8e+68)
		tmp = t_3;
	elseif (c <= 4.7e+167)
		tmp = 2.0 * (a * (c * -i));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(b * N[(i * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -90000.0], t$95$2, If[LessEqual[c, -2.8e-147], t$95$1, If[LessEqual[c, -1.25e-193], t$95$3, If[LessEqual[c, -3.3e-261], t$95$1, If[LessEqual[c, 4e-81], t$95$3, If[LessEqual[c, 1.05e+20], t$95$1, If[LessEqual[c, 1.8e+68], t$95$3, If[LessEqual[c, 4.7e+167], N[(2.0 * N[(a * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -2.8 \cdot 10^{-147}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -1.25 \cdot 10^{-193}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq -3.3 \cdot 10^{-261}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 4 \cdot 10^{-81}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 1.05 \cdot 10^{+20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.8 \cdot 10^{+68}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -9e4 or 4.70000000000000013e167 < c

    1. Initial program 73.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 64.0%

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

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

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

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

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

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

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

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

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

    if -9e4 < c < -2.8e-147 or -1.2500000000000001e-193 < c < -3.2999999999999998e-261 or 3.9999999999999998e-81 < c < 1.05e20

    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 -2.8e-147 < c < -1.2500000000000001e-193 or -3.2999999999999998e-261 < c < 3.9999999999999998e-81 or 1.05e20 < c < 1.7999999999999999e68

    1. Initial program 98.7%

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

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

    if 1.7999999999999999e68 < c < 4.70000000000000013e167

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -90000:\\ \;\;\;\;-2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -2.8 \cdot 10^{-147}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -1.25 \cdot 10^{-193}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq -3.3 \cdot 10^{-261}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 4 \cdot 10^{-81}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.05 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{+68}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 4.7 \cdot 10^{+167}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\ \end{array} \]

Alternative 6: 91.4% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 71.3%

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

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

    if -3.3e21 < c < 5.50000000000000041e127

    1. Initial program 97.5%

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

    if 5.50000000000000041e127 < c

    1. Initial program 72.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.3 \cdot 10^{+21}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{+127}:\\ \;\;\;\;\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(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 7: 77.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 71.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 79.7%

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

    if -2e22 < c < 7.20000000000000016e-96

    1. Initial program 98.2%

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

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

    if 7.20000000000000016e-96 < c

    1. Initial program 85.4%

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

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

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

Alternative 8: 79.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 71.3%

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

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

    if -1.9e13 < c < 3.20000000000000012e-96

    1. Initial program 98.2%

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

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

    if 3.20000000000000012e-96 < c

    1. Initial program 85.4%

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

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

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

Alternative 9: 83.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 68.0%

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

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

    if -2.0599999999999999e71 < c < 1.4500000000000001e116

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

    if 1.4500000000000001e116 < c

    1. Initial program 72.7%

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

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

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

Alternative 10: 67.2% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.65000000000000012e65 or 5.60000000000000022e207 < c

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

    if -1.65000000000000012e65 < c < 7.9999999999999992e-93

    1. Initial program 98.3%

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

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

    if 7.9999999999999992e-93 < c < 5.60000000000000022e207

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.65 \cdot 10^{+65}:\\ \;\;\;\;-2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq 8 \cdot 10^{-93}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq 5.6 \cdot 10^{+207}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\ \end{array} \]

Alternative 11: 74.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.6 \cdot 10^{+21} \lor \neg \left(c \leq 1.05 \cdot 10^{+81}\right):\\
\;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.6e21 or 1.0499999999999999e81 < c

    1. Initial program 72.8%

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

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

    if -1.6e21 < c < 1.0499999999999999e81

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

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

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

Alternative 12: 36.2% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;x \leq -1.42 \cdot 10^{-64}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.42 \cdot 10^{-126}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.8000000000000001e115 or 1.42e-126 < x

    1. Initial program 87.0%

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

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

    if -3.8000000000000001e115 < x < -1.42000000000000006e-64 or -4.89999999999999999e-265 < x < 1.42e-126

    1. Initial program 87.0%

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

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

    if -1.42000000000000006e-64 < x < -4.89999999999999999e-265

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{+115}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq -1.42 \cdot 10^{-64}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-265}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(a \cdot \left(-c\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.42 \cdot 10^{-126}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 13: 36.5% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;x \leq -9.5 \cdot 10^{-65}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.8 \cdot 10^{-128}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.2000000000000004e111 or 1.80000000000000012e-128 < x

    1. Initial program 87.0%

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

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

    if -7.2000000000000004e111 < x < -9.5000000000000004e-65 or -1.12e-265 < x < 1.80000000000000012e-128

    1. Initial program 87.0%

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

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

    if -9.5000000000000004e-65 < x < -1.12e-265

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{+111}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq -9.5 \cdot 10^{-65}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{-265}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-128}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 14: 68.7% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

    if -2.75e72 < c < 9.49999999999999951e126

    1. Initial program 97.6%

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

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

    if 9.49999999999999951e126 < c

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 68.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -7.5 \cdot 10^{+70} \lor \neg \left(c \leq 5.5 \cdot 10^{+118}\right):\\
\;\;\;\;-2 \cdot \left(b \cdot \left(i \cdot \left(c \cdot c\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -7.50000000000000031e70 or 5.5000000000000003e118 < c

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000031e70 < c < 5.5000000000000003e118

    1. Initial program 97.6%

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

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

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

Alternative 16: 37.6% accurate, 2.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.79999999999999994e111 or 1.42e-126 < x

    1. Initial program 87.0%

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

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

    if -8.79999999999999994e111 < x < 1.42e-126

    1. Initial program 89.5%

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

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

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

Alternative 17: 28.3% accurate, 3.8× speedup?

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

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

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

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

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

Developer target: 93.7% 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 2023266 
(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))))