\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.6263580110031235 \cdot 10^{-27} \lor \neg \left(t \leq 1.3637525120491727 \cdot 10^{-69}\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 -1.6263580110031235e-27) (not (<= t 1.3637525120491727e-69)))
(/
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 <= -1.6263580110031235e-27) || !(t <= 1.3637525120491727e-69)) {
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 < -1.62635801100312347e-27 or 1.36375251204917267e-69 < t Initial program 22.6
Simplified22.6
rmApplied unpow3_binary64_48522.6
Applied times-frac_binary64_42516.2
Applied associate-*l*_binary64_36013.7
Simplified13.7
rmApplied *-un-lft-identity_binary64_41913.7
Applied times-frac_binary64_4258.5
Simplified8.5
rmApplied associate-*r*_binary64_3598.5
Simplified7.1
rmApplied associate-*l*_binary64_3603.9
if -1.62635801100312347e-27 < t < 1.36375251204917267e-69Initial program 55.2
Simplified55.2
rmApplied unpow3_binary64_48555.2
Applied times-frac_binary64_42546.0
Applied associate-*l*_binary64_36045.2
Simplified45.2
Taylor expanded around 0 37.3
Simplified25.5
Final simplification10.4
herbie shell --seed 2021091
(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))))