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

Percentage Accurate: 89.6% → 95.0%
Time: 16.1s
Alternatives: 19
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.6% 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.0% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \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 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

Alternative 2: 70.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;c \leq -2.9 \cdot 10^{+27}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -0.00102:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq -4.7 \cdot 10^{-172}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 2.4 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 4 \cdot 10^{+42}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.1500000000000001e78 or -2.9000000000000001e27 < c < -0.00102

    1. Initial program 87.8%

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

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

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

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

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

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

    if -1.1500000000000001e78 < c < -2.9000000000000001e27 or -0.00102 < c < -4.69999999999999976e-172 or 3.24999999999999979e-118 < c < 2.40000000000000013e-46

    1. Initial program 93.0%

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

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

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

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

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

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

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

    if -4.69999999999999976e-172 < c < 3.24999999999999979e-118

    1. Initial program 100.0%

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

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

    if 2.40000000000000013e-46 < c < 4.00000000000000018e42

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if 4.00000000000000018e42 < c

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.15 \cdot 10^{+78}:\\ \;\;\;\;2 \cdot \left(x \cdot y - \left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -2.9 \cdot 10^{+27}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -0.00102:\\ \;\;\;\;2 \cdot \left(x \cdot y - \left(b \cdot i\right) \cdot \left(c \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -4.7 \cdot 10^{-172}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 3.25 \cdot 10^{-118}:\\ \;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 2.4 \cdot 10^{-46}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 4 \cdot 10^{+42}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \end{array} \]

Alternative 3: 74.4% accurate, 0.9× speedup?

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

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

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

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

\mathbf{elif}\;c \leq 1.45 \cdot 10^{+41}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(b \cdot c\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -9.99999999999999953e67 or 1.44999999999999994e41 < c

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

    if -9.99999999999999953e67 < c < 2.7500000000000001e-118

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

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

    if 2.7500000000000001e-118 < c < 2.3999999999999999e-47

    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 a around inf 88.0%

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

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

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

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

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

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

    if 2.3999999999999999e-47 < c < 1.44999999999999994e41

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;c \leq 6.8 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 9.4 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.80000000000000014e62 or 9.40000000000000047e32 < c

    1. Initial program 85.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. fma-def85.0%

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

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

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

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

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

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

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

    if -2.80000000000000014e62 < c < 6.80000000000000047e-119 or 8.1999999999999996e-10 < c < 9.40000000000000047e32

    1. Initial program 98.3%

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

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

    if 6.80000000000000047e-119 < c < 8.1999999999999996e-10

    1. Initial program 90.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.8 \cdot 10^{+62}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \mathbf{elif}\;c \leq 6.8 \cdot 10^{-119}:\\ \;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 8.2 \cdot 10^{-10}:\\ \;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 9.4 \cdot 10^{+32}:\\ \;\;\;\;\left(z \cdot t + x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\ \end{array} \]

Alternative 5: 79.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.5 \cdot 10^{+30} \lor \neg \left(c \leq 7.8 \cdot 10^{-119}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -5.50000000000000025e30 or 7.7999999999999998e-119 < c

    1. Initial program 86.4%

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

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

    if -5.50000000000000025e30 < c < 7.7999999999999998e-119

    1. Initial program 99.0%

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

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

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

Alternative 6: 85.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.8 \cdot 10^{+81} \lor \neg \left(c \leq 3.25 \cdot 10^{-118}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.79999999999999995e81 or 3.24999999999999979e-118 < c

    1. Initial program 86.1%

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

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

    if -2.79999999999999995e81 < c < 3.24999999999999979e-118

    1. Initial program 98.2%

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

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

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

Alternative 7: 73.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+51}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.10000000000000017e205

    1. Initial program 87.1%

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

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

    if -3.10000000000000017e205 < x < 1.1999999999999999e51

    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. Taylor expanded in x around 0 82.5%

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

    if 1.1999999999999999e51 < x

    1. Initial program 84.4%

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

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

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

Alternative 8: 83.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 86.0%

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

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

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

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

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

        \[\leadsto 2 \cdot \left(z \cdot t + \left(x \cdot y + \left(-\color{blue}{\left(c \cdot b\right) \cdot \left(c \cdot i\right)}\right)\right)\right) \]
      5. distribute-rgt-neg-in90.3%

        \[\leadsto 2 \cdot \left(z \cdot t + \left(x \cdot y + \color{blue}{\left(c \cdot b\right) \cdot \left(-c \cdot i\right)}\right)\right) \]
      6. distribute-rgt-neg-in90.3%

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

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

    if -7.99999999999999937e81 < c < 3.24999999999999979e-118

    1. Initial program 98.2%

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

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

    if 3.24999999999999979e-118 < c

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

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

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

Alternative 9: 48.5% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;c \leq 1.8 \cdot 10^{-199}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -4.5999999999999998e81 or 4.8999999999999998e-29 < 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. Step-by-step derivation
      1. fma-def85.6%

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

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

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

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

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

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

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

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

    if -4.5999999999999998e81 < c < -3.69999999999999999e-199

    1. Initial program 96.2%

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

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

    if -3.69999999999999999e-199 < c < 1.8000000000000001e-199

    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. fma-def99.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
    5. Step-by-step derivation
      1. associate-*r*63.4%

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
    6. Simplified63.4%

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

    if 1.8000000000000001e-199 < c < 4.8999999999999998e-29

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
    9. Step-by-step derivation
      1. *-commutative67.6%

        \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
      2. associate-*r*67.7%

        \[\leadsto \color{blue}{\left(2 \cdot z\right) \cdot t} \]
    10. Simplified67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.6 \cdot 10^{+81}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -3.7 \cdot 10^{-199}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \mathbf{elif}\;c \leq 4.9 \cdot 10^{-29}:\\ \;\;\;\;t \cdot \left(z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]

Alternative 10: 48.7% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;c \leq 1.45 \cdot 10^{-199}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.79999999999999995e81 or 4.8999999999999998e-29 < 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. Step-by-step derivation
      1. fma-def85.6%

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

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

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

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

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

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

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

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

    if -2.79999999999999995e81 < c < -7.5000000000000003e-199

    1. Initial program 96.2%

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

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

    if -7.5000000000000003e-199 < c < 1.45e-199

    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. fma-def99.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
    5. Step-by-step derivation
      1. associate-*r*63.4%

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
    6. Simplified63.4%

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

    if 1.45e-199 < c < 4.8999999999999998e-29

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
    9. Step-by-step derivation
      1. *-commutative67.6%

        \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
      2. associate-*r*67.7%

        \[\leadsto \color{blue}{\left(2 \cdot z\right) \cdot t} \]
    10. Simplified67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.8 \cdot 10^{+81}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \mathbf{elif}\;c \leq -7.5 \cdot 10^{-199}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \mathbf{elif}\;c \leq 4.9 \cdot 10^{-29}:\\ \;\;\;\;t \cdot \left(z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\ \end{array} \]

Alternative 11: 75.4% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 85.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. fma-def85.0%

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

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

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

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

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

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

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

    if -5.69999999999999998e62 < c < 2.15000000000000014e33

    1. Initial program 97.1%

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

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

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

Alternative 12: 38.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+205}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -2.05 \cdot 10^{+80}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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

\mathbf{elif}\;x \leq 1.8 \cdot 10^{+49}:\\
\;\;\;\;t \cdot \left(z \cdot 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.19999999999999996e205 or 1.79999999999999998e49 < x

    1. Initial program 85.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
    5. Step-by-step derivation
      1. associate-*r*53.4%

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
    6. Simplified53.4%

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

    if -3.19999999999999996e205 < x < -2.05000000000000001e80

    1. Initial program 81.1%

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

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

    if -2.05000000000000001e80 < x < -320

    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. fma-def94.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -320 < x < 1.79999999999999998e49

    1. Initial program 96.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. Step-by-step derivation
      1. associate-*r*97.2%

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

        \[\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. +-commutative97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
    9. Step-by-step derivation
      1. *-commutative46.7%

        \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
      2. associate-*r*46.7%

        \[\leadsto \color{blue}{\left(2 \cdot z\right) \cdot t} \]
    10. Simplified46.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+205}:\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \mathbf{elif}\;x \leq -2.05 \cdot 10^{+80}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \leq -320:\\ \;\;\;\;a \cdot \left(\left(c \cdot i\right) \cdot -2\right)\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+49}:\\ \;\;\;\;t \cdot \left(z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \end{array} \]

Alternative 13: 37.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+205}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1 \cdot 10^{+80}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.7999999999999997e205 or 1.69999999999999998e38 < x

    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. fma-def87.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
    5. Step-by-step derivation
      1. associate-*r*52.1%

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
    6. Simplified52.1%

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

    if -7.7999999999999997e205 < x < -1e80

    1. Initial program 81.1%

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

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

    if -1e80 < x < -290

    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. fma-def94.1%

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

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

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

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

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

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

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

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

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

    if -290 < x < 1.69999999999999998e38

    1. Initial program 96.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. Step-by-step derivation
      1. associate-*r*97.2%

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

        \[\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. +-commutative97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
    9. Step-by-step derivation
      1. *-commutative46.6%

        \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
      2. associate-*r*46.6%

        \[\leadsto \color{blue}{\left(2 \cdot z\right) \cdot t} \]
    10. Simplified46.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+205}:\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \mathbf{elif}\;x \leq -1 \cdot 10^{+80}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \leq -290:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \end{array} \]

Alternative 14: 69.1% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.80000000000000007e82 or 1.19999999999999993e34 < c

    1. Initial program 84.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. Step-by-step derivation
      1. fma-def84.5%

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

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

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

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

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

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

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

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

    if -1.80000000000000007e82 < c < 1.19999999999999993e34

    1. Initial program 97.1%

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

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

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

Alternative 15: 68.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.4 \cdot 10^{+81} \lor \neg \left(c \leq 2.8 \cdot 10^{+33}\right):\\
\;\;\;\;b \cdot \left(i \cdot \left(c \cdot \left(c \cdot -2\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -5.3999999999999999e81 or 2.8000000000000001e33 < c

    1. Initial program 84.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. Step-by-step derivation
      1. associate-*r*92.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. *-commutative92.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. +-commutative92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999999e81 < c < 2.8000000000000001e33

    1. Initial program 97.1%

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

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

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

Alternative 16: 68.4% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 86.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. fma-def86.0%

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999975e82 < c < 1.35e34

    1. Initial program 97.1%

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

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

    if 1.35e34 < c

    1. Initial program 83.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. fma-def83.6%

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

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

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

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

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

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

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

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

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

Alternative 17: 37.8% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{+205} \lor \neg \left(x \leq 7.5 \cdot 10^{+32}\right):\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -3.8e+205) (not (<= x 7.5e+32)))
   (* 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 <= -3.8e+205) || !(x <= 7.5e+32)) {
		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 <= (-3.8d+205)) .or. (.not. (x <= 7.5d+32))) 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 <= -3.8e+205) || !(x <= 7.5e+32)) {
		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 <= -3.8e+205) or not (x <= 7.5e+32):
		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 ((x <= -3.8e+205) || !(x <= 7.5e+32))
		tmp = Float64(x * Float64(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 <= -3.8e+205) || ~((x <= 7.5e+32)))
		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[x, -3.8e+205], N[Not[LessEqual[x, 7.5e+32]], $MachinePrecision]], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+205} \lor \neg \left(x \leq 7.5 \cdot 10^{+32}\right):\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.8e205 or 7.49999999999999959e32 < x

    1. Initial program 86.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. fma-def87.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
    5. Step-by-step derivation
      1. associate-*r*52.1%

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
    6. Simplified52.1%

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

    if -3.8e205 < x < 7.49999999999999959e32

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

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

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

Alternative 18: 37.8% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+205} \lor \neg \left(x \leq 8.5 \cdot 10^{+43}\right):\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.7999999999999997e205 or 8.5e43 < x

    1. Initial program 85.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
    5. Step-by-step derivation
      1. associate-*r*53.4%

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
    6. Simplified53.4%

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

    if -7.7999999999999997e205 < x < 8.5e43

    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-*r*96.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. *-commutative96.2%

        \[\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. +-commutative96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
    9. Step-by-step derivation
      1. *-commutative41.5%

        \[\leadsto 2 \cdot \color{blue}{\left(z \cdot t\right)} \]
      2. associate-*r*41.5%

        \[\leadsto \color{blue}{\left(2 \cdot z\right) \cdot t} \]
    10. Simplified41.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+205} \lor \neg \left(x \leq 8.5 \cdot 10^{+43}\right):\\ \;\;\;\;x \cdot \left(y \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot 2\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 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 35.8%

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

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

Developer target: 93.9% 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 2023185 
(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))))