\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 := t \cdot {\sin k}^{2}\\
\mathbf{if}\;\ell \leq -2.1513562525415348 \cdot 10^{+127} \lor \neg \left(\ell \leq -6.612126816598227 \cdot 10^{+43}\right) \land \left(\ell \leq 2.2868762441407734 \cdot 10^{-51} \lor \neg \left(\ell \leq 7.006789343459675 \cdot 10^{+148}\right)\right):\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k} \cdot \frac{\ell}{\frac{k}{\frac{\ell}{t_1}}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\cos k \cdot {\ell}^{2}}{k}}{k \cdot t_1}\\
\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 (* t (pow (sin k) 2.0))))
(if (or (<= l -2.1513562525415348e+127)
(and (not (<= l -6.612126816598227e+43))
(or (<= l 2.2868762441407734e-51)
(not (<= l 7.006789343459675e+148)))))
(* 2.0 (* (/ (cos k) k) (/ l (/ k (/ l t_1)))))
(* 2.0 (/ (/ (* (cos k) (pow l 2.0)) k) (* k t_1))))))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 = t * pow(sin(k), 2.0);
double tmp;
if ((l <= -2.1513562525415348e+127) || (!(l <= -6.612126816598227e+43) && ((l <= 2.2868762441407734e-51) || !(l <= 7.006789343459675e+148)))) {
tmp = 2.0 * ((cos(k) / k) * (l / (k / (l / t_1))));
} else {
tmp = 2.0 * (((cos(k) * pow(l, 2.0)) / k) / (k * t_1));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if l < -2.1513562525415348e127 or -6.6121268165982273e43 < l < 2.28687624414077338e-51 or 7.0067893434596753e148 < l Initial program 48.2
Simplified41.0
Taylor expanded in t around 0 24.6
Applied unpow2_binary6424.6
Applied associate-*l*_binary6423.6
Applied times-frac_binary6422.6
Applied unpow2_binary6422.6
Applied associate-/l*_binary6414.2
Simplified9.1
if -2.1513562525415348e127 < l < -6.6121268165982273e43 or 2.28687624414077338e-51 < l < 7.0067893434596753e148Initial program 47.2
Simplified38.9
Taylor expanded in t around 0 17.9
Applied unpow2_binary6417.9
Applied associate-*l*_binary6411.5
Applied associate-/r*_binary643.0
Final simplification7.8
herbie shell --seed 2022160
(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))))