x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;y \le -7.64461802614552853 \cdot 10^{-90} \lor \neg \left(y \le 7.86406132751483135 \cdot 10^{-32}\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) (((double) (z - t)) / ((double) (z - a))))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((y <= -7.6446180261455285e-90) || !(y <= 7.864061327514831e-32))) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (z - a))))))));
} else {
VAR = ((double) (x + ((double) (((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 | 1.3 |
|---|---|
| Target | 1.2 |
| Herbie | 0.4 |
if y < -7.6446180261455285e-90 or 7.864061327514831e-32 < y Initial program 0.4
if -7.6446180261455285e-90 < y < 7.864061327514831e-32Initial program 2.5
rmApplied associate-*r/0.4
Final simplification0.4
herbie shell --seed 2020123
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))