\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) M_PI) * l) - ((1.0 / (F * F)) * tan(((double) M_PI) * l));
}
double code(double F, double l) {
double tmp;
if ((((double) M_PI) * l) <= -1.328787927371943e+155) {
tmp = (((double) M_PI) * l) - (tan(sqrt((double) M_PI) * (l * sqrt((double) M_PI))) / (F * F));
} else if ((((double) M_PI) * l) <= 2.504716734864637e+128) {
tmp = (((double) M_PI) * l) - ((1.0 / F) * (sin(((double) M_PI) * l) / (F * ((1.0 + (0.041666666666666664 * pow((((double) M_PI) * l), 4.0))) - (((((double) M_PI) * l) * (((double) M_PI) * l)) * 0.5)))));
} else {
tmp = (((double) M_PI) * l) - ((1.0 / F) * (tan((cbrt((double) M_PI) * cbrt((double) M_PI)) * (l * cbrt((double) M_PI))) / F));
}
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)))))