?

Average Error: 41.59% → 1.34%
Time: 25.1s
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 := x + \left(y + t\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 -5 \cdot 10^{+278} \lor \neg \left(t_2 \leq 10^{+168}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{a}{t_1}, t, a \cdot \frac{y}{t_1}\right) - \frac{b}{\frac{t_1}{y}}\right) + \frac{z}{\frac{t_1}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, z - b, \mathsf{fma}\left(y + t, a, x \cdot z\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 (+ x (+ y t)))
        (t_2 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) (+ y (+ x t)))))
   (if (or (<= t_2 -5e+278) (not (<= t_2 1e+168)))
     (+
      (- (fma (/ a t_1) t (* a (/ y t_1))) (/ b (/ t_1 y)))
      (/ z (/ t_1 (+ x y))))
     (/ (fma y (- z b) (fma (+ y t) a (* x z))) 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 = x + (y + t);
	double t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / (y + (x + t));
	double tmp;
	if ((t_2 <= -5e+278) || !(t_2 <= 1e+168)) {
		tmp = (fma((a / t_1), t, (a * (y / t_1))) - (b / (t_1 / y))) + (z / (t_1 / (x + y)));
	} else {
		tmp = fma(y, (z - b), fma((y + t), a, (x * z))) / 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(x + Float64(y + t))
	t_2 = 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_2 <= -5e+278) || !(t_2 <= 1e+168))
		tmp = Float64(Float64(fma(Float64(a / t_1), t, Float64(a * Float64(y / t_1))) - Float64(b / Float64(t_1 / y))) + Float64(z / Float64(t_1 / Float64(x + y))));
	else
		tmp = Float64(fma(y, Float64(z - b), fma(Float64(y + t), a, Float64(x * z))) / 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[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2, -5e+278], N[Not[LessEqual[t$95$2, 1e+168]], $MachinePrecision]], N[(N[(N[(N[(a / t$95$1), $MachinePrecision] * t + N[(a * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(z - b), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a + N[(x * z), $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 := x + \left(y + t\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 -5 \cdot 10^{+278} \lor \neg \left(t_2 \leq 10^{+168}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{a}{t_1}, t, a \cdot \frac{y}{t_1}\right) - \frac{b}{\frac{t_1}{y}}\right) + \frac{z}{\frac{t_1}{x + y}}\\

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


\end{array}

Error?

Target

Original41.59%
Target17.9%
Herbie1.34%
\[\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)) < -5.00000000000000029e278 or 9.9999999999999993e167 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 87.85

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[ \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 z around inf 87.85

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

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

      [Start]87.85

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

      +-commutative [=>]87.85

      \[ \color{blue}{\left(\frac{a \cdot \left(y + t\right)}{y + \left(t + x\right)} + -1 \cdot \frac{y \cdot b}{y + \left(t + x\right)}\right) + \frac{\left(y + x\right) \cdot z}{y + \left(t + x\right)}} \]
    5. Applied egg-rr2.39

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

    if -5.00000000000000029e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999993e167

    1. Initial program 0.42

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[ \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 simplification1.34

    \[\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 -5 \cdot 10^{+278} \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 10^{+168}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{a}{x + \left(y + t\right)}, t, a \cdot \frac{y}{x + \left(y + t\right)}\right) - \frac{b}{\frac{x + \left(y + t\right)}{y}}\right) + \frac{z}{\frac{x + \left(y + t\right)}{x + y}}\\ \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
Error1.34%
Cost11721
\[\begin{array}{l} t_1 := x + \left(y + t\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 -5 \cdot 10^{+278} \lor \neg \left(t_2 \leq 10^{+168}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{a}{t_1}, t, a \cdot \frac{y}{t_1}\right) - \frac{b}{\frac{t_1}{y}}\right) + \frac{z}{\frac{t_1}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error1.82%
Cost4937
\[\begin{array}{l} t_1 := x + \left(y + t\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 -5 \cdot 10^{+278} \lor \neg \left(t_2 \leq 2 \cdot 10^{+256}\right):\\ \;\;\;\;\frac{a}{t_1} \cdot \left(y + t\right) + \left(x \cdot \frac{z}{t_1} + y \cdot \frac{z - b}{t_1}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error1.34%
Cost4937
\[\begin{array}{l} t_1 := x + \left(y + t\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 -5 \cdot 10^{+278} \lor \neg \left(t_2 \leq 10^{+176}\right):\\ \;\;\;\;\frac{z}{\frac{t_1}{x + y}} + \left(\frac{a}{t_1} \cdot \left(y + t\right) - \frac{b}{\frac{t_1}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error5.13%
Cost4297
\[\begin{array}{l} t_1 := x + \left(y + t\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 -5 \cdot 10^{+278} \lor \neg \left(t_2 \leq 2 \cdot 10^{+229}\right):\\ \;\;\;\;z + \left(\frac{a}{t_1} \cdot \left(y + t\right) - \frac{b}{\frac{t_1}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error12.09%
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^{+256}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error44.46%
Cost2408
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_2 := \left(z + a\right) - b\\ t_3 := x + \left(y + t\right)\\ t_4 := x \cdot z + t \cdot a\\ t_5 := \frac{t_4 - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -54000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-13}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-40}:\\ \;\;\;\;\frac{t_4}{x + t}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-251}:\\ \;\;\;\;\frac{a}{\frac{t_3}{y + t}}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-283}:\\ \;\;\;\;\frac{y \cdot t_2}{t_3}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-35}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+99}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error46.87%
Cost2288
\[\begin{array}{l} t_1 := b \cdot \frac{-y}{y + \left(x + t\right)}\\ t_2 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_3 := \left(z + a\right) - b\\ t_4 := \frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{if}\;z \leq -1.32 \cdot 10^{+98}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -70000000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-14}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-38}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-81}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.66 \cdot 10^{-242}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-86}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{+23}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+99}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error48.01%
Cost2024
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_2 := \left(z + a\right) - b\\ t_3 := b \cdot \frac{-y}{y + \left(x + t\right)}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -59000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-28}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-37}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-276}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-242}:\\ \;\;\;\;\frac{a}{x + \left(y + t\right)} \cdot \left(y + t\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-171}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-118}:\\ \;\;\;\;z + \frac{a}{\frac{x}{y + t}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error46.87%
Cost2024
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_2 := \left(z + a\right) - b\\ t_3 := b \cdot \frac{-y}{y + \left(x + t\right)}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+95}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -50000000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-27}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.65 \cdot 10^{-242}:\\ \;\;\;\;\frac{a}{\frac{x + \left(y + t\right)}{y + t}}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-167}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-118}:\\ \;\;\;\;z + \frac{a}{\frac{x}{y + t}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error46.93%
Cost2024
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := \left(z + a\right) - b\\ t_3 := b \cdot \frac{-y}{y + \left(x + t\right)}\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -36000000000000:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-27}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-242}:\\ \;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\ \mathbf{elif}\;z \leq 10^{-168}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-106}:\\ \;\;\;\;z + \frac{a}{\frac{x}{y + t}}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\ \end{array} \]
Alternative 11
Error49.3%
Cost2020
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := x + \left(y + t\right)\\ t_3 := \frac{y \cdot t_1}{t_2}\\ t_4 := \frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -45000000000000:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-13}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -2.76 \cdot 10^{-39}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-248}:\\ \;\;\;\;\frac{a}{\frac{t_2}{y + t}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-195}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 10^{-120}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+71}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{t_2}{x + y}}\\ \end{array} \]
Alternative 12
Error45.86%
Cost1892
\[\begin{array}{l} t_1 := \frac{a}{\frac{x + t}{t}}\\ t_2 := \left(z + a\right) - b\\ t_3 := x + \left(y + t\right)\\ \mathbf{if}\;y \leq -1.2 \cdot 10^{-43}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-269}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-101}:\\ \;\;\;\;z + \frac{a}{\frac{x}{y + t}}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-42}:\\ \;\;\;\;\frac{y \cdot \left(-b\right)}{t_3}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+32}:\\ \;\;\;\;\frac{y}{\frac{y + t}{z}}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+57}:\\ \;\;\;\;\frac{a}{t_3} \cdot \left(y + t\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error40.87%
Cost1104
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+89}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+75}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z + \frac{a}{\frac{x}{y + t}}\\ \end{array} \]
Alternative 14
Error42.33%
Cost976
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z \cdot \left(1 - \frac{t}{x}\right)\\ \mathbf{if}\;x \leq -1.2 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{-5}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+189}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error42.61%
Cost976
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z \cdot \frac{x}{x + t}\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{+86}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{-5}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error42.72%
Cost976
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z \cdot \frac{x}{x + t}\\ \mathbf{if}\;x \leq -3 \cdot 10^{+86}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-5}:\\ \;\;\;\;\frac{a}{\frac{x + t}{t}}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 17
Error42.36%
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;x \leq -6.2 \cdot 10^{+128}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5 \cdot 10^{-5}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+189}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 18
Error56.17%
Cost592
\[\begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+173}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+105}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+14}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+15}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 19
Error67.49%
Cost64
\[a \]

Error

Reproduce?

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