x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;y \leq -745928871119.6415 \lor \neg \left(y \leq 9.244173049080096 \cdot 10^{-179}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
(FPCore (x y z t a) :precision binary64 (if (or (<= y -745928871119.6415) (not (<= y 9.244173049080096e-179))) (+ x (* y (/ (- z t) (- z a)))) (+ x (/ (* y (- z t)) (- z a)))))
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 (((y <= -745928871119.6415) || !(y <= 9.244173049080096e-179))) {
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 | 1.3 |
|---|---|
| Target | 1.2 |
| Herbie | 0.6 |
if y < -745928871119.641479 or 9.24417304908009578e-179 < y Initial program 0.7
if -745928871119.641479 < y < 9.24417304908009578e-179Initial program 2.1
rmApplied associate-*r/0.4
Final simplification0.6
herbie shell --seed 2020198
(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)))))