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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -3.05223632753923583e-50 or 2.8366268066418969e-62 < t Initial program 22.3
Simplified22.3
rmApplied unpow3_binary64_14422.3
Applied times-frac_binary64_8415.8
Applied associate-*l*_binary64_1913.5
rmApplied associate-/l*_binary64_238.4
rmApplied associate-*l/_binary64_217.0
Applied associate-*l/_binary64_215.0
Applied associate-*l/_binary64_214.3
Simplified4.3
rmApplied associate-*l/_binary64_214.2
if -3.05223632753923583e-50 < t < 2.8366268066418969e-62Initial program 56.0
Simplified56.0
rmApplied unpow3_binary64_14456.0
Applied times-frac_binary64_8447.9
Applied associate-*l*_binary64_1947.4
rmApplied associate-/l*_binary64_2340.3
rmApplied associate-*l/_binary64_2140.3
Applied associate-*l/_binary64_2141.8
Applied associate-*l/_binary64_2138.4
Simplified38.4
Taylor expanded around inf 21.7
Simplified18.6
Final simplification8.4
herbie shell --seed 2020354
(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))))