\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2.085808446250641 \cdot 10^{+304}:\\
\;\;\;\;2 \cdot \frac{\frac{\cos k \cdot {\ell}^{2}}{k}}{k \cdot \left(\sin k \cdot \left(t \cdot \sin k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}}\\
\end{array}
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 2.085808446250641e+304)
(* 2.0 (/ (/ (* (cos k) (pow l 2.0)) k) (* k (* (sin k) (* t (sin k))))))
(/
2.0
(* (* (* (sin k) (* (/ (* t t) l) (/ t l))) (tan k)) (pow (/ k t) 2.0)))))double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2.085808446250641e+304) {
tmp = 2.0 * (((cos(k) * pow(l, 2.0)) / k) / (k * (sin(k) * (t * sin(k)))));
} else {
tmp = 2.0 / (((sin(k) * (((t * t) / l) * (t / l))) * tan(k)) * pow((k / t), 2.0));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (*.f64 l l) < 2.085808446250641e304Initial program 45.4
Simplified35.8
Taylor expanded in t around 0 15.2
Applied unpow2_binary6415.2
Applied associate-*l*_binary6412.6
Applied associate-/r*_binary6410.4
Applied unpow2_binary6410.4
Applied associate-*r*_binary6410.2
if 2.085808446250641e304 < (*.f64 l l) Initial program 63.8
Simplified63.8
Applied add-cube-cbrt_binary6463.8
Applied unpow-prod-down_binary6463.8
Applied times-frac_binary6448.5
Simplified48.3
Simplified48.2
Final simplification16.0
herbie shell --seed 2022020
(FPCore (t l k)
:name "Toniolo and Linder, Equation (10-)"
:precision binary64
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))