x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -1.4081501029100684 \cdot 10^{41}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;y \le 2.04242265464599254 \cdot 10^{-242}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{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 temp;
if ((y <= -1.4081501029100684e+41)) {
temp = (x + (y / ((a - t) / (z - t))));
} else {
double temp_1;
if ((y <= 2.0424226546459925e-242)) {
temp_1 = (x + ((y * (z - t)) / (a - t)));
} else {
temp_1 = (x + (y * ((z - t) / (a - t))));
}
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 | 10.9 |
|---|---|
| Target | 1.4 |
| Herbie | 1.0 |
if y < -1.4081501029100684e+41Initial program 27.8
rmApplied associate-/l*0.5
if -1.4081501029100684e+41 < y < 2.0424226546459925e-242Initial program 0.9
if 2.0424226546459925e-242 < y Initial program 11.7
rmApplied *-un-lft-identity11.7
Applied times-frac1.3
Simplified1.3
Final simplification1.0
herbie shell --seed 2020058
(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))))