\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 r985243 = atan2(1.0, 0.0);
double r985244 = l;
double r985245 = r985243 * r985244;
double r985246 = 1.0;
double r985247 = F;
double r985248 = r985247 * r985247;
double r985249 = r985246 / r985248;
double r985250 = tan(r985245);
double r985251 = r985249 * r985250;
double r985252 = r985245 - r985251;
return r985252;
}
double f(double F, double l) {
double r985253 = atan2(1.0, 0.0);
double r985254 = l;
double r985255 = r985253 * r985254;
double r985256 = -169813308136631.62;
bool r985257 = r985255 <= r985256;
double r985258 = tan(r985255);
double r985259 = F;
double r985260 = r985258 / r985259;
double r985261 = /* ERROR: no posit support in C */;
double r985262 = /* ERROR: no posit support in C */;
double r985263 = 1.0;
double r985264 = r985263 / r985259;
double r985265 = r985262 * r985264;
double r985266 = r985255 - r985265;
double r985267 = 3.493536384384748e+16;
bool r985268 = r985255 <= r985267;
double r985269 = log1p(r985255);
double r985270 = expm1(r985269);
double r985271 = tan(r985270);
double r985272 = r985271 / r985259;
double r985273 = r985272 * r985264;
double r985274 = r985255 - r985273;
double r985275 = 2.4253442475351736e+118;
bool r985276 = r985255 <= r985275;
double r985277 = r985259 * r985259;
double r985278 = r985258 / r985277;
double r985279 = /* ERROR: no posit support in C */;
double r985280 = /* ERROR: no posit support in C */;
double r985281 = r985255 - r985280;
double r985282 = r985276 ? r985281 : r985266;
double r985283 = r985268 ? r985274 : r985282;
double r985284 = r985257 ? r985266 : r985283;
return r985284;
}



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)))))