\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}\;k \leq -2.1807370113174654 \cdot 10^{+141}:\\
\;\;\;\;\frac{2}{\left(\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\sin k \cdot \left(t \cdot \left(\sin k \cdot \frac{t}{\ell}\right)\right)\right)\right) \cdot \frac{1}{\cos k \cdot \frac{\ell}{t}}}\\
\mathbf{elif}\;k \leq -3.568572040991893 \cdot 10^{-152}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot \left(t \cdot \left(\frac{t}{\ell} \cdot {\sin k}^{2}\right)\right) + \frac{{\sin k}^{2} \cdot \left(k \cdot k\right)}{\ell}}{\cos k \cdot \frac{\ell}{t}}}\\
\mathbf{elif}\;k \leq 5.138813199555828 \cdot 10^{-131}:\\
\;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\left(t \cdot \left(\frac{t}{\ell} \cdot \left(\sin k \cdot \frac{t}{\ell}\right)\right)\right) \cdot \tan k\right)}\\
\mathbf{elif}\;k \leq 5.388805501647768 \cdot 10^{+143}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot \left(t \cdot \left(\frac{t}{\ell} \cdot {\sin k}^{2}\right)\right) + \frac{{\sin k}^{2} \cdot \left(k \cdot k\right)}{\ell}}{\cos k \cdot \frac{\ell}{t}}}\\
\mathbf{elif}\;k \leq 7.433691841824543 \cdot 10^{+192}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\cos k} \cdot \left(\frac{k \cdot \left(k \cdot t\right)}{\ell \cdot \ell} + 2 \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\sin k \cdot \left(t \cdot \left(\sin k \cdot \frac{t}{\ell}\right)\right)\right)\right) \cdot \frac{1}{\cos k \cdot \frac{\ell}{t}}}\\
\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 (<= k -2.1807370113174654e+141)
(/
2.0
(*
(* (+ 2.0 (pow (/ k t) 2.0)) (* (sin k) (* t (* (sin k) (/ t l)))))
(/ 1.0 (* (cos k) (/ l t)))))
(if (<= k -3.568572040991893e-152)
(/
2.0
(/
(+
(* 2.0 (* t (* (/ t l) (pow (sin k) 2.0))))
(/ (* (pow (sin k) 2.0) (* k k)) l))
(* (cos k) (/ l t))))
(if (<= k 5.138813199555828e-131)
(/
2.0
(*
(+ 2.0 (pow (/ k t) 2.0))
(* (* t (* (/ t l) (* (sin k) (/ t l)))) (tan k))))
(if (<= k 5.388805501647768e+143)
(/
2.0
(/
(+
(* 2.0 (* t (* (/ t l) (pow (sin k) 2.0))))
(/ (* (pow (sin k) 2.0) (* k k)) l))
(* (cos k) (/ l t))))
(if (<= k 7.433691841824543e+192)
(/
2.0
(*
(/ (pow (sin k) 2.0) (cos k))
(+ (/ (* k (* k t)) (* l l)) (* 2.0 (/ (pow t 3.0) (* l l))))))
(/
2.0
(*
(*
(+ 2.0 (pow (/ k t) 2.0))
(* (sin k) (* t (* (sin k) (/ t l)))))
(/ 1.0 (* (cos k) (/ l t)))))))))))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 (k <= -2.1807370113174654e+141) {
tmp = 2.0 / (((2.0 + pow((k / t), 2.0)) * (sin(k) * (t * (sin(k) * (t / l))))) * (1.0 / (cos(k) * (l / t))));
} else if (k <= -3.568572040991893e-152) {
tmp = 2.0 / (((2.0 * (t * ((t / l) * pow(sin(k), 2.0)))) + ((pow(sin(k), 2.0) * (k * k)) / l)) / (cos(k) * (l / t)));
} else if (k <= 5.138813199555828e-131) {
tmp = 2.0 / ((2.0 + pow((k / t), 2.0)) * ((t * ((t / l) * (sin(k) * (t / l)))) * tan(k)));
} else if (k <= 5.388805501647768e+143) {
tmp = 2.0 / (((2.0 * (t * ((t / l) * pow(sin(k), 2.0)))) + ((pow(sin(k), 2.0) * (k * k)) / l)) / (cos(k) * (l / t)));
} else if (k <= 7.433691841824543e+192) {
tmp = 2.0 / ((pow(sin(k), 2.0) / cos(k)) * (((k * (k * t)) / (l * l)) + (2.0 * (pow(t, 3.0) / (l * l)))));
} else {
tmp = 2.0 / (((2.0 + pow((k / t), 2.0)) * (sin(k) * (t * (sin(k) * (t / l))))) * (1.0 / (cos(k) * (l / t))));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if k < -2.1807370113174654e141 or 7.43369184182454322e192 < k Initial program 33.7
Simplified33.7
rmApplied unpow3_binary6433.7
Applied times-frac_binary6427.0
Applied associate-*l*_binary6427.0
rmApplied associate-/l*_binary6421.7
rmApplied tan-quot_binary6421.7
Applied associate-*l/_binary6421.7
Applied frac-times_binary6421.7
Applied associate-*l/_binary6420.0
Simplified20.0
rmApplied div-inv_binary6420.0
Simplified20.0
if -2.1807370113174654e141 < k < -3.5685720409918931e-152 or 5.13881319955582764e-131 < k < 5.38880550164776784e143Initial program 30.3
Simplified30.3
rmApplied unpow3_binary6430.3
Applied times-frac_binary6422.1
Applied associate-*l*_binary6421.3
rmApplied associate-/l*_binary6414.6
rmApplied tan-quot_binary6414.6
Applied associate-*l/_binary6414.4
Applied frac-times_binary6413.5
Applied associate-*l/_binary6411.7
Simplified11.7
Taylor expanded around inf 9.9
Simplified3.9
if -3.5685720409918931e-152 < k < 5.13881319955582764e-131Initial program 38.3
Simplified38.3
rmApplied unpow3_binary6438.3
Applied times-frac_binary6433.8
Applied associate-*l*_binary6424.1
rmApplied associate-/l*_binary6418.1
rmApplied div-inv_binary6418.2
Applied associate-*l*_binary6413.5
Simplified13.5
if 5.38880550164776784e143 < k < 7.43369184182454322e192Initial program 31.2
Simplified31.2
rmApplied unpow3_binary6431.2
Applied times-frac_binary6424.1
Applied associate-*l*_binary6424.1
rmApplied associate-/l*_binary6418.5
rmApplied tan-quot_binary6418.5
Applied associate-*l/_binary6418.5
Applied frac-times_binary6418.5
Applied associate-*l/_binary6416.5
Simplified16.5
Taylor expanded around inf 30.0
Simplified22.4
Final simplification11.3
herbie shell --seed 2020253
(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))))