?

Average Error: 40.83% → 12.39%
Time: 19.3s
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 5 \cdot 10^{+229}\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 5e+229)))
     (- (+ 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 <= 5e+229)) {
		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 <= 5e+229))
		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, 5e+229]], $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 5 \cdot 10^{+229}\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

Original40.83%
Target17.79%
Herbie12.39%
\[\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 5.0000000000000005e229 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 95.06

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      [Start]28.4

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

      +-commutative [=>]28.4

      \[ \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)) < 5.0000000000000005e229

    1. Initial program 0.49

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[ \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 simplification12.39

    \[\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 5 \cdot 10^{+229}\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
Error12.4%
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 5 \cdot 10^{+229}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error41.39%
Cost2156
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := \frac{x \cdot z + t \cdot a}{x + t}\\ t_3 := a \cdot \left(y + t\right) - y \cdot b\\ t_4 := \left(z + a\right) - b\\ t_5 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_6 := \frac{t_3}{y + \left(x + t\right)}\\ \mathbf{if}\;z \leq -2 \cdot 10^{+73}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{+22}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-29}:\\ \;\;\;\;\frac{y \cdot t_4}{t_1}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-122}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-207}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-115}:\\ \;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-70}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-28}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-10}:\\ \;\;\;\;\frac{t_3}{y + t}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+185}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 3
Error44.31%
Cost2024
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := z \cdot \frac{x + y}{t_1}\\ t_3 := \left(z + a\right) - b\\ t_4 := \frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ t_5 := \frac{a \cdot \left(y + t\right) - y \cdot b}{y + t}\\ \mathbf{if}\;a \leq -5.4 \cdot 10^{+144}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{+83}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -0.0015:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-42}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-105}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-128}:\\ \;\;\;\;\frac{y}{\frac{t_1}{-b}}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-76}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-34}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+100}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 4
Error43.94%
Cost1892
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ t_3 := z \cdot \frac{x + y}{t_1}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;a \leq -3.8 \cdot 10^{+142}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{+81}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -0.00135:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;a \leq -2.15 \cdot 10^{-41}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-128}:\\ \;\;\;\;\frac{y}{\frac{t_1}{-b}}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-140}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;a \leq -1.7 \cdot 10^{-222}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-185}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+100}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error43.47%
Cost1760
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \frac{y}{\frac{t_1}{-b}}\\ t_3 := z \cdot \frac{x + y}{t_1}\\ t_4 := \frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ t_5 := \left(z + a\right) - b\\ \mathbf{if}\;a \leq -3.8 \cdot 10^{+142}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{+61}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-40}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-89}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-105}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-127}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-185}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+103}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 6
Error44.54%
Cost1496
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := z \cdot \frac{x + y}{t_1}\\ t_3 := \left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;a \leq -3.9 \cdot 10^{+142}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-40}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-127}:\\ \;\;\;\;\frac{y}{\frac{t_1}{-b}}\\ \mathbf{elif}\;a \leq 2.85 \cdot 10^{-185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+103}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error43.73%
Cost1236
\[\begin{array}{l} t_1 := z \cdot \frac{x}{x + t}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -2.5 \cdot 10^{-59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-227}:\\ \;\;\;\;\frac{a}{1 + \frac{x}{t}}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-277}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-157}:\\ \;\;\;\;a + \frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{-151}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error44.05%
Cost1236
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -3.1 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-175}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{-228}:\\ \;\;\;\;\frac{a}{1 + \frac{x}{t}}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-277}:\\ \;\;\;\;z + \frac{t \cdot \left(a - z\right)}{x}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-150}:\\ \;\;\;\;a + \frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error59.17%
Cost1116
\[\begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+148}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-43}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-129}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-139}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-76}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-20}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+41}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
Alternative 10
Error58.79%
Cost1116
\[\begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+142}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-41}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-129}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-139}:\\ \;\;\;\;z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-77}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-32}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+34}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
Alternative 11
Error43.29%
Cost976
\[\begin{array}{l} t_1 := z \cdot \frac{x}{x + t}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -7.2 \cdot 10^{-59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-179}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-228}:\\ \;\;\;\;\frac{a}{1 + \frac{x}{t}}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-194}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error43.26%
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-59} \lor \neg \left(y \leq 5.3 \cdot 10^{-194}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \end{array} \]
Alternative 13
Error57.95%
Cost592
\[\begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+148}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-77}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-30}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+56}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 14
Error57.26%
Cost592
\[\begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+82}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-229}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-303}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+120}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 15
Error41.88%
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+194}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+212}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Error67.67%
Cost64
\[a \]

Error

Reproduce?

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