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

Percentage Accurate: 90.3% → 95.2%
Time: 14.8s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 90.3% accurate, 1.0× speedup?

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

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

Alternative 1: 95.2% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot 2\\


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

    1. Initial program 94.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-def94.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. associate-*l*98.0%

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

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

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

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

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

    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. Add Preprocessing
    3. Taylor expanded in c around 0 53.3%

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

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

Alternative 2: 42.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := \left(x \cdot y\right) \cdot 2\\ \mathbf{if}\;x \cdot y \leq -1.7 \cdot 10^{+185}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq -1.06 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq -2.15 \cdot 10^{+25}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq -1.75 \cdot 10^{-147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq -9 \cdot 10^{-266}:\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\ \mathbf{elif}\;x \cdot y \leq 8.2 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 7.8 \cdot 10^{-122}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 6 \cdot 10^{-32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{+71}:\\ \;\;\;\;c \cdot \left(i \cdot \left(a \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t))) (t_2 (* (* x y) 2.0)))
   (if (<= (* x y) -1.7e+185)
     t_2
     (if (<= (* x y) -1.06e+156)
       t_1
       (if (<= (* x y) -2.15e+25)
         t_2
         (if (<= (* x y) -1.75e-147)
           t_1
           (if (<= (* x y) -9e-266)
             (* (* c i) (* a -2.0))
             (if (<= (* x y) 8.2e-172)
               t_1
               (if (<= (* x y) 7.8e-122)
                 (* 2.0 (* a (* c i)))
                 (if (<= (* x y) 6e-32)
                   t_1
                   (if (<= (* x y) 3.5e+71)
                     (* c (* i (* a -2.0)))
                     t_2)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -1.7e+185) {
		tmp = t_2;
	} else if ((x * y) <= -1.06e+156) {
		tmp = t_1;
	} else if ((x * y) <= -2.15e+25) {
		tmp = t_2;
	} else if ((x * y) <= -1.75e-147) {
		tmp = t_1;
	} else if ((x * y) <= -9e-266) {
		tmp = (c * i) * (a * -2.0);
	} else if ((x * y) <= 8.2e-172) {
		tmp = t_1;
	} else if ((x * y) <= 7.8e-122) {
		tmp = 2.0 * (a * (c * i));
	} else if ((x * y) <= 6e-32) {
		tmp = t_1;
	} else if ((x * y) <= 3.5e+71) {
		tmp = c * (i * (a * -2.0));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 2.0d0 * (z * t)
    t_2 = (x * y) * 2.0d0
    if ((x * y) <= (-1.7d+185)) then
        tmp = t_2
    else if ((x * y) <= (-1.06d+156)) then
        tmp = t_1
    else if ((x * y) <= (-2.15d+25)) then
        tmp = t_2
    else if ((x * y) <= (-1.75d-147)) then
        tmp = t_1
    else if ((x * y) <= (-9d-266)) then
        tmp = (c * i) * (a * (-2.0d0))
    else if ((x * y) <= 8.2d-172) then
        tmp = t_1
    else if ((x * y) <= 7.8d-122) then
        tmp = 2.0d0 * (a * (c * i))
    else if ((x * y) <= 6d-32) then
        tmp = t_1
    else if ((x * y) <= 3.5d+71) then
        tmp = c * (i * (a * (-2.0d0)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = 2.0 * (z * t);
	double t_2 = (x * y) * 2.0;
	double tmp;
	if ((x * y) <= -1.7e+185) {
		tmp = t_2;
	} else if ((x * y) <= -1.06e+156) {
		tmp = t_1;
	} else if ((x * y) <= -2.15e+25) {
		tmp = t_2;
	} else if ((x * y) <= -1.75e-147) {
		tmp = t_1;
	} else if ((x * y) <= -9e-266) {
		tmp = (c * i) * (a * -2.0);
	} else if ((x * y) <= 8.2e-172) {
		tmp = t_1;
	} else if ((x * y) <= 7.8e-122) {
		tmp = 2.0 * (a * (c * i));
	} else if ((x * y) <= 6e-32) {
		tmp = t_1;
	} else if ((x * y) <= 3.5e+71) {
		tmp = c * (i * (a * -2.0));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = (x * y) * 2.0
	tmp = 0
	if (x * y) <= -1.7e+185:
		tmp = t_2
	elif (x * y) <= -1.06e+156:
		tmp = t_1
	elif (x * y) <= -2.15e+25:
		tmp = t_2
	elif (x * y) <= -1.75e-147:
		tmp = t_1
	elif (x * y) <= -9e-266:
		tmp = (c * i) * (a * -2.0)
	elif (x * y) <= 8.2e-172:
		tmp = t_1
	elif (x * y) <= 7.8e-122:
		tmp = 2.0 * (a * (c * i))
	elif (x * y) <= 6e-32:
		tmp = t_1
	elif (x * y) <= 3.5e+71:
		tmp = c * (i * (a * -2.0))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(Float64(x * y) * 2.0)
	tmp = 0.0
	if (Float64(x * y) <= -1.7e+185)
		tmp = t_2;
	elseif (Float64(x * y) <= -1.06e+156)
		tmp = t_1;
	elseif (Float64(x * y) <= -2.15e+25)
		tmp = t_2;
	elseif (Float64(x * y) <= -1.75e-147)
		tmp = t_1;
	elseif (Float64(x * y) <= -9e-266)
		tmp = Float64(Float64(c * i) * Float64(a * -2.0));
	elseif (Float64(x * y) <= 8.2e-172)
		tmp = t_1;
	elseif (Float64(x * y) <= 7.8e-122)
		tmp = Float64(2.0 * Float64(a * Float64(c * i)));
	elseif (Float64(x * y) <= 6e-32)
		tmp = t_1;
	elseif (Float64(x * y) <= 3.5e+71)
		tmp = Float64(c * Float64(i * Float64(a * -2.0)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = 2.0 * (z * t);
	t_2 = (x * y) * 2.0;
	tmp = 0.0;
	if ((x * y) <= -1.7e+185)
		tmp = t_2;
	elseif ((x * y) <= -1.06e+156)
		tmp = t_1;
	elseif ((x * y) <= -2.15e+25)
		tmp = t_2;
	elseif ((x * y) <= -1.75e-147)
		tmp = t_1;
	elseif ((x * y) <= -9e-266)
		tmp = (c * i) * (a * -2.0);
	elseif ((x * y) <= 8.2e-172)
		tmp = t_1;
	elseif ((x * y) <= 7.8e-122)
		tmp = 2.0 * (a * (c * i));
	elseif ((x * y) <= 6e-32)
		tmp = t_1;
	elseif ((x * y) <= 3.5e+71)
		tmp = c * (i * (a * -2.0));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.7e+185], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1.06e+156], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -2.15e+25], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1.75e-147], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -9e-266], N[(N[(c * i), $MachinePrecision] * N[(a * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 8.2e-172], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 7.8e-122], N[(2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 6e-32], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.5e+71], N[(c * N[(i * N[(a * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \cdot y \leq -1.06 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq -2.15 \cdot 10^{+25}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \cdot y \leq -1.75 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 8.2 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 x y) < -1.70000000000000009e185 or -1.05999999999999993e156 < (*.f64 x y) < -2.14999999999999999e25 or 3.4999999999999999e71 < (*.f64 x y)

    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. Add Preprocessing
    3. Taylor expanded in x around inf 65.3%

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

    if -1.70000000000000009e185 < (*.f64 x y) < -1.05999999999999993e156 or -2.14999999999999999e25 < (*.f64 x y) < -1.75000000000000002e-147 or -9.0000000000000006e-266 < (*.f64 x y) < 8.2e-172 or 7.79999999999999979e-122 < (*.f64 x y) < 6.0000000000000001e-32

    1. Initial program 93.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. Add Preprocessing
    3. Taylor expanded in z around inf 49.9%

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

    if -1.75000000000000002e-147 < (*.f64 x y) < -9.0000000000000006e-266

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

    if 8.2e-172 < (*.f64 x y) < 7.79999999999999979e-122

    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. Add Preprocessing
    3. Taylor expanded in a around inf 10.1%

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

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000001e-32 < (*.f64 x y) < 3.4999999999999999e71

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in i around inf 79.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.7 \cdot 10^{+185}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq -1.06 \cdot 10^{+156}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq -2.15 \cdot 10^{+25}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \cdot y \leq -1.75 \cdot 10^{-147}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq -9 \cdot 10^{-266}:\\ \;\;\;\;\left(c \cdot i\right) \cdot \left(a \cdot -2\right)\\ \mathbf{elif}\;x \cdot y \leq 8.2 \cdot 10^{-172}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 7.8 \cdot 10^{-122}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 6 \cdot 10^{-32}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 3.5 \cdot 10^{+71}:\\ \;\;\;\;c \cdot \left(i \cdot \left(a \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 94.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := \left(c \cdot t\_1\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 5 \cdot 10^{+258}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(t\_1 \cdot i\right)\right)\\

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


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

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in i around inf 85.3%

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

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

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

    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. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification93.9%

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

Alternative 4: 49.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;c \leq -2.2 \cdot 10^{-115}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -3.6 \cdot 10^{-216}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;c \leq 1.4 \cdot 10^{-205}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 21500000:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.20000000000000023e71 or 2.15e7 < c

    1. Initial program 79.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. Add Preprocessing
    3. Taylor expanded in i around inf 74.0%

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

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

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

    if -3.20000000000000023e71 < c < -2.1999999999999999e-115 or -3.5999999999999999e-216 < c < 1.39999999999999996e-205

    1. Initial program 97.3%

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

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

    if -2.1999999999999999e-115 < c < -3.5999999999999999e-216 or 1.39999999999999996e-205 < c < 2.15e7

    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. Add Preprocessing
    3. Taylor expanded in z around inf 57.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.2 \cdot 10^{+71}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -2.2 \cdot 10^{-115}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq -3.6 \cdot 10^{-216}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-205}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;c \leq 21500000:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.3 \cdot 10^{+71} \lor \neg \left(c \leq 1.1 \cdot 10^{-79} \lor \neg \left(c \leq 9.2 \cdot 10^{+22}\right) \land c \leq 1.95 \cdot 10^{+52}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -3.2999999999999998e71 or 1.0999999999999999e-79 < c < 9.2000000000000008e22 or 1.95e52 < c

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in i around inf 78.5%

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

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

    if -3.2999999999999998e71 < c < 1.0999999999999999e-79 or 9.2000000000000008e22 < c < 1.95e52

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in c around 0 82.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -3.3 \cdot 10^{+71} \lor \neg \left(c \leq 1.1 \cdot 10^{-79} \lor \neg \left(c \leq 9.2 \cdot 10^{+22}\right) \land c \leq 1.95 \cdot 10^{+52}\right):\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 38.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \leq -1.12 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -4.7 \cdot 10^{-225}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 6.2 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 10^{-23}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -8e113 or 9.9999999999999996e-24 < x

    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. Add Preprocessing
    3. Taylor expanded in x around inf 46.4%

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

    if -8e113 < x < -1.12e83 or -4.70000000000000014e-225 < x < 6.1999999999999998e-204

    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. Add Preprocessing
    3. Taylor expanded in i around inf 64.1%

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

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

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

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

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

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

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

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

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

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

    if -1.12e83 < x < -4.70000000000000014e-225 or 6.1999999999999998e-204 < x < 9.9999999999999996e-24

    1. Initial program 88.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+113}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{+83}:\\ \;\;\;\;i \cdot \left(a \cdot \left(c \cdot -2\right)\right)\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{-225}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-204}:\\ \;\;\;\;i \cdot \left(a \cdot \left(c \cdot -2\right)\right)\\ \mathbf{elif}\;x \leq 10^{-23}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 40.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq 2.7 \cdot 10^{-277}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.4000000000000006e76 or 4.2e-7 < x

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in x around inf 44.9%

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

    if -9.4000000000000006e76 < x < 2.69999999999999975e-277 or 2.60000000000000017e-208 < x < 4.2e-7

    1. Initial program 90.4%

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

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

    if 2.69999999999999975e-277 < x < 2.60000000000000017e-208

    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. Add Preprocessing
    3. Taylor expanded in i around inf 73.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.4 \cdot 10^{+76}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-277}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-208}:\\ \;\;\;\;c \cdot \left(i \cdot \left(a \cdot -2\right)\right)\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-7}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 84.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.65 \cdot 10^{+76} \lor \neg \left(c \leq 3.3 \cdot 10^{+53}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.65e76 or 3.3000000000000002e53 < c

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in i around inf 80.3%

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

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

    if -1.65e76 < c < 3.3000000000000002e53

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in a around inf 88.5%

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

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

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

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

Alternative 9: 70.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 81.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. Add Preprocessing
    3. Taylor expanded in i around inf 86.4%

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

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

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

    if -2.30000000000000004e80 < c < 8.49999999999999994e52

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in c around 0 75.5%

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

    if 8.49999999999999994e52 < c

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in i around inf 73.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.3 \cdot 10^{+80}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+52}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 41.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{+77} \lor \neg \left(x \leq 0.000225\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.1199999999999999e77 or 2.2499999999999999e-4 < x

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in x around inf 44.9%

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

    if -1.1199999999999999e77 < x < 2.2499999999999999e-4

    1. Initial program 91.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. Add Preprocessing
    3. Taylor expanded in z around inf 32.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{+77} \lor \neg \left(x \leq 0.000225\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 29.8% accurate, 3.8× speedup?

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

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

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

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

    \[\leadsto 2 \cdot \left(z \cdot t\right) \]
  5. Add Preprocessing

Developer target: 94.2% accurate, 1.0× speedup?

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

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

Reproduce

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