\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 := {\left(\frac{k}{\ell}\right)}^{2}\\
t_2 := {\sin k}^{2}\\
t_3 := \frac{\cos k}{t_2}\\
t_4 := \frac{2}{\frac{t \cdot \frac{k \cdot k}{\ell}}{\ell \cdot t_3}}\\
\mathbf{if}\;k \leq -1.2996013588112017 \cdot 10^{+81}:\\
\;\;\;\;2 \cdot \frac{\frac{\cos k}{t \cdot t_2}}{t_1}\\
\mathbf{elif}\;k \leq -4.134505440007014 \cdot 10^{-152}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;k \leq 4.443471164367087 \cdot 10^{-154}:\\
\;\;\;\;\frac{2}{t_1 \cdot \frac{{\left(\sin k \cdot \sqrt{t}\right)}^{2}}{\cos k}}\\
\mathbf{elif}\;k \leq 3.260109002841418 \cdot 10^{+158}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k \cdot t}{t_3 \cdot \frac{\ell}{\frac{k}{\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 (pow (/ k l) 2.0))
(t_2 (pow (sin k) 2.0))
(t_3 (/ (cos k) t_2))
(t_4 (/ 2.0 (/ (* t (/ (* k k) l)) (* l t_3)))))
(if (<= k -1.2996013588112017e+81)
(* 2.0 (/ (/ (cos k) (* t t_2)) t_1))
(if (<= k -4.134505440007014e-152)
t_4
(if (<= k 4.443471164367087e-154)
(/ 2.0 (* t_1 (/ (pow (* (sin k) (sqrt t)) 2.0) (cos k))))
(if (<= k 3.260109002841418e+158)
t_4
(/ 2.0 (/ (* k t) (* t_3 (/ l (/ k 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 = pow((k / l), 2.0);
double t_2 = pow(sin(k), 2.0);
double t_3 = cos(k) / t_2;
double t_4 = 2.0 / ((t * ((k * k) / l)) / (l * t_3));
double tmp;
if (k <= -1.2996013588112017e+81) {
tmp = 2.0 * ((cos(k) / (t * t_2)) / t_1);
} else if (k <= -4.134505440007014e-152) {
tmp = t_4;
} else if (k <= 4.443471164367087e-154) {
tmp = 2.0 / (t_1 * (pow((sin(k) * sqrt(t)), 2.0) / cos(k)));
} else if (k <= 3.260109002841418e+158) {
tmp = t_4;
} else {
tmp = 2.0 / ((k * t) / (t_3 * (l / (k / l))));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if k < -1.29960135881120171e81Initial program 41.9
Taylor expanded in t around 0 21.6
Applied egg-rr22.1
Applied egg-rr5.4
Applied egg-rr5.3
if -1.29960135881120171e81 < k < -4.1345054400070137e-152 or 4.4434711643670872e-154 < k < 3.2601090028414181e158Initial program 54.8
Taylor expanded in t around 0 20.3
Applied egg-rr18.7
Applied egg-rr2.6
if -4.1345054400070137e-152 < k < 4.4434711643670872e-154Initial program 64.0
Taylor expanded in t around 0 64.0
Applied egg-rr61.6
Applied egg-rr57.9
Applied egg-rr37.4
if 3.2601090028414181e158 < k Initial program 38.0
Taylor expanded in t around 0 23.3
Applied egg-rr23.3
Applied egg-rr6.5
Final simplification5.4
herbie shell --seed 2022129
(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))))