\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}\;a \le -1.4808403197864043 \cdot 10^{173}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \le -6.20353380324662266 \cdot 10^{128}:\\
\;\;\;\;\left(\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\right) \cdot \frac{1}{\left(x + t\right) + y}\\
\mathbf{elif}\;a \le -1.1766897053029331 \cdot 10^{116}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \le -2.32193569235281339 \cdot 10^{63}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \le 9.6687036456074604 \cdot 10^{76}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{b}{\frac{\left(x + t\right) + y}{y}}\\
\mathbf{elif}\;a \le 4.09974571538634191 \cdot 10^{136}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \le 7.8485985484343031 \cdot 10^{210}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{b}{\frac{\left(x + t\right) + y}{y}}\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (((double) (((double) (((double) (x + y)) * z)) + ((double) (((double) (t + y)) * a)))) - ((double) (y * b)))) / ((double) (((double) (x + t)) + y))));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if ((a <= -1.4808403197864043e+173)) {
VAR = a;
} else {
double VAR_1;
if ((a <= -6.203533803246623e+128)) {
VAR_1 = ((double) (((double) (((double) (((double) (((double) (x + y)) * z)) + ((double) (((double) (t + y)) * a)))) - ((double) (y * b)))) * ((double) (1.0 / ((double) (((double) (x + t)) + y))))));
} else {
double VAR_2;
if ((a <= -1.176689705302933e+116)) {
VAR_2 = a;
} else {
double VAR_3;
if ((a <= -2.3219356923528134e+63)) {
VAR_3 = z;
} else {
double VAR_4;
if ((a <= 9.66870364560746e+76)) {
VAR_4 = ((double) (((double) (((double) (((double) (((double) (x + y)) * z)) + ((double) (((double) (t + y)) * a)))) / ((double) (((double) (x + t)) + y)))) - ((double) (b / ((double) (((double) (((double) (x + t)) + y)) / y))))));
} else {
double VAR_5;
if ((a <= 4.099745715386342e+136)) {
VAR_5 = z;
} else {
double VAR_6;
if ((a <= 7.848598548434303e+210)) {
VAR_6 = ((double) (((double) (((double) (((double) (((double) (x + y)) * z)) + ((double) (((double) (t + y)) * a)))) / ((double) (((double) (x + t)) + y)))) - ((double) (b / ((double) (((double) (((double) (x + t)) + y)) / y))))));
} else {
VAR_6 = a;
}
VAR_5 = VAR_6;
}
VAR_4 = VAR_5;
}
VAR_3 = VAR_4;
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




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 | 26.0 |
|---|---|
| Target | 10.8 |
| Herbie | 21.5 |
if a < -1.4808403197864043e173 or -6.20353380324662266e128 < a < -1.1766897053029331e116 or 7.8485985484343031e210 < a Initial program 43.6
Taylor expanded around 0 26.6
if -1.4808403197864043e173 < a < -6.20353380324662266e128Initial program 32.5
rmApplied div-inv32.6
if -1.1766897053029331e116 < a < -2.32193569235281339e63 or 9.6687036456074604e76 < a < 4.09974571538634191e136Initial program 31.1
Taylor expanded around inf 45.9
if -2.32193569235281339e63 < a < 9.6687036456074604e76 or 4.09974571538634191e136 < a < 7.8485985484343031e210Initial program 19.7
rmApplied add-cube-cbrt20.5
Applied associate-/r*20.5
rmApplied div-sub20.5
Applied div-sub20.5
Simplified19.9
Simplified16.1
Final simplification21.5
herbie shell --seed 2020148
(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.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)))