\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}
t_1 := 2 + {\left(\frac{k}{t}\right)}^{2}\\
t_2 := t \cdot \frac{t}{\ell}\\
\mathbf{if}\;t \leq -3.2224024783374074 \cdot 10^{-125}:\\
\;\;\;\;\frac{2}{\left(\left(t_2 \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right) \cdot \tan k\right) \cdot t_1}\\
\mathbf{elif}\;t \leq 1.199423056156474 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_1 \cdot \left(\tan k \cdot \left(t_2 \cdot \frac{t \cdot \sin k}{\ell}\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
(let* ((t_1 (+ 2.0 (pow (/ k t) 2.0))) (t_2 (* t (/ t l))))
(if (<= t -3.2224024783374074e-125)
(/ 2.0 (* (* (* t_2 (* (/ t l) (sin k))) (tan k)) t_1))
(if (<= t 1.199423056156474e-39)
(/
2.0
(/ (* (pow k 2.0) (* t (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(/ 2.0 (* t_1 (* (tan k) (* t_2 (/ (* t (sin k)) l)))))))))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 t_1 = 2.0 + pow((k / t), 2.0);
double t_2 = t * (t / l);
double tmp;
if (t <= -3.2224024783374074e-125) {
tmp = 2.0 / (((t_2 * ((t / l) * sin(k))) * tan(k)) * t_1);
} else if (t <= 1.199423056156474e-39) {
tmp = 2.0 / ((pow(k, 2.0) * (t * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else {
tmp = 2.0 / (t_1 * (tan(k) * (t_2 * ((t * sin(k)) / l))));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -3.22240247833740742e-125Initial program 24.3
Simplified24.3
Applied unpow3_binary6424.3
Applied times-frac_binary6416.8
Applied associate-*l*_binary6414.8
Applied *-un-lft-identity_binary6414.8
Applied times-frac_binary649.7
Simplified9.7
Applied *-un-lft-identity_binary649.7
if -3.22240247833740742e-125 < t < 1.199423056156474e-39Initial program 57.9
Simplified57.9
Taylor expanded in t around 0 26.6
if 1.199423056156474e-39 < t Initial program 22.8
Simplified22.8
Applied unpow3_binary6422.8
Applied times-frac_binary6416.0
Applied associate-*l*_binary6413.7
Applied *-un-lft-identity_binary6413.7
Applied times-frac_binary648.6
Simplified8.6
Taylor expanded in t around 0 8.7
Final simplification13.7
herbie shell --seed 2021340
(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))))