\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}\;k \le -5.71080646924530167 \cdot 10^{-150}:\\
\;\;\;\;2 \cdot \frac{\left({\left(\frac{1}{{k}^{2} \cdot {t}^{1}}\right)}^{1} \cdot \ell\right) \cdot \cos k}{\left|\sin k\right| \cdot \frac{\left|\sin k\right|}{\ell}}\\
\mathbf{elif}\;k \le 3.0026811713127095 \cdot 10^{-105}:\\
\;\;\;\;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 \left(\left(\frac{\cos k}{\left|\sin k\right|} \cdot \frac{\ell}{\left|\sin k\right|}\right) \cdot \ell\right)\right)\\
\mathbf{elif}\;k \le 1.6112049040490601 \cdot 10^{137}:\\
\;\;\;\;2 \cdot \frac{\left({\left(\frac{1}{{k}^{2} \cdot {t}^{1}}\right)}^{1} \cdot \ell\right) \cdot \cos k}{\left|\sin k\right| \cdot \frac{\left|\sin k\right|}{\ell}}\\
\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{\sqrt[3]{1}}{{k}^{\left(\frac{2}{2}\right)} \cdot {t}^{1}}\right)}^{1} \cdot \left(\frac{\cos k}{\left|\sin k\right|} \cdot \frac{\ell}{\frac{\left|\sin k\right|}{\ell}}\right)\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 ((k <= -5.710806469245302e-150)) {
temp = (2.0 * (((pow((1.0 / (pow(k, 2.0) * pow(t, 1.0))), 1.0) * l) * cos(k)) / (fabs(sin(k)) * (fabs(sin(k)) / l))));
} else {
double temp_1;
if ((k <= 3.0026811713127095e-105)) {
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) / fabs(sin(k))) * (l / fabs(sin(k)))) * l)));
} else {
double temp_2;
if ((k <= 1.61120490404906e+137)) {
temp_2 = (2.0 * (((pow((1.0 / (pow(k, 2.0) * pow(t, 1.0))), 1.0) * l) * cos(k)) / (fabs(sin(k)) * (fabs(sin(k)) / l))));
} else {
temp_2 = (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) / fabs(sin(k))) * (l / (fabs(sin(k)) / l))))));
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if k < -5.710806469245302e-150 or 3.0026811713127095e-105 < k < 1.61120490404906e+137Initial program 49.5
Simplified40.8
Taylor expanded around inf 19.3
rmApplied sqr-pow19.3
Applied associate-*l*17.8
rmApplied add-sqr-sqrt17.8
Applied times-frac17.8
Simplified17.8
Simplified16.7
rmApplied frac-times15.9
Applied associate-*r/9.5
Simplified11.8
if -5.710806469245302e-150 < k < 3.0026811713127095e-105Initial program 63.9
Simplified64.0
Taylor expanded around inf 53.6
rmApplied sqr-pow53.6
Applied associate-*l*53.6
rmApplied add-sqr-sqrt53.6
Applied times-frac53.6
Simplified53.6
Simplified29.8
rmApplied associate-/r/29.8
Applied associate-*r*15.4
if 1.61120490404906e+137 < k Initial program 40.6
Simplified34.4
Taylor expanded around inf 24.4
rmApplied sqr-pow24.4
Applied associate-*l*19.1
rmApplied add-sqr-sqrt19.1
Applied times-frac19.1
Simplified19.1
Simplified19.1
rmApplied add-cube-cbrt19.1
Applied times-frac18.8
Applied unpow-prod-down18.8
Applied associate-*l*16.0
Final simplification13.0
herbie shell --seed 2020058
(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))))