\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}
t_1 := \frac{\cos k}{k}\\
t_2 := t \cdot {\sin k}^{2}\\
\mathbf{if}\;\ell \cdot \ell \leq 9.06101675763 \cdot 10^{-313}:\\
\;\;\;\;\left(t_1 \cdot \frac{\ell}{k}\right) \cdot \frac{2}{\frac{t_2}{\ell}}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2.9764153496865264 \cdot 10^{+165}:\\
\;\;\;\;t_1 \cdot \frac{2}{\frac{k \cdot \left(\sin k \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{2}{\frac{t_2 \cdot \frac{k}{\ell}}{\ell}}\\
\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
(let* ((t_1 (/ (cos k) k)) (t_2 (* t (pow (sin k) 2.0))))
(if (<= (* l l) 9.06101675763e-313)
(* (* t_1 (/ l k)) (/ 2.0 (/ t_2 l)))
(if (<= (* l l) 2.9764153496865264e+165)
(* t_1 (/ 2.0 (/ (* k (* (sin k) (* t (sin k)))) (* l l))))
(* t_1 (/ 2.0 (/ (* t_2 (/ k l)) l)))))))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 t_1 = cos(k) / k;
double t_2 = t * pow(sin(k), 2.0);
double tmp;
if ((l * l) <= 9.06101675763e-313) {
tmp = (t_1 * (l / k)) * (2.0 / (t_2 / l));
} else if ((l * l) <= 2.9764153496865264e+165) {
tmp = t_1 * (2.0 / ((k * (sin(k) * (t * sin(k)))) / (l * l)));
} else {
tmp = t_1 * (2.0 / ((t_2 * (k / l)) / l));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (*.f64 l l) < 9.06101675763e-313Initial program 49.4
Simplified42.8
Taylor expanded in t around 0 28.6
Applied unpow2_binary6428.6
Applied associate-*l*_binary6428.6
Applied times-frac_binary6428.4
Applied *-un-lft-identity_binary6428.4
Applied times-frac_binary6428.4
Simplified28.4
Simplified28.4
Applied times-frac_binary648.7
Applied *-un-lft-identity_binary648.7
Applied times-frac_binary648.5
Applied associate-*r*_binary647.6
Simplified7.6
if 9.06101675763e-313 < (*.f64 l l) < 2.97641534968652642e165Initial program 37.2
Simplified30.2
Taylor expanded in t around 0 6.5
Applied unpow2_binary646.5
Applied associate-*l*_binary644.3
Applied times-frac_binary642.1
Applied *-un-lft-identity_binary642.1
Applied times-frac_binary642.1
Simplified2.1
Simplified2.1
Applied unpow2_binary642.1
Applied associate-*r*_binary641.8
if 2.97641534968652642e165 < (*.f64 l l) Initial program 41.0
Simplified40.1
Taylor expanded in t around 0 21.1
Applied unpow2_binary6421.1
Applied associate-*l*_binary6418.7
Applied times-frac_binary6417.3
Applied *-un-lft-identity_binary6417.3
Applied times-frac_binary6417.3
Simplified17.3
Simplified17.3
Applied associate-/r*_binary6410.6
Simplified5.2
Final simplification4.5
herbie shell --seed 2022067
(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))))