\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 -2.3324698848381964 \cdot 10^{-116}:\\
\;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(\left(t \cdot \frac{t \cdot \sin k}{\ell}\right) \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\\
\mathbf{elif}\;t \leq -4.046647252992428 \cdot 10^{-173}:\\
\;\;\;\;\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{elif}\;t \leq 1.3971187596612693 \cdot 10^{-190}:\\
\;\;\;\;0\\
\mathbf{elif}\;t \leq 2.7205590739503542 \cdot 10^{-92}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} + 2 \cdot \frac{{t}^{3}}{\frac{\ell \cdot \ell}{\frac{{\sin k}^{2}}{\cos k}}}}\\
\mathbf{elif}\;t \leq 3.348442255735602 \cdot 10^{+86}:\\
\;\;\;\;2 \cdot \left(\frac{\frac{1}{\frac{{t}^{3}}{\frac{\ell}{\sin k}}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(\left(t \cdot \frac{t \cdot \sin k}{\ell}\right) \cdot \tan k\right)\right) \cdot \left(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 -2.3324698848381964e-116)
(/
2.0
(*
(* (/ t l) (* (* t (/ (* t (sin k)) l)) (tan k)))
(+ 2.0 (pow (/ k t) 2.0))))
(if (<= t -4.046647252992428e-173)
(/
2.0
(*
(/ (pow (sin k) 2.0) (cos k))
(+ (/ (* t (* k k)) (* l l)) (* 2.0 (/ (pow t 3.0) (* l l))))))
(if (<= t 1.3971187596612693e-190)
0.0
(if (<= t 2.7205590739503542e-92)
(/
2.0
(+
(/ (* (* k k) (* t (pow (sin k) 2.0))) (* (cos k) (* l l)))
(* 2.0 (/ (pow t 3.0) (/ (* l l) (/ (pow (sin k) 2.0) (cos k)))))))
(if (<= t 3.348442255735602e+86)
(*
2.0
(*
(/ (/ 1.0 (/ (pow t 3.0) (/ l (sin k)))) (tan k))
(/ l (+ 2.0 (pow (/ k t) 2.0)))))
(/
2.0
(*
(* (/ t l) (* (* t (/ (* t (sin k)) l)) (tan k)))
(+ 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 <= -2.3324698848381964e-116) {
tmp = 2.0 / (((t / l) * ((t * ((t * sin(k)) / l)) * tan(k))) * (2.0 + pow((k / t), 2.0)));
} else if (t <= -4.046647252992428e-173) {
tmp = 2.0 / ((pow(sin(k), 2.0) / cos(k)) * (((t * (k * k)) / (l * l)) + (2.0 * (pow(t, 3.0) / (l * l)))));
} else if (t <= 1.3971187596612693e-190) {
tmp = 0.0;
} else if (t <= 2.7205590739503542e-92) {
tmp = 2.0 / ((((k * k) * (t * pow(sin(k), 2.0))) / (cos(k) * (l * l))) + (2.0 * (pow(t, 3.0) / ((l * l) / (pow(sin(k), 2.0) / cos(k))))));
} else if (t <= 3.348442255735602e+86) {
tmp = 2.0 * (((1.0 / (pow(t, 3.0) / (l / sin(k)))) / tan(k)) * (l / (2.0 + pow((k / t), 2.0))));
} else {
tmp = 2.0 / (((t / l) * ((t * ((t * sin(k)) / l)) * tan(k))) * (2.0 + pow((k / t), 2.0)));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -2.3324698848381964e-116 or 3.34844225573560198e86 < t Initial program 23.9
Simplified23.9
rmApplied cube-mult_binary64_45323.9
Applied times-frac_binary64_42916.6
Applied associate-*l*_binary64_36414.7
rmApplied *-un-lft-identity_binary64_42314.7
Applied times-frac_binary64_4299.0
Applied associate-*l*_binary64_3647.5
rmApplied associate-*l*_binary64_3645.4
Simplified5.4
rmApplied associate-*l/_binary64_3665.4
if -2.3324698848381964e-116 < t < -4.04664725299242832e-173Initial program 64.0
Simplified64.0
Taylor expanded around inf 36.9
Simplified35.9
if -4.04664725299242832e-173 < t < 1.3971187596612693e-190Initial program 64.0
Simplified64.0
rmApplied cube-mult_binary64_45364.0
Applied times-frac_binary64_42964.0
Applied associate-*l*_binary64_36464.0
rmApplied *-un-lft-identity_binary64_42364.0
Applied times-frac_binary64_42953.4
Applied associate-*l*_binary64_36453.4
Taylor expanded around inf 42.7
if 1.3971187596612693e-190 < t < 2.7205590739503542e-92Initial program 58.1
Simplified58.1
rmApplied cube-mult_binary64_45358.1
Applied times-frac_binary64_42940.2
Applied associate-*l*_binary64_36440.1
rmApplied *-un-lft-identity_binary64_42340.1
Applied times-frac_binary64_42933.1
Applied associate-*l*_binary64_36433.1
Taylor expanded around inf 36.3
Simplified35.8
if 2.7205590739503542e-92 < t < 3.34844225573560198e86Initial program 22.8
Simplified22.8
rmApplied cube-mult_binary64_45322.8
Applied times-frac_binary64_42919.4
Applied associate-*l*_binary64_36414.8
rmApplied *-un-lft-identity_binary64_42314.8
Applied times-frac_binary64_42914.8
Applied associate-*l*_binary64_36414.7
rmApplied div-inv_binary64_42014.7
Simplified12.9
Final simplification14.3
herbie shell --seed 2020292
(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))))