\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}\;\ell \cdot \ell \leq 5.571154850637776 \cdot 10^{-290}:\\
\;\;\;\;\frac{2}{\frac{\frac{1}{\ell} \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right)}{\cos k}}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2.99273882252485 \cdot 10^{+306}:\\
\;\;\;\;\frac{2}{\frac{\frac{k}{\ell \cdot \ell} \cdot \left(k \cdot \left(\sin k \cdot \left(t \cdot \sin k\right)\right)\right)}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{\sqrt[3]{k} \cdot \sqrt[3]{k}}{\ell} \cdot \left(\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right) \cdot \frac{\sqrt[3]{k}}{\ell}\right)}{\cos k}}\\
\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 (<= (* l l) 5.571154850637776e-290)
(/ 2.0 (/ (* (/ 1.0 l) (* (/ k l) (* k (* t (pow (sin k) 2.0))))) (cos k)))
(if (<= (* l l) 2.99273882252485e+306)
(/ 2.0 (/ (* (/ k (* l l)) (* k (* (sin k) (* t (sin k))))) (cos k)))
(/
2.0
(/
(*
(/ (* (cbrt k) (cbrt k)) l)
(* (* k (* t (pow (sin k) 2.0))) (/ (cbrt k) l)))
(cos k))))))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 ((l * l) <= 5.571154850637776e-290) {
tmp = 2.0 / (((1.0 / l) * ((k / l) * (k * (t * pow(sin(k), 2.0))))) / cos(k));
} else if ((l * l) <= 2.99273882252485e+306) {
tmp = 2.0 / (((k / (l * l)) * (k * (sin(k) * (t * sin(k))))) / cos(k));
} else {
tmp = 2.0 / ((((cbrt(k) * cbrt(k)) / l) * ((k * (t * pow(sin(k), 2.0))) * (cbrt(k) / l))) / cos(k));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (*.f64 l l) < 5.5711548506377763e-290Initial program 46.5
Simplified37.5
Taylor expanded around 0 20.0
Simplified20.0
rmApplied associate-*l*_binary64_36020.0
rmApplied associate-/r*_binary64_36320.0
Simplified19.8
rmApplied *-un-lft-identity_binary64_41919.8
Applied times-frac_binary64_42518.1
Applied associate-*l*_binary64_36012.3
if 5.5711548506377763e-290 < (*.f64 l l) < 2.9927388225248498e306Initial program 44.7
Simplified36.0
Taylor expanded around 0 13.2
Simplified13.2
rmApplied associate-*l*_binary64_3608.8
rmApplied associate-/r*_binary64_3638.8
Simplified4.3
rmApplied unpow2_binary64_4844.3
Applied associate-*r*_binary64_3594.0
if 2.9927388225248498e306 < (*.f64 l l) Initial program 63.9
Simplified63.9
Taylor expanded around 0 63.8
Simplified63.8
rmApplied associate-*l*_binary64_36063.8
rmApplied associate-/r*_binary64_36363.8
Simplified63.6
rmApplied add-cube-cbrt_binary64_45463.6
Applied times-frac_binary64_42533.7
Applied associate-*l*_binary64_36019.0
Final simplification9.3
herbie shell --seed 2021058
(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))))