\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\begin{array}{l}
\mathbf{if}\;F \leq -2.5900579807970206 \cdot 10^{-184}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F} \cdot \frac{\tan \left(\sqrt{\pi} \cdot \left(\ell \cdot \sqrt{\pi}\right)\right)}{F}\\
\mathbf{elif}\;F \leq 2.3653030936545813 \cdot 10^{-148}:\\
\;\;\;\;\pi \cdot \ell - \frac{\sin \left(\pi \cdot \ell\right) \cdot \left(F \cdot F\right)}{\cos \left(\pi \cdot \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F} \cdot \frac{\tan \left(\pi \cdot \ell\right)}{F}\\
\end{array}(FPCore (F l) :precision binary64 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
:precision binary64
(if (<= F -2.5900579807970206e-184)
(- (* PI l) (* (/ 1.0 F) (/ (tan (* (sqrt PI) (* l (sqrt PI)))) F)))
(if (<= F 2.3653030936545813e-148)
(- (* PI l) (/ (* (sin (* PI l)) (* F F)) (cos (* PI l))))
(- (* PI l) (* (/ 1.0 F) (/ (tan (* PI l)) F))))))double code(double F, double l) {
return (((double) M_PI) * l) - ((1.0 / (F * F)) * tan(((double) M_PI) * l));
}
double code(double F, double l) {
double tmp;
if (F <= -2.5900579807970206e-184) {
tmp = (((double) M_PI) * l) - ((1.0 / F) * (tan(sqrt((double) M_PI) * (l * sqrt((double) M_PI))) / F));
} else if (F <= 2.3653030936545813e-148) {
tmp = (((double) M_PI) * l) - ((sin(((double) M_PI) * l) * (F * F)) / cos(((double) M_PI) * l));
} else {
tmp = (((double) M_PI) * l) - ((1.0 / F) * (tan(((double) M_PI) * l) / F));
}
return tmp;
}



Bits error versus F



Bits error versus l
Results
if F < -2.59005798079702062e-184Initial program 8.2
Simplified8.0
rmApplied *-un-lft-identity_binary648.0
Applied times-frac_binary646.7
rmApplied add-sqr-sqrt_binary646.8
Applied associate-*l*_binary646.8
Simplified6.8
if -2.59005798079702062e-184 < F < 2.3653030936545813e-148Initial program 62.8
Simplified62.1
Taylor expanded around inf 19.7
Simplified19.7
if 2.3653030936545813e-148 < F Initial program 4.8
Simplified4.8
rmApplied *-un-lft-identity_binary644.8
Applied times-frac_binary644.8
Final simplification8.3
herbie shell --seed 2020344
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))