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

?

Percentage Accurate: 60.1% → 98.1%
Time: 15.8s
Precision: binary64
Cost: 11593

?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(y + t\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(\left(x + y\right) \cdot z + t_1\right) - y \cdot b}{t_2}\\
\mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 2 \cdot 10^{+146}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t_2} + \frac{y}{t_2}, z, \frac{y}{\frac{t_2}{a - b}} + \frac{a}{\frac{t_2}{t}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{z - b}{\frac{t_2}{y}} + \left(\frac{t_1}{t_2} + \frac{x \cdot z}{t_2}\right)\\


\end{array}
\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 17 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.1%
Target82.7%
Herbie98.1%
\[\begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{\left(x + t\right) + y}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Derivation?

  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 1.99999999999999987e146 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 14.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. Simplified15.2%

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

      [Start]14.7%

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

      associate--l+ [=>]14.7%

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

      fma-def [=>]15.1%

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

      *-commutative [=>]15.1%

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

      distribute-rgt-in [=>]14.7%

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

      associate--l+ [=>]14.7%

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

      fma-def [=>]15.1%

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

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

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

      +-commutative [=>]15.2%

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

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

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

      [Start]38.7%

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

      fma-def [=>]38.7%

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

      associate-/l* [=>]70.8%

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

      associate-/l* [=>]99.9%

      \[ \mathsf{fma}\left(\frac{x}{y + \left(t + x\right)} + \frac{y}{y + \left(t + x\right)}, z, \frac{y}{\frac{y + \left(t + x\right)}{a - b}} + \color{blue}{\frac{a}{\frac{y + \left(t + x\right)}{t}}}\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)) < 1.99999999999999987e146

    1. Initial program 98.9%

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

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

      [Start]98.9%

      \[ \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    3. Taylor expanded in a around inf 98.9%

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

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

      [Start]98.9%

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

      associate-/l* [=>]99.7%

      \[ \color{blue}{\frac{z - b}{\frac{y + \left(t + x\right)}{y}}} + \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.7%

      \[ \frac{z - b}{\frac{y + \left(t + x\right)}{y}} + \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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -\infty \lor \neg \left(\frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{y + \left(x + t\right)} + \frac{y}{y + \left(x + t\right)}, z, \frac{y}{\frac{y + \left(x + t\right)}{a - b}} + \frac{a}{\frac{y + \left(x + t\right)}{t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z - b}{\frac{y + \left(x + t\right)}{y}} + \left(\frac{a \cdot \left(y + t\right)}{y + \left(x + t\right)} + \frac{x \cdot z}{y + \left(x + t\right)}\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy98.1%
Cost11593
\[\begin{array}{l} t_1 := a \cdot \left(y + t\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(\left(x + y\right) \cdot z + t_1\right) - y \cdot b}{t_2}\\ \mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{t_2} + \frac{y}{t_2}, z, \frac{y}{\frac{t_2}{a - b}} + \frac{a}{\frac{t_2}{t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z - b}{\frac{t_2}{y}} + \left(\frac{t_1}{t_2} + \frac{x \cdot z}{t_2}\right)\\ \end{array} \]
Alternative 2
Accuracy95.2%
Cost4937
\[\begin{array}{l} t_1 := a \cdot \left(y + t\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(\left(x + y\right) \cdot z + t_1\right) - y \cdot b}{t_2}\\ \mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;\left(a + z \cdot \frac{x + y}{x + \left(y + t\right)}\right) - \frac{y}{\frac{t_2}{b}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{x}{t_2} + \frac{y}{t_2}\right) + \frac{t_1 - y \cdot b}{t_2}\\ \end{array} \]
Alternative 3
Accuracy94.7%
Cost4937
\[\begin{array}{l} t_1 := a \cdot \left(y + t\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(\left(x + y\right) \cdot z + t_1\right) - y \cdot b}{t_2}\\ \mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;\left(a + z \cdot \frac{x + y}{x + \left(y + t\right)}\right) - \frac{y}{\frac{t_2}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z - b}{\frac{t_2}{y}} + \left(\frac{t_1}{t_2} + \frac{x \cdot z}{t_2}\right)\\ \end{array} \]
Alternative 4
Accuracy95.5%
Cost4297
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;\left(a + z \cdot \frac{x + y}{x + \left(y + t\right)}\right) - \frac{y}{\frac{t_1}{b}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Accuracy91.0%
Cost4169
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;\left(z + a\right) - \frac{y}{\frac{t_1}{b}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Accuracy74.9%
Cost1744
\[\begin{array}{l} t_1 := \left(a + z \cdot \frac{x + y}{x + \left(y + t\right)}\right) - \frac{y}{\frac{t}{b}}\\ t_2 := \left(z + a\right) - \frac{y}{\frac{y + \left(x + t\right)}{b}}\\ \mathbf{if}\;t \leq -1.35 \cdot 10^{+167}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-98}:\\ \;\;\;\;z + \left(\frac{y}{\frac{x}{a - b}} + t \cdot \frac{a}{x}\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+159}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Accuracy59.8%
Cost1232
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{x + \left(y + t\right)}\\ \mathbf{if}\;x \leq -2.5 \cdot 10^{+113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -4.4 \cdot 10^{+71}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{+122}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \end{array} \]
Alternative 8
Accuracy60.1%
Cost1232
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{x + \left(y + t\right)}\\ \mathbf{if}\;x \leq -7 \cdot 10^{+115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -4.3 \cdot 10^{+73}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+122}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \end{array} \]
Alternative 9
Accuracy59.9%
Cost1232
\[\begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+115}:\\ \;\;\;\;z \cdot \frac{x + y}{x + \left(y + t\right)}\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{+79}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{elif}\;x \leq -1.18 \cdot 10^{-15}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+122}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \end{array} \]
Alternative 10
Accuracy72.7%
Cost1225
\[\begin{array}{l} \mathbf{if}\;x \leq -9.8 \cdot 10^{+213} \lor \neg \left(x \leq 5.6 \cdot 10^{+122}\right):\\ \;\;\;\;z + \left(\frac{y}{\frac{x}{a - b}} + t \cdot \frac{a}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - \frac{y}{\frac{y + \left(x + t\right)}{b}}\\ \end{array} \]
Alternative 11
Accuracy59.1%
Cost1100
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{x + \left(y + t\right)}\\ \mathbf{if}\;x \leq -8 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{+73}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+144}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z - \frac{y}{\frac{x}{b}}\\ \end{array} \]
Alternative 12
Accuracy58.8%
Cost976
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z - \frac{y}{\frac{x}{b}}\\ \mathbf{if}\;x \leq -4.8 \cdot 10^{+234}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{-31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.35 \cdot 10^{-111}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+147}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Accuracy69.3%
Cost964
\[\begin{array}{l} \mathbf{if}\;x \leq 2.3 \cdot 10^{+123}:\\ \;\;\;\;\left(z + a\right) - \frac{y}{\frac{y + \left(x + t\right)}{b}}\\ \mathbf{else}:\\ \;\;\;\;z + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\ \end{array} \]
Alternative 14
Accuracy58.1%
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{-142} \lor \neg \left(y \leq 3.8 \cdot 10^{-72}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \end{array} \]
Alternative 15
Accuracy55.9%
Cost585
\[\begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-144} \lor \neg \left(y \leq 6.5 \cdot 10^{-71}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Accuracy43.9%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -4.4 \cdot 10^{+114}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+122}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 17
Accuracy32.8%
Cost64
\[a \]

Reproduce?

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