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

Percentage Accurate: 90.3% → 94.3%
Time: 17.3s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 90.3% 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: 94.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+220}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\

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


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

    1. Initial program 73.6%

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

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

    if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000002e220

    1. Initial program 99.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) \]

    if 5.0000000000000002e220 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out68.2%

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

        \[\leadsto 2 \cdot \left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right) + c \cdot \color{blue}{\left(i \cdot a\right)}\right)\right) \]
      3. mul-1-neg68.2%

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)} + c \cdot \left(i \cdot a\right)\right)\right) \]
      7. associate-*l*73.1%

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

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\left(c \cdot b\right) \cdot \left(c \cdot i\right) + \color{blue}{a \cdot \left(c \cdot i\right)}\right)\right) \]
      12. distribute-rgt-out92.1%

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

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

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

Alternative 2: 95.3% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -6.6000000000000002e-65

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.6000000000000002e-65 < c

    1. Initial program 93.0%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*97.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-def97.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. Simplified97.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-def97.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. +-commutative97.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-rr97.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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.4%

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

Alternative 3: 94.5% accurate, 0.2× speedup?

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

\\
2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + c \cdot b\right)\right)
\end{array}
Derivation
  1. Initial program 90.1%

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

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

Alternative 4: 60.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{-140}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-274}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 0.195:\\ \;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+183} \lor \neg \left(t \leq 1.55 \cdot 10^{+211}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \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 (- (* x y) (* (* c c) (* b i)))))
        (t_2 (* 2.0 (- (* z t) (* c (* i (* c b)))))))
   (if (<= t -6.2e-140)
     t_2
     (if (<= t 1.6e-274)
       (* 2.0 (- (* x y) (* c (* a i))))
       (if (<= t 3.7e-81)
         t_1
         (if (<= t 0.195)
           (* 2.0 (* (* c i) (- (- a) (* c b))))
           (if (<= t 1.85e+139)
             t_2
             (if (or (<= t 7.2e+183) (not (<= t 1.55e+211)))
               (* 2.0 (- (* z t) (* a (* c i))))
               t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - ((c * c) * (b * i)));
	double t_2 = 2.0 * ((z * t) - (c * (i * (c * b))));
	double tmp;
	if (t <= -6.2e-140) {
		tmp = t_2;
	} else if (t <= 1.6e-274) {
		tmp = 2.0 * ((x * y) - (c * (a * i)));
	} else if (t <= 3.7e-81) {
		tmp = t_1;
	} else if (t <= 0.195) {
		tmp = 2.0 * ((c * i) * (-a - (c * b)));
	} else if (t <= 1.85e+139) {
		tmp = t_2;
	} else if ((t <= 7.2e+183) || !(t <= 1.55e+211)) {
		tmp = 2.0 * ((z * t) - (a * (c * i)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) - ((c * c) * (b * i)))
    t_2 = 2.0d0 * ((z * t) - (c * (i * (c * b))))
    if (t <= (-6.2d-140)) then
        tmp = t_2
    else if (t <= 1.6d-274) then
        tmp = 2.0d0 * ((x * y) - (c * (a * i)))
    else if (t <= 3.7d-81) then
        tmp = t_1
    else if (t <= 0.195d0) then
        tmp = 2.0d0 * ((c * i) * (-a - (c * b)))
    else if (t <= 1.85d+139) then
        tmp = t_2
    else if ((t <= 7.2d+183) .or. (.not. (t <= 1.55d+211))) then
        tmp = 2.0d0 * ((z * t) - (a * (c * i)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - ((c * c) * (b * i)));
	double t_2 = 2.0 * ((z * t) - (c * (i * (c * b))));
	double tmp;
	if (t <= -6.2e-140) {
		tmp = t_2;
	} else if (t <= 1.6e-274) {
		tmp = 2.0 * ((x * y) - (c * (a * i)));
	} else if (t <= 3.7e-81) {
		tmp = t_1;
	} else if (t <= 0.195) {
		tmp = 2.0 * ((c * i) * (-a - (c * b)));
	} else if (t <= 1.85e+139) {
		tmp = t_2;
	} else if ((t <= 7.2e+183) || !(t <= 1.55e+211)) {
		tmp = 2.0 * ((z * t) - (a * (c * i)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) - ((c * c) * (b * i)))
	t_2 = 2.0 * ((z * t) - (c * (i * (c * b))))
	tmp = 0
	if t <= -6.2e-140:
		tmp = t_2
	elif t <= 1.6e-274:
		tmp = 2.0 * ((x * y) - (c * (a * i)))
	elif t <= 3.7e-81:
		tmp = t_1
	elif t <= 0.195:
		tmp = 2.0 * ((c * i) * (-a - (c * b)))
	elif t <= 1.85e+139:
		tmp = t_2
	elif (t <= 7.2e+183) or not (t <= 1.55e+211):
		tmp = 2.0 * ((z * t) - (a * (c * i)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(Float64(c * c) * Float64(b * i))))
	t_2 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(c * b)))))
	tmp = 0.0
	if (t <= -6.2e-140)
		tmp = t_2;
	elseif (t <= 1.6e-274)
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(a * i))));
	elseif (t <= 3.7e-81)
		tmp = t_1;
	elseif (t <= 0.195)
		tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(Float64(-a) - Float64(c * b))));
	elseif (t <= 1.85e+139)
		tmp = t_2;
	elseif ((t <= 7.2e+183) || !(t <= 1.55e+211))
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) - ((c * c) * (b * i)));
	t_2 = 2.0 * ((z * t) - (c * (i * (c * b))));
	tmp = 0.0;
	if (t <= -6.2e-140)
		tmp = t_2;
	elseif (t <= 1.6e-274)
		tmp = 2.0 * ((x * y) - (c * (a * i)));
	elseif (t <= 3.7e-81)
		tmp = t_1;
	elseif (t <= 0.195)
		tmp = 2.0 * ((c * i) * (-a - (c * b)));
	elseif (t <= 1.85e+139)
		tmp = t_2;
	elseif ((t <= 7.2e+183) || ~((t <= 1.55e+211)))
		tmp = 2.0 * ((z * t) - (a * (c * i)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(N[(c * c), $MachinePrecision] * N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-140], t$95$2, If[LessEqual[t, 1.6e-274], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e-81], t$95$1, If[LessEqual[t, 0.195], N[(2.0 * N[(N[(c * i), $MachinePrecision] * N[((-a) - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+139], t$95$2, If[Or[LessEqual[t, 7.2e+183], N[Not[LessEqual[t, 1.55e+211]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 3.7 \cdot 10^{-81}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 0.195:\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\

\mathbf{elif}\;t \leq 1.85 \cdot 10^{+139}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+183} \lor \neg \left(t \leq 1.55 \cdot 10^{+211}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.1999999999999998e-140 or 0.19500000000000001 < t < 1.84999999999999996e139

    1. Initial program 92.5%

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

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

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

    if -6.1999999999999998e-140 < t < 1.59999999999999989e-274

    1. Initial program 85.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-*r*93.3%

        \[\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. *-commutative93.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999989e-274 < t < 3.69999999999999986e-81 or 7.20000000000000046e183 < t < 1.5500000000000001e211

    1. Initial program 94.7%

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

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

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

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

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

    if 3.69999999999999986e-81 < t < 0.19500000000000001

    1. Initial program 89.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-*r*94.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out30.1%

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

        \[\leadsto 2 \cdot \left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right) + c \cdot \color{blue}{\left(i \cdot a\right)}\right)\right) \]
      3. mul-1-neg30.1%

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)} + c \cdot \left(i \cdot a\right)\right)\right) \]
      7. associate-*l*35.9%

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

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\left(c \cdot b\right) \cdot \left(c \cdot i\right) + \color{blue}{a \cdot \left(c \cdot i\right)}\right)\right) \]
      12. distribute-rgt-out52.1%

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

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

    if 1.84999999999999996e139 < t < 7.20000000000000046e183 or 1.5500000000000001e211 < t

    1. Initial program 83.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 77.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-140}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-274}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-81}:\\ \;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 0.195:\\ \;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+139}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+183} \lor \neg \left(t \leq 1.55 \cdot 10^{+211}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \end{array} \]

