\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 \le -1.12604667027017724 \cdot 10^{-149}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{k}^{\left(\frac{2}{2}\right)}}\right)}^{1} \cdot \left(\left(\cos k \cdot {\left(\frac{\sqrt[3]{1}}{{k}^{\left(\frac{2}{2}\right)} \cdot {t}^{1}}\right)}^{1}\right) \cdot \frac{{\ell}^{2}}{{\left(\sin k\right)}^{2}}\right)\right)\\
\mathbf{elif}\;\ell \le 6.13733195565587654 \cdot 10^{-120}:\\
\;\;\;\;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 \left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{k}^{\left(\frac{2}{2}\right)}}\right)}^{1} \cdot \left({\left(\frac{\frac{\sqrt[3]{1}}{{k}^{\left(\frac{2}{2}\right)}}}{{t}^{1}}\right)}^{1} \cdot \frac{\cos k \cdot {\ell}^{2}}{{\left(\sin k\right)}^{2}}\right)\right)\\
\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 <= -1.1260466702701772e-149)) {
temp = (2.0 * (pow(((cbrt(1.0) * cbrt(1.0)) / pow(k, (2.0 / 2.0))), 1.0) * ((cos(k) * pow((cbrt(1.0) / (pow(k, (2.0 / 2.0)) * pow(t, 1.0))), 1.0)) * (pow(l, 2.0) / pow(sin(k), 2.0)))));
} else {
double temp_1;
if ((l <= 6.1373319556558765e-120)) {
temp_1 = (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_1 = (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)))));
}
temp = temp_1;
}
return temp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if l < -1.1260466702701772e-149Initial program 48.5
Simplified42.1
Taylor expanded around inf 23.4
rmApplied sqr-pow23.4
Applied associate-*l*20.3
rmApplied add-cube-cbrt20.3
Applied times-frac20.1
Applied unpow-prod-down20.1
Applied associate-*l*17.9
rmApplied *-un-lft-identity17.9
Applied unpow-prod-down17.9
Applied times-frac17.9
Applied associate-*r*17.9
Simplified17.9
if -1.1260466702701772e-149 < l < 6.1373319556558765e-120Initial program 46.3
Simplified36.4
Taylor expanded around inf 17.9
rmApplied sqr-pow17.9
Applied associate-*l*17.8
rmApplied add-cube-cbrt17.9
Applied unpow-prod-down17.9
Applied associate-/r*17.5
Simplified12.5
if 6.1373319556558765e-120 < l Initial program 51.1
Simplified44.5
Taylor expanded around inf 26.2
rmApplied sqr-pow26.2
Applied associate-*l*22.4
rmApplied add-cube-cbrt22.4
Applied times-frac22.1
Applied unpow-prod-down22.1
Applied associate-*l*19.8
rmApplied associate-/r*19.7
Final simplification16.4
herbie shell --seed 2020053 +o rules:numerics
(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))))