double code(double x, double y, double z, double t) {
return ((double) (x + ((double) (((double) (y - x)) * ((double) (z / t))))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((t <= -1.195625778550661e+53)) {
VAR = ((double) (x + ((double) (((double) (y - x)) * ((double) (z / t))))));
} else {
double VAR_1;
if ((t <= 2.307642527604618e+118)) {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y - x)) * z)) / t))));
} else {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y - x)) / ((double) sqrt(t)))) * ((double) (z / ((double) sqrt(t))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.2 |
|---|---|
| Target | 2.4 |
| Herbie | 1.8 |
if t < -1.19562577855066093e53Initial program 1.2
if -1.19562577855066093e53 < t < 2.3076425276046182e118Initial program 2.9
rmApplied associate-*r/2.5
if 2.3076425276046182e118 < t Initial program 1.5
rmApplied add-sqr-sqrt1.6
Applied *-un-lft-identity1.6
Applied times-frac1.6
Applied associate-*r*0.9
Simplified0.9
Final simplification1.8
herbie shell --seed 2020191
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) -0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))