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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (*.f64 l l) < 31752309304847.016 or 2.28298209324411989e305 < (*.f64 l l) Initial program 48.1
Simplified40.7
Taylor expanded in t around 0 24.0
Applied unpow2_binary6424.0
Applied associate-*l*_binary6423.1
Applied times-frac_binary6422.3
Applied unpow2_binary6422.3
Applied associate-/l*_binary6414.4
Simplified9.9
if 31752309304847.016 < (*.f64 l l) < 2.28298209324411989e305Initial program 47.6
Simplified39.0
Taylor expanded in t around 0 18.6
Applied unpow2_binary6418.6
Applied associate-*l*_binary6412.2
Applied times-frac_binary645.6
Applied associate-/r*_binary643.7
Final simplification8.6
herbie shell --seed 2022081
(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))))