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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -2.32470084168123686e-92Initial program 23.3
Simplified23.3
Applied cube-mult_binary6423.3
Applied times-frac_binary6416.6
Applied associate-*l*_binary6414.2
Applied *-un-lft-identity_binary6414.2
Applied times-frac_binary649.5
Applied associate-*l*_binary648.3
Applied associate-*l*_binary648.3
Applied associate-*l*_binary645.5
Simplified5.5
if -2.32470084168123686e-92 < t < 2.4703622504406875e-85Initial program 60.5
Simplified60.5
Taylor expanded in t around 0 25.6
if 2.4703622504406875e-85 < t Initial program 22.7
Simplified22.7
Applied cube-mult_binary6422.7
Applied times-frac_binary6416.5
Applied associate-*l*_binary6413.9
Applied associate-/l*_binary648.6
Final simplification11.7
herbie shell --seed 2022097
(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))))