x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -1.10784404302477939 \cdot 10^{84} \lor \neg \left(y \le 5.5802422866714181 \cdot 10^{-161}\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 (x + ((y * (z - t)) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double temp;
if (((y <= -1.1078440430247794e+84) || !(y <= 5.580242286671418e-161))) {
temp = ((((z - t) / (a - t)) * y) + x);
} else {
temp = (((1.0 / (a - t)) * ((z - t) * y)) + x);
}
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.4 |
|---|---|
| Target | 1.3 |
| Herbie | 1.0 |
if y < -1.1078440430247794e+84 or 5.580242286671418e-161 < y Initial program 18.5
Simplified3.3
rmApplied clear-num3.6
rmApplied fma-udef3.6
Simplified3.2
rmApplied associate-/r/0.7
if -1.1078440430247794e+84 < y < 5.580242286671418e-161Initial program 1.4
Simplified3.1
rmApplied clear-num3.2
rmApplied fma-udef3.2
Simplified3.2
rmApplied div-inv3.2
Applied *-un-lft-identity3.2
Applied times-frac1.4
Simplified1.4
Final simplification1.0
herbie shell --seed 2020049 +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))))