\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 -1.82726962280634511 \cdot 10^{54} \lor \neg \left(y \le 4.53189748522320259 \cdot 10^{41}\right):\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{\mathsf{fma}\left(z, x + y, \left(t + y\right) \cdot a - y \cdot b\right)}{\left(x + t\right) + y}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r864699 = x;
double r864700 = y;
double r864701 = r864699 + r864700;
double r864702 = z;
double r864703 = r864701 * r864702;
double r864704 = t;
double r864705 = r864704 + r864700;
double r864706 = a;
double r864707 = r864705 * r864706;
double r864708 = r864703 + r864707;
double r864709 = b;
double r864710 = r864700 * r864709;
double r864711 = r864708 - r864710;
double r864712 = r864699 + r864704;
double r864713 = r864712 + r864700;
double r864714 = r864711 / r864713;
return r864714;
}
double f(double x, double y, double z, double t, double a, double b) {
double r864715 = y;
double r864716 = -1.827269622806345e+54;
bool r864717 = r864715 <= r864716;
double r864718 = 4.5318974852232026e+41;
bool r864719 = r864715 <= r864718;
double r864720 = !r864719;
bool r864721 = r864717 || r864720;
double r864722 = a;
double r864723 = z;
double r864724 = r864722 + r864723;
double r864725 = b;
double r864726 = r864724 - r864725;
double r864727 = 1.0;
double r864728 = x;
double r864729 = r864728 + r864715;
double r864730 = t;
double r864731 = r864730 + r864715;
double r864732 = r864731 * r864722;
double r864733 = r864715 * r864725;
double r864734 = r864732 - r864733;
double r864735 = fma(r864723, r864729, r864734);
double r864736 = r864728 + r864730;
double r864737 = r864736 + r864715;
double r864738 = r864735 / r864737;
double r864739 = r864727 * r864738;
double r864740 = r864721 ? r864726 : r864739;
return r864740;
}




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.2 |
|---|---|
| Target | 11.7 |
| Herbie | 15.9 |
if y < -1.827269622806345e+54 or 4.5318974852232026e+41 < y Initial program 42.2
rmApplied clear-num42.2
Simplified42.2
Taylor expanded around 0 15.7
if -1.827269622806345e+54 < y < 4.5318974852232026e+41Initial program 16.1
rmApplied clear-num16.2
Simplified16.2
rmApplied *-un-lft-identity16.2
Applied *-un-lft-identity16.2
Applied times-frac16.2
Applied add-cube-cbrt16.2
Applied times-frac16.2
Simplified16.2
Simplified16.1
Final simplification15.9
herbie shell --seed 2020083 +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)))