x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;a \le -0.0012523075083707719:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;a \le 4.279694496723418 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / a))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((a <= -0.001252307508370772)) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / a))))));
} else {
double VAR_1;
if ((a <= 4.279694496723418e-88)) {
VAR_1 = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / a))));
} else {
VAR_1 = ((double) (x + ((double) (y / ((double) (a / ((double) (z - t))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 5.7 |
|---|---|
| Target | 0.8 |
| Herbie | 0.9 |
if a < -0.001252307508370772Initial program 9.0
rmApplied *-un-lft-identity9.0
Applied times-frac0.5
Simplified0.5
if -0.001252307508370772 < a < 4.279694496723418e-88Initial program 0.9
if 4.279694496723418e-88 < a Initial program 7.0
rmApplied associate-/l*1.3
Final simplification0.9
herbie shell --seed 2020120
(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)))