x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;z \leq -3.5486213838242893 \cdot 10^{-100} \lor \neg \left(z \leq 4.314373561989049 \cdot 10^{-114}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + (((double) (y * ((double) (z - t)))) / ((double) (z - a)))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((z <= -3.5486213838242893e-100) || !(z <= 4.314373561989049e-114))) {
VAR = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (z - a)))))));
} else {
VAR = ((double) (x + (((double) (y * ((double) (z - t)))) / ((double) (z - a)))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.2 |
|---|---|
| Target | 1.3 |
| Herbie | 1.4 |
if z < -3.5486213838242893e-100 or 4.31437356198904865e-114 < z Initial program 14.5
Simplified0.5
if -3.5486213838242893e-100 < z < 4.31437356198904865e-114Initial program 3.6
Final simplification1.4
herbie shell --seed 2020196
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))