x + \frac{\left(y - z\right) \cdot t}{a - z}\begin{array}{l}
\mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \le -1.5843270719797513 \cdot 10^{218}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{elif}\;\frac{\left(y - z\right) \cdot t}{a - z} \le 8.180145338784843 \cdot 10^{289}:\\
\;\;\;\;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 VAR;
if (((((y - z) * t) / (a - z)) <= -1.5843270719797513e+218)) {
VAR = (x + ((y - z) / ((a - z) / t)));
} else {
double VAR_1;
if (((((y - z) * t) / (a - z)) <= 8.180145338784843e+289)) {
VAR_1 = (x + (((y - z) * t) / (a - z)));
} else {
VAR_1 = (x + ((y - z) * (t / (a - z))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.3 |
|---|---|
| Target | 0.6 |
| Herbie | 0.7 |
if (/ (* (- y z) t) (- a z)) < -1.5843270719797513e+218Initial program 51.2
rmApplied associate-/l*2.9
if -1.5843270719797513e+218 < (/ (* (- y z) t) (- a z)) < 8.180145338784843e+289Initial program 0.2
if 8.180145338784843e+289 < (/ (* (- y z) t) (- a z)) Initial program 60.6
rmApplied *-un-lft-identity60.6
Applied times-frac1.4
Simplified1.4
Final simplification0.7
herbie shell --seed 2020102
(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))))