\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 -1.0005272868091162 \cdot 10^{-84} \lor \neg \left(t \leq -1.2330902422552477 \cdot 10^{-113}\right):\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{\frac{k}{\ell}} \cdot \cos k}{k \cdot \left(t \cdot {\sin k}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(\sin k \cdot \frac{t \cdot t}{\ell}\right)\right) \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}}\\
\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 (or (<= t -1.0005272868091162e-84) (not (<= t -1.2330902422552477e-113)))
(* 2.0 (/ (* (/ l (/ k l)) (cos k)) (* k (* t (pow (sin k) 2.0)))))
(/
2.0
(* (* (* (/ t l) (* (sin k) (/ (* t t) l))) (tan k)) (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 <= -1.0005272868091162e-84) || !(t <= -1.2330902422552477e-113)) {
tmp = 2.0 * (((l / (k / l)) * cos(k)) / (k * (t * pow(sin(k), 2.0))));
} else {
tmp = 2.0 / ((((t / l) * (sin(k) * ((t * t) / l))) * tan(k)) * pow((k / t), 2.0));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -1.00052728680911615e-84 or -1.2330902422552477e-113 < t Initial program 47.8
Simplified40.1
Taylor expanded around inf 22.1
Simplified22.1
rmApplied associate-*l*_binary64_36020.0
rmApplied associate-/r*_binary64_36317.8
Simplified17.8
rmApplied associate-/l*_binary64_36413.0
if -1.00052728680911615e-84 < t < -1.2330902422552477e-113Initial program 43.1
Simplified43.0
rmApplied cube-mult_binary64_44943.0
Applied times-frac_binary64_42527.9
Applied associate-*l*_binary64_36027.5
Simplified27.5
Final simplification13.3
herbie shell --seed 2020342
(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))))