Alternative 5: 57.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -3 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -182000:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-76}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-277}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-283}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.8999999999999998e47 or 9.49999999999999979e-283 < z

    1. Initial program 90.6%

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

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

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

    if -2.8999999999999998e47 < z < -3e14 or -4.80000000000000026e-76 < z < -2.19999999999999996e-277

    1. Initial program 90.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-*r*97.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out48.6%

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

        \[\leadsto 2 \cdot \left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right) + c \cdot \color{blue}{\left(i \cdot a\right)}\right)\right) \]
      3. mul-1-neg48.6%

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)} + c \cdot \left(i \cdot a\right)\right)\right) \]
      7. associate-*l*51.7%

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

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\left(c \cdot b\right) \cdot \left(c \cdot i\right) + \color{blue}{a \cdot \left(c \cdot i\right)}\right)\right) \]
      12. distribute-rgt-out70.1%

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

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

    if -3e14 < z < -182000

    1. Initial program 100.0%

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

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

    if -182000 < z < -4.80000000000000026e-76 or -2.19999999999999996e-277 < z < 9.49999999999999979e-283

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\ \mathbf{elif}\;z \leq -182000:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-76}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-277}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(\left(-a\right) - c \cdot b\right)\right)\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-283}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 6: 78.2% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;c \leq 1.75 \cdot 10^{-32} \lor \neg \left(c \leq 5.5 \cdot 10^{+21}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.8000000000000001e-118 or 3.1000000000000003e-147 < c < 1.7499999999999999e-32 or 5.5e21 < c

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

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

    if -3.8000000000000001e-118 < c < 3.1000000000000003e-147

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

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

    if 1.7499999999999999e-32 < c < 5.5e21

    1. Initial program 99.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 a around 0 88.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.8 \cdot 10^{-118}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\ \mathbf{elif}\;c \leq 3.1 \cdot 10^{-147}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-32} \lor \neg \left(c \leq 5.5 \cdot 10^{+21}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot c\right) \cdot \left(b \cdot i\right)\right)\\ \end{array} \]

