double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) <= -inf.0) || !(((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) <= 1.695021952440814e+246))) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (a - t))))))));
} else {
VAR = ((double) (((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t)))) + x));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.5 |
|---|---|
| Target | 1.3 |
| Herbie | 0.4 |
if (/ (* y (- z t)) (- a t)) < -inf.0 or 1.695021952440814e246 < (/ (* y (- z t)) (- a t)) Initial program 59.4
Simplified0.9
if -inf.0 < (/ (* y (- z t)) (- a t)) < 1.695021952440814e246Initial program 0.2
Final simplification0.4
herbie shell --seed 2020190
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))