?

Average Accuracy: 58.6% → 88.1%
Time: 28.6s
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 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\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^{+288}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, z - b, \mathsf{fma}\left(y + t, a, x \cdot z\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 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+288)))
     (- (+ z a) b)
     (/ (fma y (- z b) (fma (+ y t) a (* x z))) (+ 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 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+288)) {
		tmp = (z + a) - b;
	} else {
		tmp = fma(y, (z - b), fma((y + t), a, (x * z))) / (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(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+288))
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = Float64(fma(y, Float64(z - b), fma(Float64(y + t), a, Float64(x * z))) / 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[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+288]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(N[(y * N[(z - b), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a + N[(x * z), $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 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\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^{+288}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}

Error?

Target

Original58.6%
Target82.3%
Herbie88.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 2e288 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 1.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. Simplified1.0%

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

      [Start]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

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

      *-commutative [=>]1.0

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

      +-commutative [=>]1.0

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

      distribute-rgt-in [=>]1.0

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

      associate-+l+ [=>]1.0

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

      associate-+r+ [=>]1.0

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

      +-commutative [<=]1.0

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

      sub-neg [<=]1.0

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

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

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

      fma-def [=>]1.0

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

      +-commutative [=>]1.0

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

      fma-def [=>]1.0

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

      +-commutative [=>]1.0

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

      associate-+l+ [=>]1.0

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

      +-commutative [=>]1.0

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

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
    4. Simplified72.0%

      \[\leadsto \color{blue}{\left(z + a\right) - b} \]
      Proof

      [Start]72.0

      \[ \left(a + z\right) - b \]

      +-commutative [=>]72.0

      \[ \color{blue}{\left(z + a\right)} - 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)) < 2e288

    1. Initial program 99.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. Simplified99.5%

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

      [Start]99.5

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

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

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

      *-commutative [=>]99.5

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

      +-commutative [=>]99.5

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

      distribute-rgt-in [=>]99.4

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

      associate-+l+ [=>]99.4

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

      associate-+r+ [=>]99.4

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

      +-commutative [<=]99.4

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

      sub-neg [<=]99.4

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

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

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

      fma-def [=>]99.5

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

      +-commutative [=>]99.5

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

      fma-def [=>]99.5

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

      +-commutative [=>]99.5

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

      associate-+l+ [=>]99.5

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

      +-commutative [=>]99.5

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

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

Alternatives

Alternative 1
Accuracy88.1%
Cost4169
\[\begin{array}{l} t_1 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\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^{+288}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Accuracy55.1%
Cost2672
\[\begin{array}{l} t_1 := \frac{\left(y \cdot a + z \cdot \left(x + y\right)\right) - y \cdot b}{x + y}\\ t_2 := b \cdot \frac{y}{\left(\left(-x\right) - t\right) - y}\\ t_3 := x + \left(y + t\right)\\ t_4 := \frac{a}{\frac{t_3}{y + t}}\\ t_5 := \frac{z}{\frac{t_3}{x + y}}\\ t_6 := \frac{y}{\frac{x + y}{a - b}}\\ \mathbf{if}\;z \leq -8.8 \cdot 10^{+171}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-8}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-152}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{-179}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-234}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-263}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-297}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-286}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-242}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-110}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 3
Accuracy59.7%
Cost2272
\[\begin{array}{l} t_1 := a - \frac{x \cdot \left(a - z\right)}{t}\\ t_2 := \frac{a}{\frac{x}{y + t}} + \left(z + \frac{y}{x} \cdot \left(\left(z - b\right) - z\right)\right)\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;x \leq -8.2 \cdot 10^{+26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{-128}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -5.6 \cdot 10^{-242}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-88}:\\ \;\;\;\;\frac{y \cdot t_3}{y + \left(x + t\right)}\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-20}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;x \leq 3.45 \cdot 10^{+112}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Accuracy55.7%
Cost2024
\[\begin{array}{l} t_1 := b \cdot \frac{y}{\left(\left(-x\right) - t\right) - y}\\ t_2 := x + \left(y + t\right)\\ t_3 := \frac{a}{\frac{t_2}{y + t}}\\ t_4 := \frac{z}{\frac{t_2}{x + y}}\\ t_5 := \frac{y}{\frac{x + y}{a - b}}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+173}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-11}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-152}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-263}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{-296}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{-290}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-242}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-110}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+24}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 5
Accuracy57.5%
Cost1760
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := x + \left(y + t\right)\\ t_3 := \frac{a}{\frac{t_2}{y + t}}\\ t_4 := \frac{z}{\frac{t_2}{x + y}}\\ \mathbf{if}\;a \leq -1.66 \cdot 10^{+22}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-82}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-27}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-10}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 6.7 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+103}:\\ \;\;\;\;\frac{x + y}{\frac{y + \left(x + t\right)}{z}}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+127}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Accuracy53.4%
Cost1632
\[\begin{array}{l} t_1 := a - \frac{x \cdot \left(a - z\right)}{t}\\ t_2 := \left(z + a\right) - b\\ t_3 := \frac{z}{\frac{x + t}{x}}\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-31}:\\ \;\;\;\;\frac{-y}{\frac{x + t}{b}}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-291}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-106}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-49}:\\ \;\;\;\;z + \frac{t \cdot \left(a - z\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Accuracy55.4%
Cost1628
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := \frac{a}{\frac{t_1}{y + t}}\\ t_3 := \frac{z}{\frac{t_1}{x + y}}\\ t_4 := \frac{y}{\frac{x + y}{a - b}}\\ \mathbf{if}\;z \leq -4.3 \cdot 10^{+173}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-11}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-152}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-286}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-246}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-16}:\\ \;\;\;\;b \cdot \frac{y}{\left(\left(-x\right) - t\right) - y}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Accuracy53.7%
Cost1504
\[\begin{array}{l} t_1 := a - \frac{x \cdot \left(a - z\right)}{t}\\ t_2 := \left(z + a\right) - b\\ t_3 := \frac{z}{\frac{x + t}{x}}\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{+78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-30}:\\ \;\;\;\;\frac{-y}{\frac{x + t}{b}}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-291}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-207}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-107}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-43}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Accuracy54.6%
Cost1500
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := a - \frac{x \cdot \left(a - z\right)}{t}\\ \mathbf{if}\;x \leq -7 \cdot 10^{+99}:\\ \;\;\;\;z + \frac{t \cdot \left(a - z\right)}{x}\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-131}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-241}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 6.1 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-151}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+142}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.05 \cdot 10^{+230}:\\ \;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \end{array} \]
Alternative 10
Accuracy55.0%
Cost1300
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := b \cdot \frac{y}{\left(\left(-x\right) - t\right) - y}\\ \mathbf{if}\;b \leq -7 \cdot 10^{+205}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4 \cdot 10^{+132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.7 \cdot 10^{+68}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+75}:\\ \;\;\;\;a - \frac{x \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Accuracy54.9%
Cost1300
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;b \leq -8.2 \cdot 10^{+203}:\\ \;\;\;\;\frac{y}{\frac{t + \left(x + y\right)}{-b}}\\ \mathbf{elif}\;b \leq -4 \cdot 10^{+132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{+68}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{+77}:\\ \;\;\;\;a - \frac{x \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{y}{\left(\left(-x\right) - t\right) - y}\\ \end{array} \]
Alternative 12
Accuracy55.4%
Cost1300
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;b \leq -3 \cdot 10^{+203}:\\ \;\;\;\;\frac{y}{\frac{t + \left(x + y\right)}{-b}}\\ \mathbf{elif}\;b \leq -9 \cdot 10^{+132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+59}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{+72}:\\ \;\;\;\;a - \frac{x \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{y}{\left(\left(-x\right) - t\right) - y}\\ \end{array} \]
Alternative 13
Accuracy53.8%
Cost1240
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{z}{\frac{x + t}{x}}\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.16 \cdot 10^{-32}:\\ \;\;\;\;\frac{-y}{\frac{x + t}{b}}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-107}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-78}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-45}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Accuracy57.1%
Cost976
\[\begin{array}{l} t_1 := \frac{z}{\frac{x + t}{x}}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{-80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-78}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Accuracy42.5%
Cost852
\[\begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{+99}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.38 \cdot 10^{-285}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-123}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-31}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+88}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Accuracy42.4%
Cost592
\[\begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+95}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-27}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.66 \cdot 10^{+62}:\\ \;\;\;\;-b\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+69}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 17
Accuracy58.3%
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+125}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+163}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 18
Accuracy44.4%
Cost328
\[\begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+21}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+146}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 19
Accuracy33.5%
Cost64
\[a \]

Error

Reproduce?

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