\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 r41782648 = x;
double r41782649 = y;
double r41782650 = r41782648 + r41782649;
double r41782651 = z;
double r41782652 = r41782650 * r41782651;
double r41782653 = t;
double r41782654 = r41782653 + r41782649;
double r41782655 = a;
double r41782656 = r41782654 * r41782655;
double r41782657 = r41782652 + r41782656;
double r41782658 = b;
double r41782659 = r41782649 * r41782658;
double r41782660 = r41782657 - r41782659;
double r41782661 = r41782648 + r41782653;
double r41782662 = r41782661 + r41782649;
double r41782663 = r41782660 / r41782662;
return r41782663;
}
double f(double x, double y, double z, double t, double a, double b) {
double r41782664 = y;
double r41782665 = -8.734976865957546e+27;
bool r41782666 = r41782664 <= r41782665;
double r41782667 = a;
double r41782668 = z;
double r41782669 = r41782667 + r41782668;
double r41782670 = b;
double r41782671 = t;
double r41782672 = r41782664 + r41782671;
double r41782673 = x;
double r41782674 = r41782672 + r41782673;
double r41782675 = r41782674 / r41782664;
double r41782676 = r41782670 / r41782675;
double r41782677 = r41782669 - r41782676;
double r41782678 = 4.4021352839803213e+55;
bool r41782679 = r41782664 <= r41782678;
double r41782680 = 1.0;
double r41782681 = r41782667 * r41782672;
double r41782682 = r41782664 + r41782673;
double r41782683 = r41782668 * r41782682;
double r41782684 = r41782664 * r41782670;
double r41782685 = r41782683 - r41782684;
double r41782686 = r41782681 + r41782685;
double r41782687 = r41782674 / r41782686;
double r41782688 = r41782680 / r41782687;
double r41782689 = r41782679 ? r41782688 : r41782677;
double r41782690 = r41782666 ? r41782677 : r41782689;
return r41782690;
}




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)))