\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -1.328787927371943 \cdot 10^{+155}:\\
\;\;\;\;\pi \cdot \ell - \frac{\tan \left(\sqrt{\pi} \cdot \left(\ell \cdot \sqrt{\pi}\right)\right)}{F \cdot F}\\
\mathbf{elif}\;\pi \cdot \ell \leq 2.504716734864637 \cdot 10^{+128}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F} \cdot \frac{\sin \left(\pi \cdot \ell\right)}{F \cdot \left(\left(1 + 0.041666666666666664 \cdot {\left(\pi \cdot \ell\right)}^{4}\right) - \left(\left(\pi \cdot \ell\right) \cdot \left(\pi \cdot \ell\right)\right) \cdot 0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F} \cdot \frac{\tan \left(\left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right) \cdot \left(\ell \cdot \sqrt[3]{\pi}\right)\right)}{F}\\
\end{array}(FPCore (F l) :precision binary64 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
:precision binary64
(if (<= (* PI l) -1.328787927371943e+155)
(- (* PI l) (/ (tan (* (sqrt PI) (* l (sqrt PI)))) (* F F)))
(if (<= (* PI l) 2.504716734864637e+128)
(-
(* PI l)
(*
(/ 1.0 F)
(/
(sin (* PI l))
(*
F
(-
(+ 1.0 (* 0.041666666666666664 (pow (* PI l) 4.0)))
(* (* (* PI l) (* PI l)) 0.5))))))
(-
(* PI l)
(* (/ 1.0 F) (/ (tan (* (* (cbrt PI) (cbrt PI)) (* l (cbrt PI)))) F))))))double code(double F, double l) {
return ((double) (((double) (((double) M_PI) * l)) - ((double) ((1.0 / ((double) (F * F))) * ((double) tan(((double) (((double) M_PI) * l))))))));
}
double code(double F, double l) {
double tmp;
if ((((double) (((double) M_PI) * l)) <= -1.328787927371943e+155)) {
tmp = ((double) (((double) (((double) M_PI) * l)) - (((double) tan(((double) (((double) sqrt(((double) M_PI))) * ((double) (l * ((double) sqrt(((double) M_PI))))))))) / ((double) (F * F)))));
} else {
double tmp_1;
if ((((double) (((double) M_PI) * l)) <= 2.504716734864637e+128)) {
tmp_1 = ((double) (((double) (((double) M_PI) * l)) - ((double) ((1.0 / F) * (((double) sin(((double) (((double) M_PI) * l)))) / ((double) (F * ((double) (((double) (1.0 + ((double) (0.041666666666666664 * ((double) pow(((double) (((double) M_PI) * l)), 4.0)))))) - ((double) (((double) (((double) (((double) M_PI) * l)) * ((double) (((double) M_PI) * l)))) * 0.5)))))))))));
} else {
tmp_1 = ((double) (((double) (((double) M_PI) * l)) - ((double) ((1.0 / F) * (((double) tan(((double) (((double) (((double) cbrt(((double) M_PI))) * ((double) cbrt(((double) M_PI))))) * ((double) (l * ((double) cbrt(((double) M_PI))))))))) / F)))));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus F



Bits error versus l
Results
if (*.f64 PI.f64 l) < -1.328787927371943e155Initial program 20.4
Simplified20.4
rmApplied add-sqr-sqrt_binary6420.4
Applied associate-*l*_binary6420.4
Simplified20.4
if -1.328787927371943e155 < (*.f64 PI.f64 l) < 2.50471673486463688e128Initial program 14.8
Simplified14.5
rmApplied *-un-lft-identity_binary6414.5
Applied times-frac_binary649.0
rmApplied tan-quot_binary649.0
Applied associate-/l/_binary649.0
Simplified9.0
Taylor expanded around 0 3.9
Simplified3.9
if 2.50471673486463688e128 < (*.f64 PI.f64 l) Initial program 20.4
Simplified20.4
rmApplied *-un-lft-identity_binary6420.4
Applied times-frac_binary6420.4
rmApplied add-cube-cbrt_binary6420.4
Applied associate-*l*_binary6420.4
Simplified20.4
Final simplification8.6
herbie shell --seed 2020219
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))