Average Error: 26.0 → 0.9
Time: 22.7s
Precision: binary64
Cost: 8768
\[\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(t + y\right)\\ \frac{z - b}{\frac{t_1}{y}} + \mathsf{fma}\left(a, \frac{y}{t_1} + \frac{t}{t_1}, z \cdot \frac{x}{t_1}\right) \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 (+ t y))))
   (+ (/ (- z b) (/ t_1 y)) (fma a (+ (/ y t_1) (/ t t_1)) (* z (/ x 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 + (t + y);
	return ((z - b) / (t_1 / y)) + fma(a, ((y / t_1) + (t / t_1)), (z * (x / t_1)));
}
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(t + y))
	return Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + fma(a, Float64(Float64(y / t_1) + Float64(t / t_1)), Float64(z * Float64(x / t_1))))
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[(t + y), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]), $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 := x + \left(t + y\right)\\
\frac{z - b}{\frac{t_1}{y}} + \mathsf{fma}\left(a, \frac{y}{t_1} + \frac{t}{t_1}, z \cdot \frac{x}{t_1}\right)
\end{array}

Error

Target

Original26.0
Target10.8
Herbie0.9
\[\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. Initial program 26.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. Simplified26.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))): 1 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))): 0 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 0 18.4

    \[\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)} + a \cdot \left(\frac{y}{y + \left(t + x\right)} + \frac{t}{y + \left(t + x\right)}\right)\right)} \]
  4. Simplified2.8

    \[\leadsto \color{blue}{\frac{z - b}{x + \left(t + y\right)} \cdot y + \mathsf{fma}\left(a, \frac{y}{x + \left(t + y\right)} + \frac{t}{x + \left(t + y\right)}, \frac{x}{x + \left(t + y\right)} \cdot z\right)} \]
    Proof
    (+.f64 (*.f64 (/.f64 (-.f64 z b) (+.f64 x (+.f64 t y))) y) (fma.f64 a (+.f64 (/.f64 y (+.f64 x (+.f64 t y))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (/.f64 (-.f64 z b) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y))) y) (fma.f64 a (+.f64 (/.f64 y (+.f64 x (+.f64 t y))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (/.f64 (-.f64 z b) (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y)) y) (fma.f64 a (+.f64 (/.f64 y (+.f64 x (+.f64 t y))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (/.f64 (-.f64 z b) (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x)))) y) (fma.f64 a (+.f64 (/.f64 y (+.f64 x (+.f64 t y))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (Rewrite<= associate-/r/_binary64 (/.f64 (-.f64 z b) (/.f64 (+.f64 y (+.f64 t x)) y))) (fma.f64 a (+.f64 (/.f64 y (+.f64 x (+.f64 t y))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 9 points increase in error, 23 points decrease in error
    (+.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x)))) (fma.f64 a (+.f64 (/.f64 y (+.f64 x (+.f64 t y))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 69 points increase in error, 5 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y)) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x)))) (/.f64 t (+.f64 x (+.f64 t y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y)))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x))))) (*.f64 (/.f64 x (+.f64 x (+.f64 t y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x)))) (*.f64 (/.f64 x (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 x t) y))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x)))) (*.f64 (/.f64 x (+.f64 (Rewrite<= +-commutative_binary64 (+.f64 t x)) y)) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x)))) (*.f64 (/.f64 x (Rewrite<= +-commutative_binary64 (+.f64 y (+.f64 t x)))) z))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x)))) (Rewrite<= associate-/r/_binary64 (/.f64 x (/.f64 (+.f64 y (+.f64 t x)) z))))): 17 points increase in error, 1 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x)))) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 x z) (+.f64 y (+.f64 t x)))))): 22 points increase in error, 13 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (fma.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x)))) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 z x)) (+.f64 y (+.f64 t x))))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x))))) (/.f64 (*.f64 z x) (+.f64 y (+.f64 t x)))))): 0 points increase in error, 0 points decrease in error
    (+.f64 (/.f64 (*.f64 (-.f64 z b) y) (+.f64 y (+.f64 t x))) (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 z x) (+.f64 y (+.f64 t x))) (*.f64 a (+.f64 (/.f64 y (+.f64 y (+.f64 t x))) (/.f64 t (+.f64 y (+.f64 t x)))))))): 0 points increase in error, 0 points decrease in error
  5. Applied egg-rr0.9

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

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

