x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;a \le -32476558814886848 \lor \neg \left(a \le 3.28528990138168409 \cdot 10^{-63}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{a}{y \cdot \left(z - t\right)}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + ((y * (z - t)) / a));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((a <= -3.247655881488685e+16) || !(a <= 3.285289901381684e-63))) {
VAR = (x + (y * ((z - t) / a)));
} else {
VAR = (x + (1.0 / (a / (y * (z - t)))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 6.0 |
|---|---|
| Target | 0.6 |
| Herbie | 0.8 |
if a < -3.247655881488685e+16 or 3.285289901381684e-63 < a Initial program 8.9
rmApplied *-un-lft-identity8.9
Applied times-frac0.8
Simplified0.8
if -3.247655881488685e+16 < a < 3.285289901381684e-63Initial program 0.8
rmApplied clear-num0.9
Final simplification0.8
herbie shell --seed 2020091
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (+ x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))