\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 -2.792014415073566 \cdot 10^{-58}:\\
\;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(\left(t \cdot \frac{t \cdot \sin k}{\ell}\right) \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\\
\mathbf{elif}\;t \leq 2.543668611609592 \cdot 10^{-75}:\\
\;\;\;\;\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)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t}}{\tan k \cdot \left(t \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right)} \cdot \frac{2}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\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 (<= t -2.792014415073566e-58)
(/
2.0
(*
(* (/ t l) (* (* t (/ (* t (sin k)) l)) (tan k)))
(+ 2.0 (pow (/ k t) 2.0))))
(if (<= t 2.543668611609592e-75)
(/
2.0
(*
(/ (pow (sin k) 2.0) (* l l))
(+ (/ (* t (* k k)) (cos k)) (* 2.0 (/ (pow t 3.0) (cos k))))))
(*
(/ (/ l t) (* (tan k) (* t (* (/ t l) (sin k)))))
(/ 2.0 (+ 2.0 (pow (/ k t) 2.0)))))))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 <= -2.792014415073566e-58) {
tmp = 2.0 / (((t / l) * ((t * ((t * sin(k)) / l)) * tan(k))) * (2.0 + pow((k / t), 2.0)));
} else if (t <= 2.543668611609592e-75) {
tmp = 2.0 / ((pow(sin(k), 2.0) / (l * l)) * (((t * (k * k)) / cos(k)) + (2.0 * (pow(t, 3.0) / cos(k)))));
} else {
tmp = ((l / t) / (tan(k) * (t * ((t / l) * sin(k))))) * (2.0 / (2.0 + pow((k / t), 2.0)));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -2.7920144150735659e-58Initial program 22.5
Simplified22.5
rmApplied cube-mult_binary6422.6
Applied times-frac_binary6416.4
Applied associate-*l*_binary6414.4
rmApplied *-un-lft-identity_binary6414.4
Applied times-frac_binary648.3
Applied associate-*l*_binary646.8
rmApplied associate-*l*_binary644.9
Simplified4.9
rmApplied associate-*l/_binary644.9
if -2.7920144150735659e-58 < t < 2.543668611609592e-75Initial program 58.2
Simplified58.2
Taylor expanded around inf 38.9
Simplified25.7
if 2.543668611609592e-75 < t Initial program 23.1
Simplified23.1
rmApplied cube-mult_binary6423.1
Applied times-frac_binary6416.6
Applied associate-*l*_binary6414.3
rmApplied *-un-lft-identity_binary6414.3
Applied times-frac_binary649.3
Applied associate-*l*_binary648.1
rmApplied *-un-lft-identity_binary648.1
Applied times-frac_binary648.1
Simplified5.2
Final simplification10.8
herbie shell --seed 2020232
(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))))