\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 -7.7808166352996976 \cdot 10^{255}:\\
\;\;\;\;a - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{elif}\;t \le -3.6223691579229488 \cdot 10^{-18}:\\
\;\;\;\;\frac{\left(y + x\right) \cdot z + a \cdot \left(t + y\right)}{x + \left(t + y\right)} - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{elif}\;t \le -5.9615790635768166 \cdot 10^{-145}:\\
\;\;\;\;z - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{elif}\;t \le -5.07035083730066068 \cdot 10^{-209}:\\
\;\;\;\;\frac{1}{\left(x + \left(t + y\right)\right) \cdot \frac{1}{\left(y + x\right) \cdot z + \left(t \cdot a + y \cdot \left(a - b\right)\right)}}\\
\mathbf{elif}\;t \le 6.89175063681203564 \cdot 10^{-209}:\\
\;\;\;\;z - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{elif}\;t \le 1.2786425217679159 \cdot 10^{-78}:\\
\;\;\;\;\frac{\left(y + x\right) \cdot z + a \cdot \left(t + y\right)}{x + \left(t + y\right)} - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{elif}\;t \le 4304730111250584.5:\\
\;\;\;\;z - y \cdot \frac{b}{x + \left(t + y\right)}\\
\mathbf{else}:\\
\;\;\;\;a - y \cdot \frac{b}{x + \left(t + y\right)}\\
\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 <= -7.780816635299698e+255)) {
VAR = ((double) (a - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
} else {
double VAR_1;
if ((t <= -3.622369157922949e-18)) {
VAR_1 = ((double) (((double) (((double) (((double) (((double) (y + x)) * z)) + ((double) (a * ((double) (t + y)))))) / ((double) (x + ((double) (t + y)))))) - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
} else {
double VAR_2;
if ((t <= -5.9615790635768166e-145)) {
VAR_2 = ((double) (z - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
} else {
double VAR_3;
if ((t <= -5.070350837300661e-209)) {
VAR_3 = ((double) (1.0 / ((double) (((double) (x + ((double) (t + y)))) * ((double) (1.0 / ((double) (((double) (((double) (y + x)) * z)) + ((double) (((double) (t * a)) + ((double) (y * ((double) (a - b))))))))))))));
} else {
double VAR_4;
if ((t <= 6.891750636812036e-209)) {
VAR_4 = ((double) (z - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
} else {
double VAR_5;
if ((t <= 1.2786425217679159e-78)) {
VAR_5 = ((double) (((double) (((double) (((double) (((double) (y + x)) * z)) + ((double) (a * ((double) (t + y)))))) / ((double) (x + ((double) (t + y)))))) - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
} else {
double VAR_6;
if ((t <= 4304730111250584.5)) {
VAR_6 = ((double) (z - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
} else {
VAR_6 = ((double) (a - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
}
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.4 |
|---|---|
| Target | 11.8 |
| Herbie | 23.9 |
if t < -7.7808166352996976e255 or 4304730111250584.5 < t Initial program 32.4
rmApplied div-sub32.4
Simplified32.4
Simplified29.9
Taylor expanded around 0 23.8
if -7.7808166352996976e255 < t < -3.6223691579229488e-18 or 6.89175063681203564e-209 < t < 1.2786425217679159e-78Initial program 26.4
rmApplied div-sub26.4
Simplified26.4
Simplified24.4
if -3.6223691579229488e-18 < t < -5.9615790635768166e-145 or -5.07035083730066068e-209 < t < 6.89175063681203564e-209 or 1.2786425217679159e-78 < t < 4304730111250584.5Initial program 22.0
rmApplied div-sub22.0
Simplified22.0
Simplified20.8
Taylor expanded around inf 23.5
if -5.9615790635768166e-145 < t < -5.07035083730066068e-209Initial program 22.5
rmApplied clear-num22.6
Simplified22.6
rmApplied div-inv22.8
Final simplification23.9
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)))