\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}
\mathbf{if}\;y \le -9.59621725839655908 \cdot 10^{78}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;y \le 2.570722063616475 \cdot 10^{90}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{\sqrt[3]{\left(x + t\right) + y} \cdot \sqrt[3]{\left(x + t\right) + y}}}{\sqrt[3]{\left(x + t\right) + y}} - \frac{y \cdot b}{\left(x + t\right) + y}\\
\mathbf{elif}\;y \le 2.0673661513817186 \cdot 10^{176}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{else}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r946611 = x;
double r946612 = y;
double r946613 = r946611 + r946612;
double r946614 = z;
double r946615 = r946613 * r946614;
double r946616 = t;
double r946617 = r946616 + r946612;
double r946618 = a;
double r946619 = r946617 * r946618;
double r946620 = r946615 + r946619;
double r946621 = b;
double r946622 = r946612 * r946621;
double r946623 = r946620 - r946622;
double r946624 = r946611 + r946616;
double r946625 = r946624 + r946612;
double r946626 = r946623 / r946625;
return r946626;
}
double f(double x, double y, double z, double t, double a, double b) {
double r946627 = y;
double r946628 = -9.596217258396559e+78;
bool r946629 = r946627 <= r946628;
double r946630 = z;
double r946631 = b;
double r946632 = x;
double r946633 = t;
double r946634 = r946632 + r946633;
double r946635 = r946634 + r946627;
double r946636 = r946631 / r946635;
double r946637 = r946627 * r946636;
double r946638 = r946630 - r946637;
double r946639 = 2.570722063616475e+90;
bool r946640 = r946627 <= r946639;
double r946641 = r946632 + r946627;
double r946642 = r946633 + r946627;
double r946643 = a;
double r946644 = r946642 * r946643;
double r946645 = fma(r946641, r946630, r946644);
double r946646 = cbrt(r946635);
double r946647 = r946646 * r946646;
double r946648 = r946645 / r946647;
double r946649 = r946648 / r946646;
double r946650 = r946627 * r946631;
double r946651 = r946650 / r946635;
double r946652 = r946649 - r946651;
double r946653 = 2.0673661513817186e+176;
bool r946654 = r946627 <= r946653;
double r946655 = r946643 - r946637;
double r946656 = r946654 ? r946655 : r946638;
double r946657 = r946640 ? r946652 : r946656;
double r946658 = r946629 ? r946638 : r946657;
return r946658;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
| Original | 27.0 |
|---|---|
| Target | 11.1 |
| Herbie | 21.0 |
if y < -9.596217258396559e+78 or 2.0673661513817186e+176 < y Initial program 46.2
rmApplied div-sub46.2
Simplified46.2
rmApplied *-un-lft-identity46.2
Applied times-frac39.3
Simplified39.3
Taylor expanded around inf 26.7
if -9.596217258396559e+78 < y < 2.570722063616475e+90Initial program 17.2
rmApplied div-sub17.2
Simplified17.2
rmApplied add-cube-cbrt17.8
Applied associate-/r*17.8
Simplified17.8
if 2.570722063616475e+90 < y < 2.0673661513817186e+176Initial program 35.8
rmApplied div-sub35.8
Simplified35.8
rmApplied *-un-lft-identity35.8
Applied times-frac28.5
Simplified28.5
Taylor expanded around 0 25.6
Final simplification21.0
herbie shell --seed 2020056 +o rules:numerics
(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 (/ (+ (+ 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)))