x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;y \le -4.156241843490642492342216522498114807292 \cdot 10^{-54}:\\
\;\;\;\;x - \left(y \cdot \frac{t}{a} - \frac{z}{a} \cdot y\right)\\
\mathbf{elif}\;y \le 7.465710341714553384297243632530613668098 \cdot 10^{-77}:\\
\;\;\;\;x - \frac{1}{a} \cdot \left(y \cdot \left(t - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{1}{\frac{a}{y}} \cdot \left(t - z\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r277130 = x;
double r277131 = y;
double r277132 = z;
double r277133 = t;
double r277134 = r277132 - r277133;
double r277135 = r277131 * r277134;
double r277136 = a;
double r277137 = r277135 / r277136;
double r277138 = r277130 + r277137;
return r277138;
}
double f(double x, double y, double z, double t, double a) {
double r277139 = y;
double r277140 = -4.1562418434906425e-54;
bool r277141 = r277139 <= r277140;
double r277142 = x;
double r277143 = t;
double r277144 = a;
double r277145 = r277143 / r277144;
double r277146 = r277139 * r277145;
double r277147 = z;
double r277148 = r277147 / r277144;
double r277149 = r277148 * r277139;
double r277150 = r277146 - r277149;
double r277151 = r277142 - r277150;
double r277152 = 7.465710341714553e-77;
bool r277153 = r277139 <= r277152;
double r277154 = 1.0;
double r277155 = r277154 / r277144;
double r277156 = r277143 - r277147;
double r277157 = r277139 * r277156;
double r277158 = r277155 * r277157;
double r277159 = r277142 - r277158;
double r277160 = r277144 / r277139;
double r277161 = r277154 / r277160;
double r277162 = r277161 * r277156;
double r277163 = r277142 - r277162;
double r277164 = r277153 ? r277159 : r277163;
double r277165 = r277141 ? r277151 : r277164;
return r277165;
}




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.8 |
| Herbie | 1.3 |
if y < -4.1562418434906425e-54Initial program 12.7
Simplified3.0
rmApplied sub-neg3.0
Applied distribute-lft-in3.0
Simplified3.7
Taylor expanded around 0 12.7
Simplified2.8
rmApplied div-inv3.2
Applied div-inv3.2
Applied distribute-rgt-out--3.2
Taylor expanded around 0 12.7
Simplified1.3
if -4.1562418434906425e-54 < y < 7.465710341714553e-77Initial program 0.5
Simplified2.1
rmApplied sub-neg2.1
Applied distribute-lft-in2.1
Simplified7.0
Taylor expanded around 0 0.5
Simplified2.3
rmApplied div-inv2.3
Applied div-inv2.3
Applied distribute-rgt-out--2.3
rmApplied div-inv2.4
Applied add-sqr-sqrt2.4
Applied times-frac2.2
Applied associate-*l*0.6
Simplified0.6
if 7.465710341714553e-77 < y Initial program 11.6
Simplified2.7
rmApplied sub-neg2.7
Applied distribute-lft-in2.7
Simplified3.6
Taylor expanded around 0 11.6
Simplified2.4
rmApplied div-inv2.8
Applied div-inv2.8
Applied distribute-rgt-out--2.8
Final simplification1.3
herbie shell --seed 2019195
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
: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)))