Average Error: 26.0 → 0.2
Time: 18.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 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{-22} \lor \neg \left(t_2 \leq 5 \cdot 10^{+71}\right):\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(\frac{z}{\frac{t_1}{x}} + \frac{a}{\frac{t_1}{y + t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + t, a, \mathsf{fma}\left(x, z, y \cdot \left(z - b\right)\right)\right)}{t_1}\\ \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 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) t_1)))
   (if (or (<= t_2 -5e-22) (not (<= t_2 5e+71)))
     (+ (/ (- z b) (/ t_1 y)) (+ (/ z (/ t_1 x)) (/ a (/ t_1 (+ y t)))))
     (/ (fma (+ y t) a (fma x z (* y (- z b)))) t_1))))
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 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -5e-22) || !(t_2 <= 5e+71)) {
		tmp = ((z - b) / (t_1 / y)) + ((z / (t_1 / x)) + (a / (t_1 / (y + t))));
	} else {
		tmp = fma((y + t), a, fma(x, z, (y * (z - b)))) / t_1;
	}
	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(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1)
	tmp = 0.0
	if ((t_2 <= -5e-22) || !(t_2 <= 5e+71))
		tmp = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(Float64(z / Float64(t_1 / x)) + Float64(a / Float64(t_1 / Float64(y + t)))));
	else
		tmp = Float64(fma(Float64(y + t), a, fma(x, z, Float64(y * Float64(z - b)))) / t_1);
	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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -5e-22], N[Not[LessEqual[t$95$2, 5e+71]], $MachinePrecision]], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(z / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision] + N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + t), $MachinePrecision] * a + N[(x * z + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $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(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-22} \lor \neg \left(t_2 \leq 5 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(\frac{z}{\frac{t_1}{x}} + \frac{a}{\frac{t_1}{y + t}}\right)\\

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


\end{array}

Error

Target

Original26.0
Target11.1
Herbie0.2
\[\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)) < -4.99999999999999954e-22 or 4.99999999999999972e71 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 36.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      [Start]36.8

      \[ \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* [=>]27.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 [=>]27.7

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

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

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

      +-commutative [=>]19.2

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

      +-commutative [=>]19.2

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

      associate-/l* [=>]0.1

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

      +-commutative [=>]0.1

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

      +-commutative [=>]0.1

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

      +-commutative [=>]0.1

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

    if -4.99999999999999954e-22 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999972e71

    1. Initial program 0.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[ \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. Recombined 2 regimes into one program.
  4. Final simplification0.2

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

Alternatives

Alternative 1
Error0.2
Cost4937
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_2 \leq -5 \cdot 10^{-22} \lor \neg \left(t_2 \leq 5 \cdot 10^{+71}\right):\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(\frac{z}{\frac{t_1}{x}} + \frac{a}{\frac{t_1}{y + t}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error3.5
Cost4297
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\ \mathbf{if}\;t_2 \leq -4 \cdot 10^{+145} \lor \neg \left(t_2 \leq 2 \cdot 10^{+117}\right):\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(a + \frac{z}{\frac{t_1}{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error7.2
Cost4169
\[\begin{array}{l} t_1 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+275}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error22.4
Cost1744
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ \mathbf{if}\;x \leq -6 \cdot 10^{+182}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -1.42 \cdot 10^{-127}:\\ \;\;\;\;a - b \cdot \frac{y}{t_1}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-214}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{elif}\;x \leq 1750:\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(a + \frac{x \cdot z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \end{array} \]
Alternative 5
Error24.5
Cost1497
\[\begin{array}{l} t_1 := a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{-17}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-212}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+20}:\\ \;\;\;\;a - b \cdot \frac{y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+78} \lor \neg \left(z \leq 2.8 \cdot 10^{+160}\right):\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error24.2
Cost1497
\[\begin{array}{l} t_1 := a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{if}\;z \leq -2.66 \cdot 10^{-17}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-213}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+20}:\\ \;\;\;\;a - b \cdot \frac{y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+76} \lor \neg \left(z \leq 5.5 \cdot 10^{+156}\right):\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error28.2
Cost1496
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ \mathbf{if}\;a \leq -4.05 \cdot 10^{-25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.32 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.16 \cdot 10^{-306}:\\ \;\;\;\;a + \frac{y \cdot \left(z - b\right)}{y + t}\\ \mathbf{elif}\;a \leq 9.6 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-77}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+238}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error24.2
Cost1496
\[\begin{array}{l} t_1 := a + \frac{y \cdot \left(z - b\right)}{y + t}\\ t_2 := y + \left(x + t\right)\\ \mathbf{if}\;z \leq -6.4 \cdot 10^{-16}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-212}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+20}:\\ \;\;\;\;a - b \cdot \frac{y}{t_2}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+75}:\\ \;\;\;\;\frac{x + y}{\frac{t_2}{z}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+157}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \end{array} \]
Alternative 9
Error27.9
Cost1232
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \left(y + t\right) \cdot \frac{a}{x + \left(y + t\right)}\\ \mathbf{if}\;a \leq -2.8 \cdot 10^{-24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-77}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+236}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error26.4
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{+136}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+200}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + \frac{x \cdot z}{t}\\ \end{array} \]
Alternative 11
Error26.1
Cost712
\[\begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{+96}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+200}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + \frac{x \cdot z}{t}\\ \end{array} \]
Alternative 12
Error36.3
Cost592
\[\begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-22}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-112}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-157}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+69}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 13
Error36.7
Cost592
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{+171}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-259}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-230}:\\ \;\;\;\;-b\\ \mathbf{elif}\;x \leq 1150:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 14
Error26.6
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+135}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+200}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 15
Error43.1
Cost64
\[a \]

Error

Reproduce

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