Average Error: 26.2 → 4.1
Time: 18.3s
Precision: binary64
Cost: 4296
\[\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 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := x + \left(y + t\right)\\ t_3 := z + \left(\frac{a}{\frac{t_2}{y + t}} - b \cdot \frac{y}{t_2}\right)\\ \mathbf{if}\;t_1 \leq -100000000000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+252}:\\ \;\;\;\;t_1\\ \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 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t))))
        (t_2 (+ x (+ y t)))
        (t_3 (+ z (- (/ a (/ t_2 (+ y t))) (* b (/ y t_2))))))
   (if (<= t_1 -100000000000.0) t_3 (if (<= t_1 2e+252) t_1 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 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double t_2 = x + (y + t);
	double t_3 = z + ((a / (t_2 / (y + t))) - (b * (y / t_2)));
	double tmp;
	if (t_1 <= -100000000000.0) {
		tmp = t_3;
	} else if (t_1 <= 2e+252) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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
    code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
real(8) function code(x, y, z, t, a, b)
    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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t))
    t_2 = x + (y + t)
    t_3 = z + ((a / (t_2 / (y + t))) - (b * (y / t_2)))
    if (t_1 <= (-100000000000.0d0)) then
        tmp = t_3
    else if (t_1 <= 2d+252) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	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 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double t_2 = x + (y + t);
	double t_3 = z + ((a / (t_2 / (y + t))) - (b * (y / t_2)));
	double tmp;
	if (t_1 <= -100000000000.0) {
		tmp = t_3;
	} else if (t_1 <= 2e+252) {
		tmp = t_1;
	} 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 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t))
	t_2 = x + (y + t)
	t_3 = z + ((a / (t_2 / (y + t))) - (b * (y / t_2)))
	tmp = 0
	if t_1 <= -100000000000.0:
		tmp = t_3
	elif t_1 <= 2e+252:
		tmp = t_1
	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(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	t_2 = Float64(x + Float64(y + t))
	t_3 = Float64(z + Float64(Float64(a / Float64(t_2 / Float64(y + t))) - Float64(b * Float64(y / t_2))))
	tmp = 0.0
	if (t_1 <= -100000000000.0)
		tmp = t_3;
	elseif (t_1 <= 2e+252)
		tmp = t_1;
	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 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	t_2 = x + (y + t);
	t_3 = z + ((a / (t_2 / (y + t))) - (b * (y / t_2)));
	tmp = 0.0;
	if (t_1 <= -100000000000.0)
		tmp = t_3;
	elseif (t_1 <= 2e+252)
		tmp = t_1;
	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[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(N[(a / N[(t$95$2 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -100000000000.0], t$95$3, If[LessEqual[t$95$1, 2e+252], t$95$1, 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 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
t_2 := x + \left(y + t\right)\\
t_3 := z + \left(\frac{a}{\frac{t_2}{y + t}} - b \cdot \frac{y}{t_2}\right)\\
\mathbf{if}\;t_1 \leq -100000000000:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+252}:\\
\;\;\;\;t_1\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original26.2
Target11.0
Herbie4.1
\[\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)) < -1e11 or 2.0000000000000002e252 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 45.5

      \[\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 45.5

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

      \[\leadsto \color{blue}{\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(t + x\right)} + \frac{z}{\frac{y + \left(t + x\right)}{y + x}}} \]
      Proof
      (+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (/.f64 z (/.f64 (+.f64 y (+.f64 t x)) (+.f64 y x)))): 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-/l*_binary64 (/.f64 (*.f64 z (+.f64 y x)) (+.f64 y (+.f64 t x))))): 37 points increase in error, 2 points decrease in error
      (+.f64 (/.f64 (-.f64 (*.f64 a (+.f64 y t)) (*.f64 y b)) (+.f64 y (+.f64 t x))) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 y x) z)) (+.f64 y (+.f64 t x)))): 0 points increase in error, 0 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 y around inf 36.8

      \[\leadsto \frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(t + x\right)} + \color{blue}{z} \]
    5. Taylor expanded in a around inf 36.8

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

      \[\leadsto \color{blue}{\left(\frac{a}{\frac{x + \left(y + t\right)}{y + t}} - \frac{y}{x + \left(y + t\right)} \cdot b\right)} + z \]
      Proof
      (-.f64 (/.f64 a (/.f64 (+.f64 x (+.f64 y t)) (+.f64 y t))) (*.f64 (/.f64 y (+.f64 x (+.f64 y t))) b)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 a (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 y t) x)) (+.f64 y t))) (*.f64 (/.f64 y (+.f64 x (+.f64 y t))) b)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 a (/.f64 (Rewrite<= associate-+r+_binary64 (+.f64 y (+.f64 t x))) (+.f64 y t))) (*.f64 (/.f64 y (+.f64 x (+.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 (+.f64 t x)))) (*.f64 (/.f64 y (+.f64 x (+.f64 y t))) b)): 63 points increase in error, 10 points decrease in error
      (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 (/.f64 y (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 y t) x))) b)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 (/.f64 y (Rewrite<= associate-+r+_binary64 (+.f64 y (+.f64 t x)))) b)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (Rewrite<= associate-/r/_binary64 (/.f64 y (/.f64 (+.f64 y (+.f64 t x)) b)))): 27 points increase in error, 18 points decrease in error
      (-.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x))))): 41 points increase in error, 21 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (neg.f64 (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 0 points decrease in error

    if -1e11 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.0000000000000002e252

    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 simplification4.1

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

Alternatives

Alternative 1
Error5.9
Cost4168
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{y}{\frac{x + y}{a - b}} + \frac{z}{\frac{t_1}{x + y}}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+252}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;z + \left(a - b\right) \cdot \frac{y}{x + y}\\ \end{array} \]
Alternative 2
Error15.5
Cost1616
\[\begin{array}{l} t_1 := z + \frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := z + \left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{if}\;y \leq -5.490220593474589 \cdot 10^{+40}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -8.731830799351743 \cdot 10^{-218}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.1698984472565936 \cdot 10^{-170}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 4.696054216100641 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error13.7
Cost1616
\[\begin{array}{l} t_1 := z + \left(a - b\right) \cdot \frac{y}{x + y}\\ t_2 := y + \left(x + t\right)\\ t_3 := z + \frac{a \cdot \left(y + t\right) - y \cdot b}{t_2}\\ \mathbf{if}\;y \leq -5.490220593474589 \cdot 10^{+40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.4941178759920867 \cdot 10^{-237}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 6.1698984472565936 \cdot 10^{-170}:\\ \;\;\;\;\frac{z}{\frac{t_2}{x + y}} + t \cdot \frac{a}{x + t}\\ \mathbf{elif}\;y \leq 4.696054216100641 \cdot 10^{-7}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error13.4
Cost1616
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{z}{\frac{t_1}{x + y}}\\ t_3 := z + \frac{a \cdot \left(y + t\right) - y \cdot b}{t_1}\\ \mathbf{if}\;y \leq -5.490220593474589 \cdot 10^{+40}:\\ \;\;\;\;\frac{y}{\frac{x + y}{a - b}} + t_2\\ \mathbf{elif}\;y \leq -4.4941178759920867 \cdot 10^{-237}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 6.1698984472565936 \cdot 10^{-170}:\\ \;\;\;\;t_2 + t \cdot \frac{a}{x + t}\\ \mathbf{elif}\;y \leq 4.696054216100641 \cdot 10^{-7}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;z + \left(a - b\right) \cdot \frac{y}{x + y}\\ \end{array} \]
Alternative 5
Error17.1
Cost1364
\[\begin{array}{l} t_1 := z + \frac{a}{\frac{x + t}{t}}\\ t_2 := z + \left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{if}\;y \leq -2.2390621330140258 \cdot 10^{-119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3.7669081887071107 \cdot 10^{-205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -8.731830799351743 \cdot 10^{-218}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.1166800875857669 \cdot 10^{-302}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 7.605618045825252 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error22.3
Cost1104
\[\begin{array}{l} t_1 := z + \frac{a}{\frac{x + t}{t}}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.7580147027158625 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.454857228849635 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.950643393451743 \cdot 10^{-79}:\\ \;\;\;\;b \cdot \frac{-y}{x + \left(y + t\right)}\\ \mathbf{elif}\;y \leq 999750302608783500:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error18.4
Cost1100
\[\begin{array}{l} t_1 := z + \left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{if}\;x \leq -8.195093120136498:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.446292357784027 \cdot 10^{+63}:\\ \;\;\;\;a + \left(z - b \cdot \frac{y}{y + t}\right)\\ \mathbf{elif}\;x \leq 2.361513735017895 \cdot 10^{+147}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \end{array} \]
Alternative 8
Error38.4
Cost988
\[\begin{array}{l} \mathbf{if}\;z \leq -7.521808789676858 \cdot 10^{+46}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -3.3875814502472886 \cdot 10^{-117}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -1.9002916739981337 \cdot 10^{-165}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.535515790507621 \cdot 10^{-208}:\\ \;\;\;\;-b\\ \mathbf{elif}\;z \leq 9.895997290597866 \cdot 10^{-293}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq 8.175699242504616 \cdot 10^{-173}:\\ \;\;\;\;-b\\ \mathbf{elif}\;z \leq 7.242413819257329 \cdot 10^{+51}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 9
Error17.2
Cost968
\[\begin{array}{l} t_1 := z + \left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{if}\;y \leq -2.2390621330140258 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.605618045825252 \cdot 10^{-115}:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error21.3
Cost840
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.7580147027158625 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 999750302608783500:\\ \;\;\;\;z + \frac{a}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error26.8
Cost716
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -2.2390621330140258 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.866414957235653 \cdot 10^{-276}:\\ \;\;\;\;z + t \cdot \frac{a}{x}\\ \mathbf{elif}\;y \leq 4.696054216100641 \cdot 10^{-7}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error26.0
Cost584
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -2.2390621330140258 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.696054216100641 \cdot 10^{-7}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error31.4
Cost456
\[\begin{array}{l} \mathbf{if}\;b \leq 7.494533847586008 \cdot 10^{+195}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;b \leq 1.2623702844060375 \cdot 10^{+269}:\\ \;\;\;\;-b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
Alternative 14
Error35.4
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -2.05231574084677 \cdot 10^{+55}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 3.306083229077168 \cdot 10^{+35}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 15
Error43.1
Cost64
\[a \]

Error

Reproduce

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