(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 (+ 2.0 (pow (/ k t) 2.0))) (t_2 (* (/ l t) (cos k))))
(if (<= t -2.1469583486825252e-116)
(/ 2.0 (/ (* (* (sin k) (* t (/ (* t (sin k)) l))) t_1) t_2))
(if (<= t 3.1692035794907957e-171)
(/
2.0
(/ (* (pow k 2.0) (* t (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(/
2.0
(/ 1.0 (/ t_2 (* t_1 (* (sin k) (* t (* (sin k) (/ t l))))))))))))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 = 2.0 + pow((k / t), 2.0);
double t_2 = (l / t) * cos(k);
double tmp;
if (t <= -2.1469583486825252e-116) {
tmp = 2.0 / (((sin(k) * (t * ((t * sin(k)) / l))) * t_1) / t_2);
} else if (t <= 3.1692035794907957e-171) {
tmp = 2.0 / ((pow(k, 2.0) * (t * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else {
tmp = 2.0 / (1.0 / (t_2 / (t_1 * (sin(k) * (t * (sin(k) * (t / l)))))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 + ((k / t) ** 2.0d0)
t_2 = (l / t) * cos(k)
if (t <= (-2.1469583486825252d-116)) then
tmp = 2.0d0 / (((sin(k) * (t * ((t * sin(k)) / l))) * t_1) / t_2)
else if (t <= 3.1692035794907957d-171) then
tmp = 2.0d0 / (((k ** 2.0d0) * (t * (sin(k) ** 2.0d0))) / (cos(k) * (l ** 2.0d0)))
else
tmp = 2.0d0 / (1.0d0 / (t_2 / (t_1 * (sin(k) * (t * (sin(k) * (t / l)))))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
public static double code(double t, double l, double k) {
double t_1 = 2.0 + Math.pow((k / t), 2.0);
double t_2 = (l / t) * Math.cos(k);
double tmp;
if (t <= -2.1469583486825252e-116) {
tmp = 2.0 / (((Math.sin(k) * (t * ((t * Math.sin(k)) / l))) * t_1) / t_2);
} else if (t <= 3.1692035794907957e-171) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else {
tmp = 2.0 / (1.0 / (t_2 / (t_1 * (Math.sin(k) * (t * (Math.sin(k) * (t / l)))))));
}
return tmp;
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
def code(t, l, k): t_1 = 2.0 + math.pow((k / t), 2.0) t_2 = (l / t) * math.cos(k) tmp = 0 if t <= -2.1469583486825252e-116: tmp = 2.0 / (((math.sin(k) * (t * ((t * math.sin(k)) / l))) * t_1) / t_2) elif t <= 3.1692035794907957e-171: tmp = 2.0 / ((math.pow(k, 2.0) * (t * math.pow(math.sin(k), 2.0))) / (math.cos(k) * math.pow(l, 2.0))) else: tmp = 2.0 / (1.0 / (t_2 / (t_1 * (math.sin(k) * (t * (math.sin(k) * (t / l))))))) 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 = Float64(2.0 + (Float64(k / t) ^ 2.0)) t_2 = Float64(Float64(l / t) * cos(k)) tmp = 0.0 if (t <= -2.1469583486825252e-116) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * Float64(t * Float64(Float64(t * sin(k)) / l))) * t_1) / t_2)); elseif (t <= 3.1692035794907957e-171) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(1.0 / Float64(t_2 / Float64(t_1 * Float64(sin(k) * Float64(t * Float64(sin(k) * Float64(t / l)))))))); end return tmp end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
function tmp_2 = code(t, l, k) t_1 = 2.0 + ((k / t) ^ 2.0); t_2 = (l / t) * cos(k); tmp = 0.0; if (t <= -2.1469583486825252e-116) tmp = 2.0 / (((sin(k) * (t * ((t * sin(k)) / l))) * t_1) / t_2); elseif (t <= 3.1692035794907957e-171) tmp = 2.0 / (((k ^ 2.0) * (t * (sin(k) ^ 2.0))) / (cos(k) * (l ^ 2.0))); else tmp = 2.0 / (1.0 / (t_2 / (t_1 * (sin(k) * (t * (sin(k) * (t / l))))))); end tmp_2 = 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[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l / t), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1469583486825252e-116], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[(t * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1692035794907957e-171], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(1.0 / N[(t$95$2 / N[(t$95$1 * N[(N[Sin[k], $MachinePrecision] * N[(t * N[(N[Sin[k], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := 2 + {\left(\frac{k}{t}\right)}^{2}\\
t_2 := \frac{\ell}{t} \cdot \cos k\\
\mathbf{if}\;t \leq -2.1469583486825252 \cdot 10^{-116}:\\
\;\;\;\;\frac{2}{\frac{\left(\sin k \cdot \left(t \cdot \frac{t \cdot \sin k}{\ell}\right)\right) \cdot t_1}{t_2}}\\
\mathbf{elif}\;t \leq 3.1692035794907957 \cdot 10^{-171}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{1}{\frac{t_2}{t_1 \cdot \left(\sin k \cdot \left(t \cdot \left(\sin k \cdot \frac{t}{\ell}\right)\right)\right)}}}\\
\end{array}



Bits error versus t



Bits error versus l



Bits error versus k
Results
if t < -2.14695834868252524e-116Initial program 24.4
Simplified24.4
Applied unpow3_binary6424.4
Applied times-frac_binary6417.1
Applied associate-*l*_binary6414.4
Applied associate-/l*_binary649.8
Applied tan-quot_binary649.8
Applied associate-*l/_binary648.7
Applied frac-times_binary647.0
Applied associate-*l/_binary646.1
Taylor expanded in t around 0 6.0
if -2.14695834868252524e-116 < t < 3.16920357949079572e-171Initial program 64.0
Simplified64.0
Taylor expanded in t around 0 27.6
if 3.16920357949079572e-171 < t Initial program 27.2
Simplified27.2
Applied unpow3_binary6427.2
Applied times-frac_binary6418.1
Applied associate-*l*_binary6416.1
Applied associate-/l*_binary6411.4
Applied tan-quot_binary6411.5
Applied associate-*l/_binary6410.4
Applied frac-times_binary649.0
Applied associate-*l/_binary648.0
Applied clear-num_binary648.0
Final simplification10.6
herbie shell --seed 2022137
(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))))