?

Average Error: 26.8 → 0.6
Time: 1.8min
Precision: binary64
Cost: 5320

?

\[\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 + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t_1}\\ t_3 := y + \left(t + x\right)\\ t_4 := \left(\left(\frac{x}{t_3} + \frac{y}{t_3}\right) \cdot z + \left(y + t\right) \cdot \frac{a}{t_3}\right) - \frac{b}{t_3} \cdot y\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+263}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 10^{+308}:\\ \;\;\;\;\left(\frac{\left(y + x\right) \cdot z}{t_1} + a \cdot \frac{y + t}{t_1}\right) - \frac{y \cdot b}{t_1}\\ \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 t) y))
        (t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) t_1))
        (t_3 (+ y (+ t x)))
        (t_4
         (-
          (+ (* (+ (/ x t_3) (/ y t_3)) z) (* (+ y t) (/ a t_3)))
          (* (/ b t_3) y))))
   (if (<= t_2 -1e+263)
     t_4
     (if (<= t_2 1e+308)
       (- (+ (/ (* (+ y x) z) t_1) (* a (/ (+ y t) t_1))) (/ (* y b) t_1))
       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 + t) + y;
	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
	double t_3 = y + (t + x);
	double t_4 = ((((x / t_3) + (y / t_3)) * z) + ((y + t) * (a / t_3))) - ((b / t_3) * y);
	double tmp;
	if (t_2 <= -1e+263) {
		tmp = t_4;
	} else if (t_2 <= 1e+308) {
		tmp = ((((y + x) * z) / t_1) + (a * ((y + t) / t_1))) - ((y * b) / t_1);
	} else {
		tmp = t_4;
	}
	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) :: t_4
    real(8) :: tmp
    t_1 = (x + t) + y
    t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1
    t_3 = y + (t + x)
    t_4 = ((((x / t_3) + (y / t_3)) * z) + ((y + t) * (a / t_3))) - ((b / t_3) * y)
    if (t_2 <= (-1d+263)) then
        tmp = t_4
    else if (t_2 <= 1d+308) then
        tmp = ((((y + x) * z) / t_1) + (a * ((y + t) / t_1))) - ((y * b) / t_1)
    else
        tmp = t_4
    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 = (x + t) + y;
	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
	double t_3 = y + (t + x);
	double t_4 = ((((x / t_3) + (y / t_3)) * z) + ((y + t) * (a / t_3))) - ((b / t_3) * y);
	double tmp;
	if (t_2 <= -1e+263) {
		tmp = t_4;
	} else if (t_2 <= 1e+308) {
		tmp = ((((y + x) * z) / t_1) + (a * ((y + t) / t_1))) - ((y * b) / t_1);
	} 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 + t) + y
	t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1
	t_3 = y + (t + x)
	t_4 = ((((x / t_3) + (y / t_3)) * z) + ((y + t) * (a / t_3))) - ((b / t_3) * y)
	tmp = 0
	if t_2 <= -1e+263:
		tmp = t_4
	elif t_2 <= 1e+308:
		tmp = ((((y + x) * z) / t_1) + (a * ((y + t) / t_1))) - ((y * b) / t_1)
	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 + t) + y)
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
	t_3 = Float64(y + Float64(t + x))
	t_4 = Float64(Float64(Float64(Float64(Float64(x / t_3) + Float64(y / t_3)) * z) + Float64(Float64(y + t) * Float64(a / t_3))) - Float64(Float64(b / t_3) * y))
	tmp = 0.0
	if (t_2 <= -1e+263)
		tmp = t_4;
	elseif (t_2 <= 1e+308)
		tmp = Float64(Float64(Float64(Float64(Float64(y + x) * z) / t_1) + Float64(a * Float64(Float64(y + t) / t_1))) - Float64(Float64(y * b) / t_1));
	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 + t) + y;
	t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
	t_3 = y + (t + x);
	t_4 = ((((x / t_3) + (y / t_3)) * z) + ((y + t) * (a / t_3))) - ((b / t_3) * y);
	tmp = 0.0;
	if (t_2 <= -1e+263)
		tmp = t_4;
	elseif (t_2 <= 1e+308)
		tmp = ((((y + x) * z) / t_1) + (a * ((y + t) / t_1))) - ((y * b) / t_1);
	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 + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(x / t$95$3), $MachinePrecision] + N[(y / t$95$3), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * N[(a / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b / t$95$3), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+263], t$95$4, If[LessEqual[t$95$2, 1e+308], N[(N[(N[(N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / t$95$1), $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 + t\right) + y\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t_1}\\
t_3 := y + \left(t + x\right)\\
t_4 := \left(\left(\frac{x}{t_3} + \frac{y}{t_3}\right) \cdot z + \left(y + t\right) \cdot \frac{a}{t_3}\right) - \frac{b}{t_3} \cdot y\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+263}:\\
\;\;\;\;t_4\\

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original26.8
Target11.3
Herbie0.6
\[\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)) < -1.00000000000000002e263 or 1e308 < (/.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.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 0 44.4

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

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

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

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

    if -1.00000000000000002e263 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e308

    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}{\left(\frac{\left(y + x\right) \cdot z}{\left(x + t\right) + y} + a \cdot \frac{y + t}{\left(x + t\right) + y}\right) - \frac{y \cdot b}{\left(x + t\right) + y}} \]
      Proof
  3. Recombined 2 regimes into one program.

Alternatives

Alternative 1
Error0.3
Cost5320
\[\begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t_1}\\ t_3 := y + \left(t + x\right)\\ t_4 := \frac{y}{t_3}\\ t_5 := \left(\left(\frac{x}{t_3} + t_4\right) \cdot z + \left(y + t\right) \cdot \frac{a}{t_3}\right) - b \cdot t_4\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t_2 \leq 10^{+308}:\\ \;\;\;\;\left(\frac{\left(y + x\right) \cdot z}{t_1} + a \cdot \frac{y + t}{t_1}\right) - \frac{y \cdot b}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 2
Error2.7
Cost4936
\[\begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t_1}\\ t_3 := y + \left(t + x\right)\\ t_4 := \frac{y}{t_3}\\ t_5 := b \cdot t_4\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\left(\left(\frac{x}{t_3} + t_4\right) \cdot z + a\right) - t_5\\ \mathbf{elif}\;t_2 \leq 10^{+308}:\\ \;\;\;\;\left(\frac{\left(y + x\right) \cdot z}{t_1} + a \cdot \frac{y + t}{t_1}\right) - \frac{y \cdot b}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left(z + \left(y + t\right) \cdot \frac{a}{t_3}\right) - t_5\\ \end{array} \]
Alternative 3
Error2.4
Cost4296
\[\begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t_1}\\ t_3 := y + \left(t + x\right)\\ t_4 := \left(z + \left(y + t\right) \cdot \frac{a}{t_3}\right) - b \cdot \frac{y}{t_3}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 10^{+308}:\\ \;\;\;\;\frac{z \cdot x + \left(y \cdot \left(\left(a + z\right) - b\right) + a \cdot t\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 4
Error2.6
Cost4296
\[\begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t_1}\\ t_3 := y + \left(t + x\right)\\ t_4 := \frac{y}{t_3}\\ t_5 := b \cdot t_4\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\left(\left(\frac{x}{t_3} + t_4\right) \cdot z + a\right) - t_5\\ \mathbf{elif}\;t_2 \leq 10^{+308}:\\ \;\;\;\;\frac{z \cdot x + \left(y \cdot \left(\left(a + z\right) - b\right) + a \cdot t\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left(z + \left(y + t\right) \cdot \frac{a}{t_3}\right) - t_5\\ \end{array} \]
Alternative 5
Error7.6
Cost4168
\[\begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t_1}\\ t_3 := \left(a + z\right) - b\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+240}:\\ \;\;\;\;\frac{z \cdot x + \left(y \cdot t_3 + a \cdot t\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error26.3
Cost2276
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := \left(x + t\right) + y\\ t_3 := a \cdot \frac{y + t}{t_2}\\ t_4 := \left(y + x\right) \cdot z\\ t_5 := \frac{t_4 - y \cdot b}{t_2}\\ t_6 := \frac{a \cdot \left(y + t\right) + t_4}{t_2}\\ \mathbf{if}\;a \leq -3.9 \cdot 10^{+64}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -0.76:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-38}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.32 \cdot 10^{-138}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-120}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-32}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+111}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+206}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]
Alternative 7
Error29.9
Cost1892
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := \frac{z \cdot x + a \cdot t}{t + x}\\ t_3 := \left(x + t\right) + y\\ t_4 := a \cdot \frac{y + t}{t_3}\\ \mathbf{if}\;a \leq -3.6 \cdot 10^{+64}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -620000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-165}:\\ \;\;\;\;a + \frac{\left(z - b\right) \cdot y}{y + t}\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-217}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-148}:\\ \;\;\;\;\frac{y \cdot t_1}{t_3}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-123}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+20}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+205}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]
Alternative 8
Error30.0
Cost1892
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := \frac{z \cdot x + a \cdot t}{t + x}\\ t_3 := \left(x + t\right) + y\\ t_4 := a \cdot \frac{y + t}{t_3}\\ t_5 := y \cdot t_1\\ \mathbf{if}\;a \leq -6 \cdot 10^{+64}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -9200:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-169}:\\ \;\;\;\;\frac{a \cdot t + t_5}{y + t}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-148}:\\ \;\;\;\;\frac{t_5}{t_3}\\ \mathbf{elif}\;a \leq 3.15 \cdot 10^{-121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+20}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+206}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]
Alternative 9
Error25.6
Cost1752
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := \frac{z - b}{t} \cdot y + \left(a + \frac{z \cdot x}{t}\right)\\ t_3 := \frac{z \cdot x + y \cdot t_1}{y + x}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+174}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-44}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-75}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-196}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-268}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+75}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error25.9
Cost1752
\[\begin{array}{l} t_1 := \frac{z - b}{t} \cdot y + \left(a + \frac{z \cdot x}{t}\right)\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{+188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-40}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-74}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-196}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-269}:\\ \;\;\;\;\frac{z \cdot x + y \cdot t_2}{y + x}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+76}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error27.1
Cost1496
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := a + \frac{\left(z - b\right) \cdot y}{y + t}\\ \mathbf{if}\;t \leq -3.2 \cdot 10^{+182}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{+113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+23}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-15}:\\ \;\;\;\;z + \frac{t \cdot a}{x}\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-74}:\\ \;\;\;\;a \cdot \frac{y + t}{\left(x + t\right) + y}\\ \mathbf{elif}\;t \leq 1.62 \cdot 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error26.6
Cost1496
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := a + \frac{\left(z - b\right) \cdot y}{y + t}\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{+113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{+23}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-15}:\\ \;\;\;\;z + \frac{t \cdot a}{x}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-74}:\\ \;\;\;\;a \cdot \frac{y + t}{\left(x + t\right) + y}\\ \mathbf{elif}\;t \leq 10^{+97}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{z}{t} - \frac{b}{t}\right) + a\\ \end{array} \]
Alternative 13
Error29.6
Cost1496
\[\begin{array}{l} t_1 := \frac{z \cdot x + a \cdot t}{t + x}\\ t_2 := \left(a + z\right) - b\\ t_3 := \left(x + t\right) + y\\ t_4 := a \cdot \frac{y + t}{t_3}\\ \mathbf{if}\;z \leq -3 \cdot 10^{+38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-239}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-256}:\\ \;\;\;\;\frac{-y \cdot b}{t_3}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-91}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error28.2
Cost1232
\[\begin{array}{l} t_1 := a \cdot \frac{y + t}{\left(x + t\right) + y}\\ t_2 := \left(a + z\right) - b\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{+34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-66}:\\ \;\;\;\;\frac{z \cdot x}{x + t}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error26.9
Cost1108
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ t_2 := \frac{t}{x + t} \cdot a\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{+230}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2000000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-66}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error27.1
Cost976
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;t \leq -1.12 \cdot 10^{+229}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{+95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-65}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+141}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - \frac{x}{t}\right)\\ \end{array} \]
Alternative 17
Error27.1
Cost848
\[\begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;t \leq -2.05 \cdot 10^{+230}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{+95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-63}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 18
Error26.1
Cost844
\[\begin{array}{l} t_1 := z + \frac{t \cdot a}{x}\\ \mathbf{if}\;x \leq -9 \cdot 10^{+108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{-21}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+142}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 19
Error35.7
Cost592
\[\begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-35}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-66}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+63}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 20
Error30.8
Cost588
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-113}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-246}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+143}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 21
Error30.6
Cost324
\[\begin{array}{l} \mathbf{if}\;x \leq 6 \cdot 10^{+141}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 22
Error43.2
Cost64
\[a \]

Error

Reproduce?

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