Average Error: 26.3 → 3.7
Time: 22.1s
Precision: binary64
Cost: 4168
\[\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 := y + \left(x + t\right)\\ t_2 := \frac{\left(a \cdot \left(y + t\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\ t_3 := \left(a - b \cdot \frac{y}{y + t}\right) + z \cdot \frac{x + y}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+241}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \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 (+ y (+ x t)))
        (t_2 (/ (- (+ (* a (+ y t)) (* z (+ x y))) (* y b)) t_1))
        (t_3 (+ (- a (* b (/ y (+ y t)))) (* z (/ (+ x y) t_1)))))
   (if (<= t_2 (- INFINITY)) t_3 (if (<= t_2 5e+241) t_2 t_3))))
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 = y + (x + t);
	double t_2 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / t_1;
	double t_3 = (a - (b * (y / (y + t)))) + (z * ((x + y) / t_1));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= 5e+241) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 = y + (x + t);
	double t_2 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / t_1;
	double t_3 = (a - (b * (y / (y + t)))) + (z * ((x + y) / t_1));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else if (t_2 <= 5e+241) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 = y + (x + t)
	t_2 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / t_1
	t_3 = (a - (b * (y / (y + t)))) + (z * ((x + y) / t_1))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_3
	elif t_2 <= 5e+241:
		tmp = t_2
	else:
		tmp = t_3
	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(y + Float64(x + t))
	t_2 = Float64(Float64(Float64(Float64(a * Float64(y + t)) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1)
	t_3 = Float64(Float64(a - Float64(b * Float64(y / Float64(y + t)))) + Float64(z * Float64(Float64(x + y) / t_1)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= 5e+241)
		tmp = t_2;
	else
		tmp = t_3;
	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 = y + (x + t);
	t_2 = (((a * (y + t)) + (z * (x + y))) - (y * b)) / t_1;
	t_3 = (a - (b * (y / (y + t)))) + (z * ((x + y) / t_1));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_3;
	elseif (t_2 <= 5e+241)
		tmp = t_2;
	else
		tmp = t_3;
	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[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a - N[(b * N[(y / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 5e+241], t$95$2, t$95$3]]]]]
\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 := y + \left(x + t\right)\\
t_2 := \frac{\left(a \cdot \left(y + t\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\
t_3 := \left(a - b \cdot \frac{y}{y + t}\right) + z \cdot \frac{x + y}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+241}:\\
\;\;\;\;t_2\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original26.3
Target11.4
Herbie3.7
\[\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 5.00000000000000025e241 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 61.6

      \[\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 z around inf 61.6

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

      \[\leadsto \color{blue}{\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(t + x\right)} + \frac{y + x}{y + \left(t + x\right)} \cdot z} \]
      Proof
      (+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (*.f64 (/.f64 (+.f64 y x) (+.f64 y (+.f64 t x))) z)): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (Rewrite<= associate-/r/_binary64 (/.f64 (+.f64 y x) (/.f64 (+.f64 y (+.f64 t x)) z)))): 21 points increase in error, 5 points decrease in error
      (+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))))): 48 points increase in error, 18 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (Rewrite=> div-sub_binary64 (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 1 points decrease in error
      (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (/.f64 (*.f64 (+.f64 y x) z) (+.f64 y (+.f64 t x))) (/.f64 (*.f64 a (+.f64 y 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
    4. Taylor expanded in x around 0 46.0

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

      \[\leadsto \color{blue}{\left(\frac{a}{1} - \frac{y}{y + t} \cdot b\right)} + \frac{y + x}{y + \left(t + x\right)} \cdot z \]
      Proof
      (-.f64 (/.f64 a 1) (*.f64 (/.f64 y (+.f64 y t)) b)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 a (Rewrite<= *-inverses_binary64 (/.f64 (+.f64 y t) (+.f64 y t)))) (*.f64 (/.f64 y (+.f64 y t)) b)): 0 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y t))) (*.f64 (/.f64 y (+.f64 y t)) b)): 55 points increase in error, 1 points decrease in error
      (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y t)) (Rewrite<= associate-/r/_binary64 (/.f64 y (/.f64 (+.f64 y t) b)))): 15 points increase in error, 13 points decrease in error
      (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y t)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y b) (+.f64 y t)))): 31 points increase in error, 16 points decrease in error
      (Rewrite<= div-sub_binary64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y t))): 1 points increase in error, 1 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)) < 5.00000000000000025e241

    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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification3.7

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

Alternatives

