\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 := {\sin k}^{2}\\
t_2 := 2 \cdot \left(\frac{\ell}{k} \cdot \frac{\frac{\cos k}{t \cdot t_1}}{\frac{k}{\ell}}\right)\\
\mathbf{if}\;\ell \leq -4.3414506604533326 \cdot 10^{-181}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\ell \leq 1.2720644458459743 \cdot 10^{-243}:\\
\;\;\;\;\frac{2}{\frac{t \cdot \frac{k \cdot k}{\ell}}{\ell \cdot \frac{\cos k}{t_1}}}\\
\mathbf{else}:\\
\;\;\;\;t_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
(let* ((t_1 (pow (sin k) 2.0))
(t_2 (* 2.0 (* (/ l k) (/ (/ (cos k) (* t t_1)) (/ k l))))))
(if (<= l -4.3414506604533326e-181)
t_2
(if (<= l 1.2720644458459743e-243)
(/ 2.0 (/ (* t (/ (* k k) l)) (* l (/ (cos k) t_1))))
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 = pow(sin(k), 2.0);
double t_2 = 2.0 * ((l / k) * ((cos(k) / (t * t_1)) / (k / l)));
double tmp;
if (l <= -4.3414506604533326e-181) {
tmp = t_2;
} else if (l <= 1.2720644458459743e-243) {
tmp = 2.0 / ((t * ((k * k) / l)) / (l * (cos(k) / t_1)));
} else {
tmp = t_2;
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if l < -4.3414506604533326e-181 or 1.2720644458459743e-243 < l Initial program 49.0
Simplified41.3
Taylor expanded in t around 0 24.0
Applied egg-rr22.8
Applied egg-rr8.1
Applied egg-rr2.1
if -4.3414506604533326e-181 < l < 1.2720644458459743e-243Initial program 45.9
Simplified37.8
Taylor expanded in t around 0 19.1
Applied egg-rr18.9
Applied egg-rr6.8
Final simplification3.2
herbie shell --seed 2022125
(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))))