x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;a \le -8.48286850515757369 \cdot 10^{-39}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;a \le 6.93794753001235819 \cdot 10^{90}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{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 <= -8.482868505157574e-39)) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) / a))))));
} else {
double VAR_1;
if ((a <= 6.937947530012358e+90)) {
VAR_1 = ((double) (x + ((double) (((double) (y * ((double) (z - t)))) * ((double) (1.0 / 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 | 6.2 |
|---|---|
| Target | 0.7 |
| Herbie | 0.9 |
if a < -8.48286850515757369e-39Initial program 8.9
rmApplied *-un-lft-identity8.9
Applied times-frac0.6
Simplified0.6
if -8.48286850515757369e-39 < a < 6.93794753001235819e90Initial program 1.3
rmApplied div-inv1.3
if 6.93794753001235819e90 < a Initial program 11.6
rmApplied associate-/l*0.7
Final simplification0.9
herbie shell --seed 2020177
(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.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))