\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 := t \cdot \sin k\\
t_2 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;t \leq -1.3838094519414564 \cdot 10^{-52}:\\
\;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(\left(t \cdot \left(\frac{1}{\ell} \cdot t_1\right)\right) \cdot \tan k\right)\right) \cdot \left(2 + t_2\right)}\\
\mathbf{elif}\;t \leq 9.208186249841077 \cdot 10^{-142}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\ell \cdot \ell} \cdot \left(\frac{t \cdot \left(k \cdot k\right)}{\cos k} + 2 \cdot \frac{{t}^{3}}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2}{\left(\frac{t}{\ell} \cdot \left(\frac{t}{\ell} \cdot t_1\right)\right) \cdot \left(\tan k \cdot \left(-2 - t_2\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 (* t (sin k))) (t_2 (pow (/ k t) 2.0)))
(if (<= t -1.3838094519414564e-52)
(/ 2.0 (* (* (/ t l) (* (* t (* (/ 1.0 l) t_1)) (tan k))) (+ 2.0 t_2)))
(if (<= t 9.208186249841077e-142)
(/
2.0
(*
(/ (pow (sin k) 2.0) (* l l))
(+ (/ (* t (* k k)) (cos k)) (* 2.0 (/ (pow t 3.0) (cos k))))))
(/ -2.0 (* (* (/ t l) (* (/ t l) t_1)) (* (tan k) (- -2.0 t_2))))))))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 = t * sin(k);
double t_2 = pow((k / t), 2.0);
double tmp;
if (t <= -1.3838094519414564e-52) {
tmp = 2.0 / (((t / l) * ((t * ((1.0 / l) * t_1)) * tan(k))) * (2.0 + t_2));
} else if (t <= 9.208186249841077e-142) {
tmp = 2.0 / ((pow(sin(k), 2.0) / (l * l)) * (((t * (k * k)) / cos(k)) + (2.0 * (pow(t, 3.0) / cos(k)))));
} else {
tmp = -2.0 / (((t / l) * ((t / l) * t_1)) * (tan(k) * (-2.0 - t_2)));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -1.3838094519414564e-52Initial program 22.6
Simplified22.6
rmApplied cube-mult_binary6422.6
Applied times-frac_binary6416.4
Applied associate-*l*_binary6414.1
Simplified14.1
rmApplied *-un-lft-identity_binary6414.1
Applied times-frac_binary648.7
Applied associate-*r*_binary647.7
Simplified7.7
rmApplied associate-*l*_binary645.1
Simplified5.1
rmApplied div-inv_binary645.1
Applied associate-*l*_binary645.1
if -1.3838094519414564e-52 < t < 9.2081862498410771e-142Initial program 58.5
Simplified58.5
Taylor expanded around 0 38.2
Simplified24.9
if 9.2081862498410771e-142 < t Initial program 24.7
Simplified24.7
rmApplied cube-mult_binary6424.7
Applied times-frac_binary6417.5
Applied associate-*l*_binary6415.5
Simplified15.5
rmApplied *-un-lft-identity_binary6415.5
Applied times-frac_binary6410.9
Applied associate-*r*_binary649.9
Simplified9.9
rmApplied frac-2neg_binary649.9
Simplified9.9
Simplified9.9
Final simplification11.8
herbie shell --seed 2021202
(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))))