\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{\ell}{{\sin k}^{2}}\\
\mathbf{if}\;k \leq -1.0800721622191825 \cdot 10^{+154} \lor \neg \left(k \leq 1.4364428154027302 \cdot 10^{+90}\right):\\
\;\;\;\;2 \cdot \left(\left(\frac{1}{k} \cdot \left(\frac{\cos k}{k} \cdot \frac{\ell}{t}\right)\right) \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \frac{\ell \cdot \frac{\cos k}{{k}^{2}}}{t}\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 (/ l (pow (sin k) 2.0))))
(if (or (<= k -1.0800721622191825e+154) (not (<= k 1.4364428154027302e+90)))
(* 2.0 (* (* (/ 1.0 k) (* (/ (cos k) k) (/ l t))) t_1))
(* 2.0 (* t_1 (/ (* l (/ (cos k) (pow k 2.0))) 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 = l / pow(sin(k), 2.0);
double tmp;
if ((k <= -1.0800721622191825e+154) || !(k <= 1.4364428154027302e+90)) {
tmp = 2.0 * (((1.0 / k) * ((cos(k) / k) * (l / t))) * t_1);
} else {
tmp = 2.0 * (t_1 * ((l * (cos(k) / pow(k, 2.0))) / t));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if k < -1.0800721622191825e154 or 1.43644281540273021e90 < k Initial program 41.3
Simplified35.0
Taylor expanded in t around 0 22.9
Applied times-frac_binary6423.0
Applied unpow2_binary6423.0
Applied times-frac_binary6420.9
Applied associate-*r*_binary6419.9
Applied unpow2_binary6419.9
Applied *-un-lft-identity_binary6419.9
Applied times-frac_binary6419.4
Applied associate-*l*_binary6411.7
if -1.0800721622191825e154 < k < 1.43644281540273021e90Initial program 55.7
Simplified46.6
Taylor expanded in t around 0 22.5
Applied times-frac_binary6420.5
Applied unpow2_binary6420.5
Applied times-frac_binary6411.9
Applied associate-*r*_binary648.5
Applied associate-*r/_binary645.7
Final simplification8.6
herbie shell --seed 2021275
(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))))