x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -497430927919.509705 \lor \neg \left(y \le 8.1996893154064253 \cdot 10^{-107}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((y <= -497430927919.5097) || !(y <= 8.199689315406425e-107))) {
VAR = ((double) (x + ((double) (y / ((double) (((double) (a - t)) / ((double) (z - t))))))));
} else {
VAR = ((double) (x + ((double) (1.0 / ((double) (((double) (a - t)) / ((double) (y * ((double) (z - 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.7 |
|---|---|
| Target | 1.2 |
| Herbie | 0.6 |
if y < -497430927919.5097 or 8.199689315406425e-107 < y Initial program 19.2
rmApplied associate-/l*0.6
if -497430927919.5097 < y < 8.199689315406425e-107Initial program 0.4
rmApplied clear-num0.5
Final simplification0.6
herbie shell --seed 2020140
(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))))