Alternative 1
Error6.0
Cost4168
\[\begin{array}{l} t_1 := \frac{\left(a \cdot \left(y + t\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := \left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+241}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error17.8
Cost1880
\[\begin{array}{l} t_1 := \frac{x \cdot z + t \cdot a}{x + t}\\ t_2 := z + \frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ t_3 := \left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{if}\;y \leq -2.663882671406775 \cdot 10^{+64}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -1.41851874333107 \cdot 10^{-228}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.374829243419406 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.593216539077913 \cdot 10^{-218}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 2.383818826107836 \cdot 10^{-184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.0055227113639969 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error22.4
Cost1620
\[\begin{array}{l} t_1 := \left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{if}\;y \leq -4.6990079811171465 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.766354685017914 \cdot 10^{-165}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;y \leq 5.374829243419406 \cdot 10^{-238}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 6.323499362268839 \cdot 10^{-87}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 4.7695342234545777 \cdot 10^{+27}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error24.5
Cost1496
\[\begin{array}{l} t_1 := \frac{z}{\frac{x + \left(y + t\right)}{x + y}}\\ t_2 := \left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{if}\;y \leq -4.6990079811171465 \cdot 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.8767194457266458 \cdot 10^{-157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.2702418117740654 \cdot 10^{-275}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 1.5480633412022983 \cdot 10^{-265}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 5.374829243419406 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error24.0
Cost1496
\[\begin{array}{l} t_1 := \left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{if}\;y \leq -4.6990079811171465 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.8767194457266458 \cdot 10^{-157}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.2702418117740654 \cdot 10^{-275}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{elif}\;y \leq 1.0536936304637288 \cdot 10^{-263}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 5.374829243419406 \cdot 10^{-238}:\\ \;\;\;\;\frac{z}{\frac{x + \left(y + t\right)}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error17.9
Cost1484
\[\begin{array}{l} t_1 := b \cdot \frac{y}{y + t}\\ t_2 := \left(a - t_1\right) + \frac{x + y}{\frac{t}{z}}\\ \mathbf{if}\;t \leq -2.3974204647743868 \cdot 10^{+147}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.395383595355202 \cdot 10^{+81}:\\ \;\;\;\;\left(z + a\right) - t_1\\ \mathbf{elif}\;t \leq 6225259.310106767:\\ \;\;\;\;z + \frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error22.2
Cost1364
\[\begin{array}{l} t_1 := \left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{if}\;y \leq -4.6990079811171465 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.766354685017914 \cdot 10^{-165}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;y \leq 5.374829243419406 \cdot 10^{-238}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 6.323499362268839 \cdot 10^{-87}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 5.037966278218299 \cdot 10^{-68}:\\ \;\;\;\;z \cdot \left(x \cdot \frac{1}{x + t}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error28.0
Cost1236
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -4.577186250636652 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.5388818283401202 \cdot 10^{-228}:\\ \;\;\;\;z - \frac{y \cdot b}{y + t}\\ \mathbf{elif}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5480633412022983 \cdot 10^{-265}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 7.627148617420668 \cdot 10^{-240}:\\ \;\;\;\;x \cdot \left(z \cdot \frac{1}{x + t}\right)\\ \mathbf{elif}\;y \leq 5.037966278218299 \cdot 10^{-68}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error23.7
Cost1232
\[\begin{array}{l} t_1 := \left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{if}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.2702418117740654 \cdot 10^{-275}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 1.5480633412022983 \cdot 10^{-265}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 2.3468752051895183 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error28.0
Cost1112
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -4.577186250636652 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.5388818283401202 \cdot 10^{-228}:\\ \;\;\;\;z - \frac{y \cdot b}{y + t}\\ \mathbf{elif}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5480633412022983 \cdot 10^{-265}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 7.627148617420668 \cdot 10^{-240}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 5.037966278218299 \cdot 10^{-68}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error27.3
Cost1104
\[\begin{array}{l} t_1 := z \cdot \left(x \cdot \frac{1}{x + t}\right)\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.4238579257733683 \cdot 10^{-41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5480633412022983 \cdot 10^{-265}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 5.374829243419406 \cdot 10^{-238}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.037966278218299 \cdot 10^{-68}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error21.6
Cost968
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{if}\;z \leq -9.381913116042828 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.989345814893385 \cdot 10^{+157}:\\ \;\;\;\;\left(z + a\right) - b \cdot \frac{y}{y + t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error27.5
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5480633412022983 \cdot 10^{-265}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 7.627148617420668 \cdot 10^{-240}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 5.037966278218299 \cdot 10^{-68}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error27.6
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -4.8916573550789235 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5480633412022983 \cdot 10^{-265}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 7.627148617420668 \cdot 10^{-240}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 5.037966278218299 \cdot 10^{-68}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error32.1
Cost456
\[\begin{array}{l} \mathbf{if}\;t \leq -1.704702820378099 \cdot 10^{-215}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 1.0445251273279759 \cdot 10^{+47}:\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Error35.1
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -1.0942719468637188 \cdot 10^{+29}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 6.060198787264444:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 17
Error31.7
Cost324
\[\begin{array}{l} \mathbf{if}\;b \leq 2.7714357056564094 \cdot 10^{+162}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;-b\\ \end{array} \]
Alternative 18
Error42.5
Cost64
\[a \]

Error

Reproduce

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