\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 -8734976865957546379114971136:\\
\;\;\;\;\left(a + z\right) - \frac{b}{\frac{\left(y + t\right) + x}{y}}\\
\mathbf{elif}\;y \le 4.402135283980321324040881395991840262925 \cdot 10^{55}:\\
\;\;\;\;\frac{1}{\frac{\left(y + t\right) + x}{a \cdot \left(y + t\right) + \left(z \cdot \left(y + x\right) - y \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - \frac{b}{\frac{\left(y + t\right) + x}{y}}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r44512601 = x;
double r44512602 = y;
double r44512603 = r44512601 + r44512602;
double r44512604 = z;
double r44512605 = r44512603 * r44512604;
double r44512606 = t;
double r44512607 = r44512606 + r44512602;
double r44512608 = a;
double r44512609 = r44512607 * r44512608;
double r44512610 = r44512605 + r44512609;
double r44512611 = b;
double r44512612 = r44512602 * r44512611;
double r44512613 = r44512610 - r44512612;
double r44512614 = r44512601 + r44512606;
double r44512615 = r44512614 + r44512602;
double r44512616 = r44512613 / r44512615;
return r44512616;
}
double f(double x, double y, double z, double t, double a, double b) {
double r44512617 = y;
double r44512618 = -8.734976865957546e+27;
bool r44512619 = r44512617 <= r44512618;
double r44512620 = a;
double r44512621 = z;
double r44512622 = r44512620 + r44512621;
double r44512623 = b;
double r44512624 = t;
double r44512625 = r44512617 + r44512624;
double r44512626 = x;
double r44512627 = r44512625 + r44512626;
double r44512628 = r44512627 / r44512617;
double r44512629 = r44512623 / r44512628;
double r44512630 = r44512622 - r44512629;
double r44512631 = 4.4021352839803213e+55;
bool r44512632 = r44512617 <= r44512631;
double r44512633 = 1.0;
double r44512634 = r44512620 * r44512625;
double r44512635 = r44512617 + r44512626;
double r44512636 = r44512621 * r44512635;
double r44512637 = r44512617 * r44512623;
double r44512638 = r44512636 - r44512637;
double r44512639 = r44512634 + r44512638;
double r44512640 = r44512627 / r44512639;
double r44512641 = r44512633 / r44512640;
double r44512642 = r44512632 ? r44512641 : r44512630;
double r44512643 = r44512619 ? r44512630 : r44512642;
return r44512643;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 27.0 |
|---|---|
| Target | 11.5 |
| Herbie | 13.2 |
if y < -8.734976865957546e+27 or 4.4021352839803213e+55 < y Initial program 41.0
Simplified41.0
rmApplied associate-+r-41.0
Applied div-sub41.0
rmApplied associate-/l*33.3
rmApplied div-inv33.4
Taylor expanded around inf 10.4
if -8.734976865957546e+27 < y < 4.4021352839803213e+55Initial program 15.5
Simplified15.5
rmApplied clear-num15.6
Final simplification13.2
herbie shell --seed 2019172
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
: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)))