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

Percentage Accurate: 90.4% → 96.8%
Time: 16.8s
Alternatives: 18
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 96.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 94.8%

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

Alternative 2: 95.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 94.8%

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

        \[\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. +-commutative15.4%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-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. associate-*l*61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 94.9% accurate, 0.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(c \cdot \left(t_1 \cdot \left(-i\right)\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 71.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 83.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.0000000000000001e296

    1. Initial program 99.0%

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

    if 5.0000000000000001e296 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 76.8%

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

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

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

Alternative 4: 95.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 94.8%

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

        \[\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. +-commutative15.4%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left({c}^{2} \cdot \left(i \cdot b\right)\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-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. associate-*l*61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;c \leq -1.1 \cdot 10^{-36}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq 6.6 \cdot 10^{+38}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.1000000000000001e82 or 7.99999999999999961e74 < c

    1. Initial program 75.7%

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

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

    if -1.1000000000000001e82 < c < -2.2e14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e14 < c < -1.1e-36 or 6.50000000000000024e-7 < c < 6.5999999999999998e38

    1. Initial program 99.7%

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

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

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

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

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

    if -1.1e-36 < c < 6.50000000000000024e-7

    1. Initial program 98.7%

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

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

    if 6.5999999999999998e38 < c < 7.99999999999999961e74

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. fma-def100.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. +-commutative100.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-rr100.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 inf 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.1 \cdot 10^{+82}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;c \leq -2.2 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{-36}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 6.5 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq 6.6 \cdot 10^{+38}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 8 \cdot 10^{+74}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot \left(-i\right)\right)\right)\\ \end{array} \]

Alternative 6: 69.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{if}\;c \leq -7 \cdot 10^{+83}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{+74}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (- (* x y) (* a (* c i))))))
   (if (<= c -7e+83)
     (* (* b (* c (* c i))) -2.0)
     (if (<= c -8.8e+14)
       (* 2.0 (- (* z t) (* i (* a c))))
       (if (<= c -1.05e-40)
         t_1
         (if (<= c 5e-7)
           (* 2.0 (+ (* x y) (* z t)))
           (if (<= c 1.1e+39)
             t_1
             (if (<= c 5.5e+74)
               (* 2.0 (- (* z t) (* c (* a i))))
               (* -2.0 (* (* c i) (* b c)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - (a * (c * i)));
	double tmp;
	if (c <= -7e+83) {
		tmp = (b * (c * (c * i))) * -2.0;
	} else if (c <= -8.8e+14) {
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	} else if (c <= -1.05e-40) {
		tmp = t_1;
	} else if (c <= 5e-7) {
		tmp = 2.0 * ((x * y) + (z * t));
	} else if (c <= 1.1e+39) {
		tmp = t_1;
	} else if (c <= 5.5e+74) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else {
		tmp = -2.0 * ((c * i) * (b * c));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) - (a * (c * i)))
    if (c <= (-7d+83)) then
        tmp = (b * (c * (c * i))) * (-2.0d0)
    else if (c <= (-8.8d+14)) then
        tmp = 2.0d0 * ((z * t) - (i * (a * c)))
    else if (c <= (-1.05d-40)) then
        tmp = t_1
    else if (c <= 5d-7) then
        tmp = 2.0d0 * ((x * y) + (z * t))
    else if (c <= 1.1d+39) then
        tmp = t_1
    else if (c <= 5.5d+74) then
        tmp = 2.0d0 * ((z * t) - (c * (a * i)))
    else
        tmp = (-2.0d0) * ((c * i) * (b * c))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) - (a * (c * i)));
	double tmp;
	if (c <= -7e+83) {
		tmp = (b * (c * (c * i))) * -2.0;
	} else if (c <= -8.8e+14) {
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	} else if (c <= -1.05e-40) {
		tmp = t_1;
	} else if (c <= 5e-7) {
		tmp = 2.0 * ((x * y) + (z * t));
	} else if (c <= 1.1e+39) {
		tmp = t_1;
	} else if (c <= 5.5e+74) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else {
		tmp = -2.0 * ((c * i) * (b * c));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) - (a * (c * i)))
	tmp = 0
	if c <= -7e+83:
		tmp = (b * (c * (c * i))) * -2.0
	elif c <= -8.8e+14:
		tmp = 2.0 * ((z * t) - (i * (a * c)))
	elif c <= -1.05e-40:
		tmp = t_1
	elif c <= 5e-7:
		tmp = 2.0 * ((x * y) + (z * t))
	elif c <= 1.1e+39:
		tmp = t_1
	elif c <= 5.5e+74:
		tmp = 2.0 * ((z * t) - (c * (a * i)))
	else:
		tmp = -2.0 * ((c * i) * (b * c))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i))))
	tmp = 0.0
	if (c <= -7e+83)
		tmp = Float64(Float64(b * Float64(c * Float64(c * i))) * -2.0);
	elseif (c <= -8.8e+14)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(a * c))));
	elseif (c <= -1.05e-40)
		tmp = t_1;
	elseif (c <= 5e-7)
		tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t)));
	elseif (c <= 1.1e+39)
		tmp = t_1;
	elseif (c <= 5.5e+74)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))));
	else
		tmp = Float64(-2.0 * Float64(Float64(c * i) * Float64(b * c)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) - (a * (c * i)));
	tmp = 0.0;
	if (c <= -7e+83)
		tmp = (b * (c * (c * i))) * -2.0;
	elseif (c <= -8.8e+14)
		tmp = 2.0 * ((z * t) - (i * (a * c)));
	elseif (c <= -1.05e-40)
		tmp = t_1;
	elseif (c <= 5e-7)
		tmp = 2.0 * ((x * y) + (z * t));
	elseif (c <= 1.1e+39)
		tmp = t_1;
	elseif (c <= 5.5e+74)
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	else
		tmp = -2.0 * ((c * i) * (b * c));
	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[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7e+83], N[(N[(b * N[(c * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[c, -8.8e+14], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.05e-40], t$95$1, If[LessEqual[c, 5e-7], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.1e+39], t$95$1, If[LessEqual[c, 5.5e+74], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -1.05 \cdot 10^{-40}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 1.1 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -6.99999999999999954e83

    1. Initial program 81.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*87.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-def87.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. Simplified87.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-def87.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. +-commutative87.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-rr87.2%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999954e83 < c < -8.8e14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.8e14 < c < -1.05000000000000009e-40 or 4.99999999999999977e-7 < c < 1.1000000000000001e39

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000009e-40 < c < 4.99999999999999977e-7

    1. Initial program 98.7%

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

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

    if 1.1000000000000001e39 < c < 5.5000000000000003e74

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. fma-def100.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. +-commutative100.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-rr100.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 inf 100.0%

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

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

    if 5.5000000000000003e74 < c

    1. Initial program 70.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*88.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out66.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2} \]
    12. Step-by-step derivation
      1. expm1-log1p-u33.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)\right)} \cdot -2 \]
      2. expm1-udef33.6%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)} - 1\right)} \cdot -2 \]
      3. *-commutative33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)}\right)} - 1\right) \cdot -2 \]
      4. associate-*l*33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(b \cdot \color{blue}{\left(c \cdot \left(c \cdot i\right)\right)}\right)} - 1\right) \cdot -2 \]
      5. associate-*r*35.3%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot \left(c \cdot i\right)}\right)} - 1\right) \cdot -2 \]
    13. Applied egg-rr35.3%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)} - 1\right)} \cdot -2 \]
    14. Step-by-step derivation
      1. expm1-def35.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)} \cdot -2 \]
      2. expm1-log1p71.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -7 \cdot 10^{+83}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-40}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 5 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{+39}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{+74}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \end{array} \]

