?

Average Error: 41.91% → 0.42%
Time: 27.8s
Precision: binary64
Cost: 4937

?

\[\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 := z \cdot \left(x + y\right)\\ t_2 := x + \left(y + t\right)\\ t_3 := y + \left(x + t\right)\\ t_4 := \left(y + t\right) \cdot a\\ t_5 := \frac{\left(t_4 + t_1\right) - y \cdot b}{t_3}\\ \mathbf{if}\;t_5 \leq -\infty \lor \neg \left(t_5 \leq 5 \cdot 10^{+306}\right):\\ \;\;\;\;\left(y \cdot \frac{z - b}{t_2} + \left(y + t\right) \cdot \frac{a}{t_2}\right) + x \cdot \frac{z}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_4}{t_3} + \frac{t_1 - y \cdot b}{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)))
        (t_2 (+ x (+ y t)))
        (t_3 (+ y (+ x t)))
        (t_4 (* (+ y t) a))
        (t_5 (/ (- (+ t_4 t_1) (* y b)) t_3)))
   (if (or (<= t_5 (- INFINITY)) (not (<= t_5 5e+306)))
     (+ (+ (* y (/ (- z b) t_2)) (* (+ y t) (/ a t_2))) (* x (/ z t_2)))
     (+ (/ t_4 t_3) (/ (- t_1 (* y b)) 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);
	double t_2 = x + (y + t);
	double t_3 = y + (x + t);
	double t_4 = (y + t) * a;
	double t_5 = ((t_4 + t_1) - (y * b)) / t_3;
	double tmp;
	if ((t_5 <= -((double) INFINITY)) || !(t_5 <= 5e+306)) {
		tmp = ((y * ((z - b) / t_2)) + ((y + t) * (a / t_2))) + (x * (z / t_2));
	} else {
		tmp = (t_4 / t_3) + ((t_1 - (y * b)) / 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 = z * (x + y);
	double t_2 = x + (y + t);
	double t_3 = y + (x + t);
	double t_4 = (y + t) * a;
	double t_5 = ((t_4 + t_1) - (y * b)) / t_3;
	double tmp;
	if ((t_5 <= -Double.POSITIVE_INFINITY) || !(t_5 <= 5e+306)) {
		tmp = ((y * ((z - b) / t_2)) + ((y + t) * (a / t_2))) + (x * (z / t_2));
	} else {
		tmp = (t_4 / t_3) + ((t_1 - (y * b)) / 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)
	t_2 = x + (y + t)
	t_3 = y + (x + t)
	t_4 = (y + t) * a
	t_5 = ((t_4 + t_1) - (y * b)) / t_3
	tmp = 0
	if (t_5 <= -math.inf) or not (t_5 <= 5e+306):
		tmp = ((y * ((z - b) / t_2)) + ((y + t) * (a / t_2))) + (x * (z / t_2))
	else:
		tmp = (t_4 / t_3) + ((t_1 - (y * b)) / 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(z * Float64(x + y))
	t_2 = Float64(x + Float64(y + t))
	t_3 = Float64(y + Float64(x + t))
	t_4 = Float64(Float64(y + t) * a)
	t_5 = Float64(Float64(Float64(t_4 + t_1) - Float64(y * b)) / t_3)
	tmp = 0.0
	if ((t_5 <= Float64(-Inf)) || !(t_5 <= 5e+306))
		tmp = Float64(Float64(Float64(y * Float64(Float64(z - b) / t_2)) + Float64(Float64(y + t) * Float64(a / t_2))) + Float64(x * Float64(z / t_2)));
	else
		tmp = Float64(Float64(t_4 / t_3) + Float64(Float64(t_1 - Float64(y * b)) / 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);
	t_2 = x + (y + t);
	t_3 = y + (x + t);
	t_4 = (y + t) * a;
	t_5 = ((t_4 + t_1) - (y * b)) / t_3;
	tmp = 0.0;
	if ((t_5 <= -Inf) || ~((t_5 <= 5e+306)))
		tmp = ((y * ((z - b) / t_2)) + ((y + t) * (a / t_2))) + (x * (z / t_2));
	else
		tmp = (t_4 / t_3) + ((t_1 - (y * b)) / 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[Or[LessEqual[t$95$5, (-Infinity)], N[Not[LessEqual[t$95$5, 5e+306]], $MachinePrecision]], N[(N[(N[(y * N[(N[(z - b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$4 / t$95$3), $MachinePrecision] + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]
\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 := z \cdot \left(x + y\right)\\
t_2 := x + \left(y + t\right)\\
t_3 := y + \left(x + t\right)\\
t_4 := \left(y + t\right) \cdot a\\
t_5 := \frac{\left(t_4 + t_1\right) - y \cdot b}{t_3}\\
\mathbf{if}\;t_5 \leq -\infty \lor \neg \left(t_5 \leq 5 \cdot 10^{+306}\right):\\
\;\;\;\;\left(y \cdot \frac{z - b}{t_2} + \left(y + t\right) \cdot \frac{a}{t_2}\right) + x \cdot \frac{z}{t_2}\\

\mathbf{else}:\\
\;\;\;\;\frac{t_4}{t_3} + \frac{t_1 - y \cdot b}{t_3}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original41.91%
Target16.81%
Herbie0.42%
\[\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 4.99999999999999993e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 99.91

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Simplified99.91

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

      [Start]99.91

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

      sub-neg [=>]99.91

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

      +-commutative [=>]99.91

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

      associate-+l+ [=>]99.91

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

      fma-def [=>]99.91

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

      +-commutative [=>]99.91

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

      *-commutative [=>]99.91

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

      distribute-rgt-in [=>]99.91

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

      associate-+l+ [=>]99.91

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

      fma-def [=>]99.91

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

      sub-neg [<=]99.91

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

      distribute-lft-out-- [=>]99.91

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

      +-commutative [=>]99.91

      \[ \frac{\mathsf{fma}\left(y + t, a, \mathsf{fma}\left(x, z, y \cdot \left(z - b\right)\right)\right)}{\color{blue}{y + \left(x + t\right)}} \]
    3. Taylor expanded in a around inf 99.91

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

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

      [Start]99.91

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

      +-commutative [=>]99.91

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

      associate-+r+ [=>]99.91

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

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

    1. Initial program 0.52

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Simplified0.52

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

      [Start]0.52

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

      cancel-sign-sub [<=]0.52

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

      distribute-lft-neg-in [<=]0.52

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

      fma-neg [=>]0.52

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

      remove-double-neg [=>]0.52

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

      +-commutative [=>]0.52

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

      +-commutative [=>]0.52

      \[ \frac{\mathsf{fma}\left(x + y, z, \left(y + t\right) \cdot a\right) - y \cdot b}{\color{blue}{y + \left(x + t\right)}} \]
    3. Taylor expanded in z around inf 0.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)}} \]
    4. Simplified0.51

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

      [Start]0.5

      \[ \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)} \]

      +-commutative [=>]0.5

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

      associate--l+ [=>]0.5

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

      associate-+r+ [=>]0.5

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

      +-commutative [<=]0.5

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

      associate-+r+ [=>]0.5

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

      +-commutative [<=]0.5

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

      div-sub [<=]0.51

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

      +-commutative [=>]0.51

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

      associate-+r+ [<=]0.51

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

      *-commutative [=>]0.51

      \[ \frac{a \cdot \left(y + t\right)}{y + \left(t + x\right)} + \frac{\color{blue}{z \cdot \left(y + x\right)} - y \cdot b}{y + \left(t + x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.42

    \[\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 -\infty \lor \neg \left(\frac{\left(\left(y + t\right) \cdot a + z \cdot \left(x + y\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 5 \cdot 10^{+306}\right):\\ \;\;\;\;\left(y \cdot \frac{z - b}{x + \left(y + t\right)} + \left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\right) + x \cdot \frac{z}{x + \left(y + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a}{y + \left(x + t\right)} + \frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error9.75%
Cost4552
\[\begin{array}{l} t_1 := z \cdot \left(x + y\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \left(y + t\right) \cdot a\\ t_4 := \frac{\left(t_3 + t_1\right) - y \cdot b}{t_2}\\ t_5 := x + \left(y + t\right)\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;z + \left(y \cdot \frac{z - b}{t_5} + \left(y + t\right) \cdot \left(a \cdot \frac{1}{t_5}\right)\right)\\ \mathbf{elif}\;t_4 \leq 5 \cdot 10^{+274}:\\ \;\;\;\;\frac{t_3}{t_2} + \frac{t_1 - y \cdot b}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
Alternative 2
Error13.36%
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}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;a \cdot \frac{y + t}{t_1} - y \cdot \frac{b}{t_1}\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+274}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
Alternative 3
Error9.75%
Cost4168
\[\begin{array}{l} t_1 := \frac{\left(\left(y + t\right) \cdot a + z \cdot \left(x + y\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := x + \left(y + t\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;z + \left(y \cdot \frac{z - b}{t_2} + \left(y + t\right) \cdot \left(a \cdot \frac{1}{t_2}\right)\right)\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+274}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
Alternative 4
Error44.22%
Cost2156
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{a}{\frac{t_2}{y + t}}\\ t_4 := \frac{x \cdot z + t \cdot a}{x + t}\\ t_5 := y \cdot \frac{-b}{t_2}\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{+136}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{+57}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-29}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-109}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-252}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.75 \cdot 10^{-60}:\\ \;\;\;\;\frac{y}{x + y} \cdot \left(a - b\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-35}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-15}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq 1.34 \cdot 10^{+17}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error45.17%
Cost2156
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{a}{\frac{t_2}{y + t}}\\ t_4 := \frac{x \cdot z + t \cdot a}{x + t}\\ t_5 := \frac{\left(y + t\right) \cdot a - y \cdot b}{y + t}\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+136}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{+60}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-31}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-108}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-251}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-151}:\\ \;\;\;\;\frac{y}{x + y} \cdot \left(a - b\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-48}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-15}:\\ \;\;\;\;y \cdot \frac{-b}{t_2}\\ \mathbf{elif}\;z \leq 3500000000000:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error35.89%
Cost1884
\[\begin{array}{l} t_1 := z + \left(a + y \cdot \frac{z - b}{x + \left(y + t\right)}\right)\\ t_2 := \frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+130}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{+61}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-177}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
Alternative 7
Error36.45%
Cost1884
\[\begin{array}{l} t_1 := z + \left(a + y \cdot \frac{z - b}{x + \left(y + t\right)}\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{+134}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.85 \cdot 10^{+54}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-28}:\\ \;\;\;\;\frac{a}{\frac{t_2}{y + t}}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-63}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-185}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{t_2}\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error28.18%
Cost1608
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{+127}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-11}:\\ \;\;\;\;a \cdot \frac{y + t}{t_1} - y \cdot \frac{b}{t_1}\\ \mathbf{elif}\;z \leq 3200000000000:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;z \leq 9.7 \cdot 10^{+33}:\\ \;\;\;\;z + \left(a + y \cdot \frac{z - b}{x + \left(y + t\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
Alternative 9
Error43.78%
Cost1564
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{+134}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+58}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-247}:\\ \;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\ \mathbf{elif}\;z \leq 10^{-127}:\\ \;\;\;\;\frac{y}{x + y} \cdot \left(a - b\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-13}:\\ \;\;\;\;y \cdot \frac{-b}{t_1}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+23}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error45.29%
Cost1500
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{z}{\frac{x + t}{x}}\\ t_3 := \frac{y}{x + y} \cdot \left(a - b\right)\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+163}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-28}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-146}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-176}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-124}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error43.96%
Cost1500
\[\begin{array}{l} t_1 := \frac{y}{x + y} \cdot \left(a - b\right)\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;z \leq -5.3 \cdot 10^{+135}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+68}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{+62}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-146}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-176}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+23}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error42.04%
Cost1108
\[\begin{array}{l} \mathbf{if}\;t \leq -1.62 \cdot 10^{+239}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+159}:\\ \;\;\;\;\frac{y}{\frac{y + t}{z - b}}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{+128}:\\ \;\;\;\;a \cdot \frac{t}{x + t}\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{+90}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+138}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \end{array} \]
Alternative 13
Error42.57%
Cost973
\[\begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+222}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ \mathbf{elif}\;a \leq -3.15 \cdot 10^{-168} \lor \neg \left(a \leq 2.4 \cdot 10^{-41}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{y + t}{z - b}}\\ \end{array} \]
Alternative 14
Error44.4%
Cost844
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -7.3 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-126}:\\ \;\;\;\;z \cdot \left(1 - \frac{t}{x}\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+27}:\\ \;\;\;\;a \cdot \frac{t}{x + t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error44.41%
Cost844
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -7.3 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-126}:\\ \;\;\;\;z \cdot \left(1 - \frac{t}{x}\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+27}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error44.38%
Cost844
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -760000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-126}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+27}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error54.93%
Cost720
\[\begin{array}{l} \mathbf{if}\;a \leq -6.6 \cdot 10^{+100}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{+71}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-86}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-34}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
Alternative 18
Error40.85%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -1.22 \cdot 10^{+232}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+156}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 19
Error51.63%
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+127}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-43}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z - b\\ \end{array} \]
Alternative 20
Error55.17%
Cost328
\[\begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+68}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-43}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 21
Error66.58%
Cost64
\[a \]

Error

Reproduce?

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