x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;y \le -3.29812986849983016 \cdot 10^{79} \lor \neg \left(y \le 0.407937420282773189\right):\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(-\left(z - t\right)\right)}{-\left(z - a\right)}\\
\end{array}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 temp;
if (((y <= -3.29812986849983e+79) || !(y <= 0.4079374202827732))) {
temp = (x + (y / ((z - a) / (z - t))));
} else {
temp = (x + ((y * -(z - t)) / -(z - a)));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.5 |
|---|---|
| Target | 1.4 |
| Herbie | 1.0 |
if y < -3.29812986849983e+79 or 0.4079374202827732 < y Initial program 0.5
rmApplied clear-num0.7
Applied un-div-inv0.7
if -3.29812986849983e+79 < y < 0.4079374202827732Initial program 2.1
rmApplied frac-2neg2.1
Applied associate-*r/1.2
Final simplification1.0
herbie shell --seed 2020066 +o rules:numerics
(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)))))