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

Percentage Accurate: 89.8% → 95.2%
Time: 25.3s
Alternatives: 19
Speedup: 0.7×

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

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

Initial Program: 89.8% accurate, 1.0× speedup?

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

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

Alternative 1: 95.2% 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(x \cdot y - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
   (if (<= (- t_2 (* (* c t_1) i)) INFINITY)
     (* 2.0 (- t_2 (* t_1 (* c i))))
     (* 2.0 (- (* x y) (* (* b c) (* c 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 * ((x * y) - ((b * c) * (c * 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 * ((x * y) - ((b * c) * (c * 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 * ((x * y) - ((b * c) * (c * 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(Float64(x * y) - Float64(Float64(b * c) * Float64(c * 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 * ((x * y) - ((b * c) * (c * 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[(N[(x * y), $MachinePrecision] - N[(N[(b * c), $MachinePrecision] * N[(c * 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(x \cdot y - \left(b \cdot c\right) \cdot \left(c \cdot i\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.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*98.2%

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

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

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

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

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

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

    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-*r*16.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. *-commutative16.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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(x \cdot y - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \]

Alternative 2: 43.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ t_3 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;x \cdot y \leq -4.5 \cdot 10^{+49}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \cdot y \leq -6 \cdot 10^{-92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 2.7 \cdot 10^{-180}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 1.95 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 3.6 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (* a (* c i)) (- 2.0)))
        (t_2 (* 2.0 (* z t)))
        (t_3 (* (* x y) 2.0)))
   (if (<= (* x y) -4.5e+49)
     t_3
     (if (<= (* x y) -6e-92)
       t_1
       (if (<= (* x y) 2.7e-180)
         t_2
         (if (<= (* x y) 3.2e-129)
           t_1
           (if (<= (* x y) 1.95e-47)
             t_2
             (if (<= (* x y) 3.6e+14) 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 = (a * (c * i)) * -2.0;
	double t_2 = 2.0 * (z * t);
	double t_3 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.5e+49) {
		tmp = t_3;
	} else if ((x * y) <= -6e-92) {
		tmp = t_1;
	} else if ((x * y) <= 2.7e-180) {
		tmp = t_2;
	} else if ((x * y) <= 3.2e-129) {
		tmp = t_1;
	} else if ((x * y) <= 1.95e-47) {
		tmp = t_2;
	} else if ((x * y) <= 3.6e+14) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (a * (c * i)) * -2.0d0
    t_2 = 2.0d0 * (z * t)
    t_3 = (x * y) * 2.0d0
    if ((x * y) <= (-4.5d+49)) then
        tmp = t_3
    else if ((x * y) <= (-6d-92)) then
        tmp = t_1
    else if ((x * y) <= 2.7d-180) then
        tmp = t_2
    else if ((x * y) <= 3.2d-129) then
        tmp = t_1
    else if ((x * y) <= 1.95d-47) then
        tmp = t_2
    else if ((x * y) <= 3.6d+14) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * (c * i)) * -2.0;
	double t_2 = 2.0 * (z * t);
	double t_3 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.5e+49) {
		tmp = t_3;
	} else if ((x * y) <= -6e-92) {
		tmp = t_1;
	} else if ((x * y) <= 2.7e-180) {
		tmp = t_2;
	} else if ((x * y) <= 3.2e-129) {
		tmp = t_1;
	} else if ((x * y) <= 1.95e-47) {
		tmp = t_2;
	} else if ((x * y) <= 3.6e+14) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * (c * i)) * -2.0
	t_2 = 2.0 * (z * t)
	t_3 = (x * y) * 2.0
	tmp = 0
	if (x * y) <= -4.5e+49:
		tmp = t_3
	elif (x * y) <= -6e-92:
		tmp = t_1
	elif (x * y) <= 2.7e-180:
		tmp = t_2
	elif (x * y) <= 3.2e-129:
		tmp = t_1
	elif (x * y) <= 1.95e-47:
		tmp = t_2
	elif (x * y) <= 3.6e+14:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a * Float64(c * i)) * Float64(-2.0))
	t_2 = Float64(2.0 * Float64(z * t))
	t_3 = Float64(Float64(x * y) * 2.0)
	tmp = 0.0
	if (Float64(x * y) <= -4.5e+49)
		tmp = t_3;
	elseif (Float64(x * y) <= -6e-92)
		tmp = t_1;
	elseif (Float64(x * y) <= 2.7e-180)
		tmp = t_2;
	elseif (Float64(x * y) <= 3.2e-129)
		tmp = t_1;
	elseif (Float64(x * y) <= 1.95e-47)
		tmp = t_2;
	elseif (Float64(x * y) <= 3.6e+14)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a * (c * i)) * -2.0;
	t_2 = 2.0 * (z * t);
	t_3 = (x * y) * 2.0;
	tmp = 0.0;
	if ((x * y) <= -4.5e+49)
		tmp = t_3;
	elseif ((x * y) <= -6e-92)
		tmp = t_1;
	elseif ((x * y) <= 2.7e-180)
		tmp = t_2;
	elseif ((x * y) <= 3.2e-129)
		tmp = t_1;
	elseif ((x * y) <= 1.95e-47)
		tmp = t_2;
	elseif ((x * y) <= 3.6e+14)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.5e+49], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -6e-92], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.7e-180], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-129], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.95e-47], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 3.6e+14], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \cdot y \leq -6 \cdot 10^{-92}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 2.7 \cdot 10^{-180}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-129}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 1.95 \cdot 10^{-47}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 3.6 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.49999999999999982e49 or 3.6e14 < (*.f64 x y)

    1. Initial program 87.0%

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

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

    if -4.49999999999999982e49 < (*.f64 x y) < -6.00000000000000027e-92 or 2.70000000000000014e-180 < (*.f64 x y) < 3.2000000000000003e-129 or 1.94999999999999989e-47 < (*.f64 x y) < 3.6e14

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

        \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
      2. fma-def92.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. Simplified92.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-def92.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. +-commutative92.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-rr92.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 a around inf 51.2%

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

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

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

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

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

    if -6.00000000000000027e-92 < (*.f64 x y) < 2.70000000000000014e-180 or 3.2000000000000003e-129 < (*.f64 x y) < 1.94999999999999989e-47

    1. Initial program 92.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.5 \cdot 10^{+49}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq -6 \cdot 10^{-92}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;x \cdot y \leq 2.7 \cdot 10^{-180}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-129}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;x \cdot y \leq 1.95 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 3.6 \cdot 10^{+14}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]

Alternative 3: 43.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ t_2 := 2 \cdot \left(z \cdot t\right)\\ t_3 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;x \cdot y \leq -4.5 \cdot 10^{+49}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \cdot y \leq -8 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 1.42 \cdot 10^{-176}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 130000000000:\\ \;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (* a (* c i)) (- 2.0)))
        (t_2 (* 2.0 (* z t)))
        (t_3 (* (* x y) 2.0)))
   (if (<= (* x y) -4.5e+49)
     t_3
     (if (<= (* x y) -8e-91)
       t_1
       (if (<= (* x y) 1.42e-176)
         t_2
         (if (<= (* x y) 6.2e-130)
           t_1
           (if (<= (* x y) 3.2e-47)
             t_2
             (if (<= (* x y) 130000000000.0)
               (* 2.0 (* c (* a (- i))))
               t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a * (c * i)) * -2.0;
	double t_2 = 2.0 * (z * t);
	double t_3 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.5e+49) {
		tmp = t_3;
	} else if ((x * y) <= -8e-91) {
		tmp = t_1;
	} else if ((x * y) <= 1.42e-176) {
		tmp = t_2;
	} else if ((x * y) <= 6.2e-130) {
		tmp = t_1;
	} else if ((x * y) <= 3.2e-47) {
		tmp = t_2;
	} else if ((x * y) <= 130000000000.0) {
		tmp = 2.0 * (c * (a * -i));
	} 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 = (a * (c * i)) * -2.0d0
    t_2 = 2.0d0 * (z * t)
    t_3 = (x * y) * 2.0d0
    if ((x * y) <= (-4.5d+49)) then
        tmp = t_3
    else if ((x * y) <= (-8d-91)) then
        tmp = t_1
    else if ((x * y) <= 1.42d-176) then
        tmp = t_2
    else if ((x * y) <= 6.2d-130) then
        tmp = t_1
    else if ((x * y) <= 3.2d-47) then
        tmp = t_2
    else if ((x * y) <= 130000000000.0d0) then
        tmp = 2.0d0 * (c * (a * -i))
    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 = (a * (c * i)) * -2.0;
	double t_2 = 2.0 * (z * t);
	double t_3 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -4.5e+49) {
		tmp = t_3;
	} else if ((x * y) <= -8e-91) {
		tmp = t_1;
	} else if ((x * y) <= 1.42e-176) {
		tmp = t_2;
	} else if ((x * y) <= 6.2e-130) {
		tmp = t_1;
	} else if ((x * y) <= 3.2e-47) {
		tmp = t_2;
	} else if ((x * y) <= 130000000000.0) {
		tmp = 2.0 * (c * (a * -i));
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (a * (c * i)) * -2.0
	t_2 = 2.0 * (z * t)
	t_3 = (x * y) * 2.0
	tmp = 0
	if (x * y) <= -4.5e+49:
		tmp = t_3
	elif (x * y) <= -8e-91:
		tmp = t_1
	elif (x * y) <= 1.42e-176:
		tmp = t_2
	elif (x * y) <= 6.2e-130:
		tmp = t_1
	elif (x * y) <= 3.2e-47:
		tmp = t_2
	elif (x * y) <= 130000000000.0:
		tmp = 2.0 * (c * (a * -i))
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a * Float64(c * i)) * Float64(-2.0))
	t_2 = Float64(2.0 * Float64(z * t))
	t_3 = Float64(Float64(x * y) * 2.0)
	tmp = 0.0
	if (Float64(x * y) <= -4.5e+49)
		tmp = t_3;
	elseif (Float64(x * y) <= -8e-91)
		tmp = t_1;
	elseif (Float64(x * y) <= 1.42e-176)
		tmp = t_2;
	elseif (Float64(x * y) <= 6.2e-130)
		tmp = t_1;
	elseif (Float64(x * y) <= 3.2e-47)
		tmp = t_2;
	elseif (Float64(x * y) <= 130000000000.0)
		tmp = Float64(2.0 * Float64(c * Float64(a * Float64(-i))));
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a * (c * i)) * -2.0;
	t_2 = 2.0 * (z * t);
	t_3 = (x * y) * 2.0;
	tmp = 0.0;
	if ((x * y) <= -4.5e+49)
		tmp = t_3;
	elseif ((x * y) <= -8e-91)
		tmp = t_1;
	elseif ((x * y) <= 1.42e-176)
		tmp = t_2;
	elseif ((x * y) <= 6.2e-130)
		tmp = t_1;
	elseif ((x * y) <= 3.2e-47)
		tmp = t_2;
	elseif ((x * y) <= 130000000000.0)
		tmp = 2.0 * (c * (a * -i));
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.5e+49], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -8e-91], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.42e-176], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 6.2e-130], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.2e-47], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 130000000000.0], N[(2.0 * N[(c * N[(a * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \cdot y \leq -8 \cdot 10^{-91}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 1.42 \cdot 10^{-176}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-47}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4.49999999999999982e49 or 1.3e11 < (*.f64 x y)

    1. Initial program 87.0%

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

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

    if -4.49999999999999982e49 < (*.f64 x y) < -8.00000000000000018e-91 or 1.42000000000000009e-176 < (*.f64 x y) < 6.20000000000000021e-130

    1. Initial program 94.4%

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

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

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

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

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

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

    if -8.00000000000000018e-91 < (*.f64 x y) < 1.42000000000000009e-176 or 6.20000000000000021e-130 < (*.f64 x y) < 3.1999999999999999e-47

    1. Initial program 92.0%

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

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

    if 3.1999999999999999e-47 < (*.f64 x y) < 1.3e11

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.5 \cdot 10^{+49}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq -8 \cdot 10^{-91}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;x \cdot y \leq 1.42 \cdot 10^{-176}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{-130}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 130000000000:\\ \;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]

Alternative 4: 42.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{-178}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{-47}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 x y) < -4.4000000000000001e49 or 3.2e14 < (*.f64 x y)

    1. Initial program 87.0%

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

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

    if -4.4000000000000001e49 < (*.f64 x y) < -1.15e-98

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in a around inf 49.2%

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

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

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

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

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

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

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

    if -1.15e-98 < (*.f64 x y) < 2.1e-178 or 5.7000000000000001e-129 < (*.f64 x y) < 2.1000000000000001e-47

    1. Initial program 91.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 47.1%

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

    if 2.1e-178 < (*.f64 x y) < 5.7000000000000001e-129

    1. Initial program 82.2%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Step-by-step derivation
      1. associate-*l*82.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-def82.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. Simplified82.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-def82.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. +-commutative82.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-rr82.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 a around inf 63.7%

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

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

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

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

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

    if 2.1000000000000001e-47 < (*.f64 x y) < 3.2e14

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.4 \cdot 10^{+49}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq -1.15 \cdot 10^{-98}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{-178}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 5.7 \cdot 10^{-129}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;x \cdot y \leq 2.1 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(c \cdot \left(a \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]

Alternative 5: 92.2% accurate, 0.7× 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{else}:\\ \;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2\right) \cdot 2\\ \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))))
     (* (- (+ (* x y) (* z t)) t_2) 2.0))))
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 {
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	}
	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 {
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	}
	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)))
	else:
		tmp = (((x * y) + (z * t)) - t_2) * 2.0
	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))));
	else
		tmp = Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2) * 2.0);
	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)));
	else
		tmp = (((x * y) + (z * t)) - t_2) * 2.0;
	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], N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] * 2.0), $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{else}:\\
