\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 -1.771078829737053 \cdot 10^{-120} \lor \neg \left(t \leq 3.0642367544409556 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(\left(t \cdot \left(\frac{1}{\ell} \cdot \left(t \cdot \sin k\right)\right)\right) \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 -1.771078829737053e-120) (not (<= t 3.0642367544409556e-49)))
(/
2.0
(*
(* (/ t l) (* (* t (* (/ 1.0 l) (* t (sin k)))) (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 <= -1.771078829737053e-120) || !(t <= 3.0642367544409556e-49)) {
tmp = 2.0 / (((t / l) * ((t * ((1.0 / l) * (t * sin(k)))) * 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 < -1.771078829737053e-120 or 3.0642367544409556e-49 < t Initial program 23.8
Simplified23.8
rmApplied cube-mult_binary6423.8
Applied times-frac_binary6416.8
Applied associate-*l*_binary6414.4
Simplified14.4
rmApplied *-un-lft-identity_binary6414.4
Applied times-frac_binary649.6
Applied associate-*r*_binary648.5
Simplified8.5
rmApplied associate-*l*_binary646.1
Simplified6.1
rmApplied div-inv_binary646.1
Applied associate-*l*_binary646.1
if -1.771078829737053e-120 < t < 3.0642367544409556e-49Initial program 58.9
Simplified58.9
rmApplied cube-mult_binary6458.9
Applied times-frac_binary6451.0
Applied associate-*l*_binary6450.5
Simplified50.5
Taylor expanded around 0 37.3
Simplified24.3
Final simplification10.7
herbie shell --seed 2021175
(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))))