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



Bits error versus t



Bits error versus l



Bits error versus k
Results
if (*.f64 l l) < 9.2500109144054447e203Initial program 44.8
Simplified35.3
Taylor expanded in t around 0 14.4
Applied egg-rr13.1
Applied egg-rr10.6
if 9.2500109144054447e203 < (*.f64 l l) < 1.0427932792743221e305Initial program 47.7
Simplified41.9
Taylor expanded in t around 0 28.0
Applied egg-rr33.6
if 1.0427932792743221e305 < (*.f64 l l) Initial program 63.8
Simplified63.8
Applied egg-rr39.0
Final simplification16.5
herbie shell --seed 2022130
(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))))