x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a - t} = -\infty \lor \neg \left(\frac{y \cdot \left(z - t\right)}{a - t} \le 5.090381290829383 \cdot 10^{243}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - 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 (x + ((y * (z - t)) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((((y * (z - t)) / (a - t)) <= -inf.0) || !(((y * (z - t)) / (a - t)) <= 5.090381290829383e+243))) {
VAR = (x + (y / ((a - t) / (z - t))));
} else {
VAR = (x + ((y * (z - t)) / (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.6 |
|---|---|
| Target | 1.3 |
| Herbie | 0.4 |
if (/ (* y (- z t)) (- a t)) < -inf.0 or 5.090381290829383e+243 < (/ (* y (- z t)) (- a t)) Initial program 58.7
rmApplied associate-/l*1.0
if -inf.0 < (/ (* y (- z t)) (- a t)) < 5.090381290829383e+243Initial program 0.3
Final simplification0.4
herbie shell --seed 2020100
(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))))