x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{z - a} \le -8.7537559398872107 \cdot 10^{-143} \lor \neg \left(\frac{y \cdot \left(z - t\right)}{z - a} \le 3.1147786030260667 \cdot 10^{225}\right):\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\
\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 (x + ((y * (z - t)) / (z - a)));
}
double code(double x, double y, double z, double t, double a) {
double temp;
if (((((y * (z - t)) / (z - a)) <= -8.75375593988721e-143) || !(((y * (z - t)) / (z - a)) <= 3.114778603026067e+225))) {
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 | 10.7 |
|---|---|
| Target | 1.4 |
| Herbie | 1.1 |
if (/ (* y (- z t)) (- z a)) < -8.75375593988721e-143 or 3.114778603026067e+225 < (/ (* y (- z t)) (- z a)) Initial program 23.6
rmApplied associate-/l*2.0
if -8.75375593988721e-143 < (/ (* y (- z t)) (- z a)) < 3.114778603026067e+225Initial program 0.3
Final simplification1.1
herbie shell --seed 2020057
(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))))