\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \le -169813308136631.62:\\
\;\;\;\;\pi \cdot \ell - \left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F}\right)\right) \cdot \frac{1}{F}\\
\mathbf{elif}\;\pi \cdot \ell \le 3.493536384384748 \cdot 10^{+16}:\\
\;\;\;\;\pi \cdot \ell - \frac{\tan \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \ell\right)\right)\right)}{F} \cdot \frac{1}{F}\\
\mathbf{elif}\;\pi \cdot \ell \le 2.4253442475351736 \cdot 10^{+118}:\\
\;\;\;\;\pi \cdot \ell - \left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F}\right)\right) \cdot \frac{1}{F}\\
\end{array}double f(double F, double l) {
double r1002653 = atan2(1.0, 0.0);
double r1002654 = l;
double r1002655 = r1002653 * r1002654;
double r1002656 = 1.0;
double r1002657 = F;
double r1002658 = r1002657 * r1002657;
double r1002659 = r1002656 / r1002658;
double r1002660 = tan(r1002655);
double r1002661 = r1002659 * r1002660;
double r1002662 = r1002655 - r1002661;
return r1002662;
}
double f(double F, double l) {
double r1002663 = atan2(1.0, 0.0);
double r1002664 = l;
double r1002665 = r1002663 * r1002664;
double r1002666 = -169813308136631.62;
bool r1002667 = r1002665 <= r1002666;
double r1002668 = tan(r1002665);
double r1002669 = F;
double r1002670 = r1002668 / r1002669;
double r1002671 = /* ERROR: no posit support in C */;
double r1002672 = /* ERROR: no posit support in C */;
double r1002673 = 1.0;
double r1002674 = r1002673 / r1002669;
double r1002675 = r1002672 * r1002674;
double r1002676 = r1002665 - r1002675;
double r1002677 = 3.493536384384748e+16;
bool r1002678 = r1002665 <= r1002677;
double r1002679 = log1p(r1002665);
double r1002680 = expm1(r1002679);
double r1002681 = tan(r1002680);
double r1002682 = r1002681 / r1002669;
double r1002683 = r1002682 * r1002674;
double r1002684 = r1002665 - r1002683;
double r1002685 = 2.4253442475351736e+118;
bool r1002686 = r1002665 <= r1002685;
double r1002687 = r1002669 * r1002669;
double r1002688 = r1002668 / r1002687;
double r1002689 = /* ERROR: no posit support in C */;
double r1002690 = /* ERROR: no posit support in C */;
double r1002691 = r1002665 - r1002690;
double r1002692 = r1002686 ? r1002691 : r1002676;
double r1002693 = r1002678 ? r1002684 : r1002692;
double r1002694 = r1002667 ? r1002676 : r1002693;
return r1002694;
}



Bits error versus F



Bits error versus l
if (* PI l) < -169813308136631.62 or 2.4253442475351736e+118 < (* PI l) Initial program 21.2
Simplified21.2
rmApplied *-un-lft-identity21.2
Applied times-frac21.2
rmApplied insert-posit1613.9
if -169813308136631.62 < (* PI l) < 3.493536384384748e+16Initial program 9.1
Simplified8.7
rmApplied *-un-lft-identity8.7
Applied times-frac0.7
rmApplied expm1-log1p-u1.8
if 3.493536384384748e+16 < (* PI l) < 2.4253442475351736e+118Initial program 28.4
Simplified28.4
rmApplied insert-posit1616.3
Final simplification8.1
herbie shell --seed 2019162 +o rules:numerics
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
(- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))