\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.9372357391859827 \cdot 10^{+207}:\\
\;\;\;\;\pi \cdot \ell - \frac{\left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F}\right)\right)}{F}\\
\mathbf{elif}\;\pi \cdot \ell \le -1.2977109214087882 \cdot 10^{+23}:\\
\;\;\;\;\pi \cdot \ell - \left(\left(\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}\right)\right)\\
\mathbf{elif}\;\pi \cdot \ell \le 1.542584206713776 \cdot 10^{-34}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{1}{\frac{F}{\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 r395816 = atan2(1.0, 0.0);
double r395817 = l;
double r395818 = r395816 * r395817;
double r395819 = 1.0;
double r395820 = F;
double r395821 = r395820 * r395820;
double r395822 = r395819 / r395821;
double r395823 = tan(r395818);
double r395824 = r395822 * r395823;
double r395825 = r395818 - r395824;
return r395825;
}
double f(double F, double l) {
double r395826 = atan2(1.0, 0.0);
double r395827 = l;
double r395828 = r395826 * r395827;
double r395829 = -1.9372357391859827e+207;
bool r395830 = r395828 <= r395829;
double r395831 = tan(r395828);
double r395832 = F;
double r395833 = r395831 / r395832;
double r395834 = /* ERROR: no posit support in C */;
double r395835 = /* ERROR: no posit support in C */;
double r395836 = r395835 / r395832;
double r395837 = r395828 - r395836;
double r395838 = -1.2977109214087882e+23;
bool r395839 = r395828 <= r395838;
double r395840 = r395832 * r395832;
double r395841 = r395831 / r395840;
double r395842 = /* ERROR: no posit support in C */;
double r395843 = /* ERROR: no posit support in C */;
double r395844 = r395828 - r395843;
double r395845 = 1.542584206713776e-34;
bool r395846 = r395828 <= r395845;
double r395847 = 1.0;
double r395848 = r395832 / r395831;
double r395849 = r395847 / r395848;
double r395850 = r395849 / r395832;
double r395851 = r395828 - r395850;
double r395852 = r395846 ? r395851 : r395837;
double r395853 = r395839 ? r395844 : r395852;
double r395854 = r395830 ? r395837 : r395853;
return r395854;
}



Bits error versus F



Bits error versus l
if (* PI l) < -1.9372357391859827e+207 or 1.542584206713776e-34 < (* PI l) Initial program 21.0
Simplified21.0
rmApplied associate-/r*20.9
rmApplied insert-posit1614.6
if -1.9372357391859827e+207 < (* PI l) < -1.2977109214087882e+23Initial program 25.4
Simplified25.4
rmApplied insert-posit1614.5
if -1.2977109214087882e+23 < (* PI l) < 1.542584206713776e-34Initial program 9.4
Simplified8.8
rmApplied associate-/r*1.0
rmApplied clear-num1.0
Final simplification8.3
herbie shell --seed 2019153
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
(- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))