x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;\frac{z - t}{z - a} \le -2.1155362594979767 \cdot 10^{165}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{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 ((((z - t) / (z - a)) <= -2.1155362594979767e+165)) {
temp = (x + ((y * (z - t)) * (1.0 / (z - a))));
} 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.3 |
| Herbie | 0.9 |
if (/ (- z t) (- z a)) < -2.1155362594979767e+165Initial program 15.9
rmApplied div-inv15.9
Applied associate-*r*1.5
if -2.1155362594979767e+165 < (/ (- z t) (- z a)) Initial program 0.8
Final simplification0.9
herbie shell --seed 2020053
(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)))))