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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if l < -3.96634826451298485e-232 or -4.2385714915870229e-303 < l Initial program 48.0
Simplified40.3
Taylor expanded around 0 23.0
Simplified23.0
rmApplied associate-/l*_binary6422.3
Simplified22.3
rmApplied *-un-lft-identity_binary6422.3
Applied times-frac_binary6417.7
Applied times-frac_binary647.0
Simplified7.0
Simplified3.5
rmApplied unpow2_binary643.5
Applied associate-*r*_binary642.2
if -3.96634826451298485e-232 < l < -4.2385714915870229e-303Initial program 45.3
Simplified34.9
Taylor expanded around 0 17.8
Simplified17.8
rmApplied associate-/l*_binary6417.6
Simplified17.6
rmApplied *-un-lft-identity_binary6417.6
Applied times-frac_binary6417.6
Applied times-frac_binary6410.3
Applied times-frac_binary647.9
Simplified7.9
Final simplification2.7
herbie shell --seed 2021126
(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))))