\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.0248506160887325 \cdot 10^{-154} \lor \neg \left(k \leq 4.21563689246568 \cdot 10^{+170}\right):\\
\;\;\;\;\frac{2}{\frac{\frac{\sqrt[3]{k} \cdot \sqrt[3]{k}}{\ell} \cdot \left(\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right) \cdot \frac{\sqrt[3]{k}}{\ell}\right)}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{\sqrt{k}}{\ell} \cdot \frac{{k}^{1.5}}{\frac{\ell}{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 (or (<= k 2.0248506160887325e-154) (not (<= k 4.21563689246568e+170)))
(/
2.0
(/
(*
(/ (* (cbrt k) (cbrt k)) l)
(* (* k (* t (pow (sin k) 2.0))) (/ (cbrt k) l)))
(cos k)))
(/
2.0
(/
(* (/ (sqrt k) l) (/ (pow k 1.5) (/ l (* 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 ((k <= 2.0248506160887325e-154) || !(k <= 4.21563689246568e+170)) {
tmp = 2.0 / ((((cbrt(k) * cbrt(k)) / l) * ((k * (t * pow(sin(k), 2.0))) * (cbrt(k) / l))) / cos(k));
} else {
tmp = 2.0 / (((sqrt(k) / l) * (pow(k, 1.5) / (l / (t * pow(sin(k), 2.0))))) / cos(k));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if k < 2.0248506160887325e-154 or 4.2156368924656801e170 < k Initial program 46.4
Simplified39.4
Taylor expanded around 0 23.7
Simplified23.7
rmApplied associate-*l*_binary64_36021.1
rmApplied associate-/r*_binary64_36321.1
Simplified18.7
rmApplied add-cube-cbrt_binary64_45418.9
Applied times-frac_binary64_42512.5
Applied associate-*l*_binary64_3608.7
Simplified8.7
if 2.0248506160887325e-154 < k < 4.2156368924656801e170Initial program 53.2
Simplified42.6
Taylor expanded around 0 21.0
Simplified21.0
rmApplied associate-*l*_binary64_36020.1
rmApplied associate-/r*_binary64_36320.1
Simplified18.7
rmApplied add-sqr-sqrt_binary64_44118.8
Applied times-frac_binary64_42515.1
Applied associate-*l*_binary64_3607.8
Simplified5.7
Final simplification7.8
herbie shell --seed 2020357
(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))))