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 <= -205141.79145231508) || !(t <= 1.9185651848884492e+65))) {
VAR = ((double) (x + ((double) (((double) (y - x)) * ((double) (z / t))))));
} else {
VAR = ((double) (x + ((double) (((double) (((double) (y - x)) * z)) / t))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.3 |
| Herbie | 1.5 |
if t < -205141.791452315083 or 1.91856518488844918e65 < t Initial program 1.3
if -205141.791452315083 < t < 1.91856518488844918e65Initial program 3.2
rmApplied associate-*r/1.8
Final simplification1.5
herbie shell --seed 2020192
(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))))