Alternative 7: 69.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;c \leq -6.2 \cdot 10^{-37}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq 3.5 \cdot 10^{+48}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 9 \cdot 10^{+75}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if c < -1.6999999999999999e83

    1. Initial program 81.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*87.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-def87.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. Simplified87.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-def87.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. +-commutative87.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-rr87.2%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6999999999999999e83 < c < -6e14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e14 < c < -6.19999999999999987e-37 or 7.19999999999999989e-7 < c < 3.4999999999999997e48

    1. Initial program 99.7%

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

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

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

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

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

    if -6.19999999999999987e-37 < c < 7.19999999999999989e-7

    1. Initial program 98.7%

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

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

    if 3.4999999999999997e48 < c < 9.0000000000000007e75

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)} \]
    4. Step-by-step derivation
      1. fma-def100.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. +-commutative100.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-rr100.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 inf 100.0%

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

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

    if 9.0000000000000007e75 < c

    1. Initial program 70.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*88.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out66.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2} \]
    12. Step-by-step derivation
      1. expm1-log1p-u33.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)\right)} \cdot -2 \]
      2. expm1-udef33.6%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)} - 1\right)} \cdot -2 \]
      3. *-commutative33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)}\right)} - 1\right) \cdot -2 \]
      4. associate-*l*33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(b \cdot \color{blue}{\left(c \cdot \left(c \cdot i\right)\right)}\right)} - 1\right) \cdot -2 \]
      5. associate-*r*35.3%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot \left(c \cdot i\right)}\right)} - 1\right) \cdot -2 \]
    13. Applied egg-rr35.3%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)} - 1\right)} \cdot -2 \]
    14. Step-by-step derivation
      1. expm1-def35.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)} \cdot -2 \]
      2. expm1-log1p71.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.7 \cdot 10^{+83}:\\ \;\;\;\;\left(b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq -6 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -6.2 \cdot 10^{-37}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 7.2 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{+48}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 9 \cdot 10^{+75}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\ \end{array} \]

