x - \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;a \le -9.4090889659619997 \cdot 10^{-61} \lor \neg \left(a \le 1.59545685849080731 \cdot 10^{-24}\right):\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\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 <= -9.409088965962e-61) || !(a <= 1.5954568584908073e-24))) {
VAR = (x - (y / (a / (z - t))));
} 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.7 |
| Herbie | 0.8 |
if a < -9.409088965962e-61 or 1.5954568584908073e-24 < a Initial program 8.3
rmApplied associate-/l*0.7
if -9.409088965962e-61 < a < 1.5954568584908073e-24Initial program 1.0
rmApplied clear-num1.0
Final simplification0.8
herbie shell --seed 2020092
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
: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)))