\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 -7.316110015731767 \cdot 10^{-75}:\\
\;\;\;\;\left(a + z\right) - \left(\frac{1}{\left(y + t\right) + x} \cdot y\right) \cdot b\\
\mathbf{elif}\;y \le 8.638006545329685 \cdot 10^{+75}:\\
\;\;\;\;\frac{1}{\frac{\left(y + t\right) + x}{\left(y + t\right) \cdot a + \left(z \cdot \left(y + x\right) - y \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - \left(\frac{1}{\left(y + t\right) + x} \cdot y\right) \cdot b\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r42782099 = x;
double r42782100 = y;
double r42782101 = r42782099 + r42782100;
double r42782102 = z;
double r42782103 = r42782101 * r42782102;
double r42782104 = t;
double r42782105 = r42782104 + r42782100;
double r42782106 = a;
double r42782107 = r42782105 * r42782106;
double r42782108 = r42782103 + r42782107;
double r42782109 = b;
double r42782110 = r42782100 * r42782109;
double r42782111 = r42782108 - r42782110;
double r42782112 = r42782099 + r42782104;
double r42782113 = r42782112 + r42782100;
double r42782114 = r42782111 / r42782113;
return r42782114;
}
double f(double x, double y, double z, double t, double a, double b) {
double r42782115 = y;
double r42782116 = -7.316110015731767e-75;
bool r42782117 = r42782115 <= r42782116;
double r42782118 = a;
double r42782119 = z;
double r42782120 = r42782118 + r42782119;
double r42782121 = 1.0;
double r42782122 = t;
double r42782123 = r42782115 + r42782122;
double r42782124 = x;
double r42782125 = r42782123 + r42782124;
double r42782126 = r42782121 / r42782125;
double r42782127 = r42782126 * r42782115;
double r42782128 = b;
double r42782129 = r42782127 * r42782128;
double r42782130 = r42782120 - r42782129;
double r42782131 = 8.638006545329685e+75;
bool r42782132 = r42782115 <= r42782131;
double r42782133 = r42782123 * r42782118;
double r42782134 = r42782115 + r42782124;
double r42782135 = r42782119 * r42782134;
double r42782136 = r42782115 * r42782128;
double r42782137 = r42782135 - r42782136;
double r42782138 = r42782133 + r42782137;
double r42782139 = r42782125 / r42782138;
double r42782140 = r42782121 / r42782139;
double r42782141 = r42782132 ? r42782140 : r42782130;
double r42782142 = r42782117 ? r42782130 : r42782141;
return r42782142;
}




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 | 25.4 |
|---|---|
| Target | 11.2 |
| Herbie | 13.7 |
if y < -7.316110015731767e-75 or 8.638006545329685e+75 < y Initial program 35.2
Simplified35.2
rmApplied associate-+r-35.2
Applied div-sub35.2
rmApplied *-un-lft-identity35.2
Applied times-frac28.8
Simplified28.8
Taylor expanded around inf 11.8
rmApplied div-inv11.9
if -7.316110015731767e-75 < y < 8.638006545329685e+75Initial program 15.4
Simplified15.4
rmApplied clear-num15.5
Final simplification13.7
herbie shell --seed 2019168
(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 (/ (+ (+ 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)))