\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 -2.3261654035714339 \cdot 10^{143}:\\
\;\;\;\;a - \frac{y}{x + \left(y + t\right)} \cdot b\\
\mathbf{elif}\;a \le -1.4552852751360911 \cdot 10^{-44}:\\
\;\;\;\;\frac{\left(y + x\right) \cdot z + a \cdot \left(y + t\right)}{x + \left(y + t\right)} - y \cdot \frac{b}{x + \left(y + t\right)}\\
\mathbf{elif}\;a \le -1.0403241314872403 \cdot 10^{-176}:\\
\;\;\;\;z - \frac{y}{x + \left(y + t\right)} \cdot b\\
\mathbf{elif}\;a \le 2.74574753970520639 \cdot 10^{-210}:\\
\;\;\;\;\frac{\left(y + x\right) \cdot z + a \cdot \left(y + t\right)}{x + \left(y + t\right)} - y \cdot \frac{b}{x + \left(y + t\right)}\\
\mathbf{elif}\;a \le 1983.13573974047836 \lor \neg \left(a \le 2.91328404020521664 \cdot 10^{142}\right) \land a \le 8.28460359291410148 \cdot 10^{175}:\\
\;\;\;\;z - \frac{y}{x + \left(y + t\right)} \cdot b\\
\mathbf{else}:\\
\;\;\;\;a - \frac{y}{x + \left(y + t\right)} \cdot b\\
\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 <= -2.326165403571434e+143)) {
VAR = ((double) (a - ((double) (((double) (y / ((double) (x + ((double) (y + t)))))) * b))));
} else {
double VAR_1;
if ((a <= -1.455285275136091e-44)) {
VAR_1 = ((double) (((double) (((double) (((double) (((double) (y + x)) * z)) + ((double) (a * ((double) (y + t)))))) / ((double) (x + ((double) (y + t)))))) - ((double) (y * ((double) (b / ((double) (x + ((double) (y + t))))))))));
} else {
double VAR_2;
if ((a <= -1.0403241314872403e-176)) {
VAR_2 = ((double) (z - ((double) (((double) (y / ((double) (x + ((double) (y + t)))))) * b))));
} else {
double VAR_3;
if ((a <= 2.7457475397052064e-210)) {
VAR_3 = ((double) (((double) (((double) (((double) (((double) (y + x)) * z)) + ((double) (a * ((double) (y + t)))))) / ((double) (x + ((double) (y + t)))))) - ((double) (y * ((double) (b / ((double) (x + ((double) (y + t))))))))));
} else {
double VAR_4;
if (((a <= 1983.1357397404784) || (!(a <= 2.9132840402052166e+142) && (a <= 8.284603592914101e+175)))) {
VAR_4 = ((double) (z - ((double) (((double) (y / ((double) (x + ((double) (y + t)))))) * b))));
} else {
VAR_4 = ((double) (a - ((double) (((double) (y / ((double) (x + ((double) (y + t)))))) * b))));
}
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.7 |
|---|---|
| Target | 11.0 |
| Herbie | 22.3 |
if a < -2.3261654035714339e143 or 1983.13573974047836 < a < 2.91328404020521664e142 or 8.28460359291410148e175 < a Initial program 37.8
rmApplied div-sub37.8
Simplified37.8
Simplified36.6
Taylor expanded around 0 25.2
if -2.3261654035714339e143 < a < -1.4552852751360911e-44 or -1.0403241314872403e-176 < a < 2.74574753970520639e-210Initial program 21.6
rmApplied div-sub21.6
Simplified21.6
Simplified18.1
rmApplied div-inv18.2
Applied associate-*l*18.9
Simplified18.9
if -1.4552852751360911e-44 < a < -1.0403241314872403e-176 or 2.74574753970520639e-210 < a < 1983.13573974047836 or 2.91328404020521664e142 < a < 8.28460359291410148e175Initial program 19.5
rmApplied div-sub19.5
Simplified19.5
Simplified15.1
Taylor expanded around inf 22.9
Final simplification22.3
herbie shell --seed 2020179
(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)))