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

Percentage Accurate: 90.1% → 96.2%
Time: 16.8s
Alternatives: 9
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 9 alternatives:

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

Initial Program: 90.1% accurate, 1.0× speedup?

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

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

Alternative 1: 96.2% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 95.3%

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

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

        \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
    3. Simplified98.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. Add Preprocessing

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(i \cdot a\right)\right)} \]
    7. Taylor expanded in x around inf 53.4%

      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot \left(y + -1 \cdot \frac{a \cdot \left(c \cdot i\right)}{x}\right)\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg53.4%

        \[\leadsto 2 \cdot \left(x \cdot \left(y + \color{blue}{\left(-\frac{a \cdot \left(c \cdot i\right)}{x}\right)}\right)\right) \]
      2. unsub-neg53.4%

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

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

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

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

Alternative 2: 93.8% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (+.f64 a (*.f64 b c)) c) < -9.99999999999999981e295 or 1.0000000000000001e243 < (*.f64 (+.f64 a (*.f64 b c)) c)

    1. Initial program 77.3%

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

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

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

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

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

    if -9.99999999999999981e295 < (*.f64 (+.f64 a (*.f64 b c)) c) < 1.0000000000000001e243

    1. Initial program 96.3%

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

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

Alternative 3: 83.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.18 \cdot 10^{+171} \lor \neg \left(c \leq 2.7 \cdot 10^{+109}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.1799999999999999e171 or 2.70000000000000001e109 < c

    1. Initial program 82.6%

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

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

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

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

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

    if -1.1799999999999999e171 < c < 2.70000000000000001e109

    1. Initial program 92.2%

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

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

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

Alternative 4: 64.8% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -4.99999999999999997e88 or 1.2e106 < c

    1. Initial program 82.1%

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

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

        \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
    3. Simplified86.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. Add Preprocessing
    5. Taylor expanded in b around inf 72.7%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999997e88 < c < -1.09999999999999999e-43

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.09999999999999999e-43 < c < 1.2e106

    1. Initial program 93.3%

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

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

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

Alternative 5: 71.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.64999999999999992e-124 or 4e3 < c

    1. Initial program 84.7%

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

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

        \[\leadsto 2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right) \]
    3. Simplified90.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. Add Preprocessing
    5. Taylor expanded in i around inf 73.5%

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

    if -1.64999999999999992e-124 < c < 4e3

    1. Initial program 97.0%

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

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

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

Alternative 6: 36.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-16}:\\
\;\;\;\;y \cdot \left(x \cdot 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.3000000000000001e102 or 2.55e-16 < z

    1. Initial program 87.3%

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

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

    if -4.3000000000000001e102 < z < -1.9000000000000001e-308

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-308 < z < 2.55e-16

    1. Initial program 93.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
      3. *-commutative46.2%

        \[\leadsto \color{blue}{\left(y \cdot 2\right)} \cdot x \]
      4. associate-*r*46.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+102}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-308}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(a \cdot c\right)\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-16}:\\ \;\;\;\;y \cdot \left(x \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 56.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+176}:\\
\;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.1e209

    1. Initial program 83.2%

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

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

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

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

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

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

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

    if -2.1e209 < a < 3.30000000000000025e176

    1. Initial program 91.0%

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

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

    if 3.30000000000000025e176 < a

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+209}:\\ \;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+176}:\\ \;\;\;\;\left(x \cdot y + z \cdot t\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(i \cdot \left(a \cdot -2\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 39.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+50} \lor \neg \left(z \leq 6.8 \cdot 10^{-19}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2000000000000004e50 or 6.8000000000000004e-19 < z

    1. Initial program 87.7%

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

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

    if -5.2000000000000004e50 < z < 6.8000000000000004e-19

    1. Initial program 91.2%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(x \cdot y\right)} \]
    6. Step-by-step derivation
      1. *-commutative33.8%

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

        \[\leadsto \color{blue}{\left(2 \cdot y\right) \cdot x} \]
      3. *-commutative34.4%

        \[\leadsto \color{blue}{\left(y \cdot 2\right)} \cdot x \]
      4. associate-*r*33.8%

        \[\leadsto \color{blue}{y \cdot \left(2 \cdot x\right)} \]
    7. Simplified33.8%

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

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

Alternative 9: 29.0% accurate, 3.8× speedup?

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

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

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

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

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

Developer Target 1: 94.2% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024114 
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
  :precision binary64

  :alt
  (! :herbie-platform default (* 2 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))

  (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))