double code(double x, double y, double z, double t) {
return ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= -7.197295960718093e+303)) {
VAR = ((double) (x * ((double) (((double) (y - z)) / ((double) (t - z))))));
} else {
double VAR_1;
if ((((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z)))) <= 8.52786738304643e+274)) {
VAR_1 = ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
} else {
VAR_1 = ((double) (x / ((double) (((double) (t - z)) / ((double) (y - z))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.7 |
|---|---|
| Target | 2.3 |
| Herbie | 1.1 |
if (/ (* x (- y z)) (- t z)) < -7.19729596071809293e303Initial program 63.3
Simplified0.2
if -7.19729596071809293e303 < (/ (* x (- y z)) (- t z)) < 8.5278673830464306e274Initial program 1.1
if 8.5278673830464306e274 < (/ (* x (- y z)) (- t z)) Initial program 58.9
Simplified1.1
rmApplied clear-num1.1
rmApplied un-div-inv1.0
Final simplification1.1
herbie shell --seed 2020191
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))