\;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - t_2\right) \cdot 2\\


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

    1. Initial program 69.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 90.6%

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

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

    1. Initial program 96.3%

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

    \[\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{else}:\\ \;\;\;\;\left(\left(x \cdot y + z \cdot t\right) - \left(c \cdot \left(a + b \cdot c\right)\right) \cdot i\right) \cdot 2\\ \end{array} \]

Alternative 6: 81.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -2.39999999999999991e-68

    1. Initial program 87.5%

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

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

    if -2.39999999999999991e-68 < (*.f64 x y) < 4.6e11

    1. Initial program 90.2%

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

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

    if 4.6e11 < (*.f64 x y)

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

Alternative 7: 67.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;c \leq -8.2 \cdot 10^{+112}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -4:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -2.05 \cdot 10^{-22}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -1.5 \cdot 10^{-116}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.12 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{+159}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \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 (* 2.0 (+ (* x y) (* z t)))))
   (if (<= c -8.2e+112)
     (* (* (* b c) (* c i)) (- 2.0))
     (if (<= c -4.0)
       t_1
       (if (<= c -2.05e-22)
         (* c (* (* c (* b i)) -2.0))
         (if (<= c -1.5e-116)
           (* 2.0 (- (* z t) (* c (* a i))))
           (if (<= c 1.12e+30)
             t_1
             (if (<= c 1.1e+159)
               (* 2.0 (- (* x y) (* a (* c i))))
               (* 2.0 (* b (* c (* c (- i)))))))))))))
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) + (z * t));
	double tmp;
	if (c <= -8.2e+112) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -4.0) {
		tmp = t_1;
	} else if (c <= -2.05e-22) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -1.5e-116) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 1.12e+30) {
		tmp = t_1;
	} else if (c <= 1.1e+159) {
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	} else {
		tmp = 2.0 * (b * (c * (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) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) + (z * t))
    if (c <= (-8.2d+112)) then
        tmp = ((b * c) * (c * i)) * -2.0d0
    else if (c <= (-4.0d0)) then
        tmp = t_1
    else if (c <= (-2.05d-22)) then
        tmp = c * ((c * (b * i)) * (-2.0d0))
    else if (c <= (-1.5d-116)) then
        tmp = 2.0d0 * ((z * t) - (c * (a * i)))
    else if (c <= 1.12d+30) then
        tmp = t_1
    else if (c <= 1.1d+159) then
        tmp = 2.0d0 * ((x * y) - (a * (c * i)))
    else
        tmp = 2.0d0 * (b * (c * (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 t_1 = 2.0 * ((x * y) + (z * t));
	double tmp;
	if (c <= -8.2e+112) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -4.0) {
		tmp = t_1;
	} else if (c <= -2.05e-22) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -1.5e-116) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 1.12e+30) {
		tmp = t_1;
	} else if (c <= 1.1e+159) {
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	} else {
		tmp = 2.0 * (b * (c * (c * -i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) + (z * t))
	tmp = 0
	if c <= -8.2e+112:
		tmp = ((b * c) * (c * i)) * -2.0
	elif c <= -4.0:
		tmp = t_1
	elif c <= -2.05e-22:
		tmp = c * ((c * (b * i)) * -2.0)
	elif c <= -1.5e-116:
		tmp = 2.0 * ((z * t) - (c * (a * i)))
	elif c <= 1.12e+30:
		tmp = t_1
	elif c <= 1.1e+159:
		tmp = 2.0 * ((x * y) - (a * (c * i)))
	else:
		tmp = 2.0 * (b * (c * (c * -i)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t)))
	tmp = 0.0
	if (c <= -8.2e+112)
		tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0));
	elseif (c <= -4.0)
		tmp = t_1;
	elseif (c <= -2.05e-22)
		tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0));
	elseif (c <= -1.5e-116)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))));
	elseif (c <= 1.12e+30)
		tmp = t_1;
	elseif (c <= 1.1e+159)
		tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i))));
	else
		tmp = Float64(2.0 * Float64(b * Float64(c * Float64(c * Float64(-i)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) + (z * t));
	tmp = 0.0;
	if (c <= -8.2e+112)
		tmp = ((b * c) * (c * i)) * -2.0;
	elseif (c <= -4.0)
		tmp = t_1;
	elseif (c <= -2.05e-22)
		tmp = c * ((c * (b * i)) * -2.0);
	elseif (c <= -1.5e-116)
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	elseif (c <= 1.12e+30)
		tmp = t_1;
	elseif (c <= 1.1e+159)
		tmp = 2.0 * ((x * y) - (a * (c * i)));
	else
		tmp = 2.0 * (b * (c * (c * -i)));
	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[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.2e+112], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -4.0], t$95$1, If[LessEqual[c, -2.05e-22], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.5e-116], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.12e+30], t$95$1, If[LessEqual[c, 1.1e+159], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(c * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -4:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;c \leq 1.12 \cdot 10^{+30}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in c around inf 81.2%

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

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

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

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

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

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

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

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

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

    if -8.19999999999999951e112 < c < -4 or -1.50000000000000013e-116 < c < 1.12e30

    1. Initial program 94.6%

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

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

    if -4 < c < -2.05e-22

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05e-22 < c < -1.50000000000000013e-116

    1. Initial program 99.4%

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

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

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

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

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

    if 1.12e30 < c < 1.1e159

    1. Initial program 85.1%

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

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

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

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

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

    if 1.1e159 < c

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -8.2 \cdot 10^{+112}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -4:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq -2.05 \cdot 10^{-22}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -1.5 \cdot 10^{-116}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.12 \cdot 10^{+30}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.1 \cdot 10^{+159}:\\ \;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\ \end{array} \]

Alternative 8: 85.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\ t_2 := 2 \cdot \left(x \cdot y - t_1\right)\\ t_3 := 2 \cdot \left(z \cdot t - t_1\right)\\ \mathbf{if}\;c \leq -3.8 \cdot 10^{+43}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -2.3 \cdot 10^{-56}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -3.65 \cdot 10^{-75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 19:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\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 (* b c)) i)))
        (t_2 (* 2.0 (- (* x y) t_1)))
        (t_3 (* 2.0 (- (* z t) t_1))))
   (if (<= c -3.8e+43)
     t_2
     (if (<= c -2.3e-56)
       t_3
       (if (<= c -3.65e-75)
         t_2
         (if (<= c 19.0)
           (* 2.0 (- (+ (* x y) (* z t)) (* i (* a c))))
           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 + (b * c)) * i);
	double t_2 = 2.0 * ((x * y) - t_1);
	double t_3 = 2.0 * ((z * t) - t_1);
	double tmp;
	if (c <= -3.8e+43) {
		tmp = t_2;
	} else if (c <= -2.3e-56) {
		tmp = t_3;
	} else if (c <= -3.65e-75) {
		tmp = t_2;
	} else if (c <= 19.0) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	} 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 + (b * c)) * i)
    t_2 = 2.0d0 * ((x * y) - t_1)
    t_3 = 2.0d0 * ((z * t) - t_1)
    if (c <= (-3.8d+43)) then
        tmp = t_2
    else if (c <= (-2.3d-56)) then
        tmp = t_3
    else if (c <= (-3.65d-75)) then
        tmp = t_2
    else if (c <= 19.0d0) then
        tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (a * c)))
    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 + (b * c)) * i);
	double t_2 = 2.0 * ((x * y) - t_1);
	double t_3 = 2.0 * ((z * t) - t_1);
	double tmp;
	if (c <= -3.8e+43) {
		tmp = t_2;
	} else if (c <= -2.3e-56) {
		tmp = t_3;
	} else if (c <= -3.65e-75) {
		tmp = t_2;
	} else if (c <= 19.0) {
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = c * ((a + (b * c)) * i)
	t_2 = 2.0 * ((x * y) - t_1)
	t_3 = 2.0 * ((z * t) - t_1)
	tmp = 0
	if c <= -3.8e+43:
		tmp = t_2
	elif c <= -2.3e-56:
		tmp = t_3
	elif c <= -3.65e-75:
		tmp = t_2
	elif c <= 19.0:
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)))
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(c * Float64(Float64(a + Float64(b * c)) * i))
	t_2 = Float64(2.0 * Float64(Float64(x * y) - t_1))
	t_3 = Float64(2.0 * Float64(Float64(z * t) - t_1))
	tmp = 0.0
	if (c <= -3.8e+43)
		tmp = t_2;
	elseif (c <= -2.3e-56)
		tmp = t_3;
	elseif (c <= -3.65e-75)
		tmp = t_2;
	elseif (c <= 19.0)
		tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(a * c))));
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = c * ((a + (b * c)) * i);
	t_2 = 2.0 * ((x * y) - t_1);
	t_3 = 2.0 * ((z * t) - t_1);
	tmp = 0.0;
	if (c <= -3.8e+43)
		tmp = t_2;
	elseif (c <= -2.3e-56)
		tmp = t_3;
	elseif (c <= -3.65e-75)
		tmp = t_2;
	elseif (c <= 19.0)
		tmp = 2.0 * (((x * y) + (z * t)) - (i * (a * c)));
	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[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * 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[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.8e+43], t$95$2, If[LessEqual[c, -2.3e-56], t$95$3, If[LessEqual[c, -3.65e-75], t$95$2, If[LessEqual[c, 19.0], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;c \leq -3.65 \cdot 10^{-75}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.80000000000000008e43 or -2.30000000000000002e-56 < c < -3.6499999999999999e-75

    1. Initial program 81.4%

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

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

    if -3.80000000000000008e43 < c < -2.30000000000000002e-56 or 19 < c

    1. Initial program 85.6%

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

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

    if -3.6499999999999999e-75 < c < 19

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

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

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

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

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

Alternative 9: 79.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4.4 \cdot 10^{+49} \lor \neg \left(x \cdot y \leq 1.22 \cdot 10^{+66}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - \left(b \cdot c\right) \cdot \left(c \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -4.4000000000000001e49 or 1.21999999999999993e66 < (*.f64 x y)

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4000000000000001e49 < (*.f64 x y) < 1.21999999999999993e66

    1. Initial program 90.8%

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

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

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

Alternative 10: 79.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\\
\mathbf{if}\;x \cdot y \leq -2.8 \cdot 10^{-68} \lor \neg \left(x \cdot y \leq 4.15 \cdot 10^{-47}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y - t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -2.8000000000000001e-68 or 4.1499999999999998e-47 < (*.f64 x y)

    1. Initial program 88.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 82.6%

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

    if -2.8000000000000001e-68 < (*.f64 x y) < 4.1499999999999998e-47

    1. Initial program 91.3%

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

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

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

Alternative 11: 65.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;c \leq -3.8 \cdot 10^{+111}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -4:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{-23}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;c \leq 7 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \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 (* 2.0 (+ (* x y) (* z t)))))
   (if (<= c -3.8e+111)
     (* (* (* b c) (* c i)) (- 2.0))
     (if (<= c -4.0)
       t_1
       (if (<= c -8.8e-23)
         (* c (* (* c (* b i)) -2.0))
         (if (<= c -8.6e-115)
           (* 2.0 (* (* a c) (- i)))
           (if (<= c 7e+82) t_1 (* 2.0 (* b (* c (* c (- i))))))))))))
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) + (z * t));
	double tmp;
	if (c <= -3.8e+111) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -4.0) {
		tmp = t_1;
	} else if (c <= -8.8e-23) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8.6e-115) {
		tmp = 2.0 * ((a * c) * -i);
	} else if (c <= 7e+82) {
		tmp = t_1;
	} else {
		tmp = 2.0 * (b * (c * (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) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) + (z * t))
    if (c <= (-3.8d+111)) then
        tmp = ((b * c) * (c * i)) * -2.0d0
    else if (c <= (-4.0d0)) then
        tmp = t_1
    else if (c <= (-8.8d-23)) then
        tmp = c * ((c * (b * i)) * (-2.0d0))
    else if (c <= (-8.6d-115)) then
        tmp = 2.0d0 * ((a * c) * -i)
    else if (c <= 7d+82) then
        tmp = t_1
    else
        tmp = 2.0d0 * (b * (c * (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 t_1 = 2.0 * ((x * y) + (z * t));
	double tmp;
	if (c <= -3.8e+111) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -4.0) {
		tmp = t_1;
	} else if (c <= -8.8e-23) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8.6e-115) {
		tmp = 2.0 * ((a * c) * -i);
	} else if (c <= 7e+82) {
		tmp = t_1;
	} else {
		tmp = 2.0 * (b * (c * (c * -i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) + (z * t))
	tmp = 0
	if c <= -3.8e+111:
		tmp = ((b * c) * (c * i)) * -2.0
	elif c <= -4.0:
		tmp = t_1
	elif c <= -8.8e-23:
		tmp = c * ((c * (b * i)) * -2.0)
	elif c <= -8.6e-115:
		tmp = 2.0 * ((a * c) * -i)
	elif c <= 7e+82:
		tmp = t_1
	else:
		tmp = 2.0 * (b * (c * (c * -i)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t)))
	tmp = 0.0
	if (c <= -3.8e+111)
		tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0));
	elseif (c <= -4.0)
		tmp = t_1;
	elseif (c <= -8.8e-23)
		tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0));
	elseif (c <= -8.6e-115)
		tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i)));
	elseif (c <= 7e+82)
		tmp = t_1;
	else
		tmp = Float64(2.0 * Float64(b * Float64(c * Float64(c * Float64(-i)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) + (z * t));
	tmp = 0.0;
	if (c <= -3.8e+111)
		tmp = ((b * c) * (c * i)) * -2.0;
	elseif (c <= -4.0)
		tmp = t_1;
	elseif (c <= -8.8e-23)
		tmp = c * ((c * (b * i)) * -2.0);
	elseif (c <= -8.6e-115)
		tmp = 2.0 * ((a * c) * -i);
	elseif (c <= 7e+82)
		tmp = t_1;
	else
		tmp = 2.0 * (b * (c * (c * -i)));
	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[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.8e+111], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -4.0], t$95$1, If[LessEqual[c, -8.8e-23], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8.6e-115], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7e+82], t$95$1, N[(2.0 * N[(b * N[(c * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -4:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;c \leq 7 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -3.79999999999999976e111

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in c around inf 81.2%

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

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

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

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

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

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

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

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

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

    if -3.79999999999999976e111 < c < -4 or -8.6000000000000008e-115 < c < 7.0000000000000001e82

    1. Initial program 95.0%

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

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

    if -4 < c < -8.7999999999999998e-23

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.7999999999999998e-23 < c < -8.6000000000000008e-115

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in a around inf 50.6%

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

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

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

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

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

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

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

    if 7.0000000000000001e82 < c

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.8 \cdot 10^{+111}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -4:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{-23}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;c \leq 7 \cdot 10^{+82}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\ \end{array} \]

Alternative 12: 67.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;c \leq -8.2 \cdot 10^{+112}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -0.0058:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -2.05 \cdot 10^{-22}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.7 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \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 (* 2.0 (+ (* x y) (* z t)))))
   (if (<= c -8.2e+112)
     (* (* (* b c) (* c i)) (- 2.0))
     (if (<= c -0.0058)
       t_1
       (if (<= c -2.05e-22)
         (* c (* (* c (* b i)) -2.0))
         (if (<= c -8e-115)
           (* 2.0 (- (* z t) (* c (* a i))))
           (if (<= c 1.7e+83) t_1 (* 2.0 (* b (* c (* c (- i))))))))))))
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) + (z * t));
	double tmp;
	if (c <= -8.2e+112) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -0.0058) {
		tmp = t_1;
	} else if (c <= -2.05e-22) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8e-115) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 1.7e+83) {
		tmp = t_1;
	} else {
		tmp = 2.0 * (b * (c * (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) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) + (z * t))
    if (c <= (-8.2d+112)) then
        tmp = ((b * c) * (c * i)) * -2.0d0
    else if (c <= (-0.0058d0)) then
        tmp = t_1
    else if (c <= (-2.05d-22)) then
        tmp = c * ((c * (b * i)) * (-2.0d0))
    else if (c <= (-8d-115)) then
        tmp = 2.0d0 * ((z * t) - (c * (a * i)))
    else if (c <= 1.7d+83) then
        tmp = t_1
    else
        tmp = 2.0d0 * (b * (c * (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 t_1 = 2.0 * ((x * y) + (z * t));
	double tmp;
	if (c <= -8.2e+112) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -0.0058) {
		tmp = t_1;
	} else if (c <= -2.05e-22) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8e-115) {
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	} else if (c <= 1.7e+83) {
		tmp = t_1;
	} else {
		tmp = 2.0 * (b * (c * (c * -i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) + (z * t))
	tmp = 0
	if c <= -8.2e+112:
		tmp = ((b * c) * (c * i)) * -2.0
	elif c <= -0.0058:
		tmp = t_1
	elif c <= -2.05e-22:
		tmp = c * ((c * (b * i)) * -2.0)
	elif c <= -8e-115:
		tmp = 2.0 * ((z * t) - (c * (a * i)))
	elif c <= 1.7e+83:
		tmp = t_1
	else:
		tmp = 2.0 * (b * (c * (c * -i)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t)))
	tmp = 0.0
	if (c <= -8.2e+112)
		tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0));
	elseif (c <= -0.0058)
		tmp = t_1;
	elseif (c <= -2.05e-22)
		tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0));
	elseif (c <= -8e-115)
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(a * i))));
	elseif (c <= 1.7e+83)
		tmp = t_1;
	else
		tmp = Float64(2.0 * Float64(b * Float64(c * Float64(c * Float64(-i)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) + (z * t));
	tmp = 0.0;
	if (c <= -8.2e+112)
		tmp = ((b * c) * (c * i)) * -2.0;
	elseif (c <= -0.0058)
		tmp = t_1;
	elseif (c <= -2.05e-22)
		tmp = c * ((c * (b * i)) * -2.0);
	elseif (c <= -8e-115)
		tmp = 2.0 * ((z * t) - (c * (a * i)));
	elseif (c <= 1.7e+83)
		tmp = t_1;
	else
		tmp = 2.0 * (b * (c * (c * -i)));
	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[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.2e+112], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -0.0058], t$95$1, If[LessEqual[c, -2.05e-22], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8e-115], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.7e+83], t$95$1, N[(2.0 * N[(b * N[(c * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -0.0058:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;c \leq 1.7 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -8.19999999999999951e112

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in c around inf 81.2%

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

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

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

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

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

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

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

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

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

    if -8.19999999999999951e112 < c < -0.0058 or -8.0000000000000004e-115 < c < 1.6999999999999999e83

    1. Initial program 95.0%

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

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

    if -0.0058 < c < -2.05e-22

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05e-22 < c < -8.0000000000000004e-115

    1. Initial program 99.4%

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

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

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

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

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

    if 1.6999999999999999e83 < c

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -8.2 \cdot 10^{+112}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -0.0058:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq -2.05 \cdot 10^{-22}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 1.7 \cdot 10^{+83}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \left(c \cdot \left(c \cdot \left(-i\right)\right)\right)\right)\\ \end{array} \]

Alternative 13: 64.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;c \leq -0.175:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -1.25 \cdot 10^{-22}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;c \leq 6.2 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4e113 or -0.17499999999999999 < c < -1.24999999999999988e-22 or 6.19999999999999984e83 < c

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4e113 < c < -0.17499999999999999 or -8.6000000000000008e-115 < c < 6.19999999999999984e83

    1. Initial program 95.0%

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

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

    if -1.24999999999999988e-22 < c < -8.6000000000000008e-115

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in a around inf 50.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4 \cdot 10^{+113}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -0.175:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq -1.25 \cdot 10^{-22}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{+83}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \end{array} \]

Alternative 14: 65.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ t_2 := -2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{if}\;c \leq -2.4 \cdot 10^{+112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -0.0046:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -3.7 \cdot 10^{-23}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (+ (* x y) (* z t)))) (t_2 (* -2.0 (* c (* b (* c i))))))
   (if (<= c -2.4e+112)
     t_2
     (if (<= c -0.0046)
       t_1
       (if (<= c -3.7e-23)
         (* c (* (* c (* b i)) -2.0))
         (if (<= c -8.6e-115)
           (* 2.0 (* (* a c) (- i)))
           (if (<= c 8.5e+82) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) + (z * t));
	double t_2 = -2.0 * (c * (b * (c * i)));
	double tmp;
	if (c <= -2.4e+112) {
		tmp = t_2;
	} else if (c <= -0.0046) {
		tmp = t_1;
	} else if (c <= -3.7e-23) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8.6e-115) {
		tmp = 2.0 * ((a * c) * -i);
	} else if (c <= 8.5e+82) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) + (z * t))
    t_2 = (-2.0d0) * (c * (b * (c * i)))
    if (c <= (-2.4d+112)) then
        tmp = t_2
    else if (c <= (-0.0046d0)) then
        tmp = t_1
    else if (c <= (-3.7d-23)) then
        tmp = c * ((c * (b * i)) * (-2.0d0))
    else if (c <= (-8.6d-115)) then
        tmp = 2.0d0 * ((a * c) * -i)
    else if (c <= 8.5d+82) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * ((x * y) + (z * t));
	double t_2 = -2.0 * (c * (b * (c * i)));
	double tmp;
	if (c <= -2.4e+112) {
		tmp = t_2;
	} else if (c <= -0.0046) {
		tmp = t_1;
	} else if (c <= -3.7e-23) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8.6e-115) {
		tmp = 2.0 * ((a * c) * -i);
	} else if (c <= 8.5e+82) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) + (z * t))
	t_2 = -2.0 * (c * (b * (c * i)))
	tmp = 0
	if c <= -2.4e+112:
		tmp = t_2
	elif c <= -0.0046:
		tmp = t_1
	elif c <= -3.7e-23:
		tmp = c * ((c * (b * i)) * -2.0)
	elif c <= -8.6e-115:
		tmp = 2.0 * ((a * c) * -i)
	elif c <= 8.5e+82:
		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(Float64(x * y) + Float64(z * t)))
	t_2 = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i))))
	tmp = 0.0
	if (c <= -2.4e+112)
		tmp = t_2;
	elseif (c <= -0.0046)
		tmp = t_1;
	elseif (c <= -3.7e-23)
		tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0));
	elseif (c <= -8.6e-115)
		tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i)));
	elseif (c <= 8.5e+82)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) + (z * t));
	t_2 = -2.0 * (c * (b * (c * i)));
	tmp = 0.0;
	if (c <= -2.4e+112)
		tmp = t_2;
	elseif (c <= -0.0046)
		tmp = t_1;
	elseif (c <= -3.7e-23)
		tmp = c * ((c * (b * i)) * -2.0);
	elseif (c <= -8.6e-115)
		tmp = 2.0 * ((a * c) * -i);
	elseif (c <= 8.5e+82)
		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[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.4e+112], t$95$2, If[LessEqual[c, -0.0046], t$95$1, If[LessEqual[c, -3.7e-23], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8.6e-115], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.5e+82], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -0.0046:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.4e112 or 8.4999999999999995e82 < c

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e112 < c < -0.0045999999999999999 or -8.6000000000000008e-115 < c < 8.4999999999999995e82

    1. Initial program 95.0%

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

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

    if -0.0045999999999999999 < c < -3.7000000000000003e-23

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7000000000000003e-23 < c < -8.6000000000000008e-115

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in a around inf 50.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.4 \cdot 10^{+112}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -0.0046:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq -3.7 \cdot 10^{-23}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+82}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 15: 65.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{if}\;c \leq -4.5 \cdot 10^{+111}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -0.0052:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.25 \cdot 10^{-22}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;c \leq 8 \cdot 10^{+82}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (+ (* x y) (* z t)))))
   (if (<= c -4.5e+111)
     (* (* (* b c) (* c i)) (- 2.0))
     (if (<= c -0.0052)
       t_1
       (if (<= c -1.25e-22)
         (* c (* (* c (* b i)) -2.0))
         (if (<= c -8.6e-115)
           (* 2.0 (* (* a c) (- i)))
           (if (<= c 8e+82) t_1 (* -2.0 (* c (* b (* c i)))))))))))
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) + (z * t));
	double tmp;
	if (c <= -4.5e+111) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -0.0052) {
		tmp = t_1;
	} else if (c <= -1.25e-22) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8.6e-115) {
		tmp = 2.0 * ((a * c) * -i);
	} else if (c <= 8e+82) {
		tmp = t_1;
	} else {
		tmp = -2.0 * (c * (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) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 * ((x * y) + (z * t))
    if (c <= (-4.5d+111)) then
        tmp = ((b * c) * (c * i)) * -2.0d0
    else if (c <= (-0.0052d0)) then
        tmp = t_1
    else if (c <= (-1.25d-22)) then
        tmp = c * ((c * (b * i)) * (-2.0d0))
    else if (c <= (-8.6d-115)) then
        tmp = 2.0d0 * ((a * c) * -i)
    else if (c <= 8d+82) then
        tmp = t_1
    else
        tmp = (-2.0d0) * (c * (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 t_1 = 2.0 * ((x * y) + (z * t));
	double tmp;
	if (c <= -4.5e+111) {
		tmp = ((b * c) * (c * i)) * -2.0;
	} else if (c <= -0.0052) {
		tmp = t_1;
	} else if (c <= -1.25e-22) {
		tmp = c * ((c * (b * i)) * -2.0);
	} else if (c <= -8.6e-115) {
		tmp = 2.0 * ((a * c) * -i);
	} else if (c <= 8e+82) {
		tmp = t_1;
	} else {
		tmp = -2.0 * (c * (b * (c * i)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * ((x * y) + (z * t))
	tmp = 0
	if c <= -4.5e+111:
		tmp = ((b * c) * (c * i)) * -2.0
	elif c <= -0.0052:
		tmp = t_1
	elif c <= -1.25e-22:
		tmp = c * ((c * (b * i)) * -2.0)
	elif c <= -8.6e-115:
		tmp = 2.0 * ((a * c) * -i)
	elif c <= 8e+82:
		tmp = t_1
	else:
		tmp = -2.0 * (c * (b * (c * i)))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t)))
	tmp = 0.0
	if (c <= -4.5e+111)
		tmp = Float64(Float64(Float64(b * c) * Float64(c * i)) * Float64(-2.0));
	elseif (c <= -0.0052)
		tmp = t_1;
	elseif (c <= -1.25e-22)
		tmp = Float64(c * Float64(Float64(c * Float64(b * i)) * -2.0));
	elseif (c <= -8.6e-115)
		tmp = Float64(2.0 * Float64(Float64(a * c) * Float64(-i)));
	elseif (c <= 8e+82)
		tmp = t_1;
	else
		tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * ((x * y) + (z * t));
	tmp = 0.0;
	if (c <= -4.5e+111)
		tmp = ((b * c) * (c * i)) * -2.0;
	elseif (c <= -0.0052)
		tmp = t_1;
	elseif (c <= -1.25e-22)
		tmp = c * ((c * (b * i)) * -2.0);
	elseif (c <= -8.6e-115)
		tmp = 2.0 * ((a * c) * -i);
	elseif (c <= 8e+82)
		tmp = t_1;
	else
		tmp = -2.0 * (c * (b * (c * i)));
	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[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.5e+111], N[(N[(N[(b * c), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision] * (-2.0)), $MachinePrecision], If[LessEqual[c, -0.0052], t$95$1, If[LessEqual[c, -1.25e-22], N[(c * N[(N[(c * N[(b * i), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -8.6e-115], N[(2.0 * N[(N[(a * c), $MachinePrecision] * (-i)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e+82], t$95$1, N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -0.0052:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;c \leq 8 \cdot 10^{+82}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -4.50000000000000001e111

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in c around inf 81.2%

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

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

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

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

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

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

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

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

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

    if -4.50000000000000001e111 < c < -0.0051999999999999998 or -8.6000000000000008e-115 < c < 7.9999999999999997e82

    1. Initial program 95.0%

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

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

    if -0.0051999999999999998 < c < -1.24999999999999988e-22

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.24999999999999988e-22 < c < -8.6000000000000008e-115

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{\frac{1}{\mathsf{fma}\left(b, c, a\right)}}{i}}\right)\right)} \]
    8. Taylor expanded in a around inf 50.6%

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

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

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

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

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

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

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

    if 7.9999999999999997e82 < c

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.5 \cdot 10^{+111}:\\ \;\;\;\;\left(\left(b \cdot c\right) \cdot \left(c \cdot i\right)\right) \cdot \left(-2\right)\\ \mathbf{elif}\;c \leq -0.0052:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;c \leq -1.25 \cdot 10^{-22}:\\ \;\;\;\;c \cdot \left(\left(c \cdot \left(b \cdot i\right)\right) \cdot -2\right)\\ \mathbf{elif}\;c \leq -8.6 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\left(a \cdot c\right) \cdot \left(-i\right)\right)\\ \mathbf{elif}\;c \leq 8 \cdot 10^{+82}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 16: 71.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.6 \cdot 10^{-115} \lor \neg \left(c \leq 1.2 \cdot 10^{+32}\right):\\
\;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot \left(-2\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 < -8.6000000000000008e-115 or 1.19999999999999996e32 < c

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

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

    if -8.6000000000000008e-115 < c < 1.19999999999999996e32

    1. Initial program 98.9%

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

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

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

Alternative 17: 42.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.8 \cdot 10^{-92} \lor \neg \left(x \cdot y \leq 3.2 \cdot 10^{-40}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -3.8000000000000001e-92 or 3.20000000000000002e-40 < (*.f64 x y)

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

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

    if -3.8000000000000001e-92 < (*.f64 x y) < 3.20000000000000002e-40

    1. Initial program 91.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -3.8 \cdot 10^{-92} \lor \neg \left(x \cdot y \leq 3.2 \cdot 10^{-40}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 18: 57.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.1 \cdot 10^{+189} \lor \neg \left(i \leq 8.8 \cdot 10^{+106}\right):\\
\;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot \left(-2\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 < -2.09999999999999992e189 or 8.79999999999999966e106 < i

    1. Initial program 95.0%

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

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

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

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

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

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

    if -2.09999999999999992e189 < i < 8.79999999999999966e106

    1. Initial program 88.0%

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

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

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

Alternative 19: 30.1% accurate, 3.8× speedup?

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

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

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

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

Developer target: 93.7% accurate, 1.0× speedup?

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

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

Reproduce

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