\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \le -2.0471110225000456 \cdot 10^{+18}:\\
\;\;\;\;\pi \cdot \ell - \frac{\left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F}\right)\right)}{F}\\
\mathbf{elif}\;\pi \cdot \ell \le 2.2961577739006424 \cdot 10^{-14}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{1}{F} \cdot \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 r560352 = atan2(1.0, 0.0);
double r560353 = l;
double r560354 = r560352 * r560353;
double r560355 = 1.0;
double r560356 = F;
double r560357 = r560356 * r560356;
double r560358 = r560355 / r560357;
double r560359 = tan(r560354);
double r560360 = r560358 * r560359;
double r560361 = r560354 - r560360;
return r560361;
}
double f(double F, double l) {
double r560362 = atan2(1.0, 0.0);
double r560363 = l;
double r560364 = r560362 * r560363;
double r560365 = -2.0471110225000456e+18;
bool r560366 = r560364 <= r560365;
double r560367 = tan(r560364);
double r560368 = F;
double r560369 = r560367 / r560368;
double r560370 = /* ERROR: no posit support in C */;
double r560371 = /* ERROR: no posit support in C */;
double r560372 = r560371 / r560368;
double r560373 = r560364 - r560372;
double r560374 = 2.2961577739006424e-14;
bool r560375 = r560364 <= r560374;
double r560376 = 1.0;
double r560377 = r560376 / r560368;
double r560378 = r560377 * r560367;
double r560379 = r560378 / r560368;
double r560380 = r560364 - r560379;
double r560381 = r560375 ? r560380 : r560373;
double r560382 = r560366 ? r560373 : r560381;
return r560382;
}



Bits error versus F



Bits error versus l
if (* PI l) < -2.0471110225000456e+18 or 2.2961577739006424e-14 < (* PI l) Initial program 22.7
Simplified22.7
rmApplied insert-posit1616.0
if -2.0471110225000456e+18 < (* PI l) < 2.2961577739006424e-14Initial program 8.6
Simplified0.6
rmApplied div-inv0.7
Final simplification8.7
herbie shell --seed 2019144
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
(- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))