\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 := \sqrt[3]{\sin k}\\
t_2 := \left(\frac{t}{\sqrt[3]{\ell}} \cdot \frac{t_1}{\sqrt[3]{\ell}}\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\\
\mathbf{if}\;t \leq -1.2869095709499647 \cdot 10^{-59}:\\
\;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot t_1\right)}^{2} \cdot t_2}\\
\mathbf{elif}\;t \leq 1.6537578212974721 \cdot 10^{-108}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\ell \cdot \ell} \cdot \left(\frac{t \cdot \left(k \cdot k\right)}{\cos k} + 2 \cdot \frac{{t}^{3}}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_2 \cdot {\left(\frac{\frac{t \cdot t_1}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\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
(let* ((t_1 (cbrt (sin k)))
(t_2
(*
(* (/ t (cbrt l)) (/ t_1 (cbrt l)))
(* (tan k) (+ 2.0 (pow (/ k t) 2.0))))))
(if (<= t -1.2869095709499647e-59)
(/ 2.0 (* (pow (* (/ t (pow (cbrt l) 2.0)) t_1) 2.0) t_2))
(if (<= t 1.6537578212974721e-108)
(/
2.0
(*
(/ (pow (sin k) 2.0) (* l l))
(+ (/ (* t (* k k)) (cos k)) (* 2.0 (/ (pow t 3.0) (cos k))))))
(/ 2.0 (* t_2 (pow (/ (/ (* t t_1) (cbrt l)) (cbrt l)) 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 t_1 = cbrt(sin(k));
double t_2 = ((t / cbrt(l)) * (t_1 / cbrt(l))) * (tan(k) * (2.0 + pow((k / t), 2.0)));
double tmp;
if (t <= -1.2869095709499647e-59) {
tmp = 2.0 / (pow(((t / pow(cbrt(l), 2.0)) * t_1), 2.0) * t_2);
} else if (t <= 1.6537578212974721e-108) {
tmp = 2.0 / ((pow(sin(k), 2.0) / (l * l)) * (((t * (k * k)) / cos(k)) + (2.0 * (pow(t, 3.0) / cos(k)))));
} else {
tmp = 2.0 / (t_2 * pow((((t * t_1) / cbrt(l)) / cbrt(l)), 2.0));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -1.28690957094996471e-59Initial program 23.2
Simplified23.2
Applied egg4.9
Applied egg4.9
if -1.28690957094996471e-59 < t < 1.6537578212974721e-108Initial program 59.3
Simplified59.3
Applied egg35.4
Applied egg35.4
Taylor expanded in t around 0 38.0
Simplified25.2
if 1.6537578212974721e-108 < t Initial program 24.3
Simplified24.3
Applied egg6.0
Applied egg6.0
Applied egg6.0
Final simplification10.4
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))))