Average Error: 26.7 → 8.3
Time: 25.5s
Precision: binary64
Cost: 4552
\[\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 := z \cdot \frac{x + y}{t_1}\\ t_3 := a + t_2\\ t_4 := \left(y + t\right) \cdot a\\ t_5 := \frac{\left(t_4 + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_5 \leq -4 \cdot 10^{+304}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_5 \leq 2 \cdot 10^{+282}:\\ \;\;\;\;t_2 + \frac{t_4 - y \cdot b}{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 (+ y (+ x t)))
        (t_2 (* z (/ (+ x y) t_1)))
        (t_3 (+ a t_2))
        (t_4 (* (+ y t) a))
        (t_5 (/ (- (+ t_4 (* z (+ x y))) (* y b)) t_1)))
   (if (<= t_5 -4e+304)
     t_3
     (if (<= t_5 2e+282) (+ t_2 (/ (- t_4 (* y b)) 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 = y + (x + t);
	double t_2 = z * ((x + y) / t_1);
	double t_3 = a + t_2;
	double t_4 = (y + t) * a;
	double t_5 = ((t_4 + (z * (x + y))) - (y * b)) / t_1;
	double tmp;
	if (t_5 <= -4e+304) {
		tmp = t_3;
	} else if (t_5 <= 2e+282) {
		tmp = t_2 + ((t_4 - (y * b)) / 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) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = y + (x + t)
    t_2 = z * ((x + y) / t_1)
    t_3 = a + t_2
    t_4 = (y + t) * a
    t_5 = ((t_4 + (z * (x + y))) - (y * b)) / t_1
    if (t_5 <= (-4d+304)) then
        tmp = t_3
    else if (t_5 <= 2d+282) then
        tmp = t_2 + ((t_4 - (y * b)) / 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 = y + (x + t);
	double t_2 = z * ((x + y) / t_1);
	double t_3 = a + t_2;
	double t_4 = (y + t) * a;
	double t_5 = ((t_4 + (z * (x + y))) - (y * b)) / t_1;
	double tmp;
	if (t_5 <= -4e+304) {
		tmp = t_3;
	} else if (t_5 <= 2e+282) {
		tmp = t_2 + ((t_4 - (y * b)) / 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 = y + (x + t)
	t_2 = z * ((x + y) / t_1)
	t_3 = a + t_2
	t_4 = (y + t) * a
	t_5 = ((t_4 + (z * (x + y))) - (y * b)) / t_1
	tmp = 0
	if t_5 <= -4e+304:
		tmp = t_3
	elif t_5 <= 2e+282:
		tmp = t_2 + ((t_4 - (y * b)) / 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(y + Float64(x + t))
	t_2 = Float64(z * Float64(Float64(x + y) / t_1))
	t_3 = Float64(a + t_2)
	t_4 = Float64(Float64(y + t) * a)
	t_5 = Float64(Float64(Float64(t_4 + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1)
	tmp = 0.0
	if (t_5 <= -4e+304)
		tmp = t_3;
	elseif (t_5 <= 2e+282)
		tmp = Float64(t_2 + Float64(Float64(t_4 - Float64(y * b)) / 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 = y + (x + t);
	t_2 = z * ((x + y) / t_1);
	t_3 = a + t_2;
	t_4 = (y + t) * a;
	t_5 = ((t_4 + (z * (x + y))) - (y * b)) / t_1;
	tmp = 0.0;
	if (t_5 <= -4e+304)
		tmp = t_3;
	elseif (t_5 <= 2e+282)
		tmp = t_2 + ((t_4 - (y * b)) / 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[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$5, -4e+304], t$95$3, If[LessEqual[t$95$5, 2e+282], N[(t$95$2 + N[(N[(t$95$4 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], 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 := z \cdot \frac{x + y}{t_1}\\
t_3 := a + t_2\\
t_4 := \left(y + t\right) \cdot a\\
t_5 := \frac{\left(t_4 + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_5 \leq -4 \cdot 10^{+304}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_5 \leq 2 \cdot 10^{+282}:\\
\;\;\;\;t_2 + \frac{t_4 - y \cdot b}{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.7
Target11.3
Herbie8.3
\[\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)) < -3.9999999999999998e304 or 2.00000000000000007e282 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 63.0

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

      \[\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.3

      \[\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)))): 22 points increase in error, 1 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))))): 45 points increase in error, 19 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)))))): 2 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 t around inf 18.9

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

    if -3.9999999999999998e304 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.00000000000000007e282

    1. Initial program 0.4

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

      \[\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. Simplified0.6

      \[\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)))): 22 points increase in error, 1 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))))): 45 points increase in error, 19 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)))))): 2 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
  3. Recombined 2 regimes into one program.
  4. Final simplification8.3

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