Alternative 8: 70.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1050000 \lor \neg \left(t \leq 2.45 \cdot 10^{+126}\right) \land \left(t \leq 2.85 \cdot 10^{+169} \lor \neg \left(t \leq 2.45 \cdot 10^{+245}\right)\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05e6 or 2.45e126 < t < 2.8500000000000001e169 or 2.45000000000000024e245 < t

    1. Initial program 88.6%

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

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

    if -1.05e6 < t < 2.45e126 or 2.8500000000000001e169 < t < 2.45000000000000024e245

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

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

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

Alternative 9: 85.7% accurate, 1.0× speedup?

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

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

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

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


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

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

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

    if -8.9999999999999993e82 < c < 1.27999999999999994e76

    1. Initial program 97.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 inf 93.1%

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

    if 1.27999999999999994e76 < c

    1. Initial program 70.1%

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

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

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

Alternative 10: 85.8% accurate, 1.0× speedup?

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

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

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

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


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

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

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

    if -2.10000000000000002e83 < c < 2.20000000000000012e75

    1. Initial program 97.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*98.1%

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

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

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

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

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

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

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

    if 2.20000000000000012e75 < c

    1. Initial program 70.1%

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

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

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

Alternative 11: 34.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -3.85 \cdot 10^{-274}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-247}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{+44}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+221}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.05999999999999997e-86 or 6.20000000000000013e221 < y

    1. Initial program 89.7%

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

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

    if -1.05999999999999997e-86 < y < -3.84999999999999985e-274 or 1.7000000000000001e-247 < y < 7.8000000000000005e44

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.84999999999999985e-274 < y < 1.7000000000000001e-247 or 7.8000000000000005e44 < y < 6.20000000000000013e221

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{-86}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -3.85 \cdot 10^{-274}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+44}:\\ \;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+221}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 12: 34.7% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-247}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+221}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.50000000000000012e-112 or 6.20000000000000013e221 < y

    1. Initial program 88.8%

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

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

    if -4.50000000000000012e-112 < y < 4.39999999999999983e-247 or 4.4999999999999998e45 < y < 6.20000000000000013e221

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

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

    if 4.39999999999999983e-247 < y < 4.4999999999999998e45

    1. Initial program 92.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-112}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-247}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+45}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+221}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 13: 40.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+143} \lor \neg \left(z \leq -5.5 \cdot 10^{+97}\right) \land \left(z \leq -3.1 \cdot 10^{+60} \lor \neg \left(z \leq 3.1 \cdot 10^{+56}\right)\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.40000000000000028e143 or -5.50000000000000021e97 < z < -3.1000000000000001e60 or 3.10000000000000005e56 < z

    1. Initial program 89.0%

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

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

    if -4.40000000000000028e143 < z < -5.50000000000000021e97 or -3.1000000000000001e60 < z < 3.10000000000000005e56

    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 x around inf 35.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+143} \lor \neg \left(z \leq -5.5 \cdot 10^{+97}\right) \land \left(z \leq -3.1 \cdot 10^{+60} \lor \neg \left(z \leq 3.1 \cdot 10^{+56}\right)\right):\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 14: 55.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -8 \cdot 10^{+37} \lor \neg \left(i \leq 1.55 \cdot 10^{+122}\right):\\ \;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= i -8e+37) (not (<= i 1.55e+122)))
   (* 2.0 (* (* c i) (- a)))
   (* 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 ((i <= -8e+37) || !(i <= 1.55e+122)) {
		tmp = 2.0 * ((c * i) * -a);
	} 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 ((i <= (-8d+37)) .or. (.not. (i <= 1.55d+122))) then
        tmp = 2.0d0 * ((c * i) * -a)
    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 ((i <= -8e+37) || !(i <= 1.55e+122)) {
		tmp = 2.0 * ((c * i) * -a);
	} else {
		tmp = 2.0 * ((x * y) + (z * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (i <= -8e+37) or not (i <= 1.55e+122):
		tmp = 2.0 * ((c * i) * -a)
	else:
		tmp = 2.0 * ((x * y) + (z * t))
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((i <= -8e+37) || !(i <= 1.55e+122))
		tmp = Float64(2.0 * Float64(Float64(c * i) * Float64(-a)));
	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 ((i <= -8e+37) || ~((i <= 1.55e+122)))
		tmp = 2.0 * ((c * i) * -a);
	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[i, -8e+37], N[Not[LessEqual[i, 1.55e+122]], $MachinePrecision]], N[(2.0 * N[(N[(c * i), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -8 \cdot 10^{+37} \lor \neg \left(i \leq 1.55 \cdot 10^{+122}\right):\\
\;\;\;\;2 \cdot \left(\left(c \cdot i\right) \cdot \left(-a\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -7.99999999999999963e37 or 1.54999999999999999e122 < i

    1. Initial program 92.7%

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

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

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

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

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

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

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

    if -7.99999999999999963e37 < i < 1.54999999999999999e122

    1. Initial program 88.5%

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

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

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

Alternative 15: 68.7% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.39999999999999998e82 or 1.05000000000000003e76 < c

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(2 \cdot \left(i \cdot \left(b \cdot \left(-c \cdot c\right)\right)\right)\right)\right)} \]
      2. expm1-udef36.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(2 \cdot \left(i \cdot \left(b \cdot \left(-c \cdot c\right)\right)\right)\right)} - 1} \]
      3. *-commutative36.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(i \cdot \left(b \cdot \left(-c \cdot c\right)\right)\right) \cdot 2}\right)} - 1 \]
      4. distribute-rgt-neg-in36.8%

        \[\leadsto e^{\mathsf{log1p}\left(\left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(-c\right)\right)}\right)\right) \cdot 2\right)} - 1 \]
    10. Applied egg-rr36.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def36.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2\right)\right)} \]
      2. expm1-log1p70.5%

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\left({c}^{2} \cdot b\right) \cdot -1\right)} \cdot 2\right) \]
      10. associate-*l*70.5%

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

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

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

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

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

    if -2.39999999999999998e82 < c < 1.05000000000000003e76

    1. Initial program 97.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 71.9%

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

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

