\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 -5.086373656115926 \cdot 10^{-71} \lor \neg \left(t \leq 8.866292623119177 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{2}{\frac{\left(\left(\frac{t}{\ell} \cdot \left(t \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}{\frac{\ell}{t}}}\\
\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 -5.086373656115926e-71) (not (<= t 8.866292623119177e-76)))
(/
2.0
(/
(* (* (* (/ t l) (* t (sin k))) (tan k)) (+ 2.0 (pow (/ k t) 2.0)))
(/ l t)))
(/
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 <= -5.086373656115926e-71) || !(t <= 8.866292623119177e-76)) {
tmp = 2.0 / (((((t / l) * (t * sin(k))) * tan(k)) * (2.0 + pow((k / t), 2.0))) / (l / t));
} 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 < -5.08637365611592622e-71 or 8.8662926231191773e-76 < t Initial program 23.2
Simplified23.2
rmApplied cube-mult_binary64_44923.2
Applied times-frac_binary64_42516.7
Applied associate-*l*_binary64_36014.5
Simplified14.5
rmApplied associate-/l*_binary64_3649.3
rmApplied associate-*r/_binary64_3618.1
Applied associate-*r/_binary64_3618.1
Applied associate-*l/_binary64_3625.5
Applied associate-*l/_binary64_3624.8
if -5.08637365611592622e-71 < t < 8.8662926231191773e-76Initial program 58.7
Simplified58.7
rmApplied cube-mult_binary64_44958.7
Applied times-frac_binary64_42549.9
Applied associate-*l*_binary64_36049.7
Simplified49.7
Taylor expanded around 0 37.9
Simplified24.9
Final simplification10.2
herbie shell --seed 2021047
(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))))