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

Percentage Accurate: 89.4% → 94.5%
Time: 15.8s
Alternatives: 18
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 89.4% accurate, 1.0× speedup?

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

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

Alternative 1: 94.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot c\\ t_2 := c \cdot \left(t_1 \cdot i\right)\\ t_3 := i \cdot \left(c \cdot t_1\right)\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;-2 \cdot t_2\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+283}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - t_3\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ a (* b c))) (t_2 (* c (* t_1 i))) (t_3 (* i (* c t_1))))
   (if (<= t_3 (- INFINITY))
     (* -2.0 t_2)
     (if (<= t_3 4e+283)
       (* 2.0 (- (+ (* z t) (* x y)) t_3))
       (* 2.0 (- (* z t) t_2))))))
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 t_3 = i * (c * t_1);
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = -2.0 * t_2;
	} else if (t_3 <= 4e+283) {
		tmp = 2.0 * (((z * t) + (x * y)) - t_3);
	} else {
		tmp = 2.0 * ((z * t) - t_2);
	}
	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 t_3 = i * (c * t_1);
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = -2.0 * t_2;
	} else if (t_3 <= 4e+283) {
		tmp = 2.0 * (((z * t) + (x * y)) - t_3);
	} else {
		tmp = 2.0 * ((z * t) - t_2);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = a + (b * c)
	t_2 = c * (t_1 * i)
	t_3 = i * (c * t_1)
	tmp = 0
	if t_3 <= -math.inf:
		tmp = -2.0 * t_2
	elif t_3 <= 4e+283:
		tmp = 2.0 * (((z * t) + (x * y)) - t_3)
	else:
		tmp = 2.0 * ((z * t) - t_2)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(a + Float64(b * c))
	t_2 = Float64(c * Float64(t_1 * i))
	t_3 = Float64(i * Float64(c * t_1))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(-2.0 * t_2);
	elseif (t_3 <= 4e+283)
		tmp = Float64(2.0 * Float64(Float64(Float64(z * t) + Float64(x * y)) - t_3));
	else
		tmp = Float64(2.0 * Float64(Float64(z * t) - t_2));
	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);
	t_3 = i * (c * t_1);
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = -2.0 * t_2;
	elseif (t_3 <= 4e+283)
		tmp = 2.0 * (((z * t) + (x * y)) - t_3);
	else
		tmp = 2.0 * ((z * t) - t_2);
	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[(c * N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(-2.0 * t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 4e+283], N[(2.0 * N[(N[(N[(z * t), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+283}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - t_3\right)\\

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


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

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

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

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

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

    1. Initial program 99.2%

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

    if 3.99999999999999982e283 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 80.5%

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

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

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

Alternative 2: 94.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ 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) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (fma 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 * (fma(x, y, (z * t)) - ((a + (b * c)) * (c * i)));
}
function code(x, y, z, t, a, b, c, i)
	return Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(x * y + 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(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
Derivation
  1. Initial program 92.7%

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

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

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

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

    \[\leadsto 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) \]

Alternative 3: 62.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;c \leq -3.4 \cdot 10^{-221}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 5.8 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 7.8 \cdot 10^{-68}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 8600:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 8.5 \cdot 10^{+74}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -4.30000000000000024e41 or 8.50000000000000028e74 < c

    1. Initial program 83.4%

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

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

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

    if -4.30000000000000024e41 < c < -3.4000000000000001e-221 or 9.00000000000000017e-308 < c < 5.79999999999999981e-159 or 7.80000000000000064e-68 < c < 8600

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

    if -3.4000000000000001e-221 < c < 9.00000000000000017e-308

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

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

    if 5.79999999999999981e-159 < c < 7.80000000000000064e-68 or 8600 < c < 8.50000000000000028e74

    1. Initial program 97.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.3 \cdot 10^{+41}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -3.4 \cdot 10^{-221}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 9 \cdot 10^{-308}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 5.8 \cdot 10^{-159}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 7.8 \cdot 10^{-68}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 8600:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+74}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 4: 61.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;c \leq -2.05 \cdot 10^{-227}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;c \leq 6.6 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.8 \cdot 10^{-67}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 500000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 7.5 \cdot 10^{+75}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -1.46e-8

    1. Initial program 85.5%

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

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

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

    if -1.46e-8 < c < -2.05000000000000005e-227 or 1.75000000000000009e-306 < c < 6.6000000000000003e-159 or 1.8e-67 < c < 5e11

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

    if -2.05000000000000005e-227 < c < 1.75000000000000009e-306

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

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

    if 6.6000000000000003e-159 < c < 1.8e-67 or 5e11 < c < 7.4999999999999995e75

    1. Initial program 97.6%

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

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

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

    if 7.4999999999999995e75 < c

    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 i around inf 86.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.46 \cdot 10^{-8}:\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq -2.05 \cdot 10^{-227}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-306}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 6.6 \cdot 10^{-159}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.8 \cdot 10^{-67}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{elif}\;c \leq 500000000000:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 7.5 \cdot 10^{+75}:\\ \;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 5: 47.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;c \leq -1.6 \cdot 10^{-224}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.45 \cdot 10^{-304}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 2 \cdot 10^{-197}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.05 \cdot 10^{-68}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 2.1 \cdot 10^{+15}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 7.2 \cdot 10^{+75}:\\
\;\;\;\;t_2\\

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


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

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

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

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

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

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

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

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

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

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

    if -6e15 < c < -1.5999999999999999e-224 or 1.45e-304 < c < 2e-197 or 1.05000000000000004e-68 < c < 2.1e15

    1. Initial program 98.7%

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

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

    if -1.5999999999999999e-224 < c < 1.45e-304 or 2e-197 < c < 1.05000000000000004e-68 or 2.1e15 < c < 7.2e75

    1. Initial program 98.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 inf 64.9%

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

    if 7.2e75 < c

    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 67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -6 \cdot 10^{+15}:\\ \;\;\;\;\left(i \cdot \left(c \cdot c\right)\right) \cdot \left(b \cdot -2\right)\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{-224}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{-304}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 2 \cdot 10^{-197}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.05 \cdot 10^{-68}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{+15}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 7.2 \cdot 10^{+75}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(i \cdot \left(c \cdot \left(c \cdot \left(-b\right)\right)\right)\right)\\ \end{array} \]

Alternative 6: 48.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;c \leq -7.8 \cdot 10^{-224}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq -2.2 \cdot 10^{-307}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 3.4 \cdot 10^{-198}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 2.7 \cdot 10^{-66}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;c \leq 11500000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.12 \cdot 10^{+75}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4.49999999999999979e47 or 1.12000000000000001e75 < 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. Taylor expanded in i around inf 81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999979e47 < c < -7.7999999999999996e-224 or -2.2e-307 < c < 3.3999999999999998e-198 or 2.69999999999999996e-66 < c < 1.15e13

    1. Initial program 98.8%

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

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

    if -7.7999999999999996e-224 < c < -2.2e-307 or 3.3999999999999998e-198 < c < 2.69999999999999996e-66 or 1.15e13 < c < 1.12000000000000001e75

    1. Initial program 98.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 inf 64.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4.5 \cdot 10^{+47}:\\ \;\;\;\;c \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot -2\right)\right)\\ \mathbf{elif}\;c \leq -7.8 \cdot 10^{-224}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq -2.2 \cdot 10^{-307}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 3.4 \cdot 10^{-198}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{-66}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 11500000000000:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.12 \cdot 10^{+75}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot -2\right)\right)\\ \end{array} \]

