\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}\;t \le -1.877425623621617 \cdot 10^{129}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \le -4.29951474949930605 \cdot 10^{92}:\\
\;\;\;\;\frac{1}{\left(\left(x + t\right) + y\right) \cdot \frac{1}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}\\
\mathbf{elif}\;t \le -1.25926199172426231 \cdot 10^{-92}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{elif}\;t \le -1.20705898493034513 \cdot 10^{-269}:\\
\;\;\;\;\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}\;t \le 6.4644815128971739 \cdot 10^{-85}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{elif}\;t \le 1.372403736194714 \cdot 10^{55}:\\
\;\;\;\;\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}\;t \le 5.2849132795166073 \cdot 10^{81}:\\
\;\;\;\;z\\
\mathbf{elif}\;t \le 6.06352514701041726 \cdot 10^{110}:\\
\;\;\;\;\frac{1}{\left(\left(x + t\right) + y\right) \cdot \frac{1}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}\\
\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 ((t <= -1.877425623621617e+129)) {
VAR = a;
} else {
double VAR_1;
if ((t <= -4.299514749499306e+92)) {
VAR_1 = ((double) (1.0 / ((double) (((double) (((double) (x + t)) + y)) * ((double) (1.0 / ((double) (((double) (((double) (((double) (x + y)) * z)) + ((double) (((double) (t + y)) * a)))) - ((double) (y * b))))))))));
} else {
double VAR_2;
if ((t <= -1.2592619917242623e-92)) {
VAR_2 = ((double) (((double) (a + z)) - b));
} else {
double VAR_3;
if ((t <= -1.2070589849303451e-269)) {
VAR_3 = ((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_4;
if ((t <= 6.464481512897174e-85)) {
VAR_4 = ((double) (((double) (a + z)) - b));
} else {
double VAR_5;
if ((t <= 1.3724037361947135e+55)) {
VAR_5 = ((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_6;
if ((t <= 5.284913279516607e+81)) {
VAR_6 = z;
} else {
double VAR_7;
if ((t <= 6.063525147010417e+110)) {
VAR_7 = ((double) (1.0 / ((double) (((double) (((double) (x + t)) + y)) * ((double) (1.0 / ((double) (((double) (((double) (((double) (x + y)) * z)) + ((double) (((double) (t + y)) * a)))) - ((double) (y * b))))))))));
} else {
VAR_7 = a;
}
VAR_6 = VAR_7;
}
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.2 |
|---|---|
| Target | 10.9 |
| Herbie | 25.9 |
if t < -1.877425623621617e+129 or 6.063525147010417e+110 < t Initial program 35.6
Taylor expanded around 0 30.1
if -1.877425623621617e+129 < t < -4.299514749499306e+92 or 5.284913279516607e+81 < t < 6.063525147010417e+110Initial program 26.7
rmApplied clear-num26.8
rmApplied div-inv26.8
if -4.299514749499306e+92 < t < -1.2592619917242623e-92 or -1.2070589849303451e-269 < t < 6.464481512897174e-85Initial program 21.4
rmApplied clear-num21.5
Taylor expanded around 0 23.9
if -1.2592619917242623e-92 < t < -1.2070589849303451e-269 or 6.464481512897174e-85 < t < 1.3724037361947135e+55Initial program 22.0
rmApplied div-inv22.1
if 1.3724037361947135e+55 < t < 5.284913279516607e+81Initial program 24.3
Taylor expanded around inf 40.7
Final simplification25.9
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)))