\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(\pi, \left(\ell \cdot F\right) \cdot 0.3333333333333333, \mathsf{log1p}\left(\mathsf{expm1}\left(F \cdot \mathsf{fma}\left(0.0021164021164021165, {\pi}^{5} \cdot {\ell}^{5}, 0.022222222222222223 \cdot {\left(\pi \cdot \ell\right)}^{3}\right)\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
PI
(* (* l F) 0.3333333333333333)
(log1p
(expm1
(*
F
(fma
0.0021164021164021165
(* (pow PI 5.0) (pow l 5.0))
(* 0.022222222222222223 (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(((double) M_PI), ((l * F) * 0.3333333333333333), log1p(expm1(F * fma(0.0021164021164021165, (pow(((double) M_PI), 5.0) * pow(l, 5.0)), (0.022222222222222223 * pow((((double) M_PI) * l), 3.0)))))))));
}



Bits error versus F



Bits error versus l
Initial program 17.2
Simplified16.9
Applied associate-/r*_binary6412.7
Applied clear-num_binary6412.7
Simplified12.7
Taylor expanded in l around 0 2.4
Simplified2.4
Applied log1p-expm1-u_binary642.7
Simplified2.7
Final simplification2.7
herbie shell --seed 2021339
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))