?

Average Error: 27.2 → 0.3
Time: 18.6s
Precision: binary64
Cost: 4937

?

\[\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 := z \cdot \left(x + y\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(a \cdot \left(y + t\right) + t_1\right) - y \cdot b}{t_2}\\ \mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+302}\right):\\ \;\;\;\;\left(\frac{a}{t_2} \cdot \left(y + t\right) - \frac{b}{\frac{t_2}{y}}\right) + z \cdot \frac{x + y}{t_2}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right) + \frac{t_1 - y \cdot b}{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 (* z (+ x y)))
        (t_2 (+ y (+ x t)))
        (t_3 (/ (- (+ (* a (+ y t)) t_1) (* y b)) t_2)))
   (if (or (<= t_3 (- INFINITY)) (not (<= t_3 1e+302)))
     (+ (- (* (/ a t_2) (+ y t)) (/ b (/ t_2 y))) (* z (/ (+ x y) t_2)))
     (+ (* a (+ (/ y t_2) (/ t t_2))) (/ (- t_1 (* y b)) 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 = z * (x + y);
	double t_2 = y + (x + t);
	double t_3 = (((a * (y + t)) + t_1) - (y * b)) / t_2;
	double tmp;
	if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 1e+302)) {
		tmp = (((a / t_2) * (y + t)) - (b / (t_2 / y))) + (z * ((x + y) / t_2));
	} else {
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / t_2);
	}
	return tmp;
}
public static 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);
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (x + y);
	double t_2 = y + (x + t);
	double t_3 = (((a * (y + t)) + t_1) - (y * b)) / t_2;
	double tmp;
	if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 1e+302)) {
		tmp = (((a / t_2) * (y + t)) - (b / (t_2 / y))) + (z * ((x + y) / t_2));
	} else {
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / t_2);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
def code(x, y, z, t, a, b):
	t_1 = z * (x + y)
	t_2 = y + (x + t)
	t_3 = (((a * (y + t)) + t_1) - (y * b)) / t_2
	tmp = 0
	if (t_3 <= -math.inf) or not (t_3 <= 1e+302):
		tmp = (((a / t_2) * (y + t)) - (b / (t_2 / y))) + (z * ((x + y) / t_2))
	else:
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / 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(z * Float64(x + y))
	t_2 = Float64(y + Float64(x + t))
	t_3 = Float64(Float64(Float64(Float64(a * Float64(y + t)) + t_1) - Float64(y * b)) / t_2)
	tmp = 0.0
	if ((t_3 <= Float64(-Inf)) || !(t_3 <= 1e+302))
		tmp = Float64(Float64(Float64(Float64(a / t_2) * Float64(y + t)) - Float64(b / Float64(t_2 / y))) + Float64(z * Float64(Float64(x + y) / t_2)));
	else
		tmp = Float64(Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2))) + Float64(Float64(t_1 - Float64(y * b)) / t_2));
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (x + y);
	t_2 = y + (x + t);
	t_3 = (((a * (y + t)) + t_1) - (y * b)) / t_2;
	tmp = 0.0;
	if ((t_3 <= -Inf) || ~((t_3 <= 1e+302)))
		tmp = (((a / t_2) * (y + t)) - (b / (t_2 / y))) + (z * ((x + y) / t_2));
	else
		tmp = (a * ((y / t_2) + (t / t_2))) + ((t_1 - (y * b)) / t_2);
	end
	tmp_2 = 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 1e+302]], $MachinePrecision]], N[(N[(N[(N[(a / t$95$2), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(b / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $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 := z \cdot \left(x + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(a \cdot \left(y + t\right) + t_1\right) - y \cdot b}{t_2}\\
\mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+302}\right):\\
\;\;\;\;\left(\frac{a}{t_2} \cdot \left(y + t\right) - \frac{b}{\frac{t_2}{y}}\right) + z \cdot \frac{x + y}{t_2}\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right) + \frac{t_1 - y \cdot b}{t_2}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original27.2
Target11.6
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.0000000000000001e302 < (/.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 - b, \left(y + t\right) \cdot a\right)\right)}{x + \left(y + 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{a \cdot \left(y + t\right)}{y + \left(t + x\right)} + -1 \cdot \frac{y \cdot b}{y + \left(t + x\right)}\right)} \]
    4. Simplified0.1

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

      [Start]63.9

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

      \[ \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)}} \]

      mul-1-neg [=>]63.9

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

      unsub-neg [=>]63.9

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

      associate-/l* [=>]45.6

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

      associate-/r/ [=>]45.6

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

      *-commutative [=>]45.6

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

      associate-/l* [=>]33.1

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

      associate-/l* [=>]0.2

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

      associate-/r/ [=>]0.1

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

    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.0000000000000001e302

    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. Taylor expanded in a around 0 0.5

      \[\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. Simplified0.5

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

      [Start]0.5

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

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

      \[ \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)} \]

      associate-+r+ [=>]0.5

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

      +-commutative [<=]0.5

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

      associate-+r+ [=>]0.5

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

      +-commutative [<=]0.5

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

      div-sub [<=]0.5

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

      +-commutative [=>]0.5

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

      associate-+r+ [<=]0.5

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

      *-commutative [=>]0.5

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

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