Alternative 16: 69.0% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 81.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*87.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-def87.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. Simplified87.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-def87.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. +-commutative87.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-rr87.2%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out74.8%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(2 \cdot \left(i \cdot \left(b \cdot \left(-c \cdot c\right)\right)\right)\right)\right)} \]
      2. expm1-udef41.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(2 \cdot \left(i \cdot \left(b \cdot \left(-c \cdot c\right)\right)\right)\right)} - 1} \]
      3. *-commutative41.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\left(i \cdot \left(b \cdot \color{blue}{\left(c \cdot \left(-c\right)\right)}\right)\right) \cdot 2\right)} - 1 \]
    10. Applied egg-rr41.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def41.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(i \cdot \left(b \cdot \left(c \cdot \left(-c\right)\right)\right)\right) \cdot 2\right)\right)} \]
      2. expm1-log1p74.8%

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(\color{blue}{\left(\left({c}^{2} \cdot b\right) \cdot -1\right)} \cdot 2\right) \]
      10. associate-*l*74.8%

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

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

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

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

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

    if -1.9999999999999999e82 < c < 2.9000000000000002e74

    1. Initial program 97.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 71.9%

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

    if 2.9000000000000002e74 < c

    1. Initial program 70.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*88.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out66.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2} \]
    12. Step-by-step derivation
      1. expm1-log1p-u33.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)\right)} \cdot -2 \]
      2. expm1-udef33.6%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)} - 1\right)} \cdot -2 \]
      3. *-commutative33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)}\right)} - 1\right) \cdot -2 \]
      4. associate-*l*33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(b \cdot \color{blue}{\left(c \cdot \left(c \cdot i\right)\right)}\right)} - 1\right) \cdot -2 \]
      5. associate-*r*35.3%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot \left(c \cdot i\right)}\right)} - 1\right) \cdot -2 \]
    13. Applied egg-rr35.3%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)} - 1\right)} \cdot -2 \]
    14. Step-by-step derivation
      1. expm1-def35.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)} \cdot -2 \]
      2. expm1-log1p71.8%

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

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

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

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

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

