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

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


\end{array}

Error

Target

Original26.1
Target11.1
Herbie0.3
\[\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.9999999999999999e304 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 63.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. Simplified63.9

      \[\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]63.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 z around inf 63.9

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

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

      [Start]63.9

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

      +-commutative [=>]63.9

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

      associate-+l+ [=>]63.9

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

      associate-/l* [=>]46.5

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

      +-commutative [=>]46.5

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

      associate-+l+ [=>]46.5

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

      +-commutative [<=]46.5

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

      associate-/l* [=>]32.1

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

      associate-/r/ [=>]32.1

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

      +-commutative [=>]32.1

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

      associate-+l+ [=>]32.1

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

      +-commutative [<=]32.1

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

      associate-/l* [=>]0.3

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

      associate-/r/ [=>]0.2

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

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

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

      [Start]18.6

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

      *-commutative [=>]18.6

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

      associate-+r+ [=>]18.6

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

      +-commutative [=>]18.6

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

      associate-+r+ [<=]18.6

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

      associate-*l/ [<=]0.1

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

      *-commutative [=>]0.1

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

    1. Initial program 0.4

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

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

      \[ \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.3

    \[\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^{+304}\right):\\ \;\;\;\;\frac{y}{\frac{t + \left(x + y\right)}{a - b}} + \left(a \cdot \frac{t}{t + \left(x + y\right)} + z \cdot \frac{x + y}{t + \left(x + y\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\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)}\\ \end{array} \]

Alternatives

Alternative 1
Error0.3
Cost4937
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \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_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+304}\right):\\ \;\;\;\;\frac{y}{\frac{t_1}{a - b}} + \left(a \cdot \frac{t}{t_1} + z \cdot \frac{x + y}{t_1}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error2.6
Cost4297
\[\begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \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_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+304}\right):\\ \;\;\;\;\frac{y}{\frac{t_1}{a - b}} + \left(z + t \cdot \frac{a}{t_1}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error6.5
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^{+304}\right):\\ \;\;\;\;z + \frac{y}{\frac{x + y}{a - b}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error21.1
Cost1761
\[\begin{array}{l} t_1 := \frac{t \cdot a + x \cdot z}{x + t}\\ t_2 := z + \frac{y}{\frac{x + y}{a - b}}\\ t_3 := y + \left(x + t\right)\\ \mathbf{if}\;y \leq -9 \cdot 10^{-191}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{-181}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-30}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+36}:\\ \;\;\;\;\frac{x + y}{\frac{t_3}{z}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+67} \lor \neg \left(y \leq 1.65 \cdot 10^{+80}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{t_3}{y + t}}\\ \end{array} \]
Alternative 5
Error23.9
Cost1761
\[\begin{array}{l} t_1 := z + \frac{y}{\frac{x + y}{a - b}}\\ t_2 := y + \left(x + t\right)\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{-226}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-228}:\\ \;\;\;\;\frac{t \cdot a - y \cdot b}{t_2}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-181}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 8.3 \cdot 10^{-137}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-30}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+36}:\\ \;\;\;\;\frac{x + y}{\frac{t_2}{z}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+67} \lor \neg \left(y \leq 1.65 \cdot 10^{+80}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{t_2}{y + t}}\\ \end{array} \]
Alternative 6
Error26.8
Cost1496
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -1.1 \cdot 10^{-33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-297}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-170}:\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-31}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error22.5
Cost1496
\[\begin{array}{l} t_1 := z + \frac{y}{\frac{x + y}{a - b}}\\ t_2 := y + \left(x + t\right)\\ t_3 := z \cdot \frac{x + y}{t_2}\\ t_4 := \frac{a}{\frac{t_2}{y + t}}\\ \mathbf{if}\;z \leq -2.55 \cdot 10^{+241}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-120}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-59}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+198}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error19.6
Cost1364
\[\begin{array}{l} t_1 := \frac{a}{\frac{x + t}{t}}\\ t_2 := y + \left(x + t\right)\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+126}:\\ \;\;\;\;z + \frac{y}{\frac{x + y}{a - b}}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+148}:\\ \;\;\;\;a \cdot \frac{t}{t_2}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+202}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+259}:\\ \;\;\;\;z \cdot \frac{x + y}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error13.8
Cost1225
\[\begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-57} \lor \neg \left(y \leq 2.9 \cdot 10^{+36}\right):\\ \;\;\;\;z + \frac{y}{\frac{x + y}{a - b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}} + \frac{z}{\frac{x + t}{x}}\\ \end{array} \]
Alternative 10
Error26.8
Cost1112
\[\begin{array}{l} t_1 := \frac{a}{\frac{x + t}{t}}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -2.1 \cdot 10^{+20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-261}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-181}:\\ \;\;\;\;z \cdot \left(1 - \frac{t}{x}\right)\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+38}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error28.1
Cost977
\[\begin{array}{l} t_1 := \frac{z}{\frac{x + t}{x}}\\ \mathbf{if}\;x \leq -48000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+59}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+195} \lor \neg \left(x \leq 3.2 \cdot 10^{+215}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{x}\\ \end{array} \]
Alternative 12
Error27.0
Cost713
\[\begin{array}{l} \mathbf{if}\;x \leq -1.52 \cdot 10^{+150} \lor \neg \left(x \leq 1.65 \cdot 10^{+153}\right):\\ \;\;\;\;z \cdot \left(1 - \frac{t}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
Alternative 13
Error27.0
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{+150}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+143}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 14
Error30.6
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+193}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 3.25 \cdot 10^{+149}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 15
Error35.8
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -105000:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 2.55 \cdot 10^{-12}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 16
Error43.7
Cost64
\[a \]

Error

Reproduce

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