\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 -3.0717970846058635 \cdot 10^{-240}:\\
\;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(t \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right)\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}\\
\mathbf{elif}\;t \leq 1.8975220742021813 \cdot 10^{-115}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\cos k} \cdot \left(\frac{t \cdot \left(k \cdot k\right)}{\ell \cdot \ell} + 2 \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \left(\left(\frac{t}{\ell} \cdot \left(\left(t \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right) \cdot \tan k\right)\right) \cdot \sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}\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
(if (<= t -3.0717970846058635e-240)
(/
2.0
(*
(* (/ t l) (* t (* (/ t l) (sin k))))
(* (tan k) (+ 2.0 (pow (/ k t) 2.0)))))
(if (<= t 1.8975220742021813e-115)
(/
2.0
(*
(/ (pow (sin k) 2.0) (cos k))
(+ (/ (* t (* k k)) (* l l)) (* 2.0 (/ (pow t 3.0) (* l l))))))
(/
2.0
(*
(sqrt (+ 2.0 (pow (/ k t) 2.0)))
(*
(* (/ t l) (* (* t (* (/ t l) (sin k))) (tan k)))
(sqrt (+ 2.0 (pow (/ k t) 2.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 <= -3.0717970846058635e-240) {
tmp = 2.0 / (((t / l) * (t * ((t / l) * sin(k)))) * (tan(k) * (2.0 + pow((k / t), 2.0))));
} else if (t <= 1.8975220742021813e-115) {
tmp = 2.0 / ((pow(sin(k), 2.0) / cos(k)) * (((t * (k * k)) / (l * l)) + (2.0 * (pow(t, 3.0) / (l * l)))));
} else {
tmp = 2.0 / (sqrt(2.0 + pow((k / t), 2.0)) * (((t / l) * ((t * ((t / l) * sin(k))) * tan(k))) * sqrt(2.0 + pow((k / t), 2.0))));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -3.0717970846058635e-240Initial program 29.7
Simplified29.7
rmApplied cube-mult_binary64_44129.7
Applied times-frac_binary64_42021.9
Applied associate-*l*_binary64_35720.0
rmApplied *-un-lft-identity_binary64_41420.0
Applied times-frac_binary64_42014.1
Applied associate-*l*_binary64_35713.3
rmApplied associate-*l*_binary64_35713.1
if -3.0717970846058635e-240 < t < 1.8975220742021813e-115Initial program 64.0
Simplified64.0
Taylor expanded around inf 40.9
Simplified40.1
if 1.8975220742021813e-115 < t Initial program 24.2
Simplified24.2
rmApplied cube-mult_binary64_44124.2
Applied times-frac_binary64_42017.4
Applied associate-*l*_binary64_35715.0
rmApplied *-un-lft-identity_binary64_41415.0
Applied times-frac_binary64_42010.4
Applied associate-*l*_binary64_3579.0
rmApplied associate-*l*_binary64_3577.2
Simplified7.2
rmApplied add-sqr-sqrt_binary64_4357.4
Applied associate-*r*_binary64_3567.3
Final simplification14.5
herbie shell --seed 2020288
(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))))