Alternatives

Alternative 1
Error6.0
Cost4680
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(t + y\right) \cdot a\right) - b \cdot y}{t_1}\\ t_3 := \frac{z - b}{\frac{x + \left(t + y\right)}{y}} + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error6.0
Cost4680
\[\begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(t + y\right) \cdot a\right) - b \cdot y}{t_1}\\ t_3 := x + \left(t + y\right)\\ t_4 := a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\frac{z - b}{\frac{t_3}{y}} + t_4\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_4 + y \cdot \frac{z - b}{t_3}\\ \end{array} \]
Alternative 3
Error7.4
Cost4168
\[\begin{array}{l} t_1 := \frac{\left(z \cdot \left(x + y\right) + \left(t + y\right) \cdot a\right) - b \cdot y}{y + \left(x + t\right)}\\ t_2 := \frac{z - b}{\frac{x + \left(t + y\right)}{y}} + a\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 10^{+280}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error29.2
Cost2224
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_2 := \left(z + a\right) - b\\ t_3 := y + \left(x + t\right)\\ t_4 := \frac{-b}{\frac{t_3}{y}}\\ \mathbf{if}\;b \leq -7.344851288203482 \cdot 10^{+169}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq -7.967579156722608 \cdot 10^{+69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -76066844932.84715:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq -5.157031928892025 \cdot 10^{-109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.1528733393468495 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.216149223770977 \cdot 10^{-267}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -6.881017140226636 \cdot 10^{-308}:\\ \;\;\;\;\frac{a}{\frac{t_3}{t + y}}\\ \mathbf{elif}\;b \leq 1.9021161076368207 \cdot 10^{-150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.584848958821969 \cdot 10^{-65}:\\ \;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\ \mathbf{elif}\;b \leq 3.521305807735089 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 9.579022400247112 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.537459671541362 \cdot 10^{+154}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 5
Error28.5
Cost1960
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_2 := \left(z + a\right) - b\\ t_3 := y + \left(x + t\right)\\ t_4 := \frac{-b}{\frac{t_3}{y}}\\ \mathbf{if}\;b \leq -7.344851288203482 \cdot 10^{+169}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq -7.967579156722608 \cdot 10^{+69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -76066844932.84715:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq -5.157031928892025 \cdot 10^{-109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.1528733393468495 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.216149223770977 \cdot 10^{-267}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -6.881017140226636 \cdot 10^{-308}:\\ \;\;\;\;\frac{a}{\frac{t_3}{t + y}}\\ \mathbf{elif}\;b \leq 3.521305807735089 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 9.579022400247112 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.537459671541362 \cdot 10^{+154}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 6
Error15.2
Cost1872
\[\begin{array}{l} t_1 := \frac{z - b}{\frac{x + \left(t + y\right)}{y}} + a\\ t_2 := \left(z + \left(z - b\right) \cdot \frac{y}{x}\right) + \left(t + y\right) \cdot \left(\frac{a}{x} - \frac{z}{x}\right)\\ \mathbf{if}\;x \leq -5.062204879515177 \cdot 10^{+157}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.075004727353859 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;x \leq 2.3558492431716764 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6.0067686024336325 \cdot 10^{+53}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 6.599240902729002 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;z - b \cdot \frac{y}{x + y}\\ \end{array} \]
Alternative 7
Error16.3
Cost1748
\[\begin{array}{l} t_1 := x + \left(t + y\right)\\ t_2 := \frac{z - b}{\frac{t_1}{y}} + a\\ t_3 := z - b \cdot \frac{y}{x + y}\\ \mathbf{if}\;x \leq -1.8906806954904732 \cdot 10^{+207}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -6.093483515201604 \cdot 10^{+174}:\\ \;\;\;\;\frac{t + y}{\frac{t_1}{a}}\\ \mathbf{elif}\;x \leq -1.075004727353859 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;x \leq 2.3558492431716764 \cdot 10^{+27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 6.0067686024336325 \cdot 10^{+53}:\\ \;\;\;\;z + \frac{\left(z - b\right) \cdot y + \left(t + y\right) \cdot \left(a - z\right)}{x}\\ \mathbf{elif}\;x \leq 6.599240902729002 \cdot 10^{+122}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error28.1
Cost1696
\[\begin{array}{l} t_1 := z \cdot \frac{x + y}{t + \left(x + y\right)}\\ t_2 := \left(z + a\right) - b\\ t_3 := \frac{-b}{\frac{y + \left(x + t\right)}{y}}\\ \mathbf{if}\;b \leq -7.344851288203482 \cdot 10^{+169}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -7.967579156722608 \cdot 10^{+69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -76066844932.84715:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq -5.157031928892025 \cdot 10^{-109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.1528733393468495 \cdot 10^{-172}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.521305807735089 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 9.579022400247112 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.537459671541362 \cdot 10^{+154}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Error16.1
Cost1360
\[\begin{array}{l} t_1 := x + \left(t + y\right)\\ t_2 := z - b \cdot \frac{y}{x + y}\\ \mathbf{if}\;x \leq -1.8906806954904732 \cdot 10^{+207}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -6.093483515201604 \cdot 10^{+174}:\\ \;\;\;\;\frac{t + y}{\frac{t_1}{a}}\\ \mathbf{elif}\;x \leq -1.075004727353859 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \frac{x + y}{t + \left(x + y\right)}\\ \mathbf{elif}\;x \leq 6.599240902729002 \cdot 10^{+122}:\\ \;\;\;\;\frac{z - b}{\frac{t_1}{y}} + a\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error26.8
Cost972
\[\begin{array}{l} \mathbf{if}\;t \leq -3.2108065842580036 \cdot 10^{+216}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 3.296204056025647 \cdot 10^{-305}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 1.0341415142081574 \cdot 10^{+27}:\\ \;\;\;\;z - b \cdot \frac{y}{x + y}\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 11
Error26.8
Cost848
\[\begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;t \leq -3.2108065842580036 \cdot 10^{+216}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 4.068348194806781 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.4903253870470414 \cdot 10^{-181}:\\ \;\;\;\;z - \frac{b \cdot y}{x}\\ \mathbf{elif}\;t \leq 2.9617973235885554 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 12
Error36.5
Cost592
\[\begin{array}{l} \mathbf{if}\;t \leq -3.4160127400898432 \cdot 10^{+41}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.6231982959935635 \cdot 10^{-263}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 9.680362296321065 \cdot 10^{-278}:\\ \;\;\;\;-b\\ \mathbf{elif}\;t \leq 1109605833228384.5:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 13
Error26.4
Cost584
\[\begin{array}{l} \mathbf{if}\;t \leq -3.2108065842580036 \cdot 10^{+216}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 2.9617973235885554 \cdot 10^{+100}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 14
Error34.0
Cost460
\[\begin{array}{l} \mathbf{if}\;t \leq -3.4160127400898432 \cdot 10^{+41}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.3004099399477986 \cdot 10^{-216}:\\ \;\;\;\;z - b\\ \mathbf{elif}\;t \leq 1109605833228384.5:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 15
Error35.5
Cost328
\[\begin{array}{l} \mathbf{if}\;t \leq -3.4160127400898432 \cdot 10^{+41}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1109605833228384.5:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
Alternative 16
Error43.3
Cost64
\[a \]

Error

Reproduce

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