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 (((z <= -9.586446773513064e-40) || !(z <= 1.5088456049136073e-288))) {
VAR = ((double) (x * ((double) (1.0 / ((double) (((double) (t - z)) / ((double) (y - z))))))));
} else {
VAR = ((double) (((double) (x / ((double) (t - z)))) * ((double) (1.0 / ((double) (1.0 / ((double) (y - z))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.6 |
|---|---|
| Target | 2.2 |
| Herbie | 2.4 |
if z < -9.58644677351306357e-40 or 1.5088456049136073e-288 < z Initial program 13.3
Simplified1.5
rmApplied clear-num1.6
if -9.58644677351306357e-40 < z < 1.5088456049136073e-288Initial program 5.8
Simplified4.8
rmApplied clear-num5.1
rmApplied div-inv5.2
Applied *-un-lft-identity5.2
Applied times-frac4.9
Applied associate-*r*5.3
Simplified5.2
Final simplification2.4
herbie shell --seed 2020190
(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)))