
(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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}
\\
\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)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}
\\
\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)}
\end{array}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (sqrt (cbrt l))) (t_2 (pow (sin k) 2.0)))
(if (<= k 7.5e-16)
(/
(pow
(/
(cbrt (/ 2.0 (tan k)))
(/ t (/ (* t_1 t_1) (/ (cbrt (sin k)) (cbrt l)))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(if (<= k 2.35e+154)
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) t_2)))
(fma
2.0
(* (* (/ l k) (/ l k)) (/ (/ (cos k) t) t_2))
(* (* l (/ l (pow k 4.0))) (* (/ (* t (cos k)) t_2) -4.0)))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double t_1 = sqrt(cbrt(l));
double t_2 = pow(sin(k), 2.0);
double tmp;
if (k <= 7.5e-16) {
tmp = pow((cbrt((2.0 / tan(k))) / (t / ((t_1 * t_1) / (cbrt(sin(k)) / cbrt(l))))), 3.0) / (2.0 + pow((k / t), 2.0));
} else if (k <= 2.35e+154) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / t_2));
} else {
tmp = fma(2.0, (((l / k) * (l / k)) * ((cos(k) / t) / t_2)), ((l * (l / pow(k, 4.0))) * (((t * cos(k)) / t_2) * -4.0)));
}
return tmp;
}
l = abs(l) k = abs(k) function code(t, l, k) t_1 = sqrt(cbrt(l)) t_2 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 7.5e-16) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t / Float64(Float64(t_1 * t_1) / Float64(cbrt(sin(k)) / cbrt(l))))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); elseif (k <= 2.35e+154) tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / t_2))); else tmp = fma(2.0, Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(cos(k) / t) / t_2)), Float64(Float64(l * Float64(l / (k ^ 4.0))) * Float64(Float64(Float64(t * cos(k)) / t_2) * -4.0))); end return tmp end
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Sqrt[N[Power[l, 1/3], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 7.5e-16], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t / N[(N[(t$95$1 * t$95$1), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.35e+154], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
t_1 := \sqrt{\sqrt[3]{\ell}}\\
t_2 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 7.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{\frac{t}{\frac{t_1 \cdot t_1}{\frac{\sqrt[3]{\sin k}}{\sqrt[3]{\ell}}}}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{elif}\;k \leq 2.35 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{t_2}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(2, \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\frac{\cos k}{t}}{t_2}, \left(\ell \cdot \frac{\ell}{{k}^{4}}\right) \cdot \left(\frac{t \cdot \cos k}{t_2} \cdot -4\right)\right)\\
\end{array}
\end{array}
if k < 7.5e-16Initial program 58.5%
associate-/r*58.5%
associate-*l*53.5%
sqr-neg53.5%
associate-*l*58.5%
*-commutative58.5%
sqr-neg58.5%
associate-/r*58.5%
Simplified56.8%
associate-/l/56.8%
associate-/r/58.5%
add-cube-cbrt58.4%
pow358.4%
Applied egg-rr69.6%
cbrt-div81.2%
Applied egg-rr81.2%
cbrt-div85.2%
Applied egg-rr85.2%
add-sqr-sqrt40.7%
Applied egg-rr40.7%
if 7.5e-16 < k < 2.34999999999999992e154Initial program 39.5%
associate-/r*39.6%
associate-*l*39.6%
sqr-neg39.6%
associate-*l*39.6%
*-commutative39.6%
sqr-neg39.6%
associate-*l/39.5%
associate-*r/39.6%
associate-/r/39.4%
Simplified39.4%
Taylor expanded in k around inf 78.7%
*-commutative78.7%
associate-*r*78.7%
times-frac78.7%
unpow278.7%
associate-*l*78.7%
unpow278.7%
Simplified78.7%
frac-times78.7%
Applied egg-rr78.7%
Taylor expanded in k around inf 78.7%
associate-*r*78.7%
unpow278.7%
associate-*r*78.7%
times-frac78.6%
associate-*r*78.6%
unpow278.6%
unpow278.6%
*-commutative78.6%
times-frac82.2%
unpow282.2%
Simplified82.2%
if 2.34999999999999992e154 < k Initial program 45.4%
associate-/r*45.4%
associate-*l*45.4%
sqr-neg45.4%
associate-*l*45.4%
*-commutative45.4%
sqr-neg45.4%
associate-/r*45.4%
Simplified45.4%
associate-/l/45.4%
associate-/r/45.4%
add-cube-cbrt45.4%
pow345.4%
Applied egg-rr60.3%
cbrt-div67.5%
Applied egg-rr67.5%
Taylor expanded in k around inf 62.2%
+-commutative62.2%
fma-def62.2%
times-frac62.2%
unpow262.2%
unpow262.2%
times-frac69.3%
associate-/r*69.3%
*-commutative69.3%
times-frac76.8%
unpow276.8%
associate-*r/96.7%
Simplified96.7%
Final simplification54.5%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(+ 1.0 (+ t_1 1.0))
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))))
INFINITY)
(/ (* (/ (* 2.0 l) (* (tan k) (pow t 3.0))) (/ l (sin k))) (+ 2.0 t_1))
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0)))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((1.0 + (t_1 + 1.0)) * (tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))))) <= ((double) INFINITY)) {
tmp = (((2.0 * l) / (tan(k) * pow(t, 3.0))) * (l / sin(k))) / (2.0 + t_1);
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((1.0 + (t_1 + 1.0)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))))) <= Double.POSITIVE_INFINITY) {
tmp = (((2.0 * l) / (Math.tan(k) * Math.pow(t, 3.0))) * (l / Math.sin(k))) / (2.0 + t_1);
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if (2.0 / ((1.0 + (t_1 + 1.0)) * (math.tan(k) * (math.sin(k) * (math.pow(t, 3.0) / (l * l)))))) <= math.inf: tmp = (((2.0 * l) / (math.tan(k) * math.pow(t, 3.0))) * (l / math.sin(k))) / (2.0 + t_1) else: tmp = 2.0 * (((l / t) * (l / (k * k))) * (math.cos(k) / math.pow(math.sin(k), 2.0))) return tmp
l = abs(l) k = abs(k) function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(1.0 + Float64(t_1 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))))) <= Inf) tmp = Float64(Float64(Float64(Float64(2.0 * l) / Float64(tan(k) * (t ^ 3.0))) * Float64(l / sin(k))) / Float64(2.0 + t_1)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if ((2.0 / ((1.0 + (t_1 + 1.0)) * (tan(k) * (sin(k) * ((t ^ 3.0) / (l * l)))))) <= Inf) tmp = (((2.0 * l) / (tan(k) * (t ^ 3.0))) * (l / sin(k))) / (2.0 + t_1); else tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(1 + \left(t_1 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right)} \leq \infty:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\tan k \cdot {t}^{3}} \cdot \frac{\ell}{\sin k}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < +inf.0Initial program 83.5%
associate-/r*83.5%
associate-*l*78.0%
sqr-neg78.0%
associate-*l*83.5%
*-commutative83.5%
sqr-neg83.5%
associate-*l/84.0%
associate-*r/82.8%
associate-/r/82.8%
Simplified82.8%
expm1-log1p-u60.1%
expm1-udef55.6%
associate-*l/55.6%
associate-*r*55.6%
Applied egg-rr55.6%
expm1-def60.1%
expm1-log1p82.8%
associate-*r*82.8%
times-frac87.3%
*-commutative87.3%
Simplified87.3%
if +inf.0 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 0.0%
associate-/r*0.0%
associate-*l*0.0%
sqr-neg0.0%
associate-*l*0.0%
*-commutative0.0%
sqr-neg0.0%
associate-*l/0.0%
associate-*r/0.0%
associate-/r/0.0%
Simplified0.0%
Taylor expanded in k around inf 47.1%
*-commutative47.1%
associate-*r*47.1%
times-frac47.1%
unpow247.1%
associate-*l*51.4%
unpow251.4%
Simplified51.4%
frac-times51.4%
Applied egg-rr51.4%
Taylor expanded in k around inf 47.1%
associate-*r*47.1%
unpow247.1%
associate-*r*51.4%
times-frac51.4%
associate-*r*47.1%
unpow247.1%
unpow247.1%
*-commutative47.1%
times-frac62.8%
unpow262.8%
Simplified62.8%
Final simplification78.7%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 3e-16)
(/
(pow
(/
(cbrt (/ 2.0 (tan k)))
(/ t (/ (cbrt l) (/ (cbrt (sin k)) (cbrt l)))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(if (<= k 2.35e+154)
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) t_1)))
(fma
2.0
(* (* (/ l k) (/ l k)) (/ (/ (cos k) t) t_1))
(* (* l (/ l (pow k 4.0))) (* (/ (* t (cos k)) t_1) -4.0)))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 3e-16) {
tmp = pow((cbrt((2.0 / tan(k))) / (t / (cbrt(l) / (cbrt(sin(k)) / cbrt(l))))), 3.0) / (2.0 + pow((k / t), 2.0));
} else if (k <= 2.35e+154) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / t_1));
} else {
tmp = fma(2.0, (((l / k) * (l / k)) * ((cos(k) / t) / t_1)), ((l * (l / pow(k, 4.0))) * (((t * cos(k)) / t_1) * -4.0)));
}
return tmp;
}
l = abs(l) k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 3e-16) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t / Float64(cbrt(l) / Float64(cbrt(sin(k)) / cbrt(l))))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); elseif (k <= 2.35e+154) tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / t_1))); else tmp = fma(2.0, Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(cos(k) / t) / t_1)), Float64(Float64(l * Float64(l / (k ^ 4.0))) * Float64(Float64(Float64(t * cos(k)) / t_1) * -4.0))); end return tmp end
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 3e-16], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t / N[(N[Power[l, 1/3], $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.35e+154], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 3 \cdot 10^{-16}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{\frac{t}{\frac{\sqrt[3]{\ell}}{\frac{\sqrt[3]{\sin k}}{\sqrt[3]{\ell}}}}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{elif}\;k \leq 2.35 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(2, \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\frac{\cos k}{t}}{t_1}, \left(\ell \cdot \frac{\ell}{{k}^{4}}\right) \cdot \left(\frac{t \cdot \cos k}{t_1} \cdot -4\right)\right)\\
\end{array}
\end{array}
if k < 2.99999999999999994e-16Initial program 58.5%
associate-/r*58.5%
associate-*l*53.5%
sqr-neg53.5%
associate-*l*58.5%
*-commutative58.5%
sqr-neg58.5%
associate-/r*58.5%
Simplified56.8%
associate-/l/56.8%
associate-/r/58.5%
add-cube-cbrt58.4%
pow358.4%
Applied egg-rr69.6%
cbrt-div81.2%
Applied egg-rr81.2%
cbrt-div85.2%
Applied egg-rr85.2%
if 2.99999999999999994e-16 < k < 2.34999999999999992e154Initial program 39.5%
associate-/r*39.6%
associate-*l*39.6%
sqr-neg39.6%
associate-*l*39.6%
*-commutative39.6%
sqr-neg39.6%
associate-*l/39.5%
associate-*r/39.6%
associate-/r/39.4%
Simplified39.4%
Taylor expanded in k around inf 78.7%
*-commutative78.7%
associate-*r*78.7%
times-frac78.7%
unpow278.7%
associate-*l*78.7%
unpow278.7%
Simplified78.7%
frac-times78.7%
Applied egg-rr78.7%
Taylor expanded in k around inf 78.7%
associate-*r*78.7%
unpow278.7%
associate-*r*78.7%
times-frac78.6%
associate-*r*78.6%
unpow278.6%
unpow278.6%
*-commutative78.6%
times-frac82.2%
unpow282.2%
Simplified82.2%
if 2.34999999999999992e154 < k Initial program 45.4%
associate-/r*45.4%
associate-*l*45.4%
sqr-neg45.4%
associate-*l*45.4%
*-commutative45.4%
sqr-neg45.4%
associate-/r*45.4%
Simplified45.4%
associate-/l/45.4%
associate-/r/45.4%
add-cube-cbrt45.4%
pow345.4%
Applied egg-rr60.3%
cbrt-div67.5%
Applied egg-rr67.5%
Taylor expanded in k around inf 62.2%
+-commutative62.2%
fma-def62.2%
times-frac62.2%
unpow262.2%
unpow262.2%
times-frac69.3%
associate-/r*69.3%
*-commutative69.3%
times-frac76.8%
unpow276.8%
associate-*r/96.7%
Simplified96.7%
Final simplification86.6%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (or (<= t -1e-31) (not (<= t 1.6e-34)))
(/
(pow
(/ (cbrt (/ 2.0 (tan k))) (/ t (/ (cbrt l) (/ (cbrt (sin k)) (cbrt l)))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1e-31) || !(t <= 1.6e-34)) {
tmp = pow((cbrt((2.0 / tan(k))) / (t / (cbrt(l) / (cbrt(sin(k)) / cbrt(l))))), 3.0) / (2.0 + pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1e-31) || !(t <= 1.6e-34)) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) / (t / (Math.cbrt(l) / (Math.cbrt(Math.sin(k)) / Math.cbrt(l))))), 3.0) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1e-31) || !(t <= 1.6e-34)) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t / Float64(cbrt(l) / Float64(cbrt(sin(k)) / cbrt(l))))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1e-31], N[Not[LessEqual[t, 1.6e-34]], $MachinePrecision]], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t / N[(N[Power[l, 1/3], $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-31} \lor \neg \left(t \leq 1.6 \cdot 10^{-34}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{\frac{t}{\frac{\sqrt[3]{\ell}}{\frac{\sqrt[3]{\sin k}}{\sqrt[3]{\ell}}}}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if t < -1e-31 or 1.60000000000000001e-34 < t Initial program 66.1%
associate-/r*66.1%
associate-*l*59.4%
sqr-neg59.4%
associate-*l*66.1%
*-commutative66.1%
sqr-neg66.1%
associate-/r*66.1%
Simplified63.8%
associate-/l/63.7%
associate-/r/66.1%
add-cube-cbrt65.9%
pow365.9%
Applied egg-rr71.5%
cbrt-div90.4%
Applied egg-rr90.4%
cbrt-div95.8%
Applied egg-rr95.8%
if -1e-31 < t < 1.60000000000000001e-34Initial program 40.6%
associate-/r*40.6%
associate-*l*40.6%
sqr-neg40.6%
associate-*l*40.6%
*-commutative40.6%
sqr-neg40.6%
associate-*l/40.6%
associate-*r/40.5%
associate-/r/40.5%
Simplified40.5%
Taylor expanded in k around inf 75.4%
*-commutative75.4%
associate-*r*75.3%
times-frac75.4%
unpow275.4%
associate-*l*78.6%
unpow278.6%
Simplified78.6%
frac-times78.6%
Applied egg-rr78.6%
Taylor expanded in k around inf 75.4%
associate-*r*75.3%
unpow275.3%
associate-*r*78.6%
times-frac78.6%
associate-*r*75.4%
unpow275.4%
unpow275.4%
*-commutative75.4%
times-frac85.8%
unpow285.8%
Simplified85.8%
Final simplification91.1%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (or (<= t -8.2e-32) (not (<= t 7.4e-37)))
(/
(pow
(* (cbrt (/ 2.0 (tan k))) (/ 1.0 (* (/ t (cbrt l)) (cbrt (/ (sin k) l)))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -8.2e-32) || !(t <= 7.4e-37)) {
tmp = pow((cbrt((2.0 / tan(k))) * (1.0 / ((t / cbrt(l)) * cbrt((sin(k) / l))))), 3.0) / (2.0 + pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -8.2e-32) || !(t <= 7.4e-37)) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) * (1.0 / ((t / Math.cbrt(l)) * Math.cbrt((Math.sin(k) / l))))), 3.0) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -8.2e-32) || !(t <= 7.4e-37)) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) * Float64(1.0 / Float64(Float64(t / cbrt(l)) * cbrt(Float64(sin(k) / l))))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -8.2e-32], N[Not[LessEqual[t, 7.4e-37]], $MachinePrecision]], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(1.0 / N[(N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-32} \lor \neg \left(t \leq 7.4 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{{\left(\sqrt[3]{\frac{2}{\tan k}} \cdot \frac{1}{\frac{t}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{\sin k}{\ell}}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if t < -8.1999999999999995e-32 or 7.4e-37 < t Initial program 66.1%
associate-/r*66.1%
associate-*l*59.4%
sqr-neg59.4%
associate-*l*66.1%
*-commutative66.1%
sqr-neg66.1%
associate-/r*66.1%
Simplified63.8%
associate-/l/63.7%
associate-/r/66.1%
add-cube-cbrt65.9%
pow365.9%
Applied egg-rr71.5%
cbrt-div90.4%
Applied egg-rr90.4%
cbrt-div95.8%
Applied egg-rr95.8%
div-inv95.9%
associate-/r/95.9%
cbrt-undiv90.5%
Applied egg-rr90.5%
if -8.1999999999999995e-32 < t < 7.4e-37Initial program 40.6%
associate-/r*40.6%
associate-*l*40.6%
sqr-neg40.6%
associate-*l*40.6%
*-commutative40.6%
sqr-neg40.6%
associate-*l/40.6%
associate-*r/40.5%
associate-/r/40.5%
Simplified40.5%
Taylor expanded in k around inf 75.4%
*-commutative75.4%
associate-*r*75.3%
times-frac75.4%
unpow275.4%
associate-*l*78.6%
unpow278.6%
Simplified78.6%
frac-times78.6%
Applied egg-rr78.6%
Taylor expanded in k around inf 75.4%
associate-*r*75.3%
unpow275.3%
associate-*r*78.6%
times-frac78.6%
associate-*r*75.4%
unpow275.4%
unpow275.4%
*-commutative75.4%
times-frac85.8%
unpow285.8%
Simplified85.8%
Final simplification88.3%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (or (<= t -1.2e-31) (not (<= t 1.7e-33)))
(/
(pow
(* (/ (cbrt (/ 2.0 (tan k))) t) (/ (cbrt l) (cbrt (/ (sin k) l))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.2e-31) || !(t <= 1.7e-33)) {
tmp = pow(((cbrt((2.0 / tan(k))) / t) * (cbrt(l) / cbrt((sin(k) / l)))), 3.0) / (2.0 + pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.2e-31) || !(t <= 1.7e-33)) {
tmp = Math.pow(((Math.cbrt((2.0 / Math.tan(k))) / t) * (Math.cbrt(l) / Math.cbrt((Math.sin(k) / l)))), 3.0) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.2e-31) || !(t <= 1.7e-33)) tmp = Float64((Float64(Float64(cbrt(Float64(2.0 / tan(k))) / t) * Float64(cbrt(l) / cbrt(Float64(sin(k) / l)))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.2e-31], N[Not[LessEqual[t, 1.7e-33]], $MachinePrecision]], N[(N[Power[N[(N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-31} \lor \neg \left(t \leq 1.7 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t} \cdot \frac{\sqrt[3]{\ell}}{\sqrt[3]{\frac{\sin k}{\ell}}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if t < -1.2e-31 or 1.7e-33 < t Initial program 66.1%
associate-/r*66.1%
associate-*l*59.4%
sqr-neg59.4%
associate-*l*66.1%
*-commutative66.1%
sqr-neg66.1%
associate-/r*66.1%
Simplified63.8%
associate-/l/63.7%
associate-/r/66.1%
add-cube-cbrt65.9%
pow365.9%
Applied egg-rr71.5%
cbrt-div90.4%
Applied egg-rr90.4%
cbrt-div95.8%
Applied egg-rr95.8%
div-inv95.8%
associate-/r/95.8%
cbrt-undiv90.4%
Applied egg-rr90.4%
associate-*r/90.4%
associate-*l/90.4%
*-rgt-identity90.4%
Simplified90.4%
if -1.2e-31 < t < 1.7e-33Initial program 40.6%
associate-/r*40.6%
associate-*l*40.6%
sqr-neg40.6%
associate-*l*40.6%
*-commutative40.6%
sqr-neg40.6%
associate-*l/40.6%
associate-*r/40.5%
associate-/r/40.5%
Simplified40.5%
Taylor expanded in k around inf 75.4%
*-commutative75.4%
associate-*r*75.3%
times-frac75.4%
unpow275.4%
associate-*l*78.6%
unpow278.6%
Simplified78.6%
frac-times78.6%
Applied egg-rr78.6%
Taylor expanded in k around inf 75.4%
associate-*r*75.3%
unpow275.3%
associate-*r*78.6%
times-frac78.6%
associate-*r*75.4%
unpow275.4%
unpow275.4%
*-commutative75.4%
times-frac85.8%
unpow285.8%
Simplified85.8%
Final simplification88.2%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (or (<= t -8.2e-32) (not (<= t 7.4e-37)))
(/
(pow
(/ (cbrt (/ 2.0 (tan k))) (/ t (/ (cbrt l) (cbrt (/ (sin k) l)))))
3.0)
(+ 2.0 (* (/ k t) (/ k t))))
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -8.2e-32) || !(t <= 7.4e-37)) {
tmp = pow((cbrt((2.0 / tan(k))) / (t / (cbrt(l) / cbrt((sin(k) / l))))), 3.0) / (2.0 + ((k / t) * (k / t)));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -8.2e-32) || !(t <= 7.4e-37)) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) / (t / (Math.cbrt(l) / Math.cbrt((Math.sin(k) / l))))), 3.0) / (2.0 + ((k / t) * (k / t)));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -8.2e-32) || !(t <= 7.4e-37)) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t / Float64(cbrt(l) / cbrt(Float64(sin(k) / l))))) ^ 3.0) / Float64(2.0 + Float64(Float64(k / t) * Float64(k / t)))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -8.2e-32], N[Not[LessEqual[t, 7.4e-37]], $MachinePrecision]], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t / N[(N[Power[l, 1/3], $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-32} \lor \neg \left(t \leq 7.4 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{\frac{t}{\frac{\sqrt[3]{\ell}}{\sqrt[3]{\frac{\sin k}{\ell}}}}}\right)}^{3}}{2 + \frac{k}{t} \cdot \frac{k}{t}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if t < -8.1999999999999995e-32 or 7.4e-37 < t Initial program 66.1%
associate-/r*66.1%
associate-*l*59.4%
sqr-neg59.4%
associate-*l*66.1%
*-commutative66.1%
sqr-neg66.1%
associate-/r*66.1%
Simplified63.8%
associate-/l/63.7%
associate-/r/66.1%
add-cube-cbrt65.9%
pow365.9%
Applied egg-rr71.5%
cbrt-div90.4%
Applied egg-rr90.4%
unpow260.1%
Applied egg-rr90.4%
if -8.1999999999999995e-32 < t < 7.4e-37Initial program 40.6%
associate-/r*40.6%
associate-*l*40.6%
sqr-neg40.6%
associate-*l*40.6%
*-commutative40.6%
sqr-neg40.6%
associate-*l/40.6%
associate-*r/40.5%
associate-/r/40.5%
Simplified40.5%
Taylor expanded in k around inf 75.4%
*-commutative75.4%
associate-*r*75.3%
times-frac75.4%
unpow275.4%
associate-*l*78.6%
unpow278.6%
Simplified78.6%
frac-times78.6%
Applied egg-rr78.6%
Taylor expanded in k around inf 75.4%
associate-*r*75.3%
unpow275.3%
associate-*r*78.6%
times-frac78.6%
associate-*r*75.4%
unpow275.4%
unpow275.4%
*-commutative75.4%
times-frac85.8%
unpow285.8%
Simplified85.8%
Final simplification88.2%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (or (<= t -1.85e-31) (not (<= t 7.2e-33)))
(/
(/ 2.0 (* (tan k) (* (sin k) (pow (/ t (* (cbrt l) (cbrt l))) 3.0))))
(+ 1.0 (+ (pow (/ k t) 2.0) 1.0)))
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.85e-31) || !(t <= 7.2e-33)) {
tmp = (2.0 / (tan(k) * (sin(k) * pow((t / (cbrt(l) * cbrt(l))), 3.0)))) / (1.0 + (pow((k / t), 2.0) + 1.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.85e-31) || !(t <= 7.2e-33)) {
tmp = (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow((t / (Math.cbrt(l) * Math.cbrt(l))), 3.0)))) / (1.0 + (Math.pow((k / t), 2.0) + 1.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.85e-31) || !(t <= 7.2e-33)) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (Float64(t / Float64(cbrt(l) * cbrt(l))) ^ 3.0)))) / Float64(1.0 + Float64((Float64(k / t) ^ 2.0) + 1.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.85e-31], N[Not[LessEqual[t, 7.2e-33]], $MachinePrecision]], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t / N[(N[Power[l, 1/3], $MachinePrecision] * N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-31} \lor \neg \left(t \leq 7.2 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(\sin k \cdot {\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right)}^{3}\right)}}{1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if t < -1.8499999999999999e-31 or 7.20000000000000068e-33 < t Initial program 66.5%
associate-/r*66.6%
+-commutative66.6%
Simplified66.6%
add-cube-cbrt66.4%
pow366.4%
cbrt-div66.3%
rem-cbrt-cube71.8%
Applied egg-rr71.8%
cbrt-prod84.3%
Applied egg-rr84.3%
if -1.8499999999999999e-31 < t < 7.20000000000000068e-33Initial program 40.3%
associate-/r*40.3%
associate-*l*40.3%
sqr-neg40.3%
associate-*l*40.3%
*-commutative40.3%
sqr-neg40.3%
associate-*l/40.3%
associate-*r/40.2%
associate-/r/40.2%
Simplified40.2%
Taylor expanded in k around inf 74.8%
*-commutative74.8%
associate-*r*74.7%
times-frac74.8%
unpow274.8%
associate-*l*78.0%
unpow278.0%
Simplified78.0%
frac-times77.9%
Applied egg-rr77.9%
Taylor expanded in k around inf 74.8%
associate-*r*74.7%
unpow274.7%
associate-*r*77.9%
times-frac78.0%
associate-*r*74.8%
unpow274.8%
unpow274.8%
*-commutative74.8%
times-frac85.1%
unpow285.1%
Simplified85.1%
Final simplification84.7%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<= t -8.8e-32)
(/ (* (/ (* 2.0 l) (* (tan k) (pow t 3.0))) (/ l (sin k))) (+ 2.0 t_1))
(if (<= t 1.9e-33)
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0))))
(/
(/ 2.0 (* (tan k) (* (sin k) (pow (/ (pow t 1.5) l) 2.0))))
(+ 1.0 (+ t_1 1.0)))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if (t <= -8.8e-32) {
tmp = (((2.0 * l) / (tan(k) * pow(t, 3.0))) * (l / sin(k))) / (2.0 + t_1);
} else if (t <= 1.9e-33) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = (2.0 / (tan(k) * (sin(k) * pow((pow(t, 1.5) / l), 2.0)))) / (1.0 + (t_1 + 1.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
t_1 = (k / t) ** 2.0d0
if (t <= (-8.8d-32)) then
tmp = (((2.0d0 * l) / (tan(k) * (t ** 3.0d0))) * (l / sin(k))) / (2.0d0 + t_1)
else if (t <= 1.9d-33) then
tmp = 2.0d0 * (((l / t) * (l / (k * k))) * (cos(k) / (sin(k) ** 2.0d0)))
else
tmp = (2.0d0 / (tan(k) * (sin(k) * (((t ** 1.5d0) / l) ** 2.0d0)))) / (1.0d0 + (t_1 + 1.0d0))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if (t <= -8.8e-32) {
tmp = (((2.0 * l) / (Math.tan(k) * Math.pow(t, 3.0))) * (l / Math.sin(k))) / (2.0 + t_1);
} else if (t <= 1.9e-33) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t, 1.5) / l), 2.0)))) / (1.0 + (t_1 + 1.0));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if t <= -8.8e-32: tmp = (((2.0 * l) / (math.tan(k) * math.pow(t, 3.0))) * (l / math.sin(k))) / (2.0 + t_1) elif t <= 1.9e-33: tmp = 2.0 * (((l / t) * (l / (k * k))) * (math.cos(k) / math.pow(math.sin(k), 2.0))) else: tmp = (2.0 / (math.tan(k) * (math.sin(k) * math.pow((math.pow(t, 1.5) / l), 2.0)))) / (1.0 + (t_1 + 1.0)) return tmp
l = abs(l) k = abs(k) function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (t <= -8.8e-32) tmp = Float64(Float64(Float64(Float64(2.0 * l) / Float64(tan(k) * (t ^ 3.0))) * Float64(l / sin(k))) / Float64(2.0 + t_1)); elseif (t <= 1.9e-33) tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (Float64((t ^ 1.5) / l) ^ 2.0)))) / Float64(1.0 + Float64(t_1 + 1.0))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if (t <= -8.8e-32) tmp = (((2.0 * l) / (tan(k) * (t ^ 3.0))) * (l / sin(k))) / (2.0 + t_1); elseif (t <= 1.9e-33) tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / (sin(k) ^ 2.0))); else tmp = (2.0 / (tan(k) * (sin(k) * (((t ^ 1.5) / l) ^ 2.0)))) / (1.0 + (t_1 + 1.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, -8.8e-32], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-33], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\tan k \cdot {t}^{3}} \cdot \frac{\ell}{\sin k}}{2 + t_1}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)}}{1 + \left(t_1 + 1\right)}\\
\end{array}
\end{array}
if t < -8.7999999999999999e-32Initial program 69.9%
associate-/r*70.0%
associate-*l*61.2%
sqr-neg61.2%
associate-*l*70.0%
*-commutative70.0%
sqr-neg70.0%
associate-*l/69.8%
associate-*r/69.8%
associate-/r/69.7%
Simplified69.7%
expm1-log1p-u57.4%
expm1-udef53.4%
associate-*l/53.4%
associate-*r*53.4%
Applied egg-rr53.4%
expm1-def57.3%
expm1-log1p69.7%
associate-*r*69.7%
times-frac77.4%
*-commutative77.4%
Simplified77.4%
if -8.7999999999999999e-32 < t < 1.89999999999999997e-33Initial program 40.6%
associate-/r*40.6%
associate-*l*40.6%
sqr-neg40.6%
associate-*l*40.6%
*-commutative40.6%
sqr-neg40.6%
associate-*l/40.6%
associate-*r/40.5%
associate-/r/40.5%
Simplified40.5%
Taylor expanded in k around inf 75.4%
*-commutative75.4%
associate-*r*75.3%
times-frac75.4%
unpow275.4%
associate-*l*78.6%
unpow278.6%
Simplified78.6%
frac-times78.6%
Applied egg-rr78.6%
Taylor expanded in k around inf 75.4%
associate-*r*75.3%
unpow275.3%
associate-*r*78.6%
times-frac78.6%
associate-*r*75.4%
unpow275.4%
unpow275.4%
*-commutative75.4%
times-frac85.8%
unpow285.8%
Simplified85.8%
if 1.89999999999999997e-33 < t Initial program 62.2%
associate-/r*62.2%
+-commutative62.2%
Simplified62.2%
add-sqr-sqrt62.2%
pow262.2%
sqrt-div62.2%
sqrt-pow169.5%
metadata-eval69.5%
sqrt-prod25.5%
add-sqr-sqrt77.2%
Applied egg-rr77.2%
Final simplification81.3%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5e-81)
(/
(/ 2.0 (/ (* k (/ (pow t 3.0) l)) (/ l k)))
(+ 1.0 (+ (pow (/ k t) 2.0) 1.0)))
(if (<= k 2.9e-27)
(* 2.0 (/ (* l (/ l t)) (pow k 4.0)))
(if (<= k 8.3e-16)
(/
(/ (/ 2.0 (tan k)) (/ k (* l (/ l (pow t 3.0)))))
(+ 2.0 (/ (* k k) (* t t))))
(* 2.0 (* (* l (/ l (* k k))) (/ (cos k) (* t (pow (sin k) 2.0)))))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5e-81) {
tmp = (2.0 / ((k * (pow(t, 3.0) / l)) / (l / k))) / (1.0 + (pow((k / t), 2.0) + 1.0));
} else if (k <= 2.9e-27) {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
} else if (k <= 8.3e-16) {
tmp = ((2.0 / tan(k)) / (k / (l * (l / pow(t, 3.0))))) / (2.0 + ((k * k) / (t * t)));
} else {
tmp = 2.0 * ((l * (l / (k * k))) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
if (k <= 5d-81) then
tmp = (2.0d0 / ((k * ((t ** 3.0d0) / l)) / (l / k))) / (1.0d0 + (((k / t) ** 2.0d0) + 1.0d0))
else if (k <= 2.9d-27) then
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
else if (k <= 8.3d-16) then
tmp = ((2.0d0 / tan(k)) / (k / (l * (l / (t ** 3.0d0))))) / (2.0d0 + ((k * k) / (t * t)))
else
tmp = 2.0d0 * ((l * (l / (k * k))) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5e-81) {
tmp = (2.0 / ((k * (Math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (Math.pow((k / t), 2.0) + 1.0));
} else if (k <= 2.9e-27) {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
} else if (k <= 8.3e-16) {
tmp = ((2.0 / Math.tan(k)) / (k / (l * (l / Math.pow(t, 3.0))))) / (2.0 + ((k * k) / (t * t)));
} else {
tmp = 2.0 * ((l * (l / (k * k))) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): tmp = 0 if k <= 5e-81: tmp = (2.0 / ((k * (math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (math.pow((k / t), 2.0) + 1.0)) elif k <= 2.9e-27: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) elif k <= 8.3e-16: tmp = ((2.0 / math.tan(k)) / (k / (l * (l / math.pow(t, 3.0))))) / (2.0 + ((k * k) / (t * t))) else: tmp = 2.0 * ((l * (l / (k * k))) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5e-81) tmp = Float64(Float64(2.0 / Float64(Float64(k * Float64((t ^ 3.0) / l)) / Float64(l / k))) / Float64(1.0 + Float64((Float64(k / t) ^ 2.0) + 1.0))); elseif (k <= 2.9e-27) tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); elseif (k <= 8.3e-16) tmp = Float64(Float64(Float64(2.0 / tan(k)) / Float64(k / Float64(l * Float64(l / (t ^ 3.0))))) / Float64(2.0 + Float64(Float64(k * k) / Float64(t * t)))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / Float64(k * k))) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5e-81) tmp = (2.0 / ((k * ((t ^ 3.0) / l)) / (l / k))) / (1.0 + (((k / t) ^ 2.0) + 1.0)); elseif (k <= 2.9e-27) tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); elseif (k <= 8.3e-16) tmp = ((2.0 / tan(k)) / (k / (l * (l / (t ^ 3.0))))) / (2.0 + ((k * k) / (t * t))); else tmp = 2.0 * ((l * (l / (k * k))) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5e-81], N[(N[(2.0 / N[(N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.9e-27], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.3e-16], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(k / N[(l * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[(N[(k * k), $MachinePrecision] / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-81}:\\
\;\;\;\;\frac{\frac{2}{\frac{k \cdot \frac{{t}^{3}}{\ell}}{\frac{\ell}{k}}}}{1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)}\\
\mathbf{elif}\;k \leq 2.9 \cdot 10^{-27}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\mathbf{elif}\;k \leq 8.3 \cdot 10^{-16}:\\
\;\;\;\;\frac{\frac{\frac{2}{\tan k}}{\frac{k}{\ell \cdot \frac{\ell}{{t}^{3}}}}}{2 + \frac{k \cdot k}{t \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\ell \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 4.99999999999999981e-81Initial program 59.1%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
add-cube-cbrt59.0%
pow359.0%
cbrt-div59.0%
rem-cbrt-cube67.9%
Applied egg-rr67.9%
Taylor expanded in k around 0 52.5%
*-commutative52.5%
unpow252.5%
times-frac56.4%
unpow256.4%
associate-/l*59.8%
Simplified59.8%
associate-*r/64.9%
Applied egg-rr64.9%
if 4.99999999999999981e-81 < k < 2.90000000000000004e-27Initial program 56.7%
associate-/r*56.7%
associate-*l*56.7%
sqr-neg56.7%
associate-*l*56.7%
*-commutative56.7%
sqr-neg56.7%
associate-*l/56.6%
associate-*r/56.7%
associate-/r/56.6%
Simplified56.6%
Taylor expanded in k around inf 31.1%
*-commutative31.1%
associate-*r*31.1%
times-frac31.1%
unpow231.1%
associate-*l*31.1%
unpow231.1%
Simplified31.1%
Taylor expanded in k around 0 31.1%
unpow231.1%
*-commutative31.1%
times-frac55.3%
Simplified55.3%
associate-*r/68.6%
Applied egg-rr68.6%
if 2.90000000000000004e-27 < k < 8.29999999999999978e-16Initial program 40.0%
associate-/r*40.0%
associate-*l*40.0%
sqr-neg40.0%
associate-*l*40.0%
*-commutative40.0%
sqr-neg40.0%
associate-/r*40.0%
Simplified20.0%
expm1-log1p-u20.0%
expm1-udef20.0%
associate-/l*20.0%
Applied egg-rr20.0%
expm1-def20.0%
expm1-log1p20.0%
associate-/r/20.0%
Simplified20.0%
Taylor expanded in k around 0 40.0%
associate-/l*40.0%
unpow240.0%
associate-*r/43.9%
Simplified43.9%
Taylor expanded in k around 0 43.9%
unpow243.9%
unpow243.9%
Simplified43.9%
if 8.29999999999999978e-16 < k Initial program 42.8%
associate-/r*42.8%
associate-*l*42.8%
sqr-neg42.8%
associate-*l*42.8%
*-commutative42.8%
sqr-neg42.8%
associate-/r*42.8%
Simplified42.8%
associate-/l/42.8%
associate-/r/42.8%
add-cube-cbrt42.8%
pow342.8%
Applied egg-rr55.4%
Taylor expanded in k around inf 71.0%
associate-*r/71.0%
associate-*r*71.0%
unpow271.0%
associate-*r*73.6%
associate-*r/73.6%
associate-*r*71.0%
unpow271.0%
associate-*r*71.0%
times-frac67.2%
unpow267.2%
associate-*r/70.4%
unpow270.4%
Simplified70.4%
Final simplification66.1%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 4e-81)
(/
(/ 2.0 (/ (* k (/ (pow t 3.0) l)) (/ l k)))
(+ 1.0 (+ (pow (/ k t) 2.0) 1.0)))
(if (<= k 2.4e+131)
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) t_1)))
(* 2.0 (* (/ (cos k) k) (/ (* l l) (* t_1 (* k t)))))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 4e-81) {
tmp = (2.0 / ((k * (pow(t, 3.0) / l)) / (l / k))) / (1.0 + (pow((k / t), 2.0) + 1.0));
} else if (k <= 2.4e+131) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / t_1));
} else {
tmp = 2.0 * ((cos(k) / k) * ((l * l) / (t_1 * (k * t))));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 4d-81) then
tmp = (2.0d0 / ((k * ((t ** 3.0d0) / l)) / (l / k))) / (1.0d0 + (((k / t) ** 2.0d0) + 1.0d0))
else if (k <= 2.4d+131) then
tmp = 2.0d0 * (((l / t) * (l / (k * k))) * (cos(k) / t_1))
else
tmp = 2.0d0 * ((cos(k) / k) * ((l * l) / (t_1 * (k * t))))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 4e-81) {
tmp = (2.0 / ((k * (Math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (Math.pow((k / t), 2.0) + 1.0));
} else if (k <= 2.4e+131) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / t_1));
} else {
tmp = 2.0 * ((Math.cos(k) / k) * ((l * l) / (t_1 * (k * t))));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 4e-81: tmp = (2.0 / ((k * (math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (math.pow((k / t), 2.0) + 1.0)) elif k <= 2.4e+131: tmp = 2.0 * (((l / t) * (l / (k * k))) * (math.cos(k) / t_1)) else: tmp = 2.0 * ((math.cos(k) / k) * ((l * l) / (t_1 * (k * t)))) return tmp
l = abs(l) k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 4e-81) tmp = Float64(Float64(2.0 / Float64(Float64(k * Float64((t ^ 3.0) / l)) / Float64(l / k))) / Float64(1.0 + Float64((Float64(k / t) ^ 2.0) + 1.0))); elseif (k <= 2.4e+131) tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / t_1))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / k) * Float64(Float64(l * l) / Float64(t_1 * Float64(k * t))))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 4e-81) tmp = (2.0 / ((k * ((t ^ 3.0) / l)) / (l / k))) / (1.0 + (((k / t) ^ 2.0) + 1.0)); elseif (k <= 2.4e+131) tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / t_1)); else tmp = 2.0 * ((cos(k) / k) * ((l * l) / (t_1 * (k * t)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 4e-81], N[(N[(2.0 / N[(N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.4e+131], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(t$95$1 * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 4 \cdot 10^{-81}:\\
\;\;\;\;\frac{\frac{2}{\frac{k \cdot \frac{{t}^{3}}{\ell}}{\frac{\ell}{k}}}}{1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)}\\
\mathbf{elif}\;k \leq 2.4 \cdot 10^{+131}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k} \cdot \frac{\ell \cdot \ell}{t_1 \cdot \left(k \cdot t\right)}\right)\\
\end{array}
\end{array}
if k < 3.9999999999999998e-81Initial program 59.1%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
add-cube-cbrt59.0%
pow359.0%
cbrt-div59.0%
rem-cbrt-cube67.9%
Applied egg-rr67.9%
Taylor expanded in k around 0 52.5%
*-commutative52.5%
unpow252.5%
times-frac56.4%
unpow256.4%
associate-/l*59.8%
Simplified59.8%
associate-*r/64.9%
Applied egg-rr64.9%
if 3.9999999999999998e-81 < k < 2.3999999999999999e131Initial program 43.0%
associate-/r*43.1%
associate-*l*43.1%
sqr-neg43.1%
associate-*l*43.1%
*-commutative43.1%
sqr-neg43.1%
associate-*l/43.0%
associate-*r/43.1%
associate-/r/42.9%
Simplified42.9%
Taylor expanded in k around inf 64.1%
*-commutative64.1%
associate-*r*64.2%
times-frac64.1%
unpow264.1%
associate-*l*64.1%
unpow264.1%
Simplified64.1%
frac-times64.2%
Applied egg-rr64.2%
Taylor expanded in k around inf 64.1%
associate-*r*64.2%
unpow264.2%
associate-*r*64.2%
times-frac66.4%
associate-*r*66.4%
unpow266.4%
unpow266.4%
*-commutative66.4%
times-frac74.1%
unpow274.1%
Simplified74.1%
if 2.3999999999999999e131 < k Initial program 44.5%
associate-/r*44.5%
associate-*l*44.5%
sqr-neg44.5%
associate-*l*44.5%
*-commutative44.5%
sqr-neg44.5%
associate-/r*44.5%
Simplified44.5%
associate-/l/44.5%
associate-/r/44.5%
add-cube-cbrt44.5%
pow344.5%
Applied egg-rr58.5%
Taylor expanded in k around inf 65.1%
associate-*r/65.1%
associate-*r*65.1%
unpow265.1%
associate-*r*69.4%
associate-*r/69.4%
*-commutative69.4%
associate-*l*69.4%
times-frac74.9%
unpow274.9%
Simplified74.9%
Final simplification68.0%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 9e-81)
(/
(/ 2.0 (/ (* k (/ (pow t 3.0) l)) (/ l k)))
(+ 1.0 (+ (pow (/ k t) 2.0) 1.0)))
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (pow (sin k) 2.0))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 9e-81) {
tmp = (2.0 / ((k * (pow(t, 3.0) / l)) / (l / k))) / (1.0 + (pow((k / t), 2.0) + 1.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
if (k <= 9d-81) then
tmp = (2.0d0 / ((k * ((t ** 3.0d0) / l)) / (l / k))) / (1.0d0 + (((k / t) ** 2.0d0) + 1.0d0))
else
tmp = 2.0d0 * (((l / t) * (l / (k * k))) * (cos(k) / (sin(k) ** 2.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 9e-81) {
tmp = (2.0 / ((k * (Math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (Math.pow((k / t), 2.0) + 1.0));
} else {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): tmp = 0 if k <= 9e-81: tmp = (2.0 / ((k * (math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (math.pow((k / t), 2.0) + 1.0)) else: tmp = 2.0 * (((l / t) * (l / (k * k))) * (math.cos(k) / math.pow(math.sin(k), 2.0))) return tmp
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 9e-81) tmp = Float64(Float64(2.0 / Float64(Float64(k * Float64((t ^ 3.0) / l)) / Float64(l / k))) / Float64(1.0 + Float64((Float64(k / t) ^ 2.0) + 1.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9e-81) tmp = (2.0 / ((k * ((t ^ 3.0) / l)) / (l / k))) / (1.0 + (((k / t) ^ 2.0) + 1.0)); else tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 9e-81], N[(N[(2.0 / N[(N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 9 \cdot 10^{-81}:\\
\;\;\;\;\frac{\frac{2}{\frac{k \cdot \frac{{t}^{3}}{\ell}}{\frac{\ell}{k}}}}{1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 9.000000000000001e-81Initial program 59.1%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
add-cube-cbrt59.0%
pow359.0%
cbrt-div59.0%
rem-cbrt-cube67.9%
Applied egg-rr67.9%
Taylor expanded in k around 0 52.5%
*-commutative52.5%
unpow252.5%
times-frac56.4%
unpow256.4%
associate-/l*59.8%
Simplified59.8%
associate-*r/64.9%
Applied egg-rr64.9%
if 9.000000000000001e-81 < k Initial program 43.8%
associate-/r*43.8%
associate-*l*43.8%
sqr-neg43.8%
associate-*l*43.8%
*-commutative43.8%
sqr-neg43.8%
associate-*l/43.8%
associate-*r/43.8%
associate-/r/43.7%
Simplified43.7%
Taylor expanded in k around inf 64.6%
*-commutative64.6%
associate-*r*64.7%
times-frac64.7%
unpow264.7%
associate-*l*66.9%
unpow266.9%
Simplified66.9%
frac-times66.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 64.6%
associate-*r*64.7%
unpow264.7%
associate-*r*66.9%
times-frac68.0%
associate-*r*65.7%
unpow265.7%
unpow265.7%
*-commutative65.7%
times-frac70.9%
unpow270.9%
Simplified70.9%
Final simplification66.9%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 6e-81)
(/
(/ 2.0 (/ (* k (/ (pow t 3.0) l)) (/ l k)))
(+ 1.0 (+ (pow (/ k t) 2.0) 1.0)))
(if (<= k 1.45)
(* 2.0 (/ (* l (/ l t)) (pow k 4.0)))
(* 2.0 (* (* (/ l k) (/ l k)) (* (/ (cos k) t) 0.3333333333333333))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6e-81) {
tmp = (2.0 / ((k * (pow(t, 3.0) / l)) / (l / k))) / (1.0 + (pow((k / t), 2.0) + 1.0));
} else if (k <= 1.45) {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
if (k <= 6d-81) then
tmp = (2.0d0 / ((k * ((t ** 3.0d0) / l)) / (l / k))) / (1.0d0 + (((k / t) ** 2.0d0) + 1.0d0))
else if (k <= 1.45d0) then
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333d0))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6e-81) {
tmp = (2.0 / ((k * (Math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (Math.pow((k / t), 2.0) + 1.0));
} else if (k <= 1.45) {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((Math.cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): tmp = 0 if k <= 6e-81: tmp = (2.0 / ((k * (math.pow(t, 3.0) / l)) / (l / k))) / (1.0 + (math.pow((k / t), 2.0) + 1.0)) elif k <= 1.45: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) else: tmp = 2.0 * (((l / k) * (l / k)) * ((math.cos(k) / t) * 0.3333333333333333)) return tmp
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6e-81) tmp = Float64(Float64(2.0 / Float64(Float64(k * Float64((t ^ 3.0) / l)) / Float64(l / k))) / Float64(1.0 + Float64((Float64(k / t) ^ 2.0) + 1.0))); elseif (k <= 1.45) tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(cos(k) / t) * 0.3333333333333333))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6e-81) tmp = (2.0 / ((k * ((t ^ 3.0) / l)) / (l / k))) / (1.0 + (((k / t) ^ 2.0) + 1.0)); elseif (k <= 1.45) tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); else tmp = 2.0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6e-81], N[(N[(2.0 / N[(N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.45], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6 \cdot 10^{-81}:\\
\;\;\;\;\frac{\frac{2}{\frac{k \cdot \frac{{t}^{3}}{\ell}}{\frac{\ell}{k}}}}{1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)}\\
\mathbf{elif}\;k \leq 1.45:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{\cos k}{t} \cdot 0.3333333333333333\right)\right)\\
\end{array}
\end{array}
if k < 5.9999999999999998e-81Initial program 59.1%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
add-cube-cbrt59.0%
pow359.0%
cbrt-div59.0%
rem-cbrt-cube67.9%
Applied egg-rr67.9%
Taylor expanded in k around 0 52.5%
*-commutative52.5%
unpow252.5%
times-frac56.4%
unpow256.4%
associate-/l*59.8%
Simplified59.8%
associate-*r/64.9%
Applied egg-rr64.9%
if 5.9999999999999998e-81 < k < 1.44999999999999996Initial program 42.9%
associate-/r*42.9%
associate-*l*42.9%
sqr-neg42.9%
associate-*l*42.9%
*-commutative42.9%
sqr-neg42.9%
associate-*l/42.9%
associate-*r/42.9%
associate-/r/42.9%
Simplified42.9%
Taylor expanded in k around inf 30.6%
*-commutative30.6%
associate-*r*30.6%
times-frac30.5%
unpow230.5%
associate-*l*30.5%
unpow230.5%
Simplified30.5%
Taylor expanded in k around 0 30.7%
unpow230.7%
*-commutative30.7%
times-frac42.7%
Simplified42.7%
associate-*r/49.5%
Applied egg-rr49.5%
if 1.44999999999999996 < k Initial program 44.0%
associate-/r*44.0%
associate-*l*44.0%
sqr-neg44.0%
associate-*l*44.0%
*-commutative44.0%
sqr-neg44.0%
associate-*l/44.0%
associate-*r/44.0%
associate-/r/43.9%
Simplified43.9%
Taylor expanded in k around inf 71.6%
*-commutative71.6%
associate-*r*71.6%
times-frac71.6%
unpow271.6%
associate-*l*74.3%
unpow274.3%
Simplified74.3%
Taylor expanded in k around 0 60.9%
fma-def60.9%
unpow260.9%
unpow260.9%
associate-*r/60.9%
unpow260.9%
Simplified60.9%
Taylor expanded in k around inf 60.6%
*-commutative60.6%
times-frac60.2%
unpow260.2%
associate-*r/62.3%
unpow262.3%
associate-*l*62.3%
associate-/r*64.0%
associate-*r/63.7%
associate-*l/64.3%
Simplified64.3%
Final simplification63.9%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ l k) (/ l k))))
(if (<= k 4.8e-145)
(/ (* t_1 (/ 2.0 (pow t 3.0))) (+ 2.0 (pow (/ k t) 2.0)))
(if (<= k 1.16e-14)
(/ (* l (/ l (pow t 3.0))) (* k k))
(* 2.0 (* t_1 (* (/ (cos k) t) 0.3333333333333333)))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double tmp;
if (k <= 4.8e-145) {
tmp = (t_1 * (2.0 / pow(t, 3.0))) / (2.0 + pow((k / t), 2.0));
} else if (k <= 1.16e-14) {
tmp = (l * (l / pow(t, 3.0))) / (k * k);
} else {
tmp = 2.0 * (t_1 * ((cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
t_1 = (l / k) * (l / k)
if (k <= 4.8d-145) then
tmp = (t_1 * (2.0d0 / (t ** 3.0d0))) / (2.0d0 + ((k / t) ** 2.0d0))
else if (k <= 1.16d-14) then
tmp = (l * (l / (t ** 3.0d0))) / (k * k)
else
tmp = 2.0d0 * (t_1 * ((cos(k) / t) * 0.3333333333333333d0))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double tmp;
if (k <= 4.8e-145) {
tmp = (t_1 * (2.0 / Math.pow(t, 3.0))) / (2.0 + Math.pow((k / t), 2.0));
} else if (k <= 1.16e-14) {
tmp = (l * (l / Math.pow(t, 3.0))) / (k * k);
} else {
tmp = 2.0 * (t_1 * ((Math.cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): t_1 = (l / k) * (l / k) tmp = 0 if k <= 4.8e-145: tmp = (t_1 * (2.0 / math.pow(t, 3.0))) / (2.0 + math.pow((k / t), 2.0)) elif k <= 1.16e-14: tmp = (l * (l / math.pow(t, 3.0))) / (k * k) else: tmp = 2.0 * (t_1 * ((math.cos(k) / t) * 0.3333333333333333)) return tmp
l = abs(l) k = abs(k) function code(t, l, k) t_1 = Float64(Float64(l / k) * Float64(l / k)) tmp = 0.0 if (k <= 4.8e-145) tmp = Float64(Float64(t_1 * Float64(2.0 / (t ^ 3.0))) / Float64(2.0 + (Float64(k / t) ^ 2.0))); elseif (k <= 1.16e-14) tmp = Float64(Float64(l * Float64(l / (t ^ 3.0))) / Float64(k * k)); else tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(cos(k) / t) * 0.3333333333333333))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) t_1 = (l / k) * (l / k); tmp = 0.0; if (k <= 4.8e-145) tmp = (t_1 * (2.0 / (t ^ 3.0))) / (2.0 + ((k / t) ^ 2.0)); elseif (k <= 1.16e-14) tmp = (l * (l / (t ^ 3.0))) / (k * k); else tmp = 2.0 * (t_1 * ((cos(k) / t) * 0.3333333333333333)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 4.8e-145], N[(N[(t$95$1 * N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.16e-14], N[(N[(l * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{k} \cdot \frac{\ell}{k}\\
\mathbf{if}\;k \leq 4.8 \cdot 10^{-145}:\\
\;\;\;\;\frac{t_1 \cdot \frac{2}{{t}^{3}}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.16 \cdot 10^{-14}:\\
\;\;\;\;\frac{\ell \cdot \frac{\ell}{{t}^{3}}}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(\frac{\cos k}{t} \cdot 0.3333333333333333\right)\right)\\
\end{array}
\end{array}
if k < 4.8000000000000003e-145Initial program 58.1%
associate-/r*58.1%
+-commutative58.1%
Simplified58.1%
add-cube-cbrt58.0%
pow358.0%
cbrt-div58.0%
rem-cbrt-cube67.8%
Applied egg-rr67.8%
Taylor expanded in k around 0 50.9%
*-commutative50.9%
unpow250.9%
times-frac55.6%
unpow255.6%
associate-/l*59.4%
Simplified59.4%
div-inv59.4%
associate-*l/58.7%
associate-/r/58.7%
associate-+r+58.7%
metadata-eval58.7%
Applied egg-rr58.7%
associate-*r/58.7%
*-rgt-identity58.7%
associate-/l*58.7%
associate-*l/55.0%
unpow255.0%
associate-/l*50.3%
unpow250.3%
associate-/r/50.2%
unpow250.2%
unpow250.2%
times-frac60.5%
Simplified60.5%
if 4.8000000000000003e-145 < k < 1.16000000000000007e-14Initial program 60.7%
associate-/r*60.7%
associate-*l*60.7%
sqr-neg60.7%
associate-*l*60.7%
*-commutative60.7%
sqr-neg60.7%
associate-*l/60.7%
associate-*r/60.5%
associate-/r/60.5%
Simplified60.5%
Taylor expanded in k around 0 64.1%
unpow264.1%
*-commutative64.1%
times-frac62.7%
unpow262.7%
Simplified62.7%
associate-*r/70.1%
Applied egg-rr70.1%
if 1.16000000000000007e-14 < k Initial program 42.8%
associate-/r*42.8%
associate-*l*42.8%
sqr-neg42.8%
associate-*l*42.8%
*-commutative42.8%
sqr-neg42.8%
associate-*l/42.8%
associate-*r/42.8%
associate-/r/42.7%
Simplified42.7%
Taylor expanded in k around inf 71.0%
*-commutative71.0%
associate-*r*71.0%
times-frac71.0%
unpow271.0%
associate-*l*73.6%
unpow273.6%
Simplified73.6%
Taylor expanded in k around 0 60.6%
fma-def60.6%
unpow260.6%
unpow260.6%
associate-*r/60.6%
unpow260.6%
Simplified60.6%
Taylor expanded in k around inf 59.1%
*-commutative59.1%
times-frac58.7%
unpow258.7%
associate-*r/60.7%
unpow260.7%
associate-*l*60.7%
associate-/r*62.4%
associate-*r/62.1%
associate-*l/62.7%
Simplified62.7%
Final simplification62.2%
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 3.1e-80)
(/
(/ 2.0 (* (/ (pow t 3.0) l) (/ k (/ l k))))
(+ 1.0 (+ 1.0 (* (/ k t) (/ k t)))))
(if (<= k 1.45)
(* 2.0 (/ (* l (/ l t)) (pow k 4.0)))
(* 2.0 (* (* (/ l k) (/ l k)) (* (/ (cos k) t) 0.3333333333333333))))))l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 3.1e-80) {
tmp = (2.0 / ((pow(t, 3.0) / l) * (k / (l / k)))) / (1.0 + (1.0 + ((k / t) * (k / t))));
} else if (k <= 1.45) {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
if (k <= 3.1d-80) then
tmp = (2.0d0 / (((t ** 3.0d0) / l) * (k / (l / k)))) / (1.0d0 + (1.0d0 + ((k / t) * (k / t))))
else if (k <= 1.45d0) then
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333d0))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.1e-80) {
tmp = (2.0 / ((Math.pow(t, 3.0) / l) * (k / (l / k)))) / (1.0 + (1.0 + ((k / t) * (k / t))));
} else if (k <= 1.45) {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((Math.cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): tmp = 0 if k <= 3.1e-80: tmp = (2.0 / ((math.pow(t, 3.0) / l) * (k / (l / k)))) / (1.0 + (1.0 + ((k / t) * (k / t)))) elif k <= 1.45: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) else: tmp = 2.0 * (((l / k) * (l / k)) * ((math.cos(k) / t) * 0.3333333333333333)) return tmp
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 3.1e-80) tmp = Float64(Float64(2.0 / Float64(Float64((t ^ 3.0) / l) * Float64(k / Float64(l / k)))) / Float64(1.0 + Float64(1.0 + Float64(Float64(k / t) * Float64(k / t))))); elseif (k <= 1.45) tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(cos(k) / t) * 0.3333333333333333))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.1e-80) tmp = (2.0 / (((t ^ 3.0) / l) * (k / (l / k)))) / (1.0 + (1.0 + ((k / t) * (k / t)))); elseif (k <= 1.45) tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); else tmp = 2.0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 3.1e-80], N[(N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(1.0 + N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.45], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.1 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{2}{\frac{{t}^{3}}{\ell} \cdot \frac{k}{\frac{\ell}{k}}}}{1 + \left(1 + \frac{k}{t} \cdot \frac{k}{t}\right)}\\
\mathbf{elif}\;k \leq 1.45:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{\cos k}{t} \cdot 0.3333333333333333\right)\right)\\
\end{array}
\end{array}
if k < 3.10000000000000016e-80Initial program 59.1%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
add-cube-cbrt59.0%
pow359.0%
cbrt-div59.0%
rem-cbrt-cube67.9%
Applied egg-rr67.9%
Taylor expanded in k around 0 52.5%
*-commutative52.5%
unpow252.5%
times-frac56.4%
unpow256.4%
associate-/l*59.8%
Simplified59.8%
unpow259.8%
Applied egg-rr59.8%
if 3.10000000000000016e-80 < k < 1.44999999999999996Initial program 42.9%
associate-/r*42.9%
associate-*l*42.9%
sqr-neg42.9%
associate-*l*42.9%
*-commutative42.9%
sqr-neg42.9%
associate-*l/42.9%
associate-*r/42.9%
associate-/r/42.9%
Simplified42.9%
Taylor expanded in k around inf 30.6%
*-commutative30.6%
associate-*r*30.6%
times-frac30.5%
unpow230.5%
associate-*l*30.5%
unpow230.5%
Simplified30.5%
Taylor expanded in k around 0 30.7%
unpow230.7%
*-commutative30.7%
times-frac42.7%
Simplified42.7%
associate-*r/49.5%
Applied egg-rr49.5%
if 1.44999999999999996 < k Initial program 44.0%
associate-/r*44.0%
associate-*l*44.0%
sqr-neg44.0%
associate-*l*44.0%
*-commutative44.0%
sqr-neg44.0%
associate-*l/44.0%
associate-*r/44.0%
associate-/r/43.9%
Simplified43.9%
Taylor expanded in k around inf 71.6%
*-commutative71.6%
associate-*r*71.6%
times-frac71.6%
unpow271.6%
associate-*l*74.3%
unpow274.3%
Simplified74.3%
Taylor expanded in k around 0 60.9%
fma-def60.9%
unpow260.9%
unpow260.9%
associate-*r/60.9%
unpow260.9%
Simplified60.9%
Taylor expanded in k around inf 60.6%
*-commutative60.6%
times-frac60.2%
unpow260.2%
associate-*r/62.3%
unpow262.3%
associate-*l*62.3%
associate-/r*64.0%
associate-*r/63.7%
associate-*l/64.3%
Simplified64.3%
Final simplification60.5%
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 2.1e-14) (/ (* l (/ l (pow t 3.0))) (* k k)) (* 2.0 (* (* (/ l k) (/ l k)) (* (/ (cos k) t) 0.3333333333333333)))))
l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.1e-14) {
tmp = (l * (l / pow(t, 3.0))) / (k * k);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
if (k <= 2.1d-14) then
tmp = (l * (l / (t ** 3.0d0))) / (k * k)
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333d0))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.1e-14) {
tmp = (l * (l / Math.pow(t, 3.0))) / (k * k);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((Math.cos(k) / t) * 0.3333333333333333));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.1e-14: tmp = (l * (l / math.pow(t, 3.0))) / (k * k) else: tmp = 2.0 * (((l / k) * (l / k)) * ((math.cos(k) / t) * 0.3333333333333333)) return tmp
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.1e-14) tmp = Float64(Float64(l * Float64(l / (t ^ 3.0))) / Float64(k * k)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(cos(k) / t) * 0.3333333333333333))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.1e-14) tmp = (l * (l / (t ^ 3.0))) / (k * k); else tmp = 2.0 * (((l / k) * (l / k)) * ((cos(k) / t) * 0.3333333333333333)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.1e-14], N[(N[(l * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.1 \cdot 10^{-14}:\\
\;\;\;\;\frac{\ell \cdot \frac{\ell}{{t}^{3}}}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{\cos k}{t} \cdot 0.3333333333333333\right)\right)\\
\end{array}
\end{array}
if k < 2.0999999999999999e-14Initial program 58.5%
associate-/r*58.5%
associate-*l*53.5%
sqr-neg53.5%
associate-*l*58.5%
*-commutative58.5%
sqr-neg58.5%
associate-*l/59.0%
associate-*r/57.9%
associate-/r/57.9%
Simplified57.9%
Taylor expanded in k around 0 54.1%
unpow254.1%
*-commutative54.1%
times-frac57.7%
unpow257.7%
Simplified57.7%
associate-*r/57.8%
Applied egg-rr57.8%
if 2.0999999999999999e-14 < k Initial program 42.8%
associate-/r*42.8%
associate-*l*42.8%
sqr-neg42.8%
associate-*l*42.8%
*-commutative42.8%
sqr-neg42.8%
associate-*l/42.8%
associate-*r/42.8%
associate-/r/42.7%
Simplified42.7%
Taylor expanded in k around inf 71.0%
*-commutative71.0%
associate-*r*71.0%
times-frac71.0%
unpow271.0%
associate-*l*73.6%
unpow273.6%
Simplified73.6%
Taylor expanded in k around 0 60.6%
fma-def60.6%
unpow260.6%
unpow260.6%
associate-*r/60.6%
unpow260.6%
Simplified60.6%
Taylor expanded in k around inf 59.1%
*-commutative59.1%
times-frac58.7%
unpow258.7%
associate-*r/60.7%
unpow260.7%
associate-*l*60.7%
associate-/r*62.4%
associate-*r/62.1%
associate-*l/62.7%
Simplified62.7%
Final simplification59.2%
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 3.2e-80) (* (/ l (* k k)) (/ l (pow t 3.0))) (* 2.0 (/ (* l (/ l t)) (pow k 4.0)))))
l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 3.2e-80) {
tmp = (l / (k * k)) * (l / pow(t, 3.0));
} else {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
if (k <= 3.2d-80) then
tmp = (l / (k * k)) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.2e-80) {
tmp = (l / (k * k)) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): tmp = 0 if k <= 3.2e-80: tmp = (l / (k * k)) * (l / math.pow(t, 3.0)) else: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) return tmp
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 3.2e-80) tmp = Float64(Float64(l / Float64(k * k)) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.2e-80) tmp = (l / (k * k)) * (l / (t ^ 3.0)); else tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 3.2e-80], N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\ell}{k \cdot k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 3.1999999999999999e-80Initial program 59.1%
associate-/r*59.1%
associate-*l*53.8%
sqr-neg53.8%
associate-*l*59.1%
*-commutative59.1%
sqr-neg59.1%
associate-*l/59.6%
associate-*r/58.4%
associate-/r/58.5%
Simplified58.5%
Taylor expanded in k around 0 54.4%
unpow254.4%
*-commutative54.4%
times-frac58.1%
unpow258.1%
Simplified58.1%
if 3.1999999999999999e-80 < k Initial program 43.8%
associate-/r*43.8%
associate-*l*43.8%
sqr-neg43.8%
associate-*l*43.8%
*-commutative43.8%
sqr-neg43.8%
associate-*l/43.8%
associate-*r/43.8%
associate-/r/43.7%
Simplified43.7%
Taylor expanded in k around inf 64.6%
*-commutative64.6%
associate-*r*64.7%
times-frac64.7%
unpow264.7%
associate-*l*66.9%
unpow266.9%
Simplified66.9%
Taylor expanded in k around 0 49.3%
unpow249.3%
*-commutative49.3%
times-frac52.8%
Simplified52.8%
associate-*r/53.8%
Applied egg-rr53.8%
Final simplification56.7%
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 2.5e-79) (/ (* l (/ l (pow t 3.0))) (* k k)) (* 2.0 (/ (* l (/ l t)) (pow k 4.0)))))
l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-79) {
tmp = (l * (l / pow(t, 3.0))) / (k * k);
} else {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this 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) :: tmp
if (k <= 2.5d-79) then
tmp = (l * (l / (t ** 3.0d0))) / (k * k)
else
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
end if
code = tmp
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-79) {
tmp = (l * (l / Math.pow(t, 3.0))) / (k * k);
} else {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
}
return tmp;
}
l = abs(l) k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.5e-79: tmp = (l * (l / math.pow(t, 3.0))) / (k * k) else: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) return tmp
l = abs(l) k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.5e-79) tmp = Float64(Float64(l * Float64(l / (t ^ 3.0))) / Float64(k * k)); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); end return tmp end
l = abs(l) k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.5e-79) tmp = (l * (l / (t ^ 3.0))) / (k * k); else tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.5e-79], N[(N[(l * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-79}:\\
\;\;\;\;\frac{\ell \cdot \frac{\ell}{{t}^{3}}}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 2.5e-79Initial program 58.8%
associate-/r*58.8%
associate-*l*53.5%
sqr-neg53.5%
associate-*l*58.8%
*-commutative58.8%
sqr-neg58.8%
associate-*l/59.3%
associate-*r/58.1%
associate-/r/58.1%
Simplified58.1%
Taylor expanded in k around 0 54.1%
unpow254.1%
*-commutative54.1%
times-frac57.7%
unpow257.7%
Simplified57.7%
associate-*r/57.9%
Applied egg-rr57.9%
if 2.5e-79 < k Initial program 44.3%
associate-/r*44.4%
associate-*l*44.4%
sqr-neg44.4%
associate-*l*44.4%
*-commutative44.4%
sqr-neg44.4%
associate-*l/44.3%
associate-*r/44.4%
associate-/r/44.3%
Simplified44.3%
Taylor expanded in k around inf 65.4%
*-commutative65.4%
associate-*r*65.4%
times-frac65.4%
unpow265.4%
associate-*l*67.7%
unpow267.7%
Simplified67.7%
Taylor expanded in k around 0 49.9%
unpow249.9%
*-commutative49.9%
times-frac53.4%
Simplified53.4%
associate-*r/54.4%
Applied egg-rr54.4%
Final simplification56.8%
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (/ l t) (/ l (pow k 4.0)))))
l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / pow(k, 4.0)));
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
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 * ((l / t) * (l / (k ** 4.0d0)))
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
l = abs(l) k = abs(k) def code(t, l, k): return 2.0 * ((l / t) * (l / math.pow(k, 4.0)))
l = abs(l) k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))) end
l = abs(l) k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)
\end{array}
Initial program 54.2%
associate-/r*54.2%
associate-*l*50.6%
sqr-neg50.6%
associate-*l*54.2%
*-commutative54.2%
sqr-neg54.2%
associate-*l/54.5%
associate-*r/53.7%
associate-/r/53.7%
Simplified53.7%
Taylor expanded in k around inf 63.5%
*-commutative63.5%
associate-*r*63.5%
times-frac63.5%
unpow263.5%
associate-*l*65.0%
unpow265.0%
Simplified65.0%
Taylor expanded in k around 0 53.6%
unpow253.6%
*-commutative53.6%
times-frac57.2%
Simplified57.2%
Final simplification57.2%
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (* l (/ l (pow k 4.0))) t)))
l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l * (l / pow(k, 4.0))) / t);
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
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 * ((l * (l / (k ** 4.0d0))) / t)
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l * (l / Math.pow(k, 4.0))) / t);
}
l = abs(l) k = abs(k) def code(t, l, k): return 2.0 * ((l * (l / math.pow(k, 4.0))) / t)
l = abs(l) k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l * Float64(l / (k ^ 4.0))) / t)) end
l = abs(l) k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l * (l / (k ^ 4.0))) / t); end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
2 \cdot \frac{\ell \cdot \frac{\ell}{{k}^{4}}}{t}
\end{array}
Initial program 54.2%
associate-/r*54.2%
associate-*l*50.6%
sqr-neg50.6%
associate-*l*54.2%
*-commutative54.2%
sqr-neg54.2%
associate-*l/54.5%
associate-*r/53.7%
associate-/r/53.7%
Simplified53.7%
Taylor expanded in k around inf 63.5%
*-commutative63.5%
associate-*r*63.5%
times-frac63.5%
unpow263.5%
associate-*l*65.0%
unpow265.0%
Simplified65.0%
Taylor expanded in k around 0 53.6%
unpow253.6%
*-commutative53.6%
times-frac57.2%
Simplified57.2%
associate-*l/57.4%
Applied egg-rr57.4%
Final simplification57.4%
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (* l (/ l t)) (pow k 4.0))))
l = abs(l);
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l * (l / t)) / pow(k, 4.0));
}
NOTE: l should be positive before calling this function
NOTE: k should be positive before calling this function
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 * ((l * (l / t)) / (k ** 4.0d0))
end function
l = Math.abs(l);
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
}
l = abs(l) k = abs(k) def code(t, l, k): return 2.0 * ((l * (l / t)) / math.pow(k, 4.0))
l = abs(l) k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))) end
l = abs(l) k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); end
NOTE: l should be positive before calling this function NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
k = |k|\\
\\
2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}
\end{array}
Initial program 54.2%
associate-/r*54.2%
associate-*l*50.6%
sqr-neg50.6%
associate-*l*54.2%
*-commutative54.2%
sqr-neg54.2%
associate-*l/54.5%
associate-*r/53.7%
associate-/r/53.7%
Simplified53.7%
Taylor expanded in k around inf 63.5%
*-commutative63.5%
associate-*r*63.5%
times-frac63.5%
unpow263.5%
associate-*l*65.0%
unpow265.0%
Simplified65.0%
Taylor expanded in k around 0 53.6%
unpow253.6%
*-commutative53.6%
times-frac57.2%
Simplified57.2%
associate-*r/57.8%
Applied egg-rr57.8%
Final simplification57.8%
herbie shell --seed 2023278
(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))))