\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 := \frac{{t}^{1.5}}{\ell}\\
\mathbf{if}\;\ell \cdot \ell \leq 3.262102074554716 \cdot 10^{+303}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\left(\ell \cdot \ell\right) \cdot \frac{\cos k}{k}}{t \cdot {\sin k}^{2}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(t_1 \cdot \left(\sin k \cdot t_1\right)\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 (/ (pow t 1.5) l)))
(if (<= (* l l) 3.262102074554716e+303)
(/ 2.0 (/ k (/ (* (* l l) (/ (cos k) k)) (* t (pow (sin k) 2.0)))))
(/ 2.0 (* (* (* t_1 (* (sin k) t_1)) (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 = pow(t, 1.5) / l;
double tmp;
if ((l * l) <= 3.262102074554716e+303) {
tmp = 2.0 / (k / (((l * l) * (cos(k) / k)) / (t * pow(sin(k), 2.0))));
} else {
tmp = 2.0 / (((t_1 * (sin(k) * t_1)) * 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) < 3.26210207455471629e303Initial program 45.5
Simplified36.3
Taylor expanded in t around 0 15.5
Applied unpow2_binary6415.5
Applied associate-*l*_binary6413.1
Applied associate-/l*_binary6410.6
Applied associate-/r*_binary6410.1
Simplified10.1
if 3.26210207455471629e303 < (*.f64 l l) Initial program 63.8
Simplified63.8
Applied sqr-pow_binary6463.9
Applied times-frac_binary6453.8
Applied associate-*l*_binary6453.8
Simplified53.8
Final simplification16.8
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))))