Average Error: 26.1 → 7.8
Time: 23.8s
Precision: binary64
Cost: 16712
\[\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}\\ t_3 := t + \left(x + y\right)\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+255}:\\ \;\;\;\;z + a \cdot \left(\frac{y}{t_3} + \frac{t}{t_3}\right)\\ \mathbf{elif}\;t_2 \leq 10^{+210}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, z, \mathsf{fma}\left(y, z + \left(a - b\right), t \cdot a\right)\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \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))
        (t_3 (+ t (+ x y))))
   (if (<= t_2 -1e+255)
     (+ z (* a (+ (/ y t_3) (/ t t_3))))
     (if (<= t_2 1e+210)
       (/ (fma x z (fma y (+ z (- a b)) (* t a))) t_1)
       (- (+ z a) b)))))
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 t_3 = t + (x + y);
	double tmp;
	if (t_2 <= -1e+255) {
		tmp = z + (a * ((y / t_3) + (t / t_3)));
	} else if (t_2 <= 1e+210) {
		tmp = fma(x, z, fma(y, (z + (a - b)), (t * a))) / t_1;
	} else {
		tmp = (z + a) - b;
	}
	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)
	t_3 = Float64(t + Float64(x + y))
	tmp = 0.0
	if (t_2 <= -1e+255)
		tmp = Float64(z + Float64(a * Float64(Float64(y / t_3) + Float64(t / t_3))));
	elseif (t_2 <= 1e+210)
		tmp = Float64(fma(x, z, fma(y, Float64(z + Float64(a - b)), Float64(t * a))) / t_1);
	else
		tmp = Float64(Float64(z + a) - b);
	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]}, Block[{t$95$3 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+255], N[(z + N[(a * N[(N[(y / t$95$3), $MachinePrecision] + N[(t / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+210], N[(N[(x * z + N[(y * N[(z + N[(a - b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $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}\\
t_3 := t + \left(x + y\right)\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+255}:\\
\;\;\;\;z + a \cdot \left(\frac{y}{t_3} + \frac{t}{t_3}\right)\\

\mathbf{elif}\;t_2 \leq 10^{+210}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, z, \mathsf{fma}\left(y, z + \left(a - b\right), t \cdot a\right)\right)}{t_1}\\

\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\


\end{array}

Error

Target

Original26.1
Target10.9
Herbie7.8
\[\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 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.99999999999999988e254

    1. Initial program 59.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. Taylor expanded in a around 0 38.3

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

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

      [Start]38.3

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

      +-commutative [=>]38.3

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

      associate--l+ [=>]38.3

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

      +-commutative [=>]38.3

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

      associate-+r+ [=>]38.3

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

      +-commutative [=>]38.3

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

      +-commutative [=>]38.3

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

      associate-+r+ [=>]38.3

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

      +-commutative [=>]38.3

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

      associate-+r+ [=>]38.3

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

      +-commutative [<=]38.3

      \[ a \cdot \left(\frac{y}{t + \left(y + x\right)} + \frac{t}{t + \left(y + x\right)}\right) + \left(\frac{\left(y + x\right) \cdot z}{\color{blue}{x + \left(y + t\right)}} - \frac{y \cdot b}{y + \left(t + x\right)}\right) \]
    4. Taylor expanded in x around inf 16.6

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

    if -9.99999999999999988e254 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999927e209

    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(x, z, \mathsf{fma}\left(y, z + \left(a - b\right), t \cdot a\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} \]

    if 9.99999999999999927e209 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 56.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. Taylor expanded in y around inf 17.2

      \[\leadsto \color{blue}{\left(a + z\right) - b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification7.8

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

Alternatives

Alternative 1
Error7.8
Cost4168
\[\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)}\\ t_2 := t + \left(x + y\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+255}:\\ \;\;\;\;z + a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right)\\ \mathbf{elif}\;t_1 \leq 10^{+210}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
Alternative 2
Error28.3
Cost1892
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{y}{\frac{x + y}{a - b}}\\ t_3 := \frac{a}{\frac{x + t}{t}}\\ \mathbf{if}\;t \leq -1.62 \cdot 10^{+146}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-224}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-281}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-271}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-176}:\\ \;\;\;\;z + \frac{a \cdot \left(y + t\right)}{x}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+227}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+247}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 3
Error19.5
Cost1880
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := a + \frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\ t_3 := \left(z + a\right) - b\\ t_4 := z + \frac{y \cdot \left(a - b\right)}{x + y}\\ \mathbf{if}\;y \leq -4 \cdot 10^{+32}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-44}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{-126}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq -1.18 \cdot 10^{-296}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-136}:\\ \;\;\;\;z + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-113}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-81}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+32}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error19.8
Cost1748
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := a + \frac{z \cdot \left(x + y\right) - y \cdot b}{t_1}\\ t_3 := \left(z + a\right) - b\\ t_4 := z + \frac{y \cdot \left(a - b\right)}{x + y}\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+31}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-146}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-222}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-78}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+101}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+122}:\\ \;\;\;\;\frac{-y}{\frac{t_1}{b}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error27.7
Cost1372
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \left(a - b\right) \cdot \frac{y}{x + y}\\ t_3 := \frac{a}{\frac{x + t}{t}}\\ \mathbf{if}\;t \leq -1.26 \cdot 10^{+145}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-223}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-281}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-271}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-247}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-176}:\\ \;\;\;\;z + \frac{y \cdot a}{x}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error27.1
Cost1372
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \left(a - b\right) \cdot \frac{y}{x + y}\\ t_3 := \frac{a}{\frac{x + t}{t}}\\ \mathbf{if}\;t \leq -3 \cdot 10^{+146}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -7.4 \cdot 10^{-224}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-281}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-270}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-249}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-175}:\\ \;\;\;\;z + \frac{y \cdot a}{x + y}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error27.6
Cost1372
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \left(a - b\right) \cdot \frac{y}{x + y}\\ t_3 := \frac{a}{\frac{x + t}{t}}\\ \mathbf{if}\;t \leq -2.15 \cdot 10^{+145}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-224}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-283}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{-271}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-176}:\\ \;\;\;\;z + \frac{a \cdot \left(y + t\right)}{x}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error27.9
Cost1372
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{y}{\frac{x + y}{a - b}}\\ t_3 := \frac{a}{\frac{x + t}{t}}\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{+146}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-224}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-282}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-270}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-176}:\\ \;\;\;\;z + \frac{a \cdot \left(y + t\right)}{x}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Error24.8
Cost1364
\[\begin{array}{l} t_1 := z + \frac{y \cdot \left(a - b\right)}{x + y}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -5.8 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-146}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-242}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-81}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error24.4
Cost1364
\[\begin{array}{l} t_1 := z + \frac{y \cdot \left(a - b\right)}{x + y}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -5.8 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-146}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-242}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-79}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error21.9
Cost1364
\[\begin{array}{l} t_1 := z + \frac{y \cdot \left(a - b\right)}{x + y}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-146}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-195}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-79}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error28.9
Cost976
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-78}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+27}:\\ \;\;\;\;z + \frac{y \cdot a}{x}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error28.2
Cost976
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.2 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.62 \cdot 10^{-242}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-75}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+30}:\\ \;\;\;\;z + \frac{y \cdot a}{x}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error30.0
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.45 \cdot 10^{-50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-78}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 900000000000:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error28.5
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;t \leq -1.3 \cdot 10^{+151}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-176}:\\ \;\;\;\;z + \frac{y \cdot a}{x}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Error36.1
Cost724
\[\begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+33}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-38}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-98}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-114}:\\ \;\;\;\;-b\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-45}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 17
Error27.2
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+153}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+67}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 18
Error30.0
Cost456
\[\begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+155}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+242}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 19
Error35.7
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{-11}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 6.3 \cdot 10^{-27}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 20
Error43.3
Cost64
\[a \]

Error

Reproduce

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