x + \frac{y \cdot \left(z - t\right)}{z - a}\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z - t\right)}{z - a} \le -4.93401553254627053 \cdot 10^{126}:\\
\;\;\;\;x + \frac{y}{z - a} \cdot \left(z - t\right)\\
\mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{z - a} \le 1.5321512756361021 \cdot 10^{198}:\\
\;\;\;\;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 (x + ((y * (z - t)) / (z - a)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((((y * (z - t)) / (z - a)) <= -4.9340155325462705e+126)) {
VAR = (x + ((y / (z - a)) * (z - t)));
} else {
double VAR_1;
if ((((y * (z - t)) / (z - a)) <= 1.532151275636102e+198)) {
VAR_1 = (x + ((y * (z - t)) / (z - a)));
} else {
VAR_1 = (x + (y / ((z - a) / (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 | 11.0 |
|---|---|
| Target | 1.2 |
| Herbie | 1.1 |
if (/ (* y (- z t)) (- z a)) < -4.9340155325462705e+126Initial program 38.3
rmApplied associate-/l*2.4
rmApplied associate-/r/4.8
if -4.9340155325462705e+126 < (/ (* y (- z t)) (- z a)) < 1.532151275636102e+198Initial program 0.2
if 1.532151275636102e+198 < (/ (* y (- z t)) (- z a)) Initial program 46.9
rmApplied associate-/l*2.4
Final simplification1.1
herbie shell --seed 2020106
(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))))