x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;y \leq -7556432.438506252 \lor \neg \left(y \leq -9.698192082570641 \cdot 10^{-239}\right):\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{z - a}{y \cdot \left(z - t\right)}}\\
\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 -7556432.438506252) (not (<= y -9.698192082570641e-239))) (+ x (/ y (/ (- z a) (- z t)))) (+ x (/ 1.0 (/ (- z a) (* y (- z t)))))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7556432.438506252) || !(y <= -9.698192082570641e-239)) {
tmp = x + (y / ((z - a) / (z - t)));
} else {
tmp = x + (1.0 / ((z - a) / (y * (z - t))));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.9 |
|---|---|
| Target | 1.2 |
| Herbie | 0.9 |
if y < -7556432.43850625213 or -9.698192082570641e-239 < y Initial program 13.8
rmApplied associate-/l*_binary64_153681.1
if -7556432.43850625213 < y < -9.698192082570641e-239Initial program 0.2
rmApplied clear-num_binary64_154220.2
Final simplification0.9
herbie shell --seed 2020342
(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))))