\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\pi \cdot \ell - \frac{1}{F \cdot \left(\frac{F}{\pi \cdot \ell} - \mathsf{fma}\left(0.3333333333333333, \left(\pi \cdot \ell\right) \cdot F, \mathsf{fma}\left(0.0021164021164021165, F \cdot \left({\ell}^{5} \cdot {\pi}^{5}\right), 0.022222222222222223 \cdot \left(F \cdot {\left(\pi \cdot \ell\right)}^{3}\right)\right)\right)\right)}
(FPCore (F l) :precision binary64 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
:precision binary64
(-
(* PI l)
(/
1.0
(*
F
(-
(/ F (* PI l))
(fma
0.3333333333333333
(* (* PI l) F)
(fma
0.0021164021164021165
(* F (* (pow l 5.0) (pow PI 5.0)))
(* 0.022222222222222223 (* F (pow (* PI l) 3.0))))))))))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) {
return (((double) M_PI) * l) - (1.0 / (F * ((F / (((double) M_PI) * l)) - fma(0.3333333333333333, ((((double) M_PI) * l) * F), fma(0.0021164021164021165, (F * (pow(l, 5.0) * pow(((double) M_PI), 5.0))), (0.022222222222222223 * (F * pow((((double) M_PI) * l), 3.0))))))));
}



Bits error versus F



Bits error versus l
Initial program 16.6
Simplified16.4
Applied clear-num_binary6416.4
Simplified12.8
Applied div-inv_binary6412.8
Applied associate-/r*_binary6412.8
Taylor expanded in l around 0 2.4
Applied clear-num_binary642.4
Simplified2.4
Final simplification2.4
herbie shell --seed 2022097
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))