Alternative 17: 69.6% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 81.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*87.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-def87.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. Simplified87.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-def87.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. +-commutative87.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-rr87.2%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5500000000000001e82 < c < 1.2199999999999999e75

    1. Initial program 97.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 71.9%

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

    if 1.2199999999999999e75 < c

    1. Initial program 70.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*88.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(-\color{blue}{\left(b \cdot \left(c \cdot c\right)\right)} \cdot i\right) \]
      6. distribute-lft-neg-out66.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2} \]
    12. Step-by-step derivation
      1. expm1-log1p-u33.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)\right)} \cdot -2 \]
      2. expm1-udef33.6%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right)} - 1\right)} \cdot -2 \]
      3. *-commutative33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{b \cdot \left(\left(c \cdot c\right) \cdot i\right)}\right)} - 1\right) \cdot -2 \]
      4. associate-*l*33.6%

        \[\leadsto \left(e^{\mathsf{log1p}\left(b \cdot \color{blue}{\left(c \cdot \left(c \cdot i\right)\right)}\right)} - 1\right) \cdot -2 \]
      5. associate-*r*35.3%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot c\right) \cdot \left(c \cdot i\right)}\right)} - 1\right) \cdot -2 \]
    13. Applied egg-rr35.3%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)} - 1\right)} \cdot -2 \]
    14. Step-by-step derivation
      1. expm1-def35.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\right)} \cdot -2 \]
      2. expm1-log1p71.8%

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

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

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

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

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

Alternative 18: 29.3% accurate, 3.8× speedup?

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

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

    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
  3. Final simplification25.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 2023207 
(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))))