x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;a \le -3.645255194916715937641968772702949461824 \cdot 10^{-56}:\\
\;\;\;\;x - y \cdot \left(\frac{t}{a} - \frac{z}{a}\right)\\
\mathbf{elif}\;a \le 11441004867780468335951397958707827651380000:\\
\;\;\;\;x - \frac{\left(t - z\right) \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \left(t \cdot \frac{1}{\frac{a}{y}} - \frac{z}{\frac{a}{y}}\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r321320 = x;
double r321321 = y;
double r321322 = z;
double r321323 = t;
double r321324 = r321322 - r321323;
double r321325 = r321321 * r321324;
double r321326 = a;
double r321327 = r321325 / r321326;
double r321328 = r321320 + r321327;
return r321328;
}
double f(double x, double y, double z, double t, double a) {
double r321329 = a;
double r321330 = -3.645255194916716e-56;
bool r321331 = r321329 <= r321330;
double r321332 = x;
double r321333 = y;
double r321334 = t;
double r321335 = r321334 / r321329;
double r321336 = z;
double r321337 = r321336 / r321329;
double r321338 = r321335 - r321337;
double r321339 = r321333 * r321338;
double r321340 = r321332 - r321339;
double r321341 = 1.1441004867780468e+43;
bool r321342 = r321329 <= r321341;
double r321343 = r321334 - r321336;
double r321344 = r321343 * r321333;
double r321345 = r321344 / r321329;
double r321346 = r321332 - r321345;
double r321347 = 1.0;
double r321348 = r321329 / r321333;
double r321349 = r321347 / r321348;
double r321350 = r321334 * r321349;
double r321351 = r321336 / r321348;
double r321352 = r321350 - r321351;
double r321353 = r321332 - r321352;
double r321354 = r321342 ? r321346 : r321353;
double r321355 = r321331 ? r321340 : r321354;
return r321355;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 5.9 |
|---|---|
| Target | 0.7 |
| Herbie | 1.3 |
if a < -3.645255194916716e-56Initial program 8.3
Simplified1.5
rmApplied add-cube-cbrt1.9
Applied associate-*r*1.9
Simplified1.9
rmApplied add-cube-cbrt1.9
Applied cbrt-prod1.9
Taylor expanded around 0 8.3
Simplified1.6
rmApplied *-un-lft-identity1.6
Applied *-un-lft-identity1.6
Applied distribute-lft-out--1.6
Simplified0.8
if -3.645255194916716e-56 < a < 1.1441004867780468e+43Initial program 1.2
Simplified4.1
rmApplied associate-*l/1.2
if 1.1441004867780468e+43 < a Initial program 9.6
Simplified2.1
rmApplied add-cube-cbrt2.4
Applied associate-*r*2.4
Simplified2.4
rmApplied add-cube-cbrt2.4
Applied cbrt-prod2.5
Taylor expanded around 0 9.6
Simplified2.2
rmApplied div-inv2.3
Final simplification1.3
herbie shell --seed 2019194
(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)))