\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}\;\ell \cdot \ell \leq 1.3955281437000005 \cdot 10^{+216}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k}}\\
\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 (<= (* l l) 1.3955281437000005e+216)
(*
(/ l (* (cbrt k) (cbrt k)))
(* (/ 2.0 (/ (* k (* t (pow (sin k) 2.0))) (cos k))) (/ l (cbrt k))))
(* (* (/ l k) (/ l k)) (/ 2.0 (/ (* t (pow (sin k) 2.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 ((l * l) <= 1.3955281437000005e+216) {
tmp = (l / (cbrt(k) * cbrt(k))) * ((2.0 / ((k * (t * pow(sin(k), 2.0))) / cos(k))) * (l / cbrt(k)));
} else {
tmp = ((l / k) * (l / k)) * (2.0 / ((t * pow(sin(k), 2.0)) / cos(k)));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (*.f64 l l) < 1.39552814370000048e216Initial program 44.6
Simplified35.7
Taylor expanded around inf 14.5
Simplified14.5
rmApplied associate-*l*_binary64_36012.4
rmApplied times-frac_binary64_42510.9
Applied *-un-lft-identity_binary64_41910.9
Applied times-frac_binary64_42510.8
Simplified10.8
rmApplied add-cube-cbrt_binary64_45411.0
Applied times-frac_binary64_42510.0
Applied associate-*l*_binary64_3607.0
Simplified7.0
if 1.39552814370000048e216 < (*.f64 l l) Initial program 60.5
Simplified58.8
Taylor expanded around inf 54.8
Simplified54.8
rmApplied associate-*l*_binary64_36053.0
rmApplied times-frac_binary64_42549.1
Applied *-un-lft-identity_binary64_41949.1
Applied times-frac_binary64_42549.3
Simplified49.3
rmApplied *-un-lft-identity_binary64_41949.3
Applied times-frac_binary64_42549.3
Applied *-un-lft-identity_binary64_41949.3
Applied times-frac_binary64_42549.0
Applied associate-*r*_binary64_35948.3
Simplified7.6
Final simplification7.1
herbie shell --seed 2020308
(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))))