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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -6.0794026985242806e-86 or 1.3035884720446704e-59 < t Initial program 22.8
Simplified22.8
rmApplied unpow3_binary6422.8
Applied times-frac_binary6416.1
Applied associate-*l*_binary6413.9
Simplified13.9
rmApplied *-un-lft-identity_binary6413.9
Applied times-frac_binary649.0
Simplified9.0
rmApplied associate-*r*_binary649.0
Simplified7.8
rmApplied associate-*l*_binary644.7
if -6.0794026985242806e-86 < t < 1.3035884720446704e-59Initial program 58.4
Simplified58.4
rmApplied unpow3_binary6458.4
Applied times-frac_binary6448.7
Applied associate-*l*_binary6448.5
Simplified48.5
Taylor expanded around 0 37.7
Simplified25.0
Final simplification10.3
herbie shell --seed 2021166
(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))))