Alternative 7: 47.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;c \leq 10^{-306}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 8.5 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 3.5 \cdot 10^{-67}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 3.1 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 8.5 \cdot 10^{+74}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.1999999999999999e47

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

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

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

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

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

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

    if -2.1999999999999999e47 < c < -2.40000000000000024e-221 or 1.00000000000000003e-306 < c < 8.5000000000000007e-201 or 3.5e-67 < c < 3.1e14

    1. Initial program 98.8%

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

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

    if -2.40000000000000024e-221 < c < 1.00000000000000003e-306 or 8.5000000000000007e-201 < c < 3.5e-67 or 3.1e14 < c < 8.50000000000000028e74

    1. Initial program 98.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 inf 64.9%

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

    if 8.50000000000000028e74 < c

    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 i around inf 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -2.2 \cdot 10^{+47}:\\ \;\;\;\;\left(b \cdot i\right) \cdot \left(-2 \cdot \left(c \cdot c\right)\right)\\ \mathbf{elif}\;c \leq -2.4 \cdot 10^{-221}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 10^{-306}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{-201}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{-67}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 3.1 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 8.5 \cdot 10^{+74}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot -2\right)\right)\\ \end{array} \]

Alternative 8: 47.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(z \cdot t\right)\\ t_2 := 2 \cdot \left(x \cdot y\right)\\ \mathbf{if}\;c \leq -1.75 \cdot 10^{+16}:\\ \;\;\;\;\left(i \cdot \left(c \cdot c\right)\right) \cdot \left(b \cdot -2\right)\\ \mathbf{elif}\;c \leq -5.8 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-307}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5.1 \cdot 10^{-68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 4.9 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 8.4 \cdot 10^{+74}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot -2\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* 2.0 (* z t))) (t_2 (* 2.0 (* x y))))
   (if (<= c -1.75e+16)
     (* (* i (* c c)) (* b -2.0))
     (if (<= c -5.8e-226)
       t_1
       (if (<= c 1.4e-307)
         t_2
         (if (<= c 3.6e-196)
           t_1
           (if (<= c 5.1e-68)
             t_2
             (if (<= c 4.9e+14)
               t_1
               (if (<= c 8.4e+74) t_2 (* c (* (* b i) (* 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);
	double t_2 = 2.0 * (x * y);
	double tmp;
	if (c <= -1.75e+16) {
		tmp = (i * (c * c)) * (b * -2.0);
	} else if (c <= -5.8e-226) {
		tmp = t_1;
	} else if (c <= 1.4e-307) {
		tmp = t_2;
	} else if (c <= 3.6e-196) {
		tmp = t_1;
	} else if (c <= 5.1e-68) {
		tmp = t_2;
	} else if (c <= 4.9e+14) {
		tmp = t_1;
	} else if (c <= 8.4e+74) {
		tmp = t_2;
	} else {
		tmp = c * ((b * i) * (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)
    t_2 = 2.0d0 * (x * y)
    if (c <= (-1.75d+16)) then
        tmp = (i * (c * c)) * (b * (-2.0d0))
    else if (c <= (-5.8d-226)) then
        tmp = t_1
    else if (c <= 1.4d-307) then
        tmp = t_2
    else if (c <= 3.6d-196) then
        tmp = t_1
    else if (c <= 5.1d-68) then
        tmp = t_2
    else if (c <= 4.9d+14) then
        tmp = t_1
    else if (c <= 8.4d+74) then
        tmp = t_2
    else
        tmp = c * ((b * i) * (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);
	double t_2 = 2.0 * (x * y);
	double tmp;
	if (c <= -1.75e+16) {
		tmp = (i * (c * c)) * (b * -2.0);
	} else if (c <= -5.8e-226) {
		tmp = t_1;
	} else if (c <= 1.4e-307) {
		tmp = t_2;
	} else if (c <= 3.6e-196) {
		tmp = t_1;
	} else if (c <= 5.1e-68) {
		tmp = t_2;
	} else if (c <= 4.9e+14) {
		tmp = t_1;
	} else if (c <= 8.4e+74) {
		tmp = t_2;
	} else {
		tmp = c * ((b * i) * (c * -2.0));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = 2.0 * (z * t)
	t_2 = 2.0 * (x * y)
	tmp = 0
	if c <= -1.75e+16:
		tmp = (i * (c * c)) * (b * -2.0)
	elif c <= -5.8e-226:
		tmp = t_1
	elif c <= 1.4e-307:
		tmp = t_2
	elif c <= 3.6e-196:
		tmp = t_1
	elif c <= 5.1e-68:
		tmp = t_2
	elif c <= 4.9e+14:
		tmp = t_1
	elif c <= 8.4e+74:
		tmp = t_2
	else:
		tmp = c * ((b * i) * (c * -2.0))
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(2.0 * Float64(z * t))
	t_2 = Float64(2.0 * Float64(x * y))
	tmp = 0.0
	if (c <= -1.75e+16)
		tmp = Float64(Float64(i * Float64(c * c)) * Float64(b * -2.0));
	elseif (c <= -5.8e-226)
		tmp = t_1;
	elseif (c <= 1.4e-307)
		tmp = t_2;
	elseif (c <= 3.6e-196)
		tmp = t_1;
	elseif (c <= 5.1e-68)
		tmp = t_2;
	elseif (c <= 4.9e+14)
		tmp = t_1;
	elseif (c <= 8.4e+74)
		tmp = t_2;
	else
		tmp = Float64(c * Float64(Float64(b * i) * Float64(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);
	t_2 = 2.0 * (x * y);
	tmp = 0.0;
	if (c <= -1.75e+16)
		tmp = (i * (c * c)) * (b * -2.0);
	elseif (c <= -5.8e-226)
		tmp = t_1;
	elseif (c <= 1.4e-307)
		tmp = t_2;
	elseif (c <= 3.6e-196)
		tmp = t_1;
	elseif (c <= 5.1e-68)
		tmp = t_2;
	elseif (c <= 4.9e+14)
		tmp = t_1;
	elseif (c <= 8.4e+74)
		tmp = t_2;
	else
		tmp = c * ((b * i) * (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[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.75e+16], N[(N[(i * N[(c * c), $MachinePrecision]), $MachinePrecision] * N[(b * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -5.8e-226], t$95$1, If[LessEqual[c, 1.4e-307], t$95$2, If[LessEqual[c, 3.6e-196], t$95$1, If[LessEqual[c, 5.1e-68], t$95$2, If[LessEqual[c, 4.9e+14], t$95$1, If[LessEqual[c, 8.4e+74], t$95$2, N[(c * N[(N[(b * i), $MachinePrecision] * N[(c * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;c \leq -5.8 \cdot 10^{-226}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.4 \cdot 10^{-307}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 3.6 \cdot 10^{-196}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 5.1 \cdot 10^{-68}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 4.9 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 8.4 \cdot 10^{+74}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -1.75e16

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

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

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

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

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

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

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

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

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

    if -1.75e16 < c < -5.80000000000000003e-226 or 1.4e-307 < c < 3.6000000000000001e-196 or 5.09999999999999966e-68 < c < 4.9e14

    1. Initial program 98.7%

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

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

    if -5.80000000000000003e-226 < c < 1.4e-307 or 3.6000000000000001e-196 < c < 5.09999999999999966e-68 or 4.9e14 < c < 8.3999999999999995e74

    1. Initial program 98.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 inf 64.9%

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

    if 8.3999999999999995e74 < c

    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 i around inf 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.75 \cdot 10^{+16}:\\ \;\;\;\;\left(i \cdot \left(c \cdot c\right)\right) \cdot \left(b \cdot -2\right)\\ \mathbf{elif}\;c \leq -5.8 \cdot 10^{-226}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{-307}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{-196}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 5.1 \cdot 10^{-68}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 4.9 \cdot 10^{+14}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 8.4 \cdot 10^{+74}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(\left(b \cdot i\right) \cdot \left(c \cdot -2\right)\right)\\ \end{array} \]

Alternative 9: 55.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;c \leq -7 \cdot 10^{-226}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 5.4 \cdot 10^{-306}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 1.15 \cdot 10^{-199}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 6.4 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 2.35 \cdot 10^{-20}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -8.49999999999999976e-157 or 2.35000000000000007e-20 < c

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

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

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

    if -8.49999999999999976e-157 < c < -7e-226 or 5.40000000000000018e-306 < c < 1.1500000000000001e-199 or 6.39999999999999963e-66 < c < 2.35000000000000007e-20

    1. Initial program 97.7%

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

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

    if -7e-226 < c < 5.40000000000000018e-306 or 1.1500000000000001e-199 < c < 6.39999999999999963e-66

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -8.5 \cdot 10^{-157}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -7 \cdot 10^{-226}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 5.4 \cdot 10^{-306}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-199}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;c \leq 6.4 \cdot 10^{-66}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 2.35 \cdot 10^{-20}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 10: 62.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;c \leq -1.9 \cdot 10^{-224}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 1.7 \cdot 10^{-307}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 7 \cdot 10^{-146}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;c \leq 1.15 \cdot 10^{-76}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;c \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -6.90000000000000005e39 or 5.8e-18 < c

    1. Initial program 85.5%

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

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

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

    if -6.90000000000000005e39 < c < -1.90000000000000001e-224 or 1.69999999999999994e-307 < c < 7.0000000000000003e-146 or 1.15000000000000003e-76 < c < 5.8e-18

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

    if -1.90000000000000001e-224 < c < 1.69999999999999994e-307 or 7.0000000000000003e-146 < c < 1.15000000000000003e-76

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -6.9 \cdot 10^{+39}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{elif}\;c \leq -1.9 \cdot 10^{-224}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.7 \cdot 10^{-307}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 7 \cdot 10^{-146}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{-76}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;c \leq 5.8 \cdot 10^{-18}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 11: 85.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -9.2 \cdot 10^{-10} \lor \neg \left(c \leq 1.5 \cdot 10^{+75}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(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 -9.2e-10) (not (<= c 1.5e+75)))
   (* 2.0 (- (* z t) (* c (* (+ a (* b c)) i))))
   (* 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 <= -9.2e-10) || !(c <= 1.5e+75)) {
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	} 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 <= (-9.2d-10)) .or. (.not. (c <= 1.5d+75))) then
        tmp = 2.0d0 * ((z * t) - (c * ((a + (b * c)) * i)))
    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 <= -9.2e-10) || !(c <= 1.5e+75)) {
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	} 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 <= -9.2e-10) or not (c <= 1.5e+75):
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)))
	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 <= -9.2e-10) || !(c <= 1.5e+75))
		tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a + Float64(b * c)) * i))));
	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 <= -9.2e-10) || ~((c <= 1.5e+75)))
		tmp = 2.0 * ((z * t) - (c * ((a + (b * c)) * i)));
	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, -9.2e-10], N[Not[LessEqual[c, 1.5e+75]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * i), $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 -9.2 \cdot 10^{-10} \lor \neg \left(c \leq 1.5 \cdot 10^{+75}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(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 < -9.20000000000000028e-10 or 1.5e75 < c

    1. Initial program 85.7%

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

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

    if -9.20000000000000028e-10 < c < 1.5e75

    1. Initial program 98.5%

      \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \]
    2. Taylor expanded in a around inf 94.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 simplification92.3%

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

Alternative 12: 68.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+260}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\

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

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


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

    1. Initial program 90.9%

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

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

    if -7.1999999999999995e260 < x < 2.99999999999999979e-63

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

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

    if 2.99999999999999979e-63 < x

    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. Taylor expanded in b around 0 76.3%

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

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

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

Alternative 13: 84.8% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -5.6e-11

    1. Initial program 85.5%

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

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

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

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

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

    if -5.6e-11 < c < 1.29999999999999992e75

    1. Initial program 98.5%

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

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

    if 1.29999999999999992e75 < c

    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 x around 0 92.0%

      \[\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 -5.6 \cdot 10^{-11}:\\ \;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - c \cdot \left(c \cdot \left(b \cdot i\right)\right)\right)\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{+75}:\\ \;\;\;\;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(\left(a + b \cdot c\right) \cdot i\right)\right)\\ \end{array} \]

Alternative 14: 38.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-199}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-95}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{-47}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2 \cdot 10^{+39}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.9e21 or 1.99999999999999988e39 < t

    1. Initial program 95.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 53.8%

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

    if -3.9e21 < t < 4.20000000000000004e-199 or 1.8999999999999999e-95 < t < 8.5999999999999995e-47

    1. Initial program 91.6%

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

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

    if 4.20000000000000004e-199 < t < 1.8999999999999999e-95 or 8.5999999999999995e-47 < t < 1.99999999999999988e39

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.9 \cdot 10^{+21}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-199}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-95}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+39}:\\ \;\;\;\;2 \cdot \left(a \cdot \left(c \cdot \left(-i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 15: 38.4% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 5 \cdot 10^{-198}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{-95}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-47}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 3650:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+94}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.4e27 or 1.7000000000000001e94 < t

    1. Initial program 95.8%

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

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

    if -1.4e27 < t < 4.9999999999999999e-198 or 1.95e-95 < t < 8.4999999999999999e-47 or 3650 < t < 1.7000000000000001e94

    1. Initial program 91.1%

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

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

    if 4.9999999999999999e-198 < t < 1.95e-95 or 8.4999999999999999e-47 < t < 3650

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+27}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-198}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-95}:\\ \;\;\;\;\left(a \cdot i\right) \cdot \left(c \cdot -2\right)\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 3650:\\ \;\;\;\;\left(a \cdot i\right) \cdot \left(c \cdot -2\right)\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+94}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 16: 38.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 1.22 \cdot 10^{-198}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.75 \cdot 10^{-95}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 7.7 \cdot 10^{-47}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{+41}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0000000000000001e26 or 1.75e41 < t

    1. Initial program 95.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 53.8%

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

    if -2.0000000000000001e26 < t < 1.22e-198 or 2.75000000000000001e-95 < t < 7.6999999999999999e-47

    1. Initial program 91.6%

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

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

    if 1.22e-198 < t < 2.75000000000000001e-95 or 7.6999999999999999e-47 < t < 1.75e41

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+26}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-198}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-95}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;t \leq 7.7 \cdot 10^{-47}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{+41}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 17: 39.5% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+25} \lor \neg \left(t \leq 5.4 \cdot 10^{+93}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.79999999999999992e25 or 5.3999999999999999e93 < t

    1. Initial program 95.8%

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

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

    if -4.79999999999999992e25 < t < 5.3999999999999999e93

    1. Initial program 90.9%

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

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

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

Alternative 18: 29.4% 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 92.7%

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

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

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

Developer target: 93.8% 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 2023268 
(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))))