\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -5.498102941521268 \cdot 10^{+158}:\\
\;\;\;\;\pi \cdot \ell - \frac{\tan \left(\sqrt[3]{\ell} \cdot \left(\pi \cdot \left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right)\right)\right)}{F \cdot F}\\
\mathbf{elif}\;\pi \cdot \ell \leq 1.0547115320298808 \cdot 10^{+132}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F} \cdot \frac{\frac{\sin \left(\pi \cdot \ell\right)}{\left(1 + 0.041666666666666664 \cdot {\left(\pi \cdot \ell\right)}^{4}\right) - {\pi}^{2} \cdot \left(\left(\ell \cdot \ell\right) \cdot 0.5\right)}}{F}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F} \cdot \frac{\frac{\sin \left(\left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right) \cdot \left(\ell \cdot \sqrt[3]{\pi}\right)\right)}{\cos \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 (<= (* PI l) -5.498102941521268e+158)
(- (* PI l) (/ (tan (* (cbrt l) (* PI (* (cbrt l) (cbrt l))))) (* F F)))
(if (<= (* PI l) 1.0547115320298808e+132)
(-
(* PI l)
(*
(/ 1.0 F)
(/
(/
(sin (* PI l))
(-
(+ 1.0 (* 0.041666666666666664 (pow (* PI l) 4.0)))
(* (pow PI 2.0) (* (* l l) 0.5))))
F)))
(-
(* PI l)
(*
(/ 1.0 F)
(/
(/ (sin (* (* (cbrt PI) (cbrt PI)) (* l (cbrt PI)))) (cos (* 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 ((((double) M_PI) * l) <= -5.498102941521268e+158) {
tmp = (((double) M_PI) * l) - (tan(cbrt(l) * (((double) M_PI) * (cbrt(l) * cbrt(l)))) / (F * F));
} else if ((((double) M_PI) * l) <= 1.0547115320298808e+132) {
tmp = (((double) M_PI) * l) - ((1.0 / F) * ((sin(((double) M_PI) * l) / ((1.0 + (0.041666666666666664 * pow((((double) M_PI) * l), 4.0))) - (pow(((double) M_PI), 2.0) * ((l * l) * 0.5)))) / F));
} else {
tmp = (((double) M_PI) * l) - ((1.0 / F) * ((sin((cbrt((double) M_PI) * cbrt((double) M_PI)) * (l * cbrt((double) M_PI))) / cos(((double) M_PI) * l)) / F));
}
return tmp;
}



Bits error versus F



Bits error versus l
Results
if (*.f64 PI.f64 l) < -5.49810294152126846e158Initial program 21.7
Simplified21.7
rmApplied add-cube-cbrt_binary6421.7
Applied associate-*r*_binary6421.7
if -5.49810294152126846e158 < (*.f64 PI.f64 l) < 1.05471153202988076e132Initial program 14.9
Simplified14.5
rmApplied *-un-lft-identity_binary6414.5
Applied times-frac_binary648.9
rmApplied tan-quot_binary648.9
Taylor expanded around 0 4.3
Simplified4.3
if 1.05471153202988076e132 < (*.f64 PI.f64 l) Initial program 19.7
Simplified19.7
rmApplied *-un-lft-identity_binary6419.7
Applied times-frac_binary6419.7
rmApplied tan-quot_binary6419.7
rmApplied add-cube-cbrt_binary6419.7
Applied associate-*l*_binary6419.7
Simplified19.7
Final simplification8.9
herbie shell --seed 2020346
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))