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 <= -2.0894007945644426e+111)) {
VAR = ((double) (a - ((double) (((double) (y / ((double) (x + ((double) (t + y)))))) * b))));
} else {
double VAR_1;
if ((t <= -1.553899553817351e+25)) {
VAR_1 = ((double) (1.0 / ((double) (((double) (x + ((double) (t + y)))) / ((double) (((double) (((double) (y + x)) * z)) + ((double) (((double) (t * a)) + ((double) (y * ((double) (a - b))))))))))));
} else {
double VAR_2;
if ((t <= 2.3708825286757182e-225)) {
VAR_2 = ((double) (z - ((double) (((double) (y / ((double) (x + ((double) (t + y)))))) * b))));
} else {
double VAR_3;
if ((t <= 3.292261846139531e-33)) {
VAR_3 = ((double) (((double) (((double) (((double) (((double) (y + x)) * z)) + ((double) (a * ((double) (t + y)))))) - ((double) (y * b)))) * ((double) (1.0 / ((double) (x + ((double) (t + y))))))));
} else {
double VAR_4;
if ((t <= 1.0903062726921077e+42)) {
VAR_4 = ((double) (z - ((double) (y * ((double) (b / ((double) (x + ((double) (t + y))))))))));
} else {
double VAR_5;
if ((t <= 5.323893389779894e+69)) {
VAR_5 = ((double) (1.0 / ((double) (((double) (x + ((double) (t + y)))) / ((double) (((double) (((double) (y + x)) * z)) + ((double) (((double) (t * a)) + ((double) (y * ((double) (a - b))))))))))));
} else {
VAR_5 = ((double) (a - ((double) (((double) (y / ((double) (x + ((double) (t + y)))))) * b))));
}
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.6 |
|---|---|
| Target | 11.2 |
| Herbie | 22.1 |
if t < -2.0894007945644426e111 or 5.32389338977989437e69 < t Initial program 33.8
rmApplied div-sub33.8
Simplified33.8
Simplified31.1
Taylor expanded around 0 22.8
if -2.0894007945644426e111 < t < -1.55389955381735095e25 or 1.0903062726921077e42 < t < 5.32389338977989437e69Initial program 23.6
rmApplied clear-num23.6
Simplified23.6
if -1.55389955381735095e25 < t < 2.37088252867571821e-225Initial program 22.7
rmApplied div-sub22.7
Simplified22.7
Simplified19.3
Taylor expanded around inf 20.0
if 2.37088252867571821e-225 < t < 3.2922618461395312e-33Initial program 21.4
rmApplied div-inv21.5
Simplified21.5
if 3.2922618461395312e-33 < t < 1.0903062726921077e42Initial program 24.3
rmApplied div-sub24.3
Simplified24.3
Simplified21.1
rmApplied div-inv21.2
Applied associate-*l*21.3
Simplified21.3
Taylor expanded around inf 28.0
Final simplification22.1
herbie shell --seed 2020191
(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)))