x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{z - a} = -inf.0:\\
\;\;\;\;x + \frac{y}{z - a} \cdot \left(z - t\right)\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{z - a} \le 1.28025219849892211 \cdot 10^{265}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - 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) (z - a))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a)))) <= -inf.0)) {
VAR = ((double) (x + ((double) (((double) (y / ((double) (z - a)))) * ((double) (z - t))))));
} else {
double VAR_1;
if ((((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a)))) <= 1.2802521984989221e+265)) {
VAR_1 = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (z - a))))));
} else {
VAR_1 = ((double) (x + ((double) (y / ((double) (((double) (z - a)) / ((double) (z - t))))))));
}
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 | 10.9 |
|---|---|
| Target | 1.3 |
| Herbie | 0.2 |
if (/ (* y (- z t)) (- z a)) < -inf.0Initial program 64.0
rmApplied associate-/l*0.1
rmApplied associate-/r/0.1
if -inf.0 < (/ (* y (- z t)) (- z a)) < 1.28025219849892211e265Initial program 0.2
if 1.28025219849892211e265 < (/ (* y (- z t)) (- z a)) Initial program 57.6
rmApplied associate-/l*0.7
Final simplification0.2
herbie shell --seed 2020152
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))