x - \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;y \cdot \left(z - t\right) \le -5.275596583469645 \cdot 10^{271}:\\
\;\;\;\;x - \frac{1}{\frac{\frac{a}{y}}{z - t}}\\
\mathbf{elif}\;y \cdot \left(z - t\right) \le 1.72919691515906818 \cdot 10^{262}:\\
\;\;\;\;x - \frac{1}{a \cdot \frac{1}{y \cdot \left(z - t\right)}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\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 temp;
if (((y * (z - t)) <= -5.275596583469645e+271)) {
temp = (x - (1.0 / ((a / y) / (z - t))));
} else {
double temp_1;
if (((y * (z - t)) <= 1.7291969151590682e+262)) {
temp_1 = (x - (1.0 / (a * (1.0 / (y * (z - t))))));
} else {
temp_1 = (x - (y / (a / (z - 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 | 6.4 |
|---|---|
| Target | 0.7 |
| Herbie | 0.5 |
if (* y (- z t)) < -5.275596583469645e+271Initial program 49.3
rmApplied clear-num49.3
rmApplied associate-/r*0.3
if -5.275596583469645e+271 < (* y (- z t)) < 1.7291969151590682e+262Initial program 0.4
rmApplied clear-num0.5
rmApplied div-inv0.5
if 1.7291969151590682e+262 < (* y (- z t)) Initial program 44.4
rmApplied associate-/l*0.2
Final simplification0.5
herbie shell --seed 2020060
(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)))