\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 \le 7.7815364995264491 \cdot 10^{-163}:\\
\;\;\;\;2 \cdot \left({\left(\frac{1}{{k}^{\left(\frac{2}{2}\right)} \cdot \left({k}^{\left(\frac{2}{2}\right)} \cdot {t}^{1}\right)}\right)}^{1} \cdot \frac{\frac{\cos k}{\frac{\frac{{\left(\sqrt[3]{\sin k}\right)}^{4}}{\ell}}{\ell}}}{{\left(\sqrt[3]{\sin k}\right)}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{k}^{\left(\frac{2}{2}\right)}}\right)}^{1} \cdot \left({\left(\frac{\sqrt[3]{1}}{{k}^{\left(\frac{2}{2}\right)} \cdot {t}^{1}}\right)}^{1} \cdot \left(\cos k \cdot {\ell}^{2}\right)\right)}{{\left(\sin k\right)}^{2}}\\
\end{array}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 temp;
if (((l * l) <= 7.781536499526449e-163)) {
temp = (2.0 * (pow((1.0 / (pow(k, (2.0 / 2.0)) * (pow(k, (2.0 / 2.0)) * pow(t, 1.0)))), 1.0) * ((cos(k) / ((pow(cbrt(sin(k)), 4.0) / l) / l)) / pow(cbrt(sin(k)), 2.0))));
} else {
temp = (2.0 * ((pow(((cbrt(1.0) * cbrt(1.0)) / pow(k, (2.0 / 2.0))), 1.0) * (pow((cbrt(1.0) / (pow(k, (2.0 / 2.0)) * pow(t, 1.0))), 1.0) * (cos(k) * pow(l, 2.0)))) / pow(sin(k), 2.0)));
}
return temp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (* l l) < 7.781536499526449e-163Initial program 44.4
Simplified35.2
Taylor expanded around inf 14.2
rmApplied sqr-pow14.2
Applied associate-*l*14.1
rmApplied add-cube-cbrt14.2
Applied unpow-prod-down14.2
Applied associate-/r*13.6
Simplified9.7
if 7.781536499526449e-163 < (* l l) Initial program 50.8
Simplified44.4
Taylor expanded around inf 28.5
rmApplied sqr-pow28.5
Applied associate-*l*24.5
rmApplied add-cube-cbrt24.5
Applied times-frac24.2
Applied unpow-prod-down24.2
Applied associate-*l*21.5
rmApplied associate-*r/21.1
Applied associate-*r/21.1
Final simplification15.7
herbie shell --seed 2020060
(FPCore (t l k)
:name "Toniolo and Linder, Equation (10-)"
:precision binary64
(/ 2 (* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (- (+ 1 (pow (/ k t) 2)) 1))))