
(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 18 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}
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (pow (cbrt l) 2.0) (cbrt 2.0))))
(if (<= k_m 7.2e-6)
(pow
(/
t_1
(*
k_m
(+
(cbrt (* k_m t))
(* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
3.0)
(pow
(/
t_1
(* t (* (pow (cbrt (/ k_m t)) 2.0) (cbrt (* (sin k_m) (tan k_m))))))
3.0))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), 2.0) * cbrt(2.0);
double tmp;
if (k_m <= 7.2e-6) {
tmp = pow((t_1 / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
} else {
tmp = pow((t_1 / (t * (pow(cbrt((k_m / t)), 2.0) * cbrt((sin(k_m) * tan(k_m)))))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0);
double tmp;
if (k_m <= 7.2e-6) {
tmp = Math.pow((t_1 / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
} else {
tmp = Math.pow((t_1 / (t * (Math.pow(Math.cbrt((k_m / t)), 2.0) * Math.cbrt((Math.sin(k_m) * Math.tan(k_m)))))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) tmp = 0.0 if (k_m <= 7.2e-6) tmp = Float64(t_1 / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0; else tmp = Float64(t_1 / Float64(t * Float64((cbrt(Float64(k_m / t)) ^ 2.0) * cbrt(Float64(sin(k_m) * tan(k_m)))))) ^ 3.0; end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k$95$m, 7.2e-6], N[Power[N[(t$95$1 / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[Power[N[(t$95$1 / N[(t * N[(N[Power[N[Power[N[(k$95$m / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}\\
\mathbf{if}\;k\_m \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;{\left(\frac{t\_1}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{t\_1}{t \cdot \left({\left(\sqrt[3]{\frac{k\_m}{t}}\right)}^{2} \cdot \sqrt[3]{\sin k\_m \cdot \tan k\_m}\right)}\right)}^{3}\\
\end{array}
\end{array}
if k < 7.19999999999999967e-6Initial program 38.4%
Simplified43.7%
add-cube-cbrt43.7%
pow343.7%
Applied egg-rr57.8%
pow257.8%
*-commutative57.8%
cbrt-prod57.7%
cbrt-prod70.4%
unpow270.4%
Applied egg-rr70.4%
Taylor expanded in k around 0 83.5%
if 7.19999999999999967e-6 < k Initial program 27.0%
Simplified34.5%
add-cube-cbrt34.4%
pow334.4%
Applied egg-rr56.2%
pow256.2%
*-commutative56.2%
cbrt-prod56.1%
cbrt-prod67.5%
unpow267.5%
Applied egg-rr67.5%
cbrt-prod67.5%
unpow267.5%
cbrt-prod82.9%
pow282.9%
Applied egg-rr82.9%
Final simplification83.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (pow (cbrt l) 2.0) (cbrt 2.0))))
(if (<= k_m 4e-9)
(pow
(/
t_1
(*
k_m
(+
(cbrt (* k_m t))
(* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
3.0)
(if (<= k_m 1.46e+158)
(pow
(/
t_1
(cbrt (/ (* (pow k_m 2.0) (* t (pow (sin k_m) 2.0))) (cos k_m))))
3.0)
(pow
(/
t_1
(* t (cbrt (* (* (sin k_m) (tan k_m)) (* (/ k_m t) (/ k_m t))))))
3.0)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), 2.0) * cbrt(2.0);
double tmp;
if (k_m <= 4e-9) {
tmp = pow((t_1 / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
} else if (k_m <= 1.46e+158) {
tmp = pow((t_1 / cbrt(((pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0))) / cos(k_m)))), 3.0);
} else {
tmp = pow((t_1 / (t * cbrt(((sin(k_m) * tan(k_m)) * ((k_m / t) * (k_m / t)))))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0);
double tmp;
if (k_m <= 4e-9) {
tmp = Math.pow((t_1 / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
} else if (k_m <= 1.46e+158) {
tmp = Math.pow((t_1 / Math.cbrt(((Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0))) / Math.cos(k_m)))), 3.0);
} else {
tmp = Math.pow((t_1 / (t * Math.cbrt(((Math.sin(k_m) * Math.tan(k_m)) * ((k_m / t) * (k_m / t)))))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) tmp = 0.0 if (k_m <= 4e-9) tmp = Float64(t_1 / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0; elseif (k_m <= 1.46e+158) tmp = Float64(t_1 / cbrt(Float64(Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0))) / cos(k_m)))) ^ 3.0; else tmp = Float64(t_1 / Float64(t * cbrt(Float64(Float64(sin(k_m) * tan(k_m)) * Float64(Float64(k_m / t) * Float64(k_m / t)))))) ^ 3.0; end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k$95$m, 4e-9], N[Power[N[(t$95$1 / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 1.46e+158], N[Power[N[(t$95$1 / N[Power[N[(N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[Power[N[(t$95$1 / N[(t * N[Power[N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[(k$95$m / t), $MachinePrecision] * N[(k$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}\\
\mathbf{if}\;k\_m \leq 4 \cdot 10^{-9}:\\
\;\;\;\;{\left(\frac{t\_1}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\
\mathbf{elif}\;k\_m \leq 1.46 \cdot 10^{+158}:\\
\;\;\;\;{\left(\frac{t\_1}{\sqrt[3]{\frac{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}{\cos k\_m}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{t\_1}{t \cdot \sqrt[3]{\left(\sin k\_m \cdot \tan k\_m\right) \cdot \left(\frac{k\_m}{t} \cdot \frac{k\_m}{t}\right)}}\right)}^{3}\\
\end{array}
\end{array}
if k < 4.00000000000000025e-9Initial program 38.6%
Simplified43.9%
add-cube-cbrt43.9%
pow343.9%
Applied egg-rr58.0%
pow258.0%
*-commutative58.0%
cbrt-prod58.0%
cbrt-prod70.8%
unpow270.8%
Applied egg-rr70.8%
Taylor expanded in k around 0 83.4%
if 4.00000000000000025e-9 < k < 1.4599999999999999e158Initial program 25.2%
Simplified36.6%
add-cube-cbrt36.5%
pow336.5%
Applied egg-rr60.0%
pow260.0%
*-commutative60.0%
cbrt-prod59.8%
cbrt-prod68.2%
unpow268.2%
Applied egg-rr68.2%
Taylor expanded in t around 0 89.9%
if 1.4599999999999999e158 < k Initial program 29.3%
Simplified29.2%
add-cube-cbrt29.2%
pow329.2%
Applied egg-rr47.0%
pow247.0%
*-commutative47.0%
cbrt-prod47.0%
cbrt-prod63.4%
unpow263.4%
Applied egg-rr63.4%
unpow263.4%
Applied egg-rr63.4%
Final simplification82.7%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (pow (cbrt l) 2.0) (cbrt 2.0))))
(if (<= k_m 0.7)
(pow
(/
t_1
(*
k_m
(+
(cbrt (* k_m t))
(* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
3.0)
(if (<= k_m 2e+158)
(*
(* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
(* (pow k_m -2.0) (/ 2.0 t)))
(pow
(/
t_1
(* t (cbrt (* (* (sin k_m) (tan k_m)) (* (/ k_m t) (/ k_m t))))))
3.0)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), 2.0) * cbrt(2.0);
double tmp;
if (k_m <= 0.7) {
tmp = pow((t_1 / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
} else if (k_m <= 2e+158) {
tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
} else {
tmp = pow((t_1 / (t * cbrt(((sin(k_m) * tan(k_m)) * ((k_m / t) * (k_m / t)))))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0);
double tmp;
if (k_m <= 0.7) {
tmp = Math.pow((t_1 / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
} else if (k_m <= 2e+158) {
tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
} else {
tmp = Math.pow((t_1 / (t * Math.cbrt(((Math.sin(k_m) * Math.tan(k_m)) * ((k_m / t) * (k_m / t)))))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) tmp = 0.0 if (k_m <= 0.7) tmp = Float64(t_1 / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0; elseif (k_m <= 2e+158) tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t))); else tmp = Float64(t_1 / Float64(t * cbrt(Float64(Float64(sin(k_m) * tan(k_m)) * Float64(Float64(k_m / t) * Float64(k_m / t)))))) ^ 3.0; end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k$95$m, 0.7], N[Power[N[(t$95$1 / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 2e+158], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$1 / N[(t * N[Power[N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[(k$95$m / t), $MachinePrecision] * N[(k$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}\\
\mathbf{if}\;k\_m \leq 0.7:\\
\;\;\;\;{\left(\frac{t\_1}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\
\mathbf{elif}\;k\_m \leq 2 \cdot 10^{+158}:\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{t\_1}{t \cdot \sqrt[3]{\left(\sin k\_m \cdot \tan k\_m\right) \cdot \left(\frac{k\_m}{t} \cdot \frac{k\_m}{t}\right)}}\right)}^{3}\\
\end{array}
\end{array}
if k < 0.69999999999999996Initial program 38.0%
Simplified43.8%
add-cube-cbrt43.7%
pow343.8%
Applied egg-rr58.2%
pow258.2%
*-commutative58.2%
cbrt-prod58.2%
cbrt-prod70.7%
unpow270.7%
Applied egg-rr70.7%
Taylor expanded in k around 0 83.6%
if 0.69999999999999996 < k < 1.99999999999999991e158Initial program 27.0%
Simplified36.9%
Taylor expanded in t around 0 86.1%
associate-*r*86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in k around inf 86.0%
associate-*r/86.0%
times-frac84.2%
*-commutative84.2%
Simplified84.2%
associate-*r/81.1%
div-inv81.1%
pow-flip81.1%
metadata-eval81.1%
pow281.1%
*-commutative81.1%
pow281.1%
Applied egg-rr81.1%
*-commutative81.1%
*-commutative81.1%
times-frac86.3%
*-commutative86.3%
associate-*r/86.5%
*-commutative86.5%
associate-/l*86.5%
Simplified86.5%
if 1.99999999999999991e158 < k Initial program 29.3%
Simplified29.2%
add-cube-cbrt29.2%
pow329.2%
Applied egg-rr47.0%
pow247.0%
*-commutative47.0%
cbrt-prod47.0%
cbrt-prod63.4%
unpow263.4%
Applied egg-rr63.4%
unpow263.4%
Applied egg-rr63.4%
Final simplification82.2%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 3.4e-76)
(*
(* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
(* (pow k_m -2.0) (/ 2.0 t)))
(if (<= t 4.3e+228)
(/
(/ 2.0 (pow (/ k_m t) 2.0))
(pow (* t (* (cbrt (* (sin k_m) (tan k_m))) (pow (cbrt l) -2.0))) 3.0))
(pow
(/
(cbrt (* 2.0 (pow l 2.0)))
(*
k_m
(+
(cbrt (* k_m t))
(* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
3.0))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 3.4e-76) {
tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
} else if (t <= 4.3e+228) {
tmp = (2.0 / pow((k_m / t), 2.0)) / pow((t * (cbrt((sin(k_m) * tan(k_m))) * pow(cbrt(l), -2.0))), 3.0);
} else {
tmp = pow((cbrt((2.0 * pow(l, 2.0))) / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 3.4e-76) {
tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
} else if (t <= 4.3e+228) {
tmp = (2.0 / Math.pow((k_m / t), 2.0)) / Math.pow((t * (Math.cbrt((Math.sin(k_m) * Math.tan(k_m))) * Math.pow(Math.cbrt(l), -2.0))), 3.0);
} else {
tmp = Math.pow((Math.cbrt((2.0 * Math.pow(l, 2.0))) / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 3.4e-76) tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t))); elseif (t <= 4.3e+228) tmp = Float64(Float64(2.0 / (Float64(k_m / t) ^ 2.0)) / (Float64(t * Float64(cbrt(Float64(sin(k_m) * tan(k_m))) * (cbrt(l) ^ -2.0))) ^ 3.0)); else tmp = Float64(cbrt(Float64(2.0 * (l ^ 2.0))) / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0; end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 3.4e-76], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+228], N[(N[(2.0 / N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(t * N[(N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.4 \cdot 10^{-76}:\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+228}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k\_m}{t}\right)}^{2}}}{{\left(t \cdot \left(\sqrt[3]{\sin k\_m \cdot \tan k\_m} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\ell}^{2}}}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\
\end{array}
\end{array}
if t < 3.3999999999999999e-76Initial program 35.1%
Simplified39.3%
Taylor expanded in t around 0 71.6%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in k around inf 71.9%
associate-*r/71.9%
times-frac72.1%
*-commutative72.1%
Simplified72.1%
associate-*r/71.4%
div-inv71.4%
pow-flip71.7%
metadata-eval71.7%
pow271.7%
*-commutative71.7%
pow271.7%
Applied egg-rr71.7%
*-commutative71.7%
*-commutative71.7%
times-frac73.5%
*-commutative73.5%
associate-*r/73.5%
*-commutative73.5%
associate-/l*73.5%
Simplified73.5%
if 3.3999999999999999e-76 < t < 4.30000000000000032e228Initial program 43.1%
*-commutative43.1%
associate-/r*43.1%
Simplified51.9%
unpow351.9%
times-frac59.8%
pow259.8%
Applied egg-rr59.8%
add-cube-cbrt59.7%
pow359.7%
Applied egg-rr78.5%
associate-*l*80.1%
*-commutative80.1%
Simplified80.1%
if 4.30000000000000032e228 < t Initial program 6.7%
Simplified20.0%
add-cube-cbrt20.0%
pow320.0%
Applied egg-rr47.3%
Taylor expanded in k around 0 79.9%
Final simplification75.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 0.7)
(pow
(/
(* (pow (cbrt l) 2.0) (cbrt 2.0))
(*
k_m
(+ (cbrt (* k_m t)) (* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
3.0)
(*
(* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
(* (pow k_m -2.0) (/ 2.0 t)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 0.7) {
tmp = pow(((pow(cbrt(l), 2.0) * cbrt(2.0)) / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
} else {
tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 0.7) {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0)) / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
} else {
tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 0.7) tmp = Float64(Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0; else tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 0.7], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision] / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 0.7:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\
\end{array}
\end{array}
if k < 0.69999999999999996Initial program 38.0%
Simplified43.8%
add-cube-cbrt43.7%
pow343.8%
Applied egg-rr58.2%
pow258.2%
*-commutative58.2%
cbrt-prod58.2%
cbrt-prod70.7%
unpow270.7%
Applied egg-rr70.7%
Taylor expanded in k around 0 83.6%
if 0.69999999999999996 < k Initial program 27.8%
Simplified34.0%
Taylor expanded in t around 0 71.5%
associate-*r*71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in k around inf 71.5%
associate-*r/71.5%
times-frac70.3%
*-commutative70.3%
Simplified70.3%
associate-*r/68.4%
div-inv68.4%
pow-flip68.4%
metadata-eval68.4%
pow268.4%
*-commutative68.4%
pow268.4%
Applied egg-rr68.4%
*-commutative68.4%
*-commutative68.4%
times-frac71.7%
*-commutative71.7%
associate-*r/71.8%
*-commutative71.8%
associate-/l*71.8%
Simplified71.8%
Final simplification80.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 6.2e-159)
(pow (/ (* (pow (cbrt l) 2.0) (cbrt 2.0)) (cbrt (* t (pow k_m 4.0)))) 3.0)
(*
(* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
(* (pow k_m -2.0) (/ 2.0 t)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 6.2e-159) {
tmp = pow(((pow(cbrt(l), 2.0) * cbrt(2.0)) / cbrt((t * pow(k_m, 4.0)))), 3.0);
} else {
tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 6.2e-159) {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0)) / Math.cbrt((t * Math.pow(k_m, 4.0)))), 3.0);
} else {
tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 6.2e-159) tmp = Float64(Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) / cbrt(Float64(t * (k_m ^ 4.0)))) ^ 3.0; else tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.2e-159], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-159}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}}{\sqrt[3]{t \cdot {k\_m}^{4}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\
\end{array}
\end{array}
if k < 6.2e-159Initial program 39.3%
Simplified45.8%
add-cube-cbrt45.8%
pow345.8%
Applied egg-rr59.7%
pow259.7%
*-commutative59.7%
cbrt-prod59.6%
cbrt-prod74.5%
unpow274.5%
Applied egg-rr74.5%
Taylor expanded in k around 0 70.8%
if 6.2e-159 < k Initial program 29.6%
Simplified34.5%
Taylor expanded in t around 0 73.2%
associate-*r*73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in k around inf 73.1%
associate-*r/73.2%
times-frac72.6%
*-commutative72.6%
Simplified72.6%
associate-*r/71.3%
div-inv71.3%
pow-flip71.3%
metadata-eval71.3%
pow271.3%
*-commutative71.3%
pow271.3%
Applied egg-rr71.3%
*-commutative71.3%
*-commutative71.3%
times-frac73.4%
*-commutative73.4%
associate-*r/73.5%
*-commutative73.5%
associate-/l*73.5%
Simplified73.5%
Final simplification71.9%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (or (<= t 1.9e-76) (not (<= t 3.2e+106)))
(*
(* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
(* (pow k_m -2.0) (/ 2.0 t)))
(/
(/ 2.0 (/ (/ k_m t) (/ t k_m)))
(/ (/ (* (* (sin k_m) (tan k_m)) (pow t 3.0)) l) l))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if ((t <= 1.9e-76) || !(t <= 3.2e+106)) {
tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
} else {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * pow(t, 3.0)) / l) / l);
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if ((t <= 1.9d-76) .or. (.not. (t <= 3.2d+106))) then
tmp = (cos(k_m) * ((l ** 2.0d0) / (sin(k_m) ** 2.0d0))) * ((k_m ** (-2.0d0)) * (2.0d0 / t))
else
tmp = (2.0d0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ** 3.0d0)) / l) / l)
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if ((t <= 1.9e-76) || !(t <= 3.2e+106)) {
tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
} else {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(t, 3.0)) / l) / l);
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if (t <= 1.9e-76) or not (t <= 3.2e+106): tmp = (math.cos(k_m) * (math.pow(l, 2.0) / math.pow(math.sin(k_m), 2.0))) * (math.pow(k_m, -2.0) * (2.0 / t)) else: tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((math.sin(k_m) * math.tan(k_m)) * math.pow(t, 3.0)) / l) / l) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if ((t <= 1.9e-76) || !(t <= 3.2e+106)) tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t))); else tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) / Float64(t / k_m))) / Float64(Float64(Float64(Float64(sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l)); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if ((t <= 1.9e-76) || ~((t <= 3.2e+106))) tmp = (cos(k_m) * ((l ^ 2.0) / (sin(k_m) ^ 2.0))) * ((k_m ^ -2.0) * (2.0 / t)); else tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[Or[LessEqual[t, 1.9e-76], N[Not[LessEqual[t, 3.2e+106]], $MachinePrecision]], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] / N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.9 \cdot 10^{-76} \lor \neg \left(t \leq 3.2 \cdot 10^{+106}\right):\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 1.9000000000000001e-76 or 3.1999999999999998e106 < t Initial program 31.1%
Simplified36.9%
Taylor expanded in t around 0 72.6%
associate-*r*72.6%
*-commutative72.6%
Simplified72.6%
Taylor expanded in k around inf 72.8%
associate-*r/72.8%
times-frac73.5%
*-commutative73.5%
Simplified73.5%
associate-*r/72.9%
div-inv72.9%
pow-flip73.2%
metadata-eval73.2%
pow273.2%
*-commutative73.2%
pow273.2%
Applied egg-rr73.2%
*-commutative73.2%
*-commutative73.2%
times-frac74.2%
*-commutative74.2%
associate-*r/74.2%
*-commutative74.2%
associate-/l*74.2%
Simplified74.2%
if 1.9000000000000001e-76 < t < 3.1999999999999998e106Initial program 58.9%
*-commutative58.9%
associate-/r*58.9%
Simplified65.4%
unpow265.4%
clear-num65.5%
un-div-inv65.5%
Applied egg-rr65.5%
associate-*l/65.4%
associate-/r*80.8%
Applied egg-rr80.8%
Final simplification75.2%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (pow (sin k_m) 2.0)))
(if (<= t 3.2e-77)
(* (* (cos k_m) (/ (pow l 2.0) t_1)) (* (pow k_m -2.0) (/ 2.0 t)))
(if (<= t 3.2e+106)
(/
(/ 2.0 (/ (/ k_m t) (/ t k_m)))
(/ (/ (* (* (sin k_m) (tan k_m)) (pow t 3.0)) l) l))
(* (/ 2.0 (pow k_m 2.0)) (* (pow l 2.0) (/ (cos k_m) (* t t_1))))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(sin(k_m), 2.0);
double tmp;
if (t <= 3.2e-77) {
tmp = (cos(k_m) * (pow(l, 2.0) / t_1)) * (pow(k_m, -2.0) * (2.0 / t));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * pow(t, 3.0)) / l) / l);
} else {
tmp = (2.0 / pow(k_m, 2.0)) * (pow(l, 2.0) * (cos(k_m) / (t * t_1)));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k_m) ** 2.0d0
if (t <= 3.2d-77) then
tmp = (cos(k_m) * ((l ** 2.0d0) / t_1)) * ((k_m ** (-2.0d0)) * (2.0d0 / t))
else if (t <= 3.2d+106) then
tmp = (2.0d0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ** 3.0d0)) / l) / l)
else
tmp = (2.0d0 / (k_m ** 2.0d0)) * ((l ** 2.0d0) * (cos(k_m) / (t * t_1)))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.pow(Math.sin(k_m), 2.0);
double tmp;
if (t <= 3.2e-77) {
tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / t_1)) * (Math.pow(k_m, -2.0) * (2.0 / t));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (2.0 / Math.pow(k_m, 2.0)) * (Math.pow(l, 2.0) * (Math.cos(k_m) / (t * t_1)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.pow(math.sin(k_m), 2.0) tmp = 0 if t <= 3.2e-77: tmp = (math.cos(k_m) * (math.pow(l, 2.0) / t_1)) * (math.pow(k_m, -2.0) * (2.0 / t)) elif t <= 3.2e+106: tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((math.sin(k_m) * math.tan(k_m)) * math.pow(t, 3.0)) / l) / l) else: tmp = (2.0 / math.pow(k_m, 2.0)) * (math.pow(l, 2.0) * (math.cos(k_m) / (t * t_1))) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = sin(k_m) ^ 2.0 tmp = 0.0 if (t <= 3.2e-77) tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / t_1)) * Float64((k_m ^ -2.0) * Float64(2.0 / t))); elseif (t <= 3.2e+106) tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) / Float64(t / k_m))) / Float64(Float64(Float64(Float64(sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(2.0 / (k_m ^ 2.0)) * Float64((l ^ 2.0) * Float64(cos(k_m) / Float64(t * t_1)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) t_1 = sin(k_m) ^ 2.0; tmp = 0.0; if (t <= 3.2e-77) tmp = (cos(k_m) * ((l ^ 2.0) / t_1)) * ((k_m ^ -2.0) * (2.0 / t)); elseif (t <= 3.2e+106) tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l); else tmp = (2.0 / (k_m ^ 2.0)) * ((l ^ 2.0) * (cos(k_m) / (t * t_1))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, 3.2e-77], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+106], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] / N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\sin k\_m}^{2}\\
\mathbf{if}\;t \leq 3.2 \cdot 10^{-77}:\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{t\_1}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k\_m}^{2}} \cdot \left({\ell}^{2} \cdot \frac{\cos k\_m}{t \cdot t\_1}\right)\\
\end{array}
\end{array}
if t < 3.2e-77Initial program 35.1%
Simplified39.3%
Taylor expanded in t around 0 71.6%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in k around inf 71.9%
associate-*r/71.9%
times-frac72.1%
*-commutative72.1%
Simplified72.1%
associate-*r/71.4%
div-inv71.4%
pow-flip71.7%
metadata-eval71.7%
pow271.7%
*-commutative71.7%
pow271.7%
Applied egg-rr71.7%
*-commutative71.7%
*-commutative71.7%
times-frac73.5%
*-commutative73.5%
associate-*r/73.5%
*-commutative73.5%
associate-/l*73.5%
Simplified73.5%
if 3.2e-77 < t < 3.1999999999999998e106Initial program 58.9%
*-commutative58.9%
associate-/r*58.9%
Simplified65.4%
unpow265.4%
clear-num65.5%
un-div-inv65.5%
Applied egg-rr65.5%
associate-*l/65.4%
associate-/r*80.8%
Applied egg-rr80.8%
if 3.1999999999999998e106 < t Initial program 12.8%
Simplified25.9%
Taylor expanded in t around 0 77.2%
associate-*r*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in k around inf 77.3%
associate-*r/77.3%
times-frac79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in k around inf 79.7%
associate-/l*79.7%
Simplified79.7%
Final simplification75.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 4.7e-76)
(/ (* (pow l 2.0) (* 2.0 (cos k_m))) (* t (pow (* k_m (sin k_m)) 2.0)))
(if (<= t 3.2e+106)
(/
(/ 2.0 (/ (/ k_m t) (/ t k_m)))
(/ (/ (* (* (sin k_m) (tan k_m)) (pow t 3.0)) l) l))
(*
2.0
(/
(* (cos k_m) (pow l 2.0))
(* (pow k_m 2.0) (* t (pow (sin k_m) 2.0))))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 4.7e-76) {
tmp = (pow(l, 2.0) * (2.0 * cos(k_m))) / (t * pow((k_m * sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * pow(t, 3.0)) / l) / l);
} else {
tmp = 2.0 * ((cos(k_m) * pow(l, 2.0)) / (pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0))));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 4.7d-76) then
tmp = ((l ** 2.0d0) * (2.0d0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ** 2.0d0))
else if (t <= 3.2d+106) then
tmp = (2.0d0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ** 3.0d0)) / l) / l)
else
tmp = 2.0d0 * ((cos(k_m) * (l ** 2.0d0)) / ((k_m ** 2.0d0) * (t * (sin(k_m) ** 2.0d0))))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 4.7e-76) {
tmp = (Math.pow(l, 2.0) * (2.0 * Math.cos(k_m))) / (t * Math.pow((k_m * Math.sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = 2.0 * ((Math.cos(k_m) * Math.pow(l, 2.0)) / (Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0))));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 4.7e-76: tmp = (math.pow(l, 2.0) * (2.0 * math.cos(k_m))) / (t * math.pow((k_m * math.sin(k_m)), 2.0)) elif t <= 3.2e+106: tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((math.sin(k_m) * math.tan(k_m)) * math.pow(t, 3.0)) / l) / l) else: tmp = 2.0 * ((math.cos(k_m) * math.pow(l, 2.0)) / (math.pow(k_m, 2.0) * (t * math.pow(math.sin(k_m), 2.0)))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 4.7e-76) tmp = Float64(Float64((l ^ 2.0) * Float64(2.0 * cos(k_m))) / Float64(t * (Float64(k_m * sin(k_m)) ^ 2.0))); elseif (t <= 3.2e+106) tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) / Float64(t / k_m))) / Float64(Float64(Float64(Float64(sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(2.0 * Float64(Float64(cos(k_m) * (l ^ 2.0)) / Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0))))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 4.7e-76) tmp = ((l ^ 2.0) * (2.0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ^ 2.0)); elseif (t <= 3.2e+106) tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l); else tmp = 2.0 * ((cos(k_m) * (l ^ 2.0)) / ((k_m ^ 2.0) * (t * (sin(k_m) ^ 2.0)))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 4.7e-76], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+106], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] / N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.7 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k\_m \cdot {\ell}^{2}}{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}\\
\end{array}
\end{array}
if t < 4.7000000000000002e-76Initial program 35.1%
Simplified39.3%
Taylor expanded in t around 0 71.6%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
associate-*r/71.6%
associate-*r*69.3%
pow-prod-down69.3%
Applied egg-rr69.3%
associate-*l/69.4%
pow269.4%
*-commutative69.4%
*-commutative69.4%
Applied egg-rr69.4%
if 4.7000000000000002e-76 < t < 3.1999999999999998e106Initial program 58.9%
*-commutative58.9%
associate-/r*58.9%
Simplified65.4%
unpow265.4%
clear-num65.5%
un-div-inv65.5%
Applied egg-rr65.5%
associate-*l/65.4%
associate-/r*80.8%
Applied egg-rr80.8%
if 3.1999999999999998e106 < t Initial program 12.8%
Simplified25.9%
Taylor expanded in t around 0 77.3%
Final simplification72.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 6e-76)
(/ (* (pow l 2.0) (* 2.0 (cos k_m))) (* t (pow (* k_m (sin k_m)) 2.0)))
(if (<= t 3.2e+106)
(/
(/ 2.0 (/ (/ k_m t) (/ t k_m)))
(/ (/ (* (* (sin k_m) (tan k_m)) (pow t 3.0)) l) l))
(*
(* (/ 2.0 (pow k_m 2.0)) (/ (cos k_m) (* t (pow (sin k_m) 2.0))))
(* l l)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 6e-76) {
tmp = (pow(l, 2.0) * (2.0 * cos(k_m))) / (t * pow((k_m * sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * pow(t, 3.0)) / l) / l);
} else {
tmp = ((2.0 / pow(k_m, 2.0)) * (cos(k_m) / (t * pow(sin(k_m), 2.0)))) * (l * l);
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 6d-76) then
tmp = ((l ** 2.0d0) * (2.0d0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ** 2.0d0))
else if (t <= 3.2d+106) then
tmp = (2.0d0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ** 3.0d0)) / l) / l)
else
tmp = ((2.0d0 / (k_m ** 2.0d0)) * (cos(k_m) / (t * (sin(k_m) ** 2.0d0)))) * (l * l)
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 6e-76) {
tmp = (Math.pow(l, 2.0) * (2.0 * Math.cos(k_m))) / (t * Math.pow((k_m * Math.sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = ((2.0 / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t * Math.pow(Math.sin(k_m), 2.0)))) * (l * l);
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 6e-76: tmp = (math.pow(l, 2.0) * (2.0 * math.cos(k_m))) / (t * math.pow((k_m * math.sin(k_m)), 2.0)) elif t <= 3.2e+106: tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((math.sin(k_m) * math.tan(k_m)) * math.pow(t, 3.0)) / l) / l) else: tmp = ((2.0 / math.pow(k_m, 2.0)) * (math.cos(k_m) / (t * math.pow(math.sin(k_m), 2.0)))) * (l * l) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 6e-76) tmp = Float64(Float64((l ^ 2.0) * Float64(2.0 * cos(k_m))) / Float64(t * (Float64(k_m * sin(k_m)) ^ 2.0))); elseif (t <= 3.2e+106) tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) / Float64(t / k_m))) / Float64(Float64(Float64(Float64(sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(Float64(2.0 / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t * (sin(k_m) ^ 2.0)))) * Float64(l * l)); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 6e-76) tmp = ((l ^ 2.0) * (2.0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ^ 2.0)); elseif (t <= 3.2e+106) tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l); else tmp = ((2.0 / (k_m ^ 2.0)) * (cos(k_m) / (t * (sin(k_m) ^ 2.0)))) * (l * l); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 6e-76], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+106], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] / N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{2}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t \cdot {\sin k\_m}^{2}}\right) \cdot \left(\ell \cdot \ell\right)\\
\end{array}
\end{array}
if t < 6.00000000000000048e-76Initial program 35.1%
Simplified39.3%
Taylor expanded in t around 0 71.6%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
associate-*r/71.6%
associate-*r*69.3%
pow-prod-down69.3%
Applied egg-rr69.3%
associate-*l/69.4%
pow269.4%
*-commutative69.4%
*-commutative69.4%
Applied egg-rr69.4%
if 6.00000000000000048e-76 < t < 3.1999999999999998e106Initial program 58.9%
*-commutative58.9%
associate-/r*58.9%
Simplified65.4%
unpow265.4%
clear-num65.5%
un-div-inv65.5%
Applied egg-rr65.5%
associate-*l/65.4%
associate-/r*80.8%
Applied egg-rr80.8%
if 3.1999999999999998e106 < t Initial program 12.8%
Simplified25.9%
Taylor expanded in t around 0 77.2%
associate-*r*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in k around inf 77.2%
associate-*r/77.2%
*-commutative77.2%
*-commutative77.2%
times-frac77.3%
Simplified77.3%
Final simplification72.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 6.8e-76)
(/ (* (pow l 2.0) (* 2.0 (cos k_m))) (* t (pow (* k_m (sin k_m)) 2.0)))
(if (<= t 3.2e+106)
(/
(/ 2.0 (/ (/ k_m t) (/ t k_m)))
(/ (/ (* (* (sin k_m) (tan k_m)) (pow t 3.0)) l) l))
(*
(* l l)
(* 2.0 (/ (cos k_m) (* (pow k_m 2.0) (* t (pow (sin k_m) 2.0)))))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 6.8e-76) {
tmp = (pow(l, 2.0) * (2.0 * cos(k_m))) / (t * pow((k_m * sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 * (cos(k_m) / (pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0)))));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 6.8d-76) then
tmp = ((l ** 2.0d0) * (2.0d0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ** 2.0d0))
else if (t <= 3.2d+106) then
tmp = (2.0d0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ** 3.0d0)) / l) / l)
else
tmp = (l * l) * (2.0d0 * (cos(k_m) / ((k_m ** 2.0d0) * (t * (sin(k_m) ** 2.0d0)))))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 6.8e-76) {
tmp = (Math.pow(l, 2.0) * (2.0 * Math.cos(k_m))) / (t * Math.pow((k_m * Math.sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 * (Math.cos(k_m) / (Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0)))));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 6.8e-76: tmp = (math.pow(l, 2.0) * (2.0 * math.cos(k_m))) / (t * math.pow((k_m * math.sin(k_m)), 2.0)) elif t <= 3.2e+106: tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((math.sin(k_m) * math.tan(k_m)) * math.pow(t, 3.0)) / l) / l) else: tmp = (l * l) * (2.0 * (math.cos(k_m) / (math.pow(k_m, 2.0) * (t * math.pow(math.sin(k_m), 2.0))))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 6.8e-76) tmp = Float64(Float64((l ^ 2.0) * Float64(2.0 * cos(k_m))) / Float64(t * (Float64(k_m * sin(k_m)) ^ 2.0))); elseif (t <= 3.2e+106) tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) / Float64(t / k_m))) / Float64(Float64(Float64(Float64(sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(cos(k_m) / Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0)))))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 6.8e-76) tmp = ((l ^ 2.0) * (2.0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ^ 2.0)); elseif (t <= 3.2e+106) tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l); else tmp = (l * l) * (2.0 * (cos(k_m) / ((k_m ^ 2.0) * (t * (sin(k_m) ^ 2.0))))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 6.8e-76], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+106], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] / N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[Cos[k$95$m], $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.8 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\cos k\_m}{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}\right)\\
\end{array}
\end{array}
if t < 6.7999999999999998e-76Initial program 35.1%
Simplified39.3%
Taylor expanded in t around 0 71.6%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
associate-*r/71.6%
associate-*r*69.3%
pow-prod-down69.3%
Applied egg-rr69.3%
associate-*l/69.4%
pow269.4%
*-commutative69.4%
*-commutative69.4%
Applied egg-rr69.4%
if 6.7999999999999998e-76 < t < 3.1999999999999998e106Initial program 58.9%
*-commutative58.9%
associate-/r*58.9%
Simplified65.4%
unpow265.4%
clear-num65.5%
un-div-inv65.5%
Applied egg-rr65.5%
associate-*l/65.4%
associate-/r*80.8%
Applied egg-rr80.8%
if 3.1999999999999998e106 < t Initial program 12.8%
Simplified25.9%
Taylor expanded in t around 0 77.2%
Final simplification72.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 9e-76)
(/ (* (pow l 2.0) (* 2.0 (cos k_m))) (* t (pow (* k_m (sin k_m)) 2.0)))
(if (<= t 3.2e+106)
(/
(/ 2.0 (/ (/ k_m t) (/ t k_m)))
(/ (/ (* (* (sin k_m) (tan k_m)) (pow t 3.0)) l) l))
(* (/ 2.0 (pow k_m 2.0)) (/ (pow l 2.0) (* t (pow k_m 2.0)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 9e-76) {
tmp = (pow(l, 2.0) * (2.0 * cos(k_m))) / (t * pow((k_m * sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * pow(t, 3.0)) / l) / l);
} else {
tmp = (2.0 / pow(k_m, 2.0)) * (pow(l, 2.0) / (t * pow(k_m, 2.0)));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 9d-76) then
tmp = ((l ** 2.0d0) * (2.0d0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ** 2.0d0))
else if (t <= 3.2d+106) then
tmp = (2.0d0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ** 3.0d0)) / l) / l)
else
tmp = (2.0d0 / (k_m ** 2.0d0)) * ((l ** 2.0d0) / (t * (k_m ** 2.0d0)))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 9e-76) {
tmp = (Math.pow(l, 2.0) * (2.0 * Math.cos(k_m))) / (t * Math.pow((k_m * Math.sin(k_m)), 2.0));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (2.0 / Math.pow(k_m, 2.0)) * (Math.pow(l, 2.0) / (t * Math.pow(k_m, 2.0)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 9e-76: tmp = (math.pow(l, 2.0) * (2.0 * math.cos(k_m))) / (t * math.pow((k_m * math.sin(k_m)), 2.0)) elif t <= 3.2e+106: tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((math.sin(k_m) * math.tan(k_m)) * math.pow(t, 3.0)) / l) / l) else: tmp = (2.0 / math.pow(k_m, 2.0)) * (math.pow(l, 2.0) / (t * math.pow(k_m, 2.0))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 9e-76) tmp = Float64(Float64((l ^ 2.0) * Float64(2.0 * cos(k_m))) / Float64(t * (Float64(k_m * sin(k_m)) ^ 2.0))); elseif (t <= 3.2e+106) tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) / Float64(t / k_m))) / Float64(Float64(Float64(Float64(sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(2.0 / (k_m ^ 2.0)) * Float64((l ^ 2.0) / Float64(t * (k_m ^ 2.0)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 9e-76) tmp = ((l ^ 2.0) * (2.0 * cos(k_m))) / (t * ((k_m * sin(k_m)) ^ 2.0)); elseif (t <= 3.2e+106) tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l); else tmp = (2.0 / (k_m ^ 2.0)) * ((l ^ 2.0) / (t * (k_m ^ 2.0))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 9e-76], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+106], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] / N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k\_m}^{2}} \cdot \frac{{\ell}^{2}}{t \cdot {k\_m}^{2}}\\
\end{array}
\end{array}
if t < 9.0000000000000001e-76Initial program 35.1%
Simplified39.3%
Taylor expanded in t around 0 71.6%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
associate-*r/71.6%
associate-*r*69.3%
pow-prod-down69.3%
Applied egg-rr69.3%
associate-*l/69.4%
pow269.4%
*-commutative69.4%
*-commutative69.4%
Applied egg-rr69.4%
if 9.0000000000000001e-76 < t < 3.1999999999999998e106Initial program 58.9%
*-commutative58.9%
associate-/r*58.9%
Simplified65.4%
unpow265.4%
clear-num65.5%
un-div-inv65.5%
Applied egg-rr65.5%
associate-*l/65.4%
associate-/r*80.8%
Applied egg-rr80.8%
if 3.1999999999999998e106 < t Initial program 12.8%
Simplified25.9%
Taylor expanded in t around 0 77.2%
associate-*r*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in k around inf 77.3%
associate-*r/77.3%
times-frac79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in k around 0 74.8%
Final simplification72.0%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 5e-76)
(* (* l l) (* 2.0 (/ 1.0 (* (pow (* k_m (sin k_m)) 2.0) (/ t (cos k_m))))))
(if (<= t 3.2e+106)
(/
(/ 2.0 (/ (/ k_m t) (/ t k_m)))
(/ (/ (* (* (sin k_m) (tan k_m)) (pow t 3.0)) l) l))
(* (/ 2.0 (pow k_m 2.0)) (/ (pow l 2.0) (* t (pow k_m 2.0)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 5e-76) {
tmp = (l * l) * (2.0 * (1.0 / (pow((k_m * sin(k_m)), 2.0) * (t / cos(k_m)))));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * pow(t, 3.0)) / l) / l);
} else {
tmp = (2.0 / pow(k_m, 2.0)) * (pow(l, 2.0) / (t * pow(k_m, 2.0)));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 5d-76) then
tmp = (l * l) * (2.0d0 * (1.0d0 / (((k_m * sin(k_m)) ** 2.0d0) * (t / cos(k_m)))))
else if (t <= 3.2d+106) then
tmp = (2.0d0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ** 3.0d0)) / l) / l)
else
tmp = (2.0d0 / (k_m ** 2.0d0)) * ((l ** 2.0d0) / (t * (k_m ** 2.0d0)))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 5e-76) {
tmp = (l * l) * (2.0 * (1.0 / (Math.pow((k_m * Math.sin(k_m)), 2.0) * (t / Math.cos(k_m)))));
} else if (t <= 3.2e+106) {
tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (2.0 / Math.pow(k_m, 2.0)) * (Math.pow(l, 2.0) / (t * Math.pow(k_m, 2.0)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 5e-76: tmp = (l * l) * (2.0 * (1.0 / (math.pow((k_m * math.sin(k_m)), 2.0) * (t / math.cos(k_m))))) elif t <= 3.2e+106: tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((math.sin(k_m) * math.tan(k_m)) * math.pow(t, 3.0)) / l) / l) else: tmp = (2.0 / math.pow(k_m, 2.0)) * (math.pow(l, 2.0) / (t * math.pow(k_m, 2.0))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 5e-76) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(1.0 / Float64((Float64(k_m * sin(k_m)) ^ 2.0) * Float64(t / cos(k_m)))))); elseif (t <= 3.2e+106) tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) / Float64(t / k_m))) / Float64(Float64(Float64(Float64(sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(2.0 / (k_m ^ 2.0)) * Float64((l ^ 2.0) / Float64(t * (k_m ^ 2.0)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 5e-76) tmp = (l * l) * (2.0 * (1.0 / (((k_m * sin(k_m)) ^ 2.0) * (t / cos(k_m))))); elseif (t <= 3.2e+106) tmp = (2.0 / ((k_m / t) / (t / k_m))) / ((((sin(k_m) * tan(k_m)) * (t ^ 3.0)) / l) / l); else tmp = (2.0 / (k_m ^ 2.0)) * ((l ^ 2.0) / (t * (k_m ^ 2.0))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 5e-76], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(1.0 / N[(N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+106], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] / N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-76}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{1}{{\left(k\_m \cdot \sin k\_m\right)}^{2} \cdot \frac{t}{\cos k\_m}}\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k\_m}^{2}} \cdot \frac{{\ell}^{2}}{t \cdot {k\_m}^{2}}\\
\end{array}
\end{array}
if t < 4.9999999999999998e-76Initial program 35.1%
Simplified39.3%
Taylor expanded in t around 0 71.6%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
clear-num71.6%
inv-pow71.6%
associate-*r*69.3%
pow-prod-down69.4%
Applied egg-rr69.4%
unpow-169.4%
associate-/l*69.4%
*-commutative69.4%
Simplified69.4%
if 4.9999999999999998e-76 < t < 3.1999999999999998e106Initial program 58.9%
*-commutative58.9%
associate-/r*58.9%
Simplified65.4%
unpow265.4%
clear-num65.5%
un-div-inv65.5%
Applied egg-rr65.5%
associate-*l/65.4%
associate-/r*80.8%
Applied egg-rr80.8%
if 3.1999999999999998e106 < t Initial program 12.8%
Simplified25.9%
Taylor expanded in t around 0 77.2%
associate-*r*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in k around inf 77.3%
associate-*r/77.3%
times-frac79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in k around 0 74.8%
Final simplification72.0%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 9.2e-15) (* (/ 2.0 (pow k_m 2.0)) (/ (pow l 2.0) (* t (pow k_m 2.0)))) (* (* l l) (* (/ 2.0 (pow (* k_m (sin k_m)) 2.0)) (/ (cos k_m) t)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 9.2e-15) {
tmp = (2.0 / pow(k_m, 2.0)) * (pow(l, 2.0) / (t * pow(k_m, 2.0)));
} else {
tmp = (l * l) * ((2.0 / pow((k_m * sin(k_m)), 2.0)) * (cos(k_m) / t));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 9.2d-15) then
tmp = (2.0d0 / (k_m ** 2.0d0)) * ((l ** 2.0d0) / (t * (k_m ** 2.0d0)))
else
tmp = (l * l) * ((2.0d0 / ((k_m * sin(k_m)) ** 2.0d0)) * (cos(k_m) / t))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 9.2e-15) {
tmp = (2.0 / Math.pow(k_m, 2.0)) * (Math.pow(l, 2.0) / (t * Math.pow(k_m, 2.0)));
} else {
tmp = (l * l) * ((2.0 / Math.pow((k_m * Math.sin(k_m)), 2.0)) * (Math.cos(k_m) / t));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 9.2e-15: tmp = (2.0 / math.pow(k_m, 2.0)) * (math.pow(l, 2.0) / (t * math.pow(k_m, 2.0))) else: tmp = (l * l) * ((2.0 / math.pow((k_m * math.sin(k_m)), 2.0)) * (math.cos(k_m) / t)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 9.2e-15) tmp = Float64(Float64(2.0 / (k_m ^ 2.0)) * Float64((l ^ 2.0) / Float64(t * (k_m ^ 2.0)))); else tmp = Float64(Float64(l * l) * Float64(Float64(2.0 / (Float64(k_m * sin(k_m)) ^ 2.0)) * Float64(cos(k_m) / t))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 9.2e-15) tmp = (2.0 / (k_m ^ 2.0)) * ((l ^ 2.0) / (t * (k_m ^ 2.0))); else tmp = (l * l) * ((2.0 / ((k_m * sin(k_m)) ^ 2.0)) * (cos(k_m) / t)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 9.2e-15], N[(N[(2.0 / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 9.2 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{{k\_m}^{2}} \cdot \frac{{\ell}^{2}}{t \cdot {k\_m}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{{\left(k\_m \cdot \sin k\_m\right)}^{2}} \cdot \frac{\cos k\_m}{t}\right)\\
\end{array}
\end{array}
if k < 9.19999999999999961e-15Initial program 38.6%
Simplified44.1%
Taylor expanded in t around 0 71.5%
associate-*r*71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in k around inf 71.9%
associate-*r/71.9%
times-frac73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in k around 0 67.8%
if 9.19999999999999961e-15 < k Initial program 27.0%
Simplified34.0%
Taylor expanded in t around 0 72.6%
associate-*r*72.6%
*-commutative72.6%
Simplified72.6%
associate-*r/72.6%
associate-*r*72.6%
pow-prod-down72.6%
Applied egg-rr72.6%
times-frac72.7%
*-commutative72.7%
Simplified72.7%
Final simplification69.2%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (/ 2.0 (pow k_m 2.0)) (/ (pow l 2.0) (* t (pow k_m 2.0)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (2.0 / pow(k_m, 2.0)) * (pow(l, 2.0) / (t * pow(k_m, 2.0)));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = (2.0d0 / (k_m ** 2.0d0)) * ((l ** 2.0d0) / (t * (k_m ** 2.0d0)))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return (2.0 / Math.pow(k_m, 2.0)) * (Math.pow(l, 2.0) / (t * Math.pow(k_m, 2.0)));
}
k_m = math.fabs(k) def code(t, l, k_m): return (2.0 / math.pow(k_m, 2.0)) * (math.pow(l, 2.0) / (t * math.pow(k_m, 2.0)))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(2.0 / (k_m ^ 2.0)) * Float64((l ^ 2.0) / Float64(t * (k_m ^ 2.0)))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (2.0 / (k_m ^ 2.0)) * ((l ^ 2.0) / (t * (k_m ^ 2.0))); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(2.0 / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{2}{{k\_m}^{2}} \cdot \frac{{\ell}^{2}}{t \cdot {k\_m}^{2}}
\end{array}
Initial program 35.4%
Simplified41.3%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in k around inf 72.0%
associate-*r/72.0%
times-frac72.6%
*-commutative72.6%
Simplified72.6%
Taylor expanded in k around 0 63.6%
Final simplification63.6%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* l l) (/ 2.0 (* t (pow (* k_m (sin k_m)) 2.0)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (l * l) * (2.0 / (t * pow((k_m * sin(k_m)), 2.0)));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = (l * l) * (2.0d0 / (t * ((k_m * sin(k_m)) ** 2.0d0)))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return (l * l) * (2.0 / (t * Math.pow((k_m * Math.sin(k_m)), 2.0)));
}
k_m = math.fabs(k) def code(t, l, k_m): return (l * l) * (2.0 / (t * math.pow((k_m * math.sin(k_m)), 2.0)))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(l * l) * Float64(2.0 / Float64(t * (Float64(k_m * sin(k_m)) ^ 2.0)))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (l * l) * (2.0 / (t * ((k_m * sin(k_m)) ^ 2.0))); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t * N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}
\end{array}
Initial program 35.4%
Simplified41.3%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
*-commutative71.8%
Simplified71.8%
associate-*r/71.8%
associate-*r*68.7%
pow-prod-down68.8%
Applied egg-rr68.8%
Taylor expanded in k around 0 59.9%
Final simplification59.9%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* l l) (* 2.0 (/ (cos k_m) (* t (pow k_m 4.0))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (l * l) * (2.0 * (cos(k_m) / (t * pow(k_m, 4.0))));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = (l * l) * (2.0d0 * (cos(k_m) / (t * (k_m ** 4.0d0))))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return (l * l) * (2.0 * (Math.cos(k_m) / (t * Math.pow(k_m, 4.0))));
}
k_m = math.fabs(k) def code(t, l, k_m): return (l * l) * (2.0 * (math.cos(k_m) / (t * math.pow(k_m, 4.0))))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(l * l) * Float64(2.0 * Float64(cos(k_m) / Float64(t * (k_m ^ 4.0))))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (l * l) * (2.0 * (cos(k_m) / (t * (k_m ^ 4.0)))); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\cos k\_m}{t \cdot {k\_m}^{4}}\right)
\end{array}
Initial program 35.4%
Simplified41.3%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in k around 0 57.9%
Final simplification57.9%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* l l) (* 2.0 (/ (pow k_m -4.0) t))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (l * l) * (2.0 * (pow(k_m, -4.0) / t));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = (l * l) * (2.0d0 * ((k_m ** (-4.0d0)) / t))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return (l * l) * (2.0 * (Math.pow(k_m, -4.0) / t));
}
k_m = math.fabs(k) def code(t, l, k_m): return (l * l) * (2.0 * (math.pow(k_m, -4.0) / t))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(l * l) * Float64(2.0 * Float64((k_m ^ -4.0) / t))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (l * l) * (2.0 * ((k_m ^ -4.0) / t)); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[Power[k$95$m, -4.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{{k\_m}^{-4}}{t}\right)
\end{array}
Initial program 35.4%
Simplified41.3%
Taylor expanded in k around 0 57.5%
*-commutative57.5%
associate-/r*57.5%
Simplified57.5%
div-inv57.5%
pow-flip57.5%
metadata-eval57.5%
Applied egg-rr57.5%
associate-*l/57.5%
associate-/l*57.5%
Simplified57.5%
Final simplification57.5%
herbie shell --seed 2024139
(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))))