Alternative 7: 86.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{if}\;c \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-32}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;c \leq 7.8 \cdot 10^{+21} \lor \neg \left(c \leq 1.2 \cdot 10^{+164}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* c (* i (+ a (* c b))))) (t_2 (* 2.0 (- (* z t) t_1))))
   (if (<= c -1.35e-14)
     t_2
     (if (<= c 1.4e-32)
       (* 2.0 (- (+ (* x y) (* z t)) (* i (* c a))))
       (if (or (<= c 7.8e+21) (not (<= c 1.2e+164)))
         (* 2.0 (- (* x y) 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 = c * (i * (a + (c * b)));
	double t_2 = 2.0 * ((z * t) - t_1);
	double tmp;
	if (c <= -1.35e-14) {
		tmp = t_2;
	} else if (c <= 1.4e-32) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
	} else if ((c <= 7.8e+21) || !(c <= 1.2e+164)) {
		tmp = 2.0 * ((x * y) - 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 = c * (i * (a + (c * b)))
    t_2 = 2.0d0 * ((z * t) - t_1)
    if (c <= (-1.35d-14)) then
        tmp = t_2
    else if (c <= 1.4d-32) then
        tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (c * a)))
    else if ((c <= 7.8d+21) .or. (.not. (c <= 1.2d+164))) then
        tmp = 2.0d0 * ((x * y) - 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 = c * (i * (a + (c * b)));
	double t_2 = 2.0 * ((z * t) - t_1);
	double tmp;
	if (c <= -1.35e-14) {
		tmp = t_2;
	} else if (c <= 1.4e-32) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
	} else if ((c <= 7.8e+21) || !(c <= 1.2e+164)) {
		tmp = 2.0 * ((x * y) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = c * (i * (a + (c * b)))
	t_2 = 2.0 * ((z * t) - t_1)
	tmp = 0
	if c <= -1.35e-14:
		tmp = t_2
	elif c <= 1.4e-32:
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)))
	elif (c <= 7.8e+21) or not (c <= 1.2e+164):
		tmp = 2.0 * ((x * y) - t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(c * Float64(i * Float64(a + Float64(c * b))))
	t_2 = Float64(2.0 * Float64(Float64(z * t) - t_1))
	tmp = 0.0
	if (c <= -1.35e-14)
		tmp = t_2;
	elseif (c <= 1.4e-32)
		tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * a))));
	elseif ((c <= 7.8e+21) || !(c <= 1.2e+164))
		tmp = Float64(2.0 * Float64(Float64(x * y) - t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = c * (i * (a + (c * b)));
	t_2 = 2.0 * ((z * t) - t_1);
	tmp = 0.0;
	if (c <= -1.35e-14)
		tmp = t_2;
	elseif (c <= 1.4e-32)
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
	elseif ((c <= 7.8e+21) || ~((c <= 1.2e+164)))
		tmp = 2.0 * ((x * y) - 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[(c * N[(i * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.35e-14], t$95$2, If[LessEqual[c, 1.4e-32], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 7.8e+21], N[Not[LessEqual[c, 1.2e+164]], $MachinePrecision]], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq 7.8 \cdot 10^{+21} \lor \neg \left(c \leq 1.2 \cdot 10^{+164}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.3499999999999999e-14 or 7.8e21 < c < 1.20000000000000005e164

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

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

    if -1.3499999999999999e-14 < c < 1.3999999999999999e-32

    1. Initial program 97.3%

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

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

    if 1.3999999999999999e-32 < c < 7.8e21 or 1.20000000000000005e164 < c

    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. Taylor expanded in z around 0 99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-32}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;c \leq 7.8 \cdot 10^{+21} \lor \neg \left(c \leq 1.2 \cdot 10^{+164}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 8: 84.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+16} \lor \neg \left(a \leq 3.8 \cdot 10^{+126}\right):\\
\;\;\;\;2 \cdot \left(t_1 - \frac{c \cdot i}{\frac{1}{a}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.2e16 or 3.80000000000000017e126 < a

    1. Initial program 84.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-*r*94.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e16 < a < 3.80000000000000017e126

    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 0 88.2%

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

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

Alternative 9: 86.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{+39} \lor \neg \left(a \leq 1.9 \cdot 10^{+126}\right):\\
\;\;\;\;2 \cdot \left(t_1 - \frac{c \cdot i}{\frac{1}{a}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.45000000000000015e39 or 1.90000000000000008e126 < a

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000015e39 < a < 1.90000000000000008e126

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

Alternative 10: 76.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\\
\mathbf{if}\;t \leq -3.85 \cdot 10^{-131} \lor \neg \left(t \leq 9.2 \cdot 10^{+23}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.85000000000000007e-131 or 9.2000000000000002e23 < t

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

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

    if -3.85000000000000007e-131 < t < 9.2000000000000002e23

    1. Initial program 89.4%

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

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

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

Alternative 11: 94.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + c \cdot b\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (* c i) (+ a (* c b))))))
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)) - ((c * i) * (a + (c * b))));
}
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)) - ((c * i) * (a + (c * b))))
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)) - ((c * i) * (a + (c * b))));
}
def code(x, y, z, t, a, b, c, i):
	return 2.0 * (((x * y) + (z * t)) - ((c * i) * (a + (c * b))))
