\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}
\mathbf{if}\;t \leq -1.343344005601436 \cdot 10^{-68}:\\
\;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\\
\mathbf{elif}\;t \leq -1.9880298207529304 \cdot 10^{-177}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\cos k} \cdot \left(\frac{t \cdot \left(k \cdot k\right)}{\ell \cdot \ell} + 2 \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)}\\
\mathbf{elif}\;t \leq -2.335793423968273 \cdot 10^{-188}:\\
\;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\tan k \cdot \left(\left(\frac{t}{\ell} \cdot \sin k\right) \cdot \left(t \cdot \frac{t}{\ell}\right)\right)\right)}\\
\mathbf{elif}\;t \leq 6.055902006289046 \cdot 10^{-126}:\\
\;\;\;\;0\\
\mathbf{elif}\;t \leq 2.6878191797578578 \cdot 10^{-17}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\cos k} \cdot \left(\frac{t \cdot \left(k \cdot k\right)}{\ell \cdot \ell} + 2 \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\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
(if (<= t -1.343344005601436e-68)
(/
2.0
(*
(* (* t (* (/ t l) (sin k))) (* (/ t l) (tan k)))
(+ 2.0 (pow (/ k t) 2.0))))
(if (<= t -1.9880298207529304e-177)
(/
2.0
(*
(/ (pow (sin k) 2.0) (cos k))
(+ (/ (* t (* k k)) (* l l)) (* 2.0 (/ (pow t 3.0) (* l l))))))
(if (<= t -2.335793423968273e-188)
(/
2.0
(*
(+ 2.0 (pow (/ k t) 2.0))
(* (tan k) (* (* (/ t l) (sin k)) (* t (/ t l))))))
(if (<= t 6.055902006289046e-126)
0.0
(if (<= t 2.6878191797578578e-17)
(/
2.0
(*
(/ (pow (sin k) 2.0) (cos k))
(+ (/ (* t (* k k)) (* l l)) (* 2.0 (/ (pow t 3.0) (* l l))))))
(/
2.0
(*
(* (* t (* (/ t l) (sin k))) (* (/ t l) (tan k)))
(+ 2.0 (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 tmp;
if (t <= -1.343344005601436e-68) {
tmp = 2.0 / (((t * ((t / l) * sin(k))) * ((t / l) * tan(k))) * (2.0 + pow((k / t), 2.0)));
} else if (t <= -1.9880298207529304e-177) {
tmp = 2.0 / ((pow(sin(k), 2.0) / cos(k)) * (((t * (k * k)) / (l * l)) + (2.0 * (pow(t, 3.0) / (l * l)))));
} else if (t <= -2.335793423968273e-188) {
tmp = 2.0 / ((2.0 + pow((k / t), 2.0)) * (tan(k) * (((t / l) * sin(k)) * (t * (t / l)))));
} else if (t <= 6.055902006289046e-126) {
tmp = 0.0;
} else if (t <= 2.6878191797578578e-17) {
tmp = 2.0 / ((pow(sin(k), 2.0) / cos(k)) * (((t * (k * k)) / (l * l)) + (2.0 * (pow(t, 3.0) / (l * l)))));
} else {
tmp = 2.0 / (((t * ((t / l) * sin(k))) * ((t / l) * tan(k))) * (2.0 + pow((k / t), 2.0)));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -1.343344005601436e-68 or 2.68781917975785784e-17 < t Initial program 23.0
Simplified23.0
rmApplied unpow3_binary64_48523.0
Applied times-frac_binary64_42516.4
Applied associate-*l*_binary64_36014.0
Simplified14.0
rmApplied *-un-lft-identity_binary64_41914.0
Applied times-frac_binary64_4258.8
Simplified8.8
rmApplied associate-*r*_binary64_3598.8
Simplified7.5
rmApplied associate-*l*_binary64_3604.2
if -1.343344005601436e-68 < t < -1.98802982075293044e-177 or 6.0559020062890462e-126 < t < 2.68781917975785784e-17Initial program 40.4
Simplified40.4
Taylor expanded around inf 29.0
Simplified26.8
if -1.98802982075293044e-177 < t < -2.33579342396827289e-188Initial program 64.0
Simplified64.0
rmApplied unpow3_binary64_48564.0
Applied times-frac_binary64_42564.0
Applied associate-*l*_binary64_36064.0
Simplified64.0
rmApplied *-un-lft-identity_binary64_41964.0
Applied times-frac_binary64_42533.3
Simplified33.3
if -2.33579342396827289e-188 < t < 6.0559020062890462e-126Initial program 64.0
Simplified64.0
rmApplied unpow3_binary64_48564.0
Applied times-frac_binary64_42560.4
Applied associate-*l*_binary64_36060.4
Simplified60.4
rmApplied *-un-lft-identity_binary64_41960.4
Applied times-frac_binary64_42550.9
Simplified50.9
rmApplied associate-*r*_binary64_35950.9
Simplified50.9
Taylor expanded around inf 42.4
Final simplification13.8
herbie shell --seed 2020308
(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))))