x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -4.16821903091809114 \cdot 10^{-47} \lor \neg \left(y \le 1.5894593416801174 \cdot 10^{-57}\right):\\
\;\;\;\;\frac{z - t}{a - t} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a - t} \cdot \left(\left(z - t\right) \cdot y\right) + x\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((y <= -4.168219030918091e-47) || !(y <= 1.5894593416801174e-57))) {
VAR = ((double) (((double) (((double) (((double) (z - t)) / ((double) (a - t)))) * y)) + x));
} else {
VAR = ((double) (((double) (((double) (1.0 / ((double) (a - t)))) * ((double) (((double) (z - t)) * y)))) + x));
}
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.5 |
|---|---|
| Target | 1.3 |
| Herbie | 0.5 |
if y < -4.168219030918091e-47 or 1.5894593416801174e-57 < y Initial program 18.9
Simplified2.6
rmApplied *-un-lft-identity2.6
Applied add-cube-cbrt3.3
Applied times-frac3.3
Simplified3.3
rmApplied fma-udef3.3
Simplified2.5
rmApplied associate-/r/0.6
if -4.168219030918091e-47 < y < 1.5894593416801174e-57Initial program 0.4
Simplified3.6
rmApplied *-un-lft-identity3.6
Applied add-cube-cbrt3.9
Applied times-frac3.9
Simplified3.9
rmApplied fma-udef3.9
Simplified4.0
rmApplied div-inv4.0
Applied *-un-lft-identity4.0
Applied times-frac0.4
Simplified0.4
Final simplification0.5
herbie shell --seed 2020120 +o rules:numerics
(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))))