function code(x, y, z, t, a, b, c, i)
	return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(c * i) * Float64(a + Float64(c * b)))))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = 2.0 * (((x * y) + (z * t)) - ((c * i) * (a + (c * b))));
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[(c * i), $MachinePrecision] * N[(a + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + c \cdot b\right)\right)
\end{array}
Derivation
  1. Initial program 90.1%

    \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
  2. Step-by-step derivation
    1. associate-*l*94.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-def94.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. Simplified94.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-def94.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. +-commutative94.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-rr94.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. Final simplification94.5%

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

Alternative 12: 46.1% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;c \leq 9.5 \cdot 10^{+121} \lor \neg \left(c \leq 4.2 \cdot 10^{+189}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.0000000000000001e71 or 1.35e-33 < c < 9.49999999999999949e121 or 4.19999999999999985e189 < c

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e71 < c < 1.35e-33

    1. Initial program 96.8%

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

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

    if 9.49999999999999949e121 < c < 4.19999999999999985e189

    1. Initial program 75.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 x around 0 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2 \cdot 10^{+71}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 1.35 \cdot 10^{-33}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{+121} \lor \neg \left(c \leq 4.2 \cdot 10^{+189}\right):\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \end{array} \]

Alternative 13: 46.2% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;c \leq 7.5 \cdot 10^{+121}:\\
\;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.24999999999999994e73 or 4.19999999999999985e189 < c

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999994e73 < c < 2.7000000000000001e-33

    1. Initial program 96.8%

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

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

    if 2.7000000000000001e-33 < c < 7.49999999999999965e121

    1. Initial program 94.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*97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999965e121 < c < 4.19999999999999985e189

    1. Initial program 75.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 x around 0 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.25 \cdot 10^{+73}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-33}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 7.5 \cdot 10^{+121}:\\ \;\;\;\;\left(\left(c \cdot c\right) \cdot \left(b \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 4.2 \cdot 10^{+189}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\ \end{array} \]

Alternative 14: 37.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;t \leq -3.4 \cdot 10^{-129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-237}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-76}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 0.22:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* a (* c (* i -2.0)))) (t_2 (* 2.0 (* z t))))
   (if (<= t -3.4e-129)
     t_2
     (if (<= t -2.4e-237)
       t_1
       (if (<= t 3e-76) (* 2.0 (* x y)) (if (<= t 0.22) 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 = a * (c * (i * -2.0));
	double t_2 = 2.0 * (z * t);
	double tmp;
	if (t <= -3.4e-129) {
		tmp = t_2;
	} else if (t <= -2.4e-237) {
		tmp = t_1;
	} else if (t <= 3e-76) {
		tmp = 2.0 * (x * y);
	} else if (t <= 0.22) {
		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 = a * (c * (i * (-2.0d0)))
    t_2 = 2.0d0 * (z * t)
    if (t <= (-3.4d-129)) then
        tmp = t_2
    else if (t <= (-2.4d-237)) then
        tmp = t_1
    else if (t <= 3d-76) then
        tmp = 2.0d0 * (x * y)
    else if (t <= 0.22d0) 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 = a * (c * (i * -2.0));
	double t_2 = 2.0 * (z * t);
	double tmp;
	if (t <= -3.4e-129) {
		tmp = t_2;
	} else if (t <= -2.4e-237) {
		tmp = t_1;
	} else if (t <= 3e-76) {
		tmp = 2.0 * (x * y);
	} else if (t <= 0.22) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a * (c * (i * -2.0))
	t_2 = 2.0 * (z * t)
	tmp = 0
	if t <= -3.4e-129:
		tmp = t_2
	elif t <= -2.4e-237:
		tmp = t_1
	elif t <= 3e-76:
		tmp = 2.0 * (x * y)
	elif t <= 0.22:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a * Float64(c * Float64(i * -2.0)))
	t_2 = Float64(2.0 * Float64(z * t))
	tmp = 0.0
	if (t <= -3.4e-129)
		tmp = t_2;
	elseif (t <= -2.4e-237)
		tmp = t_1;
	elseif (t <= 3e-76)
		tmp = Float64(2.0 * Float64(x * y));
	elseif (t <= 0.22)
		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 = a * (c * (i * -2.0));
	t_2 = 2.0 * (z * t);
	tmp = 0.0;
	if (t <= -3.4e-129)
		tmp = t_2;
	elseif (t <= -2.4e-237)
		tmp = t_1;
	elseif (t <= 3e-76)
		tmp = 2.0 * (x * y);
	elseif (t <= 0.22)
		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[(a * N[(c * N[(i * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e-129], t$95$2, If[LessEqual[t, -2.4e-237], t$95$1, If[LessEqual[t, 3e-76], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.22], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-237}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-76}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;t \leq 0.22:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.40000000000000013e-129 or 0.220000000000000001 < t

    1. Initial program 90.4%

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

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

    if -3.40000000000000013e-129 < t < -2.4e-237 or 3.00000000000000024e-76 < t < 0.220000000000000001

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e-237 < t < 3.00000000000000024e-76

    1. Initial program 92.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 x around inf 33.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{-129}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-237}:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-76}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 0.22:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 15: 37.5% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;t \leq 0.205:\\
\;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.39999999999999977e-134 or 0.204999999999999988 < t

    1. Initial program 90.5%

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

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

    if -3.39999999999999977e-134 < t < -3.65000000000000014e-236

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.65000000000000014e-236 < t < 1.24999999999999995e-75

    1. Initial program 92.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 x around inf 33.5%

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

    if 1.24999999999999995e-75 < t < 0.204999999999999988

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{-134}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq -3.65 \cdot 10^{-236}:\\ \;\;\;\;\left(c \cdot \left(a \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-75}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 0.205:\\ \;\;\;\;a \cdot \left(c \cdot \left(i \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 16: 73.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.3 \cdot 10^{+75} \lor \neg \left(c \leq 1.35 \cdot 10^{-49}\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.2999999999999999e75 or 1.35e-49 < c

    1. Initial program 83.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-*r*92.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right) + -1 \cdot \left(c \cdot \left(a \cdot i\right)\right)\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out59.7%

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

        \[\leadsto 2 \cdot \left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right) + c \cdot \color{blue}{\left(i \cdot a\right)}\right)\right) \]
      3. mul-1-neg59.7%

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)} + c \cdot \left(i \cdot a\right)\right)\right) \]
      7. associate-*l*60.7%

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

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

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

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

        \[\leadsto 2 \cdot \left(-\left(\left(c \cdot b\right) \cdot \left(c \cdot i\right) + \color{blue}{a \cdot \left(c \cdot i\right)}\right)\right) \]
      12. distribute-rgt-out73.6%

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

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

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

    if -2.2999999999999999e75 < c < 1.35e-49

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

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

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

Alternative 17: 38.3% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-75}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;t \leq 0.216:\\
\;\;\;\;\left(c \cdot a\right) \cdot \left(i \cdot -2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.59999999999999993e-100 or 0.215999999999999998 < t

    1. Initial program 90.0%

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

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

    if -6.59999999999999993e-100 < t < 1.89999999999999997e-75

    1. Initial program 90.6%

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

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

    if 1.89999999999999997e-75 < t < 0.215999999999999998

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 69.3% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.4 \cdot 10^{+76} \lor \neg \left(c \leq 5 \cdot 10^{+57}\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(c \cdot b\right)\right)\right) \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -4.4000000000000001e76 or 4.99999999999999972e57 < c

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4000000000000001e76 < c < 4.99999999999999972e57

    1. Initial program 97.2%

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

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

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

