x + \frac{\left(y - z\right) \cdot t}{a - z}\begin{array}{l}
\mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} = -\infty:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{elif}\;\frac{\left(y - z\right) \cdot t}{a - z} \le 6.3021334972798484 \cdot 10^{302}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + (((y - z) * t) / (a - z)));
}
double code(double x, double y, double z, double t, double a) {
double temp;
if (((((y - z) * t) / (a - z)) <= -inf.0)) {
temp = (x + ((y - z) / ((a - z) / t)));
} else {
double temp_1;
if (((((y - z) * t) / (a - z)) <= 6.3021334972798484e+302)) {
temp_1 = (x + (((y - z) * t) / (a - z)));
} else {
temp_1 = (x + ((y - z) * (t / (a - z))));
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.0 |
|---|---|
| Target | 0.6 |
| Herbie | 0.2 |
if (/ (* (- y z) t) (- a z)) < -inf.0Initial program 64.0
rmApplied associate-/l*0.2
if -inf.0 < (/ (* (- y z) t) (- a z)) < 6.3021334972798484e+302Initial program 0.2
if 6.3021334972798484e+302 < (/ (* (- y z) t) (- a z)) Initial program 63.2
rmApplied *-un-lft-identity63.2
Applied times-frac0.3
Simplified0.3
Final simplification0.2
herbie shell --seed 2020060
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))