\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 r386670 = atan2(1.0, 0.0);
double r386671 = l;
double r386672 = r386670 * r386671;
double r386673 = 1.0;
double r386674 = F;
double r386675 = r386674 * r386674;
double r386676 = r386673 / r386675;
double r386677 = tan(r386672);
double r386678 = r386676 * r386677;
double r386679 = r386672 - r386678;
return r386679;
}
double f(double F, double l) {
double r386680 = atan2(1.0, 0.0);
double r386681 = l;
double r386682 = r386680 * r386681;
double r386683 = -1.1470128979354866e+18;
bool r386684 = r386682 <= r386683;
double r386685 = tan(r386682);
double r386686 = F;
double r386687 = r386686 * r386686;
double r386688 = r386685 / r386687;
double r386689 = /* ERROR: no posit support in C */;
double r386690 = /* ERROR: no posit support in C */;
double r386691 = r386682 - r386690;
double r386692 = 6.176150626079544e-13;
bool r386693 = r386682 <= r386692;
double r386694 = 1.0;
double r386695 = r386694 / r386686;
double r386696 = r386685 / r386686;
double r386697 = r386695 * r386696;
double r386698 = r386682 - r386697;
double r386699 = /* ERROR: no posit support in C */;
double r386700 = /* ERROR: no posit support in C */;
double r386701 = r386700 / r386686;
double r386702 = r386682 - r386701;
double r386703 = r386693 ? r386698 : r386702;
double r386704 = r386684 ? r386691 : r386703;
return r386704;
}



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
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
(- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))