Alternative 19: 38.9% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{-103} \lor \neg \left(y \leq 2.45 \cdot 10^{+55}\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 (<= y -7.2e-103) (not (<= y 2.45e+55)))
   (* 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 ((y <= -7.2e-103) || !(y <= 2.45e+55)) {
		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 ((y <= (-7.2d-103)) .or. (.not. (y <= 2.45d+55))) 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 ((y <= -7.2e-103) || !(y <= 2.45e+55)) {
		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 (y <= -7.2e-103) or not (y <= 2.45e+55):
		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 ((y <= -7.2e-103) || !(y <= 2.45e+55))
		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 ((y <= -7.2e-103) || ~((y <= 2.45e+55)))
		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[y, -7.2e-103], N[Not[LessEqual[y, 2.45e+55]], $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}\;y \leq -7.2 \cdot 10^{-103} \lor \neg \left(y \leq 2.45 \cdot 10^{+55}\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 y < -7.1999999999999996e-103 or 2.45000000000000007e55 < y

    1. Initial program 88.1%

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

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

    if -7.1999999999999996e-103 < y < 2.45000000000000007e55

    1. Initial program 91.9%

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

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

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

Alternative 20: 28.8% 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 90.1%

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

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

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

Developer target: 94.2% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2023227 
(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))))