\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 -4.240753838228914 \cdot 10^{-17} \lor \neg \left(t \leq 2.2676346131408102 \cdot 10^{-188}\right):\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \left(2 \cdot \frac{\cos k}{k \cdot \left(t \cdot {\sin k}^{2}\right)}\right)\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 -4.240753838228914e-17) (not (<= t 2.2676346131408102e-188))) (* (* (/ l k) (/ l k)) (/ 2.0 (/ (* t (pow (sin k) 2.0)) (cos k)))) (* l (* (/ l k) (* 2.0 (/ (cos k) (* k (* t (pow (sin k) 2.0)))))))))
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 <= -4.240753838228914e-17) || !(t <= 2.2676346131408102e-188)) {
tmp = ((l / k) * (l / k)) * (2.0 / ((t * pow(sin(k), 2.0)) / cos(k)));
} else {
tmp = l * ((l / k) * (2.0 * (cos(k) / (k * (t * pow(sin(k), 2.0))))));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -4.24075383822891424e-17 or 2.2676346131408102e-188 < t Initial program 45.3
Simplified34.5
Taylor expanded around 0 21.4
Simplified21.4
rmApplied associate-*l*_binary64_36020.9
rmApplied times-frac_binary64_42518.3
Applied *-un-lft-identity_binary64_41918.3
Applied times-frac_binary64_42518.3
Simplified18.2
rmApplied *-un-lft-identity_binary64_41918.2
Applied times-frac_binary64_42518.2
Applied *-un-lft-identity_binary64_41918.2
Applied times-frac_binary64_42518.1
Applied associate-*r*_binary64_35917.9
Simplified7.3
if -4.24075383822891424e-17 < t < 2.2676346131408102e-188Initial program 55.1
Simplified54.8
Taylor expanded around 0 26.3
Simplified26.3
rmApplied associate-*l*_binary64_36019.6
rmApplied times-frac_binary64_42518.2
Applied *-un-lft-identity_binary64_41918.2
Applied times-frac_binary64_42518.2
Simplified17.9
rmApplied *-un-lft-identity_binary64_41917.9
Applied times-frac_binary64_42511.7
Applied associate-*l*_binary64_3607.5
Simplified7.5
Final simplification7.3
herbie shell --seed 2021046
(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))))