?

Average Error: 6.3 → 1.6
Time: 40.3s
Precision: binary64
Cost: 2504

?

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.3
Target1.8
Herbie1.6
\[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right) \]

Derivation?

  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0

    1. Initial program 64.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. Simplified10.0

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

      [Start]64.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) \]

      rational.json-simplify-1 [=>]64.0

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

      rational.json-simplify-48 [=>]64.0

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

      rational.json-simplify-2 [=>]64.0

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

      rational.json-simplify-2 [=>]64.0

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

      rational.json-simplify-43 [=>]10.0

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

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

    1. Initial program 0.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) \]

    if 5.0000000000000003e299 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

    1. Initial program 59.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. Simplified11.9

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

      [Start]59.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) \]

      rational.json-simplify-1 [=>]59.4

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

      rational.json-simplify-48 [=>]59.4

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

      rational.json-simplify-2 [=>]59.4

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

      rational.json-simplify-2 [=>]59.4

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

      rational.json-simplify-43 [=>]11.9

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

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

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

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

      [Start]41.6

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

      rational.json-simplify-61 [=>]41.6

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

      rational.json-simplify-49 [=>]21.2

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

      rational.json-simplify-46 [=>]21.2

      \[ 2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \frac{c}{\color{blue}{\frac{\frac{1}{i}}{b}}}\right)\right) \]
    6. Applied egg-rr20.9

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

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

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

      [Start]20.9

      \[ 2 \cdot \left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{1}{c \cdot \left(i \cdot b\right)} + 0}\right)\right) \]

      rational.json-simplify-4 [=>]20.9

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

      rational.json-simplify-43 [<=]18.2

      \[ 2 \cdot \left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{1}{\color{blue}{b \cdot \left(c \cdot i\right)}}}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.6

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

Alternatives

Alternative 1
Error4.2
Cost3792
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := 2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(t_1 \cdot i\right)\right)\right)\\ t_3 := \left(t_1 \cdot c\right) \cdot i\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{+108}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_3\right)\\ \mathbf{elif}\;t_3 \leq 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;2 \cdot \left(t \cdot z - t_3\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - \frac{c}{\frac{1}{b \cdot \left(c \cdot i\right)}}\right)\right)\\ \end{array} \]
Alternative 2
Error9.7
Cost3536
\[\begin{array}{l} t_1 := 2 \cdot \left(t \cdot z - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ t_3 := 2 \cdot \left(y \cdot x - t_2\right)\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{+25}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 10^{-49}:\\ \;\;\;\;2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+33}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error4.3
Cost3148
\[\begin{array}{l} t_1 := a + b \cdot c\\ t_2 := 2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(t_1 \cdot i\right)\right)\right)\\ t_3 := \left(t_1 \cdot c\right) \cdot i\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_3 \leq -5 \cdot 10^{+108}:\\ \;\;\;\;2 \cdot \left(y \cdot x - t_3\right)\\ \mathbf{elif}\;t_3 \leq 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t \cdot z - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ \end{array} \]
Alternative 4
Error11.9
Cost2892
\[\begin{array}{l} t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+115}:\\ \;\;\;\;2 \cdot \left(\left(a + c \cdot b\right) \cdot \left(-c \cdot i\right)\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+39}:\\ \;\;\;\;2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;2 \cdot \left(t \cdot z - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t \cdot z - c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right)\\ \end{array} \]
Alternative 5
Error20.6
Cost2264
\[\begin{array}{l} t_1 := 2 \cdot \left(t \cdot z - \left(c \cdot a\right) \cdot i\right)\\ t_2 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-125}:\\ \;\;\;\;2 \cdot \left(\left(a + c \cdot b\right) \cdot \left(-c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-161}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(t \cdot z - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error20.7
Cost2264
\[\begin{array}{l} t_1 := 2 \cdot \left(t \cdot z - \left(c \cdot a\right) \cdot i\right)\\ t_2 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-125}:\\ \;\;\;\;2 \cdot \left(\left(a + c \cdot b\right) \cdot \left(-c \cdot i\right)\right)\\ \mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-161}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(t \cdot z - c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error23.1
Cost2220
\[\begin{array}{l} t_1 := 2 \cdot \left(\left(a + c \cdot b\right) \cdot \left(-c \cdot i\right)\right)\\ t_2 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;x \leq -1.62 \cdot 10^{+53}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.65 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -9.6 \cdot 10^{-43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-153}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-166}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-268}:\\ \;\;\;\;2 \cdot \left(t \cdot z - \left(c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-231}:\\ \;\;\;\;2 \cdot \left(t \cdot z - \left(c \cdot a\right) \cdot i\right)\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-49}:\\ \;\;\;\;2 \cdot \left(t \cdot z - b \cdot \left(c \cdot \left(c \cdot i\right)\right)\right)\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{+47}:\\ \;\;\;\;2 \cdot \left(x \cdot y + c \cdot \left(i \cdot \left(-a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error12.0
Cost1480
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+91}:\\ \;\;\;\;2 \cdot \left(t \cdot z - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error20.6
Cost1232
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ t_2 := \left(i \cdot \left(a + c \cdot b\right)\right) \cdot \left(c \cdot -2\right)\\ \mathbf{if}\;c \leq -3.3 \cdot 10^{+112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-218}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5.4 \cdot 10^{-170}:\\ \;\;\;\;2 \cdot \left(t \cdot z - \left(c \cdot a\right) \cdot i\right)\\ \mathbf{elif}\;c \leq 2.7 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error36.7
Cost1112
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+120}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-5}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-309}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(c \cdot a\right)\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error36.8
Cost1112
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{+140}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+120}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -0.0022:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-301}:\\ \;\;\;\;a \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-53}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error24.9
Cost1104
\[\begin{array}{l} t_1 := a \cdot \left(i \cdot \left(c \cdot -2\right)\right)\\ t_2 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{if}\;b \leq -2.35 \cdot 10^{-209}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-135}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 7.4 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error22.3
Cost1104
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x + t \cdot z\right)\\ t_2 := \left(b \cdot \left(c \cdot i\right)\right) \cdot \left(c \cdot -2\right)\\ \mathbf{if}\;c \leq -3.4 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 2.1 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.45 \cdot 10^{-170}:\\ \;\;\;\;2 \cdot \left(t \cdot z - \left(c \cdot a\right) \cdot i\right)\\ \mathbf{elif}\;c \leq 7.2 \cdot 10^{+90}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error36.0
Cost848
\[\begin{array}{l} t_1 := 2 \cdot \left(y \cdot x\right)\\ t_2 := 2 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+140}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+120}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -0.0048:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error21.5
Cost840
\[\begin{array}{l} t_1 := \left(b \cdot \left(c \cdot i\right)\right) \cdot \left(c \cdot -2\right)\\ \mathbf{if}\;c \leq -1.05 \cdot 10^{+141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 6.5 \cdot 10^{+102}:\\ \;\;\;\;2 \cdot \left(y \cdot x + t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error42.5
Cost320
\[2 \cdot \left(t \cdot z\right) \]

Error

Reproduce?

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