Alternatives

Alternative 1
Error8.2
Cost4168
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(\left(y + t\right) \cdot a + z \cdot \left(x + y\right)\right) - y \cdot b}{t_1}\\ t_3 := a + z \cdot \frac{x + y}{t_1}\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{+304}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+282}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error20.3
Cost2136
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \left(z + \frac{y}{x} \cdot \left(z - b\right)\right) + \left(y + t\right) \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\ t_3 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ t_4 := a + t_3\\ \mathbf{if}\;x \leq -2.546550700736882 \cdot 10^{+114}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 6.419822411422625 \cdot 10^{-289}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.5690808883645831 \cdot 10^{-124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 207.12227290875015:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.6403668880731512 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.4543918621153115 \cdot 10^{+114}:\\ \;\;\;\;t_3 + \frac{t \cdot a}{x + t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error29.9
Cost2024
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := a + z \cdot \frac{x}{x + t}\\ t_3 := x + \left(y + t\right)\\ \mathbf{if}\;z \leq -1.0097491987536285 \cdot 10^{+91}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.7721612877292893 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7892073717586052 \cdot 10^{-87}:\\ \;\;\;\;a + x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;z \leq -2.027719555703835 \cdot 10^{-127}:\\ \;\;\;\;\frac{y}{\frac{\left(-y\right) - x}{b}}\\ \mathbf{elif}\;z \leq -6.84390464161328 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.97961290416265 \cdot 10^{-246}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;z \leq 2.200246425317224 \cdot 10^{-300}:\\ \;\;\;\;\frac{y \cdot \left(a - b\right)}{x + y}\\ \mathbf{elif}\;z \leq 1.7348030014749988 \cdot 10^{-214}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{t_3}\\ \mathbf{elif}\;z \leq 4.4908154750824105 \cdot 10^{-89}:\\ \;\;\;\;\frac{y \cdot t_1}{x + y}\\ \mathbf{elif}\;z \leq 5.94367663998266 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y}{\frac{t_3}{z}}\\ \end{array} \]
Alternative 4
Error29.5
Cost2024
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := a + z \cdot \frac{x}{x + t}\\ \mathbf{if}\;z \leq -1.0097491987536285 \cdot 10^{+91}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2.7721612877292893 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7892073717586052 \cdot 10^{-87}:\\ \;\;\;\;a + x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;z \leq -2.027719555703835 \cdot 10^{-127}:\\ \;\;\;\;\frac{y}{\frac{\left(-y\right) - x}{b}}\\ \mathbf{elif}\;z \leq -6.84390464161328 \cdot 10^{-147}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.97961290416265 \cdot 10^{-246}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;z \leq 2.200246425317224 \cdot 10^{-300}:\\ \;\;\;\;\frac{y \cdot \left(a - b\right)}{x + y}\\ \mathbf{elif}\;z \leq 1.7348030014749988 \cdot 10^{-214}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ \mathbf{elif}\;z \leq 4.4908154750824105 \cdot 10^{-89}:\\ \;\;\;\;\frac{y \cdot t_1}{x + y}\\ \mathbf{elif}\;z \leq 5.94367663998266 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
Alternative 5
Error24.3
Cost2020
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := a + z \cdot \frac{x + y}{t_1}\\ t_3 := z \cdot \left(x + y\right)\\ t_4 := \left(z + a\right) - b\\ t_5 := \frac{y \cdot t_4}{t_1}\\ \mathbf{if}\;z \leq -4.4659932589249126 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -9.282301729566822 \cdot 10^{-14}:\\ \;\;\;\;\frac{t_3 - y \cdot b}{t_1}\\ \mathbf{elif}\;z \leq -8.256686061621135 \cdot 10^{-140}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.78857460570549 \cdot 10^{-243}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a + t_3}{t_1}\\ \mathbf{elif}\;z \leq -1.6950725879051737 \cdot 10^{-263}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 1.2213350051830038 \cdot 10^{-275}:\\ \;\;\;\;\frac{y}{\frac{x + y}{a}}\\ \mathbf{elif}\;z \leq 5.630249382513926 \cdot 10^{-251}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq 1.7348030014749988 \cdot 10^{-214}:\\ \;\;\;\;t \cdot \frac{a}{x + t}\\ \mathbf{elif}\;z \leq 4.4908154750824105 \cdot 10^{-89}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error24.0
Cost1624
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{y \cdot \left(\left(z + a\right) - b\right)}{t_1}\\ t_3 := a + z \cdot \frac{x + y}{t_1}\\ \mathbf{if}\;z \leq -4.4659932589249126 \cdot 10^{+51}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -9.282301729566822 \cdot 10^{-14}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\ \mathbf{elif}\;z \leq -2.9481474514221326 \cdot 10^{-217}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.200246425317224 \cdot 10^{-300}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.7348030014749988 \cdot 10^{-214}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ \mathbf{elif}\;z \leq 4.4908154750824105 \cdot 10^{-89}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error23.4
Cost1360
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{y \cdot \left(\left(z + a\right) - b\right)}{t_1}\\ t_3 := a + z \cdot \frac{x + y}{t_1}\\ \mathbf{if}\;z \leq -2.9481474514221326 \cdot 10^{-217}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.200246425317224 \cdot 10^{-300}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.7348030014749988 \cdot 10^{-214}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ \mathbf{elif}\;z \leq 4.4908154750824105 \cdot 10^{-89}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error23.6
Cost1232
\[\begin{array}{l} t_1 := a + z \cdot \frac{x}{x + t}\\ t_2 := a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{if}\;t \leq -2.41008415757217 \cdot 10^{+75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 0.008488527590674625:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 8.284234057465977 \cdot 10^{+24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.4584081691852703 \cdot 10^{+171}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error23.9
Cost1104
\[\begin{array}{l} \mathbf{if}\;t \leq -2.41008415757217 \cdot 10^{+75}:\\ \;\;\;\;a + x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;t \leq 0.008488527590674625:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 8.284234057465977 \cdot 10^{+24}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t}\\ \mathbf{elif}\;t \leq 9.068481632461633 \cdot 10^{+129}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a + \frac{x + y}{\frac{t}{z}}\\ \end{array} \]
Alternative 10
Error23.9
Cost1104
\[\begin{array}{l} \mathbf{if}\;t \leq -2.41008415757217 \cdot 10^{+75}:\\ \;\;\;\;a + z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;t \leq 0.008488527590674625:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 8.284234057465977 \cdot 10^{+24}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t}\\ \mathbf{elif}\;t \leq 9.068481632461633 \cdot 10^{+129}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a + \frac{x + y}{\frac{t}{z}}\\ \end{array} \]
Alternative 11
Error20.3
Cost1096
\[\begin{array}{l} t_1 := a + z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{if}\;t \leq -14719924827106.752:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.2266080025402558 \cdot 10^{-99}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error27.2
Cost972
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := a + x \cdot \frac{z}{x + t}\\ \mathbf{if}\;x \leq -5.738027738203341 \cdot 10^{-153}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.169945573503212 \cdot 10^{-118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.2567338870330124 \cdot 10^{-15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 4.4543918621153115 \cdot 10^{+114}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 13
Error24.8
Cost712
\[\begin{array}{l} t_1 := a + z \cdot \frac{x}{t}\\ \mathbf{if}\;t \leq -1.562923146601576 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9.068481632461633 \cdot 10^{+129}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error24.8
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -1.562923146601576 \cdot 10^{+83}:\\ \;\;\;\;a + z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq 9.068481632461633 \cdot 10^{+129}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + x \cdot \frac{z}{t}\\ \end{array} \]
Alternative 15
Error31.1
Cost588
\[\begin{array}{l} \mathbf{if}\;t \leq 1.5496323845828818 \cdot 10^{-287}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 2.991662576042048 \cdot 10^{-122}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 9.068481632461633 \cdot 10^{+129}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Error26.6
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -7.950624327376661 \cdot 10^{+43}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 9.068481632461633 \cdot 10^{+129}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 17
Error36.4
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -1.2068871045905004 \cdot 10^{+110}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 4.1471910794349006 \cdot 10^{-30}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 18
Error43.1
Cost64
\[a \]

Error

Reproduce

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