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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -2.29176800939263592e-57Initial program 23.2
Simplified23.2
Applied egg-rr8.2
Applied egg-rr8.2
if -2.29176800939263592e-57 < t < 1.4741695502041248e-108Initial program 59.2
Simplified59.2
Taylor expanded in t around 0 38.0
Simplified25.2
if 1.4741695502041248e-108 < t Initial program 24.3
Simplified24.3
Applied egg-rr9.7
Applied egg-rr9.7
Final simplification13.0
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))))