\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 -8.037426128813863 \cdot 10^{-109} \lor \neg \left(\ell \leq 4.5304118855774756 \cdot 10^{-246}\right):\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(\frac{k}{\ell} \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t}}{k} \cdot \frac{2}{\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 -8.037426128813863e-109) (not (<= l 4.5304118855774756e-246))) (/ 2.0 (* (/ k l) (* (/ k l) (/ (* t (pow (sin k) 2.0)) (cos k))))) (* (/ (/ l t) k) (/ 2.0 (/ 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 <= -8.037426128813863e-109) || !(l <= 4.5304118855774756e-246)) {
tmp = 2.0 / ((k / l) * ((k / l) * ((t * pow(sin(k), 2.0)) / cos(k))));
} else {
tmp = ((l / t) / k) * (2.0 / (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 < -8.03742612881386299e-109 or 4.5304118855774756e-246 < l Initial program 49.6
Simplified42.2
Taylor expanded around inf 25.1
Simplified25.1
rmApplied associate-/l*_binary64_36124.1
Simplified24.1
rmApplied *-un-lft-identity_binary64_41424.1
Applied times-frac_binary64_42019.3
Applied times-frac_binary64_4207.1
Simplified7.1
Simplified2.3
if -8.03742612881386299e-109 < l < 4.5304118855774756e-246Initial program 45.8
Simplified37.0
Taylor expanded around inf 17.2
Simplified17.2
rmApplied associate-/l*_binary64_36116.6
Simplified16.6
rmApplied *-un-lft-identity_binary64_41416.6
Applied times-frac_binary64_42016.6
Applied times-frac_binary64_4209.2
Applied times-frac_binary64_4207.9
Applied *-un-lft-identity_binary64_4147.9
Applied times-frac_binary64_4207.7
Simplified7.7
Final simplification3.9
herbie shell --seed 2020281
(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))))