\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 3.3750445306 \cdot 10^{-315}:\\
\;\;\;\;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{1}{{k}^{\left(\frac{2}{2}\right)}}\right)}^{1} \cdot \left({\left(\frac{1}{{k}^{\left(\frac{2}{2}\right)} \cdot {t}^{1}}\right)}^{1} \cdot \frac{\frac{\cos k}{\frac{\sin k}{{\ell}^{2}}}}{\sin k}\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 VAR;
if (((l * l) <= 3.3750445305706e-315)) {
VAR = (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 {
VAR = (2.0 * (pow((1.0 / pow(k, (2.0 / 2.0))), 1.0) * (pow((1.0 / (pow(k, (2.0 / 2.0)) * pow(t, 1.0))), 1.0) * ((cos(k) / (sin(k) / pow(l, 2.0))) / sin(k)))));
}
return VAR;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (* l l) < 3.3750445305706e-315Initial program 46.7
Simplified38.4
Taylor expanded around inf 20.8
rmApplied sqr-pow20.8
Applied associate-*l*20.8
rmApplied add-cube-cbrt20.8
Applied unpow-prod-down20.8
Applied associate-/r*20.7
Simplified14.4
if 3.3750445305706e-315 < (* l l) Initial program 48.3
Simplified40.9
Taylor expanded around inf 22.2
rmApplied sqr-pow22.2
Applied associate-*l*19.1
rmApplied *-un-lft-identity19.1
Applied times-frac18.9
Applied unpow-prod-down18.9
Applied associate-*l*16.7
rmApplied unpow216.7
Applied associate-/r*16.4
Simplified16.5
Final simplification15.8
herbie shell --seed 2020079
(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))))