AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1

?

Percentage Accurate: 60.9% → 96.9%
Time: 21.0s
Precision: binary64
Cost: 16713

?

\[\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}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 4 \cdot 10^{+285}\right):\\ \;\;\;\;\left(\frac{x + y}{\frac{t_1}{z}} + \frac{y + t}{\frac{t_1}{a}}\right) - \frac{y}{\frac{y + t}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, a - b, \mathsf{fma}\left(x + y, z, t \cdot a\right)\right)}{x + \left(y + t\right)}\\ \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)))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 4e+285)))
     (- (+ (/ (+ x y) (/ t_1 z)) (/ (+ y t) (/ t_1 a))) (/ y (/ (+ y t) b)))
     (/ (fma y (- a b) (fma (+ x y) z (* t a))) (+ x (+ y t))))))
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 tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 4e+285)) {
		tmp = (((x + y) / (t_1 / z)) + ((y + t) / (t_1 / a))) - (y / ((y + t) / b));
	} else {
		tmp = fma(y, (a - b), fma((x + y), z, (t * a))) / (x + (y + t));
	}
	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)
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 4e+285))
		tmp = Float64(Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(Float64(y + t) / Float64(t_1 / a))) - Float64(y / Float64(Float64(y + t) / b)));
	else
		tmp = Float64(fma(y, Float64(a - b), fma(Float64(x + y), z, Float64(t * a))) / Float64(x + Float64(y + t)));
	end
	return 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]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 4e+285]], $MachinePrecision]], N[(N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] / N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[(y + t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(a - b), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * z + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $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 := 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}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 4 \cdot 10^{+285}\right):\\
\;\;\;\;\left(\frac{x + y}{\frac{t_1}{z}} + \frac{y + t}{\frac{t_1}{a}}\right) - \frac{y}{\frac{y + t}{b}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, a - b, \mathsf{fma}\left(x + y, z, t \cdot a\right)\right)}{x + \left(y + t\right)}\\


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 18 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Bogosity?

Bogosity

Target