Alternatives

Alternative 1
Error2.9
Cost4937
\[\begin{array}{l} t_1 := z \cdot \left(x + y\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(a \cdot \left(y + t\right) + t_1\right) - y \cdot b}{t_2}\\ \mathbf{if}\;t_3 \leq -\infty \lor \neg \left(t_3 \leq 10^{+236}\right):\\ \;\;\;\;z \cdot \frac{x + y}{t_2} + \left(a - \frac{b}{\frac{t_2}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(\frac{y}{t_2} + \frac{t}{t_2}\right) + \frac{t_1 - y \cdot b}{t_2}\\ \end{array} \]
Alternative 2
Error2.8
Cost4297
\[\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}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+275} \lor \neg \left(t_2 \leq 10^{+236}\right):\\ \;\;\;\;z \cdot \frac{x + y}{t_1} + \left(a - \frac{b}{\frac{t_1}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error5.1
Cost4169
\[\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}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{+275} \lor \neg \left(t_2 \leq 10^{+236}\right):\\ \;\;\;\;z + \left(a - \frac{b}{\frac{t_1}{y}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error22.7
Cost2153
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := a \cdot \frac{y + t}{t_1}\\ t_3 := z + \left(a - \frac{b}{\frac{t_1}{y}}\right)\\ \mathbf{if}\;z \leq -5.8 \cdot 10^{-87}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-170}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-285}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-144}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-40}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+29}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+75}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+134} \lor \neg \left(z \leq 3.45 \cdot 10^{+159}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{t_1}\\ \end{array} \]
Alternative 5
Error18.4
Cost2009
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := z \cdot \frac{x + y}{t_1} + \left(a - \frac{y \cdot b}{t}\right)\\ t_3 := z + \left(a - \frac{b}{\frac{t_1}{y}}\right)\\ \mathbf{if}\;y \leq -1.25 \cdot 10^{+22}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -2.55 \cdot 10^{-216}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-207}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-117}:\\ \;\;\;\;\frac{x}{\frac{t_1}{z}}\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{-61} \lor \neg \left(y \leq 1.5 \cdot 10^{-46}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error26.8
Cost1628
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := z \cdot \frac{x + y}{t_1}\\ t_3 := a \cdot \frac{y + t}{t_1}\\ \mathbf{if}\;a \leq -1 \cdot 10^{+52}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-19}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-306}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-278}:\\ \;\;\;\;b \cdot \frac{-y}{t_1}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+90}:\\ \;\;\;\;z + \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error26.5
Cost1628
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := z \cdot \frac{x + y}{t_1}\\ t_3 := a \cdot \frac{y + t}{t_1}\\ \mathbf{if}\;a \leq -1.45 \cdot 10^{+51}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-19}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-306}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-278}:\\ \;\;\;\;b \cdot \frac{-y}{t_1}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+89}:\\ \;\;\;\;z + \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error26.8
Cost1108
\[\begin{array}{l} t_1 := z + \left(a - b\right)\\ t_2 := \frac{a}{1 + \frac{x}{t}}\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+127}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.9 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.32 \cdot 10^{-30}:\\ \;\;\;\;\frac{a}{y + \left(x + t\right)} \cdot \left(y + t\right)\\ \mathbf{elif}\;t \leq -1.48 \cdot 10^{-43}:\\ \;\;\;\;z - z \cdot \frac{t}{x + y}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error27.6
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{-86} \lor \neg \left(z \leq 1.4 \cdot 10^{+58}\right):\\ \;\;\;\;z + \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\ \end{array} \]
Alternative 10
Error26.5
Cost848
\[\begin{array}{l} t_1 := z + \left(a - b\right)\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{+181}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -3.15 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-220}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 11
Error25.7
Cost713
\[\begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+126} \lor \neg \left(t \leq 4.8 \cdot 10^{+174}\right):\\ \;\;\;\;\frac{a}{1 + \frac{x}{t}}\\ \mathbf{else}:\\ \;\;\;\;z + \left(a - b\right)\\ \end{array} \]
Alternative 12
Error37.1
Cost592
\[\begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+188}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-31}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-130}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+57}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 13
Error43.4
Cost64
\[a \]

Error

Reproduce?

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