Average Error: 26.4 → 0.2
Time: 27.3s
Precision: binary64
Cost: 11208
\[\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 := \left(y + t\right) \cdot a\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(z \cdot \left(x + y\right) + t_1\right) - y \cdot b}{t_2}\\ t_4 := x + \left(y + t\right)\\ t_5 := \mathsf{fma}\left(\frac{a}{t_4}, y + t, \frac{x + y}{\frac{t_4}{z}}\right) - \frac{b}{\frac{t_4}{y}}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;\frac{y \cdot \left(z - b\right)}{t_2} + \left(\frac{x \cdot z}{t_2} + \frac{t_1}{t_2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \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 t) a))
        (t_2 (+ y (+ x t)))
        (t_3 (/ (- (+ (* z (+ x y)) t_1) (* y b)) t_2))
        (t_4 (+ x (+ y t)))
        (t_5
         (- (fma (/ a t_4) (+ y t) (/ (+ x y) (/ t_4 z))) (/ b (/ t_4 y)))))
   (if (<= t_3 (- INFINITY))
     t_5
     (if (<= t_3 4e+307)
       (+ (/ (* y (- z b)) t_2) (+ (/ (* x z) t_2) (/ t_1 t_2)))
       t_5))))
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 + t) * a;
	double t_2 = y + (x + t);
	double t_3 = (((z * (x + y)) + t_1) - (y * b)) / t_2;
	double t_4 = x + (y + t);
	double t_5 = fma((a / t_4), (y + t), ((x + y) / (t_4 / z))) - (b / (t_4 / y));
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = t_5;
	} else if (t_3 <= 4e+307) {
		tmp = ((y * (z - b)) / t_2) + (((x * z) / t_2) + (t_1 / t_2));
	} else {
		tmp = t_5;
	}
	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(Float64(y + t) * a)
	t_2 = Float64(y + Float64(x + t))
	t_3 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + t_1) - Float64(y * b)) / t_2)
	t_4 = Float64(x + Float64(y + t))
	t_5 = Float64(fma(Float64(a / t_4), Float64(y + t), Float64(Float64(x + y) / Float64(t_4 / z))) - Float64(b / Float64(t_4 / y)))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = t_5;
	elseif (t_3 <= 4e+307)
		tmp = Float64(Float64(Float64(y * Float64(z - b)) / t_2) + Float64(Float64(Float64(x * z) / t_2) + Float64(t_1 / t_2)));
	else
		tmp = t_5;
	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[(N[(y + t), $MachinePrecision] * a), $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] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(a / t$95$4), $MachinePrecision] * N[(y + t), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] / N[(t$95$4 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b / N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$5, If[LessEqual[t$95$3, 4e+307], N[(N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(N[(x * z), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$5]]]]]]]
\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 := \left(y + t\right) \cdot a\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(z \cdot \left(x + y\right) + t_1\right) - y \cdot b}{t_2}\\
t_4 := x + \left(y + t\right)\\
t_5 := \mathsf{fma}\left(\frac{a}{t_4}, y + t, \frac{x + y}{\frac{t_4}{z}}\right) - \frac{b}{\frac{t_4}{y}}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;\frac{y \cdot \left(z - b\right)}{t_2} + \left(\frac{x \cdot z}{t_2} + \frac{t_1}{t_2}\right)\\

\mathbf{else}:\\
\;\;\;\;t_5\\


\end{array}

Error

Target

