\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \le -1.1470128979354866 \cdot 10^{+18}:\\
\;\;\;\;\pi \cdot \ell - \left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}\right)\right)\\
\mathbf{elif}\;\pi \cdot \ell \le 6.176150626079544 \cdot 10^{-13}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F} \cdot \frac{\tan \left(\pi \cdot \ell\right)}{F}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F}\right)\right)}{F}\\
\end{array}double f(double F, double l) {
double r357443 = atan2(1.0, 0.0);
double r357444 = l;
double r357445 = r357443 * r357444;
double r357446 = 1.0;
double r357447 = F;
double r357448 = r357447 * r357447;
double r357449 = r357446 / r357448;
double r357450 = tan(r357445);
double r357451 = r357449 * r357450;
double r357452 = r357445 - r357451;
return r357452;
}
double f(double F, double l) {
double r357453 = atan2(1.0, 0.0);
double r357454 = l;
double r357455 = r357453 * r357454;
double r357456 = -1.1470128979354866e+18;
bool r357457 = r357455 <= r357456;
double r357458 = tan(r357455);
double r357459 = F;
double r357460 = r357459 * r357459;
double r357461 = r357458 / r357460;
double r357462 = /* ERROR: no posit support in C */;
double r357463 = /* ERROR: no posit support in C */;
double r357464 = r357455 - r357463;
double r357465 = 6.176150626079544e-13;
bool r357466 = r357455 <= r357465;
double r357467 = 1.0;
double r357468 = r357467 / r357459;
double r357469 = r357458 / r357459;
double r357470 = r357468 * r357469;
double r357471 = r357455 - r357470;
double r357472 = /* ERROR: no posit support in C */;
double r357473 = /* ERROR: no posit support in C */;
double r357474 = r357473 / r357459;
double r357475 = r357455 - r357474;
double r357476 = r357466 ? r357471 : r357475;
double r357477 = r357457 ? r357464 : r357476;
return r357477;
}



Bits error versus F



Bits error versus l
if (* PI l) < -1.1470128979354866e+18Initial program 23.3
Simplified23.3
rmApplied insert-posit1615.5
if -1.1470128979354866e+18 < (* PI l) < 6.176150626079544e-13Initial program 9.1
Simplified8.6
rmApplied *-un-lft-identity8.6
Applied times-frac0.8
if 6.176150626079544e-13 < (* PI l) Initial program 22.0
Simplified22.0
rmApplied associate-/r*22.0
rmApplied insert-posit1617.2
Final simplification9.1
herbie shell --seed 2019155 +o rules:numerics
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
(- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))