Original60.9%
Target82.2%
Herbie96.9%
\[\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 3.9999999999999999e285 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 5.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. Simplified5.6%

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

      [Start]5.5%

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

      *-commutative [=>]5.5%

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

      distribute-rgt-in [=>]5.1%

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

      associate-+r+ [=>]5.1%

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

      associate--l+ [=>]5.1%

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

      +-commutative [=>]5.1%

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

      +-commutative [=>]5.1%

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

      distribute-lft-out-- [=>]5.2%

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

      fma-def [=>]5.5%

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

      +-commutative [<=]5.5%

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

      fma-def [=>]5.6%

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

      associate-+l+ [=>]5.6%

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

      +-commutative [=>]5.6%

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

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

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

      [Start]5.5%

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

      associate-+r+ [=>]5.5%

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

      mul-1-neg [=>]5.5%

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

      unsub-neg [=>]5.5%

      \[ \color{blue}{\left(\frac{\left(y + x\right) \cdot z}{y + \left(t + x\right)} + -1 \cdot \frac{\left(-1 \cdot t + -1 \cdot y\right) \cdot a}{y + \left(t + x\right)}\right) - \frac{y \cdot b}{y + \left(t + x\right)}} \]
    5. Taylor expanded in x around 0 71.0%

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

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

      [Start]71.0%

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

      associate-/l* [=>]92.7%

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

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

    1. Initial program 99.7%

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

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

      [Start]99.7%

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

      *-commutative [=>]99.7%

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

      distribute-rgt-in [=>]99.7%

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

      associate-+r+ [=>]99.7%

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

      associate--l+ [=>]99.7%

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

      +-commutative [=>]99.7%

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

      +-commutative [=>]99.7%

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

      distribute-lft-out-- [=>]99.8%

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

      fma-def [=>]99.7%

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

      +-commutative [<=]99.7%

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

      fma-def [=>]99.7%

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

      associate-+l+ [=>]99.7%

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

      +-commutative [=>]99.7%

      \[ \frac{\mathsf{fma}\left(y, a - b, \mathsf{fma}\left(x + y, z, t \cdot a\right)\right)}{x + \color{blue}{\left(y + t\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.9%

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

Alternatives

Alternative 1
Accuracy96.9%
Cost16713
\[\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}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 4 \cdot 10^{+285}\right):\\ \;\;\;\;\left(\frac{x + y}{\frac{t_1}{z}} + \frac{y + t}{\frac{t_1}{a}}\right) - \frac{y}{\frac{y + t}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, a - b, \mathsf{fma}\left(x + y, z, t \cdot a\right)\right)}{x + \left(y + t\right)}\\ \end{array} \]
Alternative 2
Accuracy96.9%
Cost4809
\[\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}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 4 \cdot 10^{+285}\right):\\ \;\;\;\;\left(\frac{x + y}{\frac{t_1}{z}} + \frac{y + t}{\frac{t_1}{a}}\right) - \frac{y}{\frac{y + t}{b}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Accuracy87.7%
Cost4169
\[\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)}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+191}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Accuracy92.6%
Cost4169
\[\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}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+191}\right):\\ \;\;\;\;\left(a + \frac{x + y}{\frac{t_1}{z}}\right) - \frac{y}{\frac{y + t}{b}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Accuracy92.7%
Cost4168
\[\begin{array}{l} t_1 := \frac{y}{\frac{y + t}{b}}\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(a \cdot \left(y + t\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{t_2}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\left(\frac{z}{\frac{x + t}{x}} + \frac{y + t}{\frac{t_2}{a}}\right) - t_1\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{+191}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\left(a + \frac{x + y}{\frac{t_2}{z}}\right) - t_1\\ \end{array} \]
Alternative 6
Accuracy91.1%
Cost4168
\[\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 := \frac{x + y}{\frac{t_1}{z}}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\left(t_3 + \frac{y + t}{\frac{t_1}{a}}\right) - \frac{y}{\frac{x + t}{b}}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+191}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(a + t_3\right) - \frac{y}{\frac{y + t}{b}}\\ \end{array} \]
Alternative 7
Accuracy64.2%
Cost1620
\[\begin{array}{l} t_1 := y \cdot \left(a - b\right)\\ t_2 := z \cdot \left(x + y\right)\\ t_3 := y + \left(x + t\right)\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -5 \cdot 10^{+31}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-198}:\\ \;\;\;\;\frac{t_1 + t_2}{x + y}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-75}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+19}:\\ \;\;\;\;\frac{t_1 + t \cdot a}{t_3}\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+41}:\\ \;\;\;\;\frac{t_2 - y \cdot b}{t_3}\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 8
Accuracy64.3%
Cost1488
\[\begin{array}{l} t_1 := y \cdot \left(a - b\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -6.8 \cdot 10^{+30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-198}:\\ \;\;\;\;\frac{t_1 + z \cdot \left(x + y\right)}{x + y}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-74}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{+21}:\\ \;\;\;\;\frac{t_1 + t \cdot a}{t_2}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+32}:\\ \;\;\;\;\frac{x + y}{\frac{t_2}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Accuracy59.9%
Cost1232
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{+170}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-74}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{+77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Accuracy60.2%
Cost1232
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \mathbf{if}\;x \leq -4 \cdot 10^{+170}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Accuracy59.9%
Cost1104
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z + \frac{y}{\frac{x}{a - b}}\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{+170}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-74}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Accuracy55.4%
Cost716
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;t \leq -6 \cdot 10^{+141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.72 \cdot 10^{+83}:\\ \;\;\;\;t \cdot \frac{a}{x}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+168}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 13
Accuracy56.2%
Cost716
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;t \leq -6 \cdot 10^{+141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{a}{\frac{x}{t}}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+167}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 14
Accuracy55.5%
Cost716
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;t \leq -6 \cdot 10^{+141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+82}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+167}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 15
Accuracy57.7%
Cost580
\[\begin{array}{l} \mathbf{if}\;t \leq 5.9 \cdot 10^{+168}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{1 + \frac{x}{t}}\\ \end{array} \]
Alternative 16
Accuracy47.8%
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+24}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+73}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 17
Accuracy44.5%
Cost328
\[\begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+24}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+73}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 18
Accuracy32.5%
Cost64
\[a \]

Reproduce?

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