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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if k < -2.20654592946525221e-94 or 2.47977501586148838e-177 < k < 4.44387612118673385e154Initial program 31.7
Simplified31.7
rmApplied unpow3_binary6431.7
Applied times-frac_binary6423.9
Applied associate-*l*_binary6423.1
rmApplied associate-/l*_binary6416.8
rmApplied associate-*l/_binary6416.8
Applied associate-*l/_binary6416.0
Applied associate-*l/_binary6414.2
Simplified14.2
Taylor expanded around inf 13.3
Simplified9.0
if -2.20654592946525221e-94 < k < 2.47977501586148838e-177Initial program 38.4
Simplified38.4
rmApplied unpow3_binary6438.4
Applied times-frac_binary6432.9
Applied associate-*l*_binary6424.2
rmApplied associate-/l*_binary6417.8
rmApplied associate-*l/_binary6413.1
Applied associate-*l/_binary649.3
Applied associate-*l/_binary649.3
Simplified9.3
rmApplied associate-*l/_binary648.6
if 4.44387612118673385e154 < k Initial program 32.9
Simplified32.9
rmApplied unpow3_binary6432.9
Applied times-frac_binary6426.5
Applied associate-*l*_binary6426.5
rmApplied associate-/l*_binary6421.3
rmApplied associate-*l/_binary6421.3
Applied associate-*l/_binary6421.3
Applied associate-*l/_binary6419.0
Simplified19.0
Taylor expanded around inf 27.7
Simplified22.5
Final simplification11.2
herbie shell --seed 2020274
(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))))