\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 -6.210609360145837 \cdot 10^{-162}:\\
\;\;\;\;\frac{\ell}{\sqrt[3]{k} \cdot \sqrt[3]{k}} \cdot \left(\frac{2}{\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k}} \cdot \frac{\ell}{\sqrt[3]{k}}\right)\\
\mathbf{elif}\;k \leq 4.5629687678940777 \cdot 10^{-128}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t \cdot t}{\ell} \cdot \left(\sin k \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{\sqrt{k}} \cdot \left(\frac{2}{\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k}} \cdot \frac{\ell}{\sqrt{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 (<= k -6.210609360145837e-162)
(*
(/ l (* (cbrt k) (cbrt k)))
(* (/ 2.0 (/ (* k (* t (pow (sin k) 2.0))) (cos k))) (/ l (cbrt k))))
(if (<= k 4.5629687678940777e-128)
(/
2.0
(* (* (* (/ (* t t) l) (* (sin k) (/ t l))) (tan k)) (pow (/ k t) 2.0)))
(*
(/ l (sqrt k))
(* (/ 2.0 (/ (* k (* t (pow (sin k) 2.0))) (cos k))) (/ l (sqrt 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 (k <= -6.210609360145837e-162) {
tmp = (l / (cbrt(k) * cbrt(k))) * ((2.0 / ((k * (t * pow(sin(k), 2.0))) / cos(k))) * (l / cbrt(k)));
} else if (k <= 4.5629687678940777e-128) {
tmp = 2.0 / (((((t * t) / l) * (sin(k) * (t / l))) * tan(k)) * pow((k / t), 2.0));
} else {
tmp = (l / sqrt(k)) * ((2.0 / ((k * (t * pow(sin(k), 2.0))) / cos(k))) * (l / sqrt(k)));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if k < -6.210609360145837e-162Initial program 48.2
Simplified40.2
Taylor expanded around inf 22.0
Simplified22.0
rmApplied associate-*l*_binary6419.7
rmApplied times-frac_binary6417.5
Applied *-un-lft-identity_binary6417.5
Applied times-frac_binary6417.5
Simplified17.3
rmApplied add-cube-cbrt_binary6417.5
Applied times-frac_binary6412.0
Applied associate-*l*_binary647.2
Simplified7.2
if -6.210609360145837e-162 < k < 4.5629687678940777e-128Initial program 64.0
Simplified62.9
rmApplied unpow3_binary6462.9
Applied times-frac_binary6460.2
Applied associate-*l*_binary6457.0
Simplified57.0
if 4.5629687678940777e-128 < k Initial program 47.3
Simplified38.9
Taylor expanded around inf 20.9
Simplified20.9
rmApplied associate-*l*_binary6418.5
rmApplied times-frac_binary6416.1
Applied *-un-lft-identity_binary6416.1
Applied times-frac_binary6416.2
Simplified16.0
rmApplied add-sqr-sqrt_binary6416.1
Applied times-frac_binary6410.7
Applied associate-*l*_binary646.1
Simplified6.1
Final simplification8.8
herbie shell --seed 2020231
(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))))