(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 (sin k) 2.0))
(t_2 (* t t_1))
(t_3 (* 0.0 t_2))
(t_4 (- t_3))
(t_5 (fma 0.0 t_2 t_3))
(t_6 (/ k (* (cos k) (* l l)))))
(if (<= l -3.0320863962966904e+184)
(/ 2.0 (/ t_2 (/ 1.0 (pow (/ k (* l (sqrt (cos k)))) 2.0))))
(if (<= l -3.9559806813423186e-156)
(/
2.0
(+
(fma
k
(*
t_6
(+ (fma (sin k) (* (sin k) t) (- (* 0.0 t))) (fma 0.0 t (* 0.0 t))))
t_4)
t_5))
(if (<= l 2.4761954081248927e-234)
(/ 2.0 (/ (/ (* (* k k) t_2) l) (* (cos k) l)))
(if (<= l 4.429858786323863e+127)
(/ 2.0 (+ (* (* t_6 t_1) (* k t)) t_5))
(/
2.0
(+
(fma k (* (pow (/ (sqrt (/ k (cos k))) l) 2.0) t_2) t_4)
t_5))))))))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(sin(k), 2.0);
double t_2 = t * t_1;
double t_3 = 0.0 * t_2;
double t_4 = -t_3;
double t_5 = fma(0.0, t_2, t_3);
double t_6 = k / (cos(k) * (l * l));
double tmp;
if (l <= -3.0320863962966904e+184) {
tmp = 2.0 / (t_2 / (1.0 / pow((k / (l * sqrt(cos(k)))), 2.0)));
} else if (l <= -3.9559806813423186e-156) {
tmp = 2.0 / (fma(k, (t_6 * (fma(sin(k), (sin(k) * t), -(0.0 * t)) + fma(0.0, t, (0.0 * t)))), t_4) + t_5);
} else if (l <= 2.4761954081248927e-234) {
tmp = 2.0 / ((((k * k) * t_2) / l) / (cos(k) * l));
} else if (l <= 4.429858786323863e+127) {
tmp = 2.0 / (((t_6 * t_1) * (k * t)) + t_5);
} else {
tmp = 2.0 / (fma(k, (pow((sqrt((k / cos(k))) / l), 2.0) * t_2), t_4) + t_5);
}
return tmp;
}
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function code(t, l, k) t_1 = sin(k) ^ 2.0 t_2 = Float64(t * t_1) t_3 = Float64(0.0 * t_2) t_4 = Float64(-t_3) t_5 = fma(0.0, t_2, t_3) t_6 = Float64(k / Float64(cos(k) * Float64(l * l))) tmp = 0.0 if (l <= -3.0320863962966904e+184) tmp = Float64(2.0 / Float64(t_2 / Float64(1.0 / (Float64(k / Float64(l * sqrt(cos(k)))) ^ 2.0)))); elseif (l <= -3.9559806813423186e-156) tmp = Float64(2.0 / Float64(fma(k, Float64(t_6 * Float64(fma(sin(k), Float64(sin(k) * t), Float64(-Float64(0.0 * t))) + fma(0.0, t, Float64(0.0 * t)))), t_4) + t_5)); elseif (l <= 2.4761954081248927e-234) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t_2) / l) / Float64(cos(k) * l))); elseif (l <= 4.429858786323863e+127) tmp = Float64(2.0 / Float64(Float64(Float64(t_6 * t_1) * Float64(k * t)) + t_5)); else tmp = Float64(2.0 / Float64(fma(k, Float64((Float64(sqrt(Float64(k / cos(k))) / l) ^ 2.0) * t_2), t_4) + t_5)); end return tmp end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(t * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(0.0 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = (-t$95$3)}, Block[{t$95$5 = N[(0.0 * t$95$2 + t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(k / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.0320863962966904e+184], N[(2.0 / N[(t$95$2 / N[(1.0 / N[Power[N[(k / N[(l * N[Sqrt[N[Cos[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -3.9559806813423186e-156], N[(2.0 / N[(N[(k * N[(t$95$6 * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t), $MachinePrecision] + (-N[(0.0 * t), $MachinePrecision])), $MachinePrecision] + N[(0.0 * t + N[(0.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.4761954081248927e-234], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$2), $MachinePrecision] / l), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.429858786323863e+127], N[(2.0 / N[(N[(N[(t$95$6 * t$95$1), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * N[(N[Power[N[(N[Sqrt[N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\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 := {\sin k}^{2}\\
t_2 := t \cdot t_1\\
t_3 := 0 \cdot t_2\\
t_4 := -t_3\\
t_5 := \mathsf{fma}\left(0, t_2, t_3\right)\\
t_6 := \frac{k}{\cos k \cdot \left(\ell \cdot \ell\right)}\\
\mathbf{if}\;\ell \leq -3.0320863962966904 \cdot 10^{+184}:\\
\;\;\;\;\frac{2}{\frac{t_2}{\frac{1}{{\left(\frac{k}{\ell \cdot \sqrt{\cos k}}\right)}^{2}}}}\\
\mathbf{elif}\;\ell \leq -3.9559806813423186 \cdot 10^{-156}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(k, t_6 \cdot \left(\mathsf{fma}\left(\sin k, \sin k \cdot t, -0 \cdot t\right) + \mathsf{fma}\left(0, t, 0 \cdot t\right)\right), t_4\right) + t_5}\\
\mathbf{elif}\;\ell \leq 2.4761954081248927 \cdot 10^{-234}:\\
\;\;\;\;\frac{2}{\frac{\frac{\left(k \cdot k\right) \cdot t_2}{\ell}}{\cos k \cdot \ell}}\\
\mathbf{elif}\;\ell \leq 4.429858786323863 \cdot 10^{+127}:\\
\;\;\;\;\frac{2}{\left(t_6 \cdot t_1\right) \cdot \left(k \cdot t\right) + t_5}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(k, {\left(\frac{\sqrt{\frac{k}{\cos k}}}{\ell}\right)}^{2} \cdot t_2, t_4\right) + t_5}\\
\end{array}



Bits error versus t



Bits error versus l



Bits error versus k
if l < -3.03208639629669038e184Initial program 64.0
Simplified64.0
Taylor expanded in t around 0 64.0
Applied egg-rr64.0
Applied egg-rr37.3
if -3.03208639629669038e184 < l < -3.95598068134231862e-156Initial program 46.1
Simplified37.9
Taylor expanded in t around 0 16.4
Applied egg-rr14.8
Applied egg-rr8.0
Applied egg-rr7.6
if -3.95598068134231862e-156 < l < 2.4761954081248927e-234Initial program 46.7
Simplified37.7
Taylor expanded in t around 0 19.6
Applied egg-rr19.3
Applied egg-rr15.3
if 2.4761954081248927e-234 < l < 4.42985878632386335e127Initial program 44.7
Simplified34.8
Taylor expanded in t around 0 13.4
Applied egg-rr12.4
Applied egg-rr7.7
Applied egg-rr7.6
if 4.42985878632386335e127 < l Initial program 61.0
Simplified60.0
Taylor expanded in t around 0 57.6
Applied egg-rr56.3
Applied egg-rr53.7
Applied egg-rr46.0
Final simplification14.9
herbie shell --seed 2022131
(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))))