Average Error: 26.4 → 8.0
Time: 18.9s
Precision: binary64
Cost: 4936
\[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
\[\begin{array}{l} t_1 := \left(x + y\right) \cdot z\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(\left(y + t\right) \cdot a + t_1\right) - y \cdot b}{t_2}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_3 \leq 10^{+269}:\\ \;\;\;\;a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right) + \frac{t_1 - y \cdot b}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (+ x y) z))
        (t_2 (+ y (+ x t)))
        (t_3 (/ (- (+ (* (+ y t) a) t_1) (* y b)) t_2))
        (t_4 (- (+ z a) b)))
   (if (<= t_3 (- INFINITY))
     t_4
     (if (<= t_3 1e+269)
       (+ (* a (+ (/ y t_2) (/ t t_2))) (/ (- t_1 (* y b)) t_2))
       t_4))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + y) * z;
	double t_2 = y + (x + t);
	double t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2;
	double t_4 = (z + a) - b;
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_4;
	} else if (t_3 <= 1e+269) {
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / t_2);
	} else {
		tmp = t_4;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + y) * z;
	double t_2 = y + (x + t);
	double t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2;
	double t_4 = (z + a) - b;
	double tmp;
	if (t_3 <= -Double.POSITIVE_INFINITY) {
		tmp = t_4;
	} else if (t_3 <= 1e+269) {
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / t_2);
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
def code(x, y, z, t, a, b):
	t_1 = (x + y) * z
	t_2 = y + (x + t)
	t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2
	t_4 = (z + a) - b
	tmp = 0
	if t_3 <= -math.inf:
		tmp = t_4
	elif t_3 <= 1e+269:
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / t_2)
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
end
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + y) * z)
	t_2 = Float64(y + Float64(x + t))
	t_3 = Float64(Float64(Float64(Float64(Float64(y + t) * a) + t_1) - Float64(y * b)) / t_2)
	t_4 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_4;
	elseif (t_3 <= 1e+269)
		tmp = Float64(Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2))) + Float64(Float64(t_1 - Float64(y * b)) / t_2));
	else
		tmp = t_4;
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + y) * z;
	t_2 = y + (x + t);
	t_3 = ((((y + t) * a) + t_1) - (y * b)) / t_2;
	t_4 = (z + a) - b;
	tmp = 0.0;
	if (t_3 <= -Inf)
		tmp = t_4;
	elseif (t_3 <= 1e+269)
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / t_2);
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, 1e+269], N[(N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\begin{array}{l}
t_1 := \left(x + y\right) \cdot z\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(\left(y + t\right) \cdot a + t_1\right) - y \cdot b}{t_2}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t_3 \leq 10^{+269}:\\
\;\;\;\;a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right) + \frac{t_1 - y \cdot b}{t_2}\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original26.4
Target11.6
Herbie8.0
\[\begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{\left(x + t\right) + y}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Derivation

  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 1e269 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 62.9

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Taylor expanded in y around inf 18.5

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    3. Simplified18.5

      \[\leadsto \color{blue}{\left(z + a\right) - b} \]
      Proof
      (-.f64 (+.f64 z a) b): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 a z)) b): 0 points increase in error, 0 points decrease in error

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e269

    1. Initial program 0.3

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Taylor expanded in a around 0 0.5

      \[\leadsto \color{blue}{\left(\frac{\left(y + x\right) \cdot z}{y + \left(t + x\right)} + a \cdot \left(\frac{y}{y + \left(t + x\right)} + \frac{t}{y + \left(t + x\right)}\right)\right) - \frac{y \cdot b}{y + \left(t + x\right)}} \]
    3. Simplified0.5

      \[\leadsto \color{blue}{a \cdot \left(\frac{y}{y + \left(t + x\right)} + \frac{t}{y + \left(t + x\right)}\right) + \frac{z \cdot \left(y + x\right) - y \cdot b}{y + \left(t + x\right)}} \]
      Proof
      (+.f64 (*.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x))))) (/.f64 (-.f64 (*.f64 z (+.f64 y x)) (*.f64 y b)) (+.f64 y (+.f64 t x)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x))))) (/.f64 (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 y x) z)) (*.f64 y b)) (+.f64 y (+.f64 t x)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (*.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x))))) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (*.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x))))) (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x)))) (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x))))): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (*.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x))))))) (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))): 0 points increase in error, 0 points decrease in error
  3. Recombined 2 regimes into one program.
  4. Final simplification8.0

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

Alternatives

Alternative 1
Error7.9
Cost4168
\[\begin{array}{l} t_1 := \frac{\left(\left(y + t\right) \cdot a + \left(x + y\right) \cdot z\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 10^{+269}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error19.8
Cost1872
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := \frac{z - b}{\frac{t_1}{y}} + \left(z + \frac{a}{\frac{x + y}{y}}\right)\\ t_3 := z \cdot \frac{x + y}{t_1}\\ \mathbf{if}\;z \leq -1.46 \cdot 10^{+69}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-282}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+167}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error23.6
Cost1492
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{y \cdot t_1}{y + \left(x + t\right)}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-57}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-135}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-97}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-8}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error23.0
Cost1360
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-110}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a + y \cdot \left(z - b\right)}{y + t}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-91}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-8}:\\ \;\;\;\;\frac{y \cdot t_1}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error26.8
Cost1232
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := z \cdot \frac{x + y}{t_1}\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -6.3 \cdot 10^{-263}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-292}:\\ \;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-229}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-36}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error32.8
Cost1116
\[\begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{+146}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{+55}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-54}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{-116}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{+63}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+138}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{+249}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 7
Error32.3
Cost1116
\[\begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{+192}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{+66}:\\ \;\;\;\;z - b\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-52}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-119}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+60}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+138}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{+249}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 8
Error27.3
Cost980
\[\begin{array}{l} t_1 := z \cdot \frac{x}{x + t}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -3.9 \cdot 10^{-35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-292}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-228}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-36}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error27.3
Cost980
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -3 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-262}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-291}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-230}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-35}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error26.9
Cost968
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-228}:\\ \;\;\;\;z \cdot \frac{x + y}{x + \left(y + t\right)}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error23.6
Cost968
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.2 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-35}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error27.3
Cost840
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -5.6 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-228}:\\ \;\;\;\;z + \frac{a}{\frac{x}{y + t}}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-34}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error31.9
Cost720
\[\begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-178}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-194}:\\ \;\;\;\;-b\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-232}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-254}:\\ \;\;\;\;-b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
Alternative 14
Error27.4
Cost716
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-229}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-36}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error36.5
Cost592
\[\begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+58}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-75}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+37}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+121}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Error26.4
Cost584
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -8 \cdot 10^{-15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-35}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error43.5
Cost64
\[a \]

Error

Reproduce

herbie shell --seed 2022337 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :herbie-target
  (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))

  (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))