x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -1.74328329258889717 \cdot 10^{46} \lor \neg \left(y \le 1.81313242607608628 \cdot 10^{-24}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\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 <= -1.7432832925888972e+46) || !(y <= 1.8131324260760863e-24))) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / ((double) (a - t))))))));
} else {
VAR = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (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.7 |
|---|---|
| Target | 1.3 |
| Herbie | 0.5 |
if y < -1.74328329258889717e46 or 1.81313242607608628e-24 < y Initial program 23.9
Simplified0.5
if -1.74328329258889717e46 < y < 1.81313242607608628e-24Initial program 0.5
Final simplification0.5
herbie shell --seed 2020179
(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))))