x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -171.38886454770591 \lor \neg \left(y \le 1.79450657829952375 \cdot 10^{-242}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + ((y * (z - t)) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((y <= -171.3888645477059) || !(y <= 1.7945065782995238e-242))) {
VAR = (x + (y / ((a - t) / (z - t))));
} else {
VAR = (x + ((y * (z - t)) * (1.0 / (a - t))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.4 |
|---|---|
| Target | 1.3 |
| Herbie | 0.7 |
if y < -171.3888645477059 or 1.7945065782995238e-242 < y Initial program 15.2
rmApplied associate-/l*0.9
if -171.3888645477059 < y < 1.7945065782995238e-242Initial program 0.3
rmApplied div-inv0.3
Final simplification0.7
herbie shell --seed 2020092
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))