\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 \cdot \tan k}\\
t_2 := \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
\mathbf{if}\;\ell \leq -4.478607638891889 \cdot 10^{+152}:\\
\;\;\;\;\frac{2}{{\left(t_2 \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k}\right)\right)}^{2} \cdot \left(\frac{\frac{t \cdot t_1}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}} \cdot {\left(\frac{k}{t}\right)}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := {\sin k}^{2}\\
t_4 := \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot t_3\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{if}\;\ell \leq -1.0913728313287718 \cdot 10^{-156}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;\ell \leq -1.4584328222929 \cdot 10^{-310}:\\
\;\;\;\;\frac{2}{{\left(t_2 \cdot t_1\right)}^{2} \cdot \left(\left(\sqrt[3]{\frac{t_3}{\cos k}} \cdot {\left(\frac{-1}{\ell}\right)}^{0.6666666666666666}\right) \cdot \frac{k \cdot k}{t \cdot {\left(\sqrt[3]{-1}\right)}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_5 := \left(t_1 \cdot \frac{t}{{\ell}^{0.6666666666666666}}\right) \cdot {\left(\sqrt[3]{\frac{k}{t}}\right)}^{2}\\
\mathbf{if}\;\ell \leq 2.570052205725406 \cdot 10^{-142}:\\
\;\;\;\;\frac{2}{t_5 \cdot {t_5}^{2}}\\
\mathbf{elif}\;\ell \leq 2.309802372999623 \cdot 10^{+92}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{t_5}^{3}}\\
\end{array}\\
\end{array}\\
\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) (tan k)))) (t_2 (/ t (pow (cbrt l) 2.0))))
(if (<= l -4.478607638891889e+152)
(/
2.0
(*
(pow (* t_2 (* (cbrt (sin k)) (cbrt (tan k)))) 2.0)
(* (/ (/ (* t t_1) (cbrt l)) (cbrt l)) (pow (/ k t) 2.0))))
(let* ((t_3 (pow (sin k) 2.0))
(t_4
(/ 2.0 (/ (* (pow k 2.0) (* t t_3)) (* (cos k) (pow l 2.0))))))
(if (<= l -1.0913728313287718e-156)
t_4
(if (<= l -1.4584328222929e-310)
(/
2.0
(*
(pow (* t_2 t_1) 2.0)
(*
(* (cbrt (/ t_3 (cos k))) (pow (/ -1.0 l) 0.6666666666666666))
(/ (* k k) (* t (pow (cbrt -1.0) 2.0))))))
(let* ((t_5
(*
(* t_1 (/ t (pow l 0.6666666666666666)))
(pow (cbrt (/ k t)) 2.0))))
(if (<= l 2.570052205725406e-142)
(/ 2.0 (* t_5 (pow t_5 2.0)))
(if (<= l 2.309802372999623e+92)
t_4
(/ 2.0 (pow t_5 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) * tan(k));
double t_2 = t / pow(cbrt(l), 2.0);
double tmp;
if (l <= -4.478607638891889e+152) {
tmp = 2.0 / (pow((t_2 * (cbrt(sin(k)) * cbrt(tan(k)))), 2.0) * ((((t * t_1) / cbrt(l)) / cbrt(l)) * pow((k / t), 2.0)));
} else {
double t_3 = pow(sin(k), 2.0);
double t_4 = 2.0 / ((pow(k, 2.0) * (t * t_3)) / (cos(k) * pow(l, 2.0)));
double tmp_1;
if (l <= -1.0913728313287718e-156) {
tmp_1 = t_4;
} else if (l <= -1.4584328222929e-310) {
tmp_1 = 2.0 / (pow((t_2 * t_1), 2.0) * ((cbrt(t_3 / cos(k)) * pow((-1.0 / l), 0.6666666666666666)) * ((k * k) / (t * pow(cbrt(-1.0), 2.0)))));
} else {
double t_5 = (t_1 * (t / pow(l, 0.6666666666666666))) * pow(cbrt(k / t), 2.0);
double tmp_2;
if (l <= 2.570052205725406e-142) {
tmp_2 = 2.0 / (t_5 * pow(t_5, 2.0));
} else if (l <= 2.309802372999623e+92) {
tmp_2 = t_4;
} else {
tmp_2 = 2.0 / pow(t_5, 3.0);
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if l < -4.4786076388918893e152Initial program 63.7
Simplified63.7
Applied egg36.0
Applied egg36.1
Applied egg36.1
if -4.4786076388918893e152 < l < -1.0913728313287718e-156 or 2.570052205725406e-142 < l < 2.30980237299962287e92Initial program 44.7
Simplified34.9
Taylor expanded in t around 0 11.8
if -1.0913728313287718e-156 < l < -1.45843282229288e-310Initial program 45.1
Simplified36.6
Applied egg17.7
Taylor expanded in l around -inf 31.3
Simplified13.1
if -1.45843282229288e-310 < l < 2.570052205725406e-142Initial program 47.0
Simplified37.5
Applied egg20.3
Applied egg11.2
if 2.30980237299962287e92 < l Initial program 59.7
Simplified57.6
Applied egg34.4
Applied egg19.6
Final simplification14.6
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))))