x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;a \le -7.263328688146093211874950167035565067353 \cdot 10^{44}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{a} - \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \le 7.661482294517787913285118129263252490351 \cdot 10^{-69}:\\
\;\;\;\;\left(\frac{z \cdot y}{a} - \frac{t \cdot y}{a}\right) + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z - t, x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r290352 = x;
double r290353 = y;
double r290354 = z;
double r290355 = t;
double r290356 = r290354 - r290355;
double r290357 = r290353 * r290356;
double r290358 = a;
double r290359 = r290357 / r290358;
double r290360 = r290352 + r290359;
return r290360;
}
double f(double x, double y, double z, double t, double a) {
double r290361 = a;
double r290362 = -7.263328688146093e+44;
bool r290363 = r290361 <= r290362;
double r290364 = y;
double r290365 = z;
double r290366 = r290365 / r290361;
double r290367 = t;
double r290368 = r290367 / r290361;
double r290369 = r290366 - r290368;
double r290370 = x;
double r290371 = fma(r290364, r290369, r290370);
double r290372 = 7.661482294517788e-69;
bool r290373 = r290361 <= r290372;
double r290374 = r290365 * r290364;
double r290375 = r290374 / r290361;
double r290376 = r290367 * r290364;
double r290377 = r290376 / r290361;
double r290378 = r290375 - r290377;
double r290379 = r290378 + r290370;
double r290380 = r290364 / r290361;
double r290381 = r290365 - r290367;
double r290382 = fma(r290380, r290381, r290370);
double r290383 = r290373 ? r290379 : r290382;
double r290384 = r290363 ? r290371 : r290383;
return r290384;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 6.0 |
|---|---|
| Target | 0.7 |
| Herbie | 1.1 |
if a < -7.263328688146093e+44Initial program 10.6
Simplified1.9
rmApplied fma-udef1.9
Simplified2.1
rmApplied div-sub2.1
rmApplied associate-/r/1.4
Applied associate-/r/0.6
Applied distribute-rgt-out--0.6
Applied fma-def0.6
if -7.263328688146093e+44 < a < 7.661482294517788e-69Initial program 1.0
Simplified4.1
rmApplied fma-udef4.1
Simplified3.5
rmApplied div-sub3.5
Taylor expanded around 0 1.0
if 7.661482294517788e-69 < a Initial program 7.7
Simplified1.6
Final simplification1.1
herbie shell --seed 2019325 +o rules:numerics
(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)))