\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 -1.8953370375107 \cdot 10^{-192}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \left(\left(\left(t \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\\
\mathbf{elif}\;t \leq 2.0914496211353583 \cdot 10^{-88}:\\
\;\;\;\;0\\
\mathbf{elif}\;t \leq 1.603545270302865 \cdot 10^{+81}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{k}{t}\right)}^{2} \cdot \frac{{t}^{3}}{\frac{\ell}{\sin k \cdot \sin k}}}{\ell \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\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 (<= t -1.8953370375107e-192)
(/
2.0
(* (/ t l) (* (* (* t (/ t l)) (sin k)) (* (tan k) (pow (/ k t) 2.0)))))
(if (<= t 2.0914496211353583e-88)
0.0
(if (<= t 1.603545270302865e+81)
(/
2.0
(/
(* (pow (/ k t) 2.0) (/ (pow t 3.0) (/ l (* (sin k) (sin k)))))
(* l (cos k))))
0.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 <= -1.8953370375107e-192) {
tmp = 2.0 / ((t / l) * (((t * (t / l)) * sin(k)) * (tan(k) * pow((k / t), 2.0))));
} else if (t <= 2.0914496211353583e-88) {
tmp = 0.0;
} else if (t <= 1.603545270302865e+81) {
tmp = 2.0 / ((pow((k / t), 2.0) * (pow(t, 3.0) / (l / (sin(k) * sin(k))))) / (l * cos(k)));
} else {
tmp = 0.0;
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -1.8953370375107e-192Initial program 45.3
Simplified35.7
rmApplied cube-mult_binary6435.7
Applied times-frac_binary6428.6
Simplified25.4
rmApplied associate-*l*_binary6425.5
rmApplied associate-*l*_binary6425.3
Simplified25.3
rmApplied associate-*l*_binary6422.9
if -1.8953370375107e-192 < t < 2.0914496211353583e-88 or 1.6035452703028649e81 < t Initial program 56.4
Simplified50.0
rmApplied cube-mult_binary6450.0
Applied times-frac_binary6444.7
Simplified38.5
Taylor expanded around 0 35.9
if 2.0914496211353583e-88 < t < 1.6035452703028649e81Initial program 29.3
Simplified22.0
rmApplied cube-mult_binary6422.0
Applied times-frac_binary6419.2
Simplified19.2
rmApplied tan-quot_binary6419.2
Applied associate-*l/_binary6419.2
Applied associate-*l/_binary6417.6
Applied frac-times_binary6416.9
Applied associate-*l/_binary6415.7
Simplified14.9
Final simplification27.5
herbie shell --seed 2020277
(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))))