Original26.4
Target11.4
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)) < -inf.0 or 3.99999999999999994e307 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 64.0

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

      \[\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
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (+.f64 y t) a (*.f64 x z))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (Rewrite<= +-commutative_binary64 (+.f64 t y)) a (*.f64 x z))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (+.f64 t y) a (Rewrite<= *-commutative_binary64 (*.f64 z x)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (+.f64 t y) a) (*.f64 z x)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (-.f64 z b)) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 1 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 y z) (*.f64 y b))) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (*.f64 y z) (neg.f64 (*.f64 y b)))) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite=> +-commutative_binary64 (+.f64 (neg.f64 (*.f64 y b)) (*.f64 y z))) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate-+r+_binary64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (*.f64 y z) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (*.f64 y z) (+.f64 (Rewrite=> *-commutative_binary64 (*.f64 x z)) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 y z) (*.f64 x z)) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 z (+.f64 y x))) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 1 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (*.f64 z (Rewrite<= +-commutative_binary64 (+.f64 x y))) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 x y) z)) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (neg.f64 (*.f64 y b)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= sub-neg_binary64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 x (Rewrite<= +-commutative_binary64 (+.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in z around -inf 64.0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{a}{x + \left(t + y\right)}, t + y, \frac{1 \cdot \left(x + y\right)}{\frac{x + \left(t + y\right)}{z}}\right) - \frac{b}{\frac{x + \left(t + y\right)}{y}}} \]
      Proof
      (-.f64 (fma.f64 (/.f64 a (+.f64 x (+.f64 t y))) (+.f64 t y) (/.f64 (*.f64 1 (+.f64 x y)) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y))) (+.f64 t y) (/.f64 (*.f64 1 (+.f64 x y)) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y)) (+.f64 t y) (/.f64 (*.f64 1 (+.f64 x y)) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x)))) (+.f64 t y) (/.f64 (*.f64 1 (+.f64 x y)) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (Rewrite<= +-commutative_binary64 (+.f64 y t)) (/.f64 (*.f64 1 (+.f64 x y)) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (*.f64 1 (Rewrite<= +-commutative_binary64 (+.f64 y x))) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (*.f64 (Rewrite<= metadata-eval (*.f64 -1 -1)) (+.f64 y x)) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 -1 (*.f64 -1 (+.f64 y x)))) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (*.f64 -1 (*.f64 -1 (Rewrite=> +-commutative_binary64 (+.f64 x y)))) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (*.f64 -1 (Rewrite<= distribute-lft-out_binary64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)))) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (Rewrite=> mul-1-neg_binary64 (neg.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)))) (/.f64 (+.f64 x (+.f64 t y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (neg.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y))) (/.f64 (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y)) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (neg.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y))) (/.f64 (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (/.f64 (neg.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y))) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x))) z))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) (/.f64 (+.f64 y (+.f64 t x)) z))))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (fma.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t) (neg.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x)))))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 59 points increase in error, 19 points decrease in error
      (-.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 (/.f64 a (+.f64 y (+.f64 t x))) (+.f64 y t)) (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (-.f64 (Rewrite<= associate-/r/_binary64 (/.f64 a (/.f64 (+.f64 y (+.f64 t x)) (+.f64 y t)))) (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x)))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 5 points increase in error, 29 points decrease in error
      (-.f64 (-.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x)))) (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x)))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 45 points increase in error, 6 points decrease in error
      (-.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (neg.f64 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x)))))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x)))))) (/.f64 b (/.f64 (+.f64 x (+.f64 t y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (/.f64 b (/.f64 (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y)) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (/.f64 b (/.f64 (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (/.f64 b (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x))) y))): 0 points increase in error, 0 points decrease in error
      (-.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 b y) (+.f64 y (+.f64 t x))))): 18 points increase in error, 2 points decrease in error
      (-.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 y b)) (+.f64 y (+.f64 t x)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= unsub-neg_binary64 (+.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (neg.f64 (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x))))) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+r+_binary64 (+.f64 (/.f64 (*.f64 a (+.f64 y t)) (+.f64 y (+.f64 t x))) (+.f64 (*.f64 -1 (/.f64 (*.f64 (+.f64 (*.f64 -1 x) (*.f64 -1 y)) z) (+.f64 y (+.f64 t x)))) (*.f64 -1 (/.f64 (*.f64 y b) (+.f64 y (+.f64 t x))))))): 0 points increase in error, 0 points decrease in error

    if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 3.99999999999999994e307

    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, z - b, \mathsf{fma}\left(y + t, a, x \cdot z\right)\right)}{x + \left(y + t\right)}} \]
      Proof
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (+.f64 y t) a (*.f64 x z))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (Rewrite<= +-commutative_binary64 (+.f64 t y)) a (*.f64 x z))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (fma.f64 (+.f64 t y) a (Rewrite<= *-commutative_binary64 (*.f64 z x)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (+.f64 t y) a) (*.f64 z x)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (fma.f64 y (-.f64 z b) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (-.f64 z b)) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 1 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 y z) (*.f64 y b))) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (*.f64 y z) (neg.f64 (*.f64 y b)))) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite=> +-commutative_binary64 (+.f64 (neg.f64 (*.f64 y b)) (*.f64 y z))) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate-+r+_binary64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (*.f64 y z) (+.f64 (*.f64 z x) (*.f64 (+.f64 t y) a))))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (*.f64 y z) (+.f64 (Rewrite=> *-commutative_binary64 (*.f64 x z)) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 y z) (*.f64 x z)) (*.f64 (+.f64 t y) a)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 z (+.f64 y x))) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 1 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (*.f64 z (Rewrite<= +-commutative_binary64 (+.f64 x y))) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (neg.f64 (*.f64 y b)) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 x y) z)) (*.f64 (+.f64 t y) a))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (neg.f64 (*.f64 y b)))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= sub-neg_binary64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b))) (+.f64 x (+.f64 y t))): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 x (Rewrite<= +-commutative_binary64 (+.f64 t y)))): 0 points increase in error, 0 points decrease in error
      (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in a around inf 0.3

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

Alternatives

Alternative 1
Error4.3
Cost9284
\[\begin{array}{l} t_1 := \left(y + t\right) \cdot a\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(z \cdot \left(x + y\right) + t_1\right) - y \cdot b}{t_2}\\ t_4 := x + \left(y + t\right)\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{t_4}, y + t, \frac{x + y}{\frac{t_4}{z}}\right) - b\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;\frac{y \cdot \left(z - b\right)}{t_2} + \left(\frac{x \cdot z}{t_2} + \frac{t_1}{t_2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{t_4}{y}}\\ \end{array} \]
Alternative 2
Error4.6
Cost4936
\[\begin{array}{l} t_1 := \left(y + t\right) \cdot a\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{\left(z \cdot \left(x + y\right) + t_1\right) - y \cdot b}{t_2}\\ t_4 := \left(z + a\right) - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;\frac{y \cdot \left(z - b\right)}{t_2} + \left(\frac{x \cdot z}{t_2} + \frac{t_1}{t_2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 3
Error4.6
Cost4168
\[\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)}\\ t_2 := \left(z + a\right) - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error19.9
Cost2272
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := \frac{b}{\frac{t_1}{y}}\\ t_3 := \left(z + \frac{y \cdot a}{x + y}\right) - t_2\\ t_4 := a - t_2\\ t_5 := \left(z + a\right) - t_2\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{+150}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+106}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - b\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-103}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-165}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-301}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-198}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-26}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;z \leq 150000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+198}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y}{\frac{t_1}{z}}\\ \end{array} \]
Alternative 5
Error21.5
Cost2024
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := a - \frac{b}{\frac{t_1}{y}}\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+150}:\\ \;\;\;\;z \cdot \frac{x + y}{t_2}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+106}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - b\\ \mathbf{elif}\;z \leq -7.1 \cdot 10^{+78}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+58}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+58}:\\ \;\;\;\;a - x \cdot \frac{a}{y}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{+48}:\\ \;\;\;\;x \cdot \frac{z}{x + t}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-110}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-149}:\\ \;\;\;\;\frac{y + t}{\frac{t_2}{a}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-52}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+197}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y}{\frac{t_1}{z}}\\ \end{array} \]
Alternative 6
Error22.8
Cost1892
\[\begin{array}{l} t_1 := a - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ t_2 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ t_3 := \left(z + a\right) - b\\ \mathbf{if}\;z \leq -6.3 \cdot 10^{+150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{+49}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{+14}:\\ \;\;\;\;\left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4100000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+31}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+54}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+196}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error28.8
Cost1764
\[\begin{array}{l} t_1 := x \cdot \frac{z}{x + t}\\ t_2 := \left(z + a\right) - b\\ t_3 := \left(z + a\right) - \frac{y}{\frac{t}{b}}\\ \mathbf{if}\;y \leq -1.1 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-129}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-155}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-204}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-236}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-36}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+74}:\\ \;\;\;\;\left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error28.2
Cost1760
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{if}\;z \leq -1.08 \cdot 10^{+49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-159}:\\ \;\;\;\;\left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{elif}\;z \leq 10^{-20}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq 6500000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+57}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+59}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+196}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Error14.7
Cost1744
\[\begin{array}{l} t_1 := \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ t_2 := \left(z + \frac{y \cdot a}{x + y}\right) - t_1\\ \mathbf{if}\;x \leq -1.1 \cdot 10^{+52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+98}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - t_1\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+226}:\\ \;\;\;\;\left(z + a\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error21.8
Cost1496
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ t_2 := a - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{+106}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - b\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-199}:\\ \;\;\;\;\frac{y}{\frac{x + y}{a - b}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-55}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+200}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error21.8
Cost1496
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ t_2 := a - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{+106}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - b\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-198}:\\ \;\;\;\;\frac{y}{\frac{x + y}{a + \left(z - b\right)}}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-53}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+197}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error21.4
Cost1496
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ t_2 := a - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{+106}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - b\\ \mathbf{elif}\;z \leq -3.95 \cdot 10^{-140}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-198}:\\ \;\;\;\;\frac{y}{\frac{t + \left(x + y\right)}{a - b}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-53}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+202}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error21.1
Cost1496
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := z \cdot \frac{x + y}{t_1}\\ t_3 := a - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+106}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - b\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-110}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{y + t}{\frac{t_1}{a}}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-53}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+204}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error21.4
Cost1496
\[\begin{array}{l} t_1 := x + \left(y + t\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := a - \frac{b}{\frac{t_1}{y}}\\ \mathbf{if}\;z \leq -5.9 \cdot 10^{+150}:\\ \;\;\;\;z \cdot \frac{x + y}{t_2}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+106}:\\ \;\;\;\;\left(a + \frac{y}{\frac{y + t}{z}}\right) - b\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-110}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{y + t}{\frac{t_2}{a}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-54}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+207}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y}{\frac{t_1}{z}}\\ \end{array} \]
Alternative 15
Error24.8
Cost1364
\[\begin{array}{l} t_1 := a - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ t_2 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-190}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+90}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+226}:\\ \;\;\;\;\left(z + a\right) - \frac{b}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Error18.3
Cost1360
\[\begin{array}{l} t_1 := \frac{x \cdot z + t \cdot a}{x + t}\\ t_2 := \left(z + a\right) - \frac{b}{\frac{x + \left(y + t\right)}{y}}\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.7 \cdot 10^{-168}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 17
Error27.4
Cost972
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;t \leq -2.02 \cdot 10^{+186}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.08 \cdot 10^{-206}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-301}:\\ \;\;\;\;\left(a - b\right) \cdot \frac{y}{x + y}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+200}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 18
Error27.3
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;x \leq -1.25 \cdot 10^{+114}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-120}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{+256}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 19
Error27.3
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;x \leq -2.8 \cdot 10^{+114}:\\ \;\;\;\;z \cdot \left(1 - \frac{t}{x}\right)\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-120}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+253}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 20
Error34.8
Cost720
\[\begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+66}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+98}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+115}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.52 \cdot 10^{+226}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 21
Error35.4
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+61}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+98}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 22
Error43.0
Cost64
\[a \]

Error

Reproduce

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