
(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 16 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)))
(if (<= k_m 1.4e-78)
(pow (/ (/ t_1 (pow (cbrt k_m) 2.0)) t) 3.0)
(if (or (<= k_m 3.2e-7) (not (<= k_m 2.45e+129)))
(/
2.0
(pow
(*
(/ t t_1)
(cbrt (* (sin k_m) (* (tan k_m) (+ 2.0 (pow (/ k_m t) 2.0))))))
3.0))
(*
2.0
(/
(pow l 2.0)
(/ (* (pow k_m 2.0) (* t (pow (sin k_m) 2.0))) (cos k_m))))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), 2.0);
double tmp;
if (k_m <= 1.4e-78) {
tmp = pow(((t_1 / pow(cbrt(k_m), 2.0)) / t), 3.0);
} else if ((k_m <= 3.2e-7) || !(k_m <= 2.45e+129)) {
tmp = 2.0 / pow(((t / t_1) * cbrt((sin(k_m) * (tan(k_m) * (2.0 + pow((k_m / t), 2.0)))))), 3.0);
} else {
tmp = 2.0 * (pow(l, 2.0) / ((pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0))) / cos(k_m)));
}
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);
double tmp;
if (k_m <= 1.4e-78) {
tmp = Math.pow(((t_1 / Math.pow(Math.cbrt(k_m), 2.0)) / t), 3.0);
} else if ((k_m <= 3.2e-7) || !(k_m <= 2.45e+129)) {
tmp = 2.0 / Math.pow(((t / t_1) * Math.cbrt((Math.sin(k_m) * (Math.tan(k_m) * (2.0 + Math.pow((k_m / t), 2.0)))))), 3.0);
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / ((Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0))) / Math.cos(k_m)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = cbrt(l) ^ 2.0 tmp = 0.0 if (k_m <= 1.4e-78) tmp = Float64(Float64(t_1 / (cbrt(k_m) ^ 2.0)) / t) ^ 3.0; elseif ((k_m <= 3.2e-7) || !(k_m <= 2.45e+129)) tmp = Float64(2.0 / (Float64(Float64(t / t_1) * cbrt(Float64(sin(k_m) * Float64(tan(k_m) * Float64(2.0 + (Float64(k_m / t) ^ 2.0)))))) ^ 3.0)); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0))) / cos(k_m)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k$95$m, 1.4e-78], N[Power[N[(N[(t$95$1 / N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision], If[Or[LessEqual[k$95$m, 3.2e-7], N[Not[LessEqual[k$95$m, 2.45e+129]], $MachinePrecision]], N[(2.0 / N[Power[N[(N[(t / t$95$1), $MachinePrecision] * N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[(2.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / 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]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;k_m \leq 1.4 \cdot 10^{-78}:\\
\;\;\;\;{\left(\frac{\frac{t_1}{{\left(\sqrt[3]{k_m}\right)}^{2}}}{t}\right)}^{3}\\
\mathbf{elif}\;k_m \leq 3.2 \cdot 10^{-7} \lor \neg \left(k_m \leq 2.45 \cdot 10^{+129}\right):\\
\;\;\;\;\frac{2}{{\left(\frac{t}{t_1} \cdot \sqrt[3]{\sin k_m \cdot \left(\tan k_m \cdot \left(2 + {\left(\frac{k_m}{t}\right)}^{2}\right)\right)}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{\frac{{k_m}^{2} \cdot \left(t \cdot {\sin k_m}^{2}\right)}{\cos k_m}}\\
\end{array}
\end{array}
if k < 1.40000000000000012e-78Initial program 57.7%
Simplified57.1%
Taylor expanded in k around 0 54.4%
add-cube-cbrt54.4%
pow354.4%
associate-/r*55.0%
cbrt-div55.0%
rem-cbrt-cube61.9%
Applied egg-rr61.9%
cbrt-div62.4%
unpow262.4%
cbrt-prod68.5%
unpow268.5%
unpow268.5%
cbrt-prod79.9%
pow279.9%
Applied egg-rr79.9%
if 1.40000000000000012e-78 < k < 3.2000000000000001e-7 or 2.45e129 < k Initial program 38.0%
associate-*l*38.0%
*-commutative38.0%
*-commutative38.0%
associate-/r*43.1%
distribute-rgt-in43.1%
unpow243.1%
times-frac33.8%
sqr-neg33.8%
times-frac43.1%
unpow243.1%
distribute-rgt-in43.1%
+-commutative43.1%
Simplified43.1%
add-cube-cbrt43.0%
pow343.0%
associate-*l*43.0%
cbrt-prod42.9%
associate-/l/37.8%
cbrt-div38.0%
rem-cbrt-cube62.1%
cbrt-prod76.0%
pow276.0%
Applied egg-rr76.0%
if 3.2000000000000001e-7 < k < 2.45e129Initial program 37.0%
Simplified37.0%
add-cube-cbrt36.9%
pow336.9%
*-commutative36.9%
cbrt-prod36.9%
cbrt-prod36.9%
rem-cbrt-cube36.9%
Applied egg-rr36.9%
Taylor expanded in t around 0 79.3%
associate-/l*79.4%
Simplified79.4%
Final simplification79.1%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.7e-77)
(pow (/ (/ (pow (cbrt l) 2.0) (pow (cbrt k_m) 2.0)) t) 3.0)
(if (<= k_m 6.5e-8)
(/
2.0
(pow
(*
(/ (pow t 1.5) l)
(sqrt (* (+ 2.0 (pow (/ k_m t) 2.0)) (* (sin k_m) (tan k_m)))))
2.0))
(/
2.0
(/
(pow (cbrt (pow (* k_m (* (sin k_m) (sqrt t))) 2.0)) 3.0)
(* (pow l 2.0) (cos k_m)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.7e-77) {
tmp = pow(((pow(cbrt(l), 2.0) / pow(cbrt(k_m), 2.0)) / t), 3.0);
} else if (k_m <= 6.5e-8) {
tmp = 2.0 / pow(((pow(t, 1.5) / l) * sqrt(((2.0 + pow((k_m / t), 2.0)) * (sin(k_m) * tan(k_m))))), 2.0);
} else {
tmp = 2.0 / (pow(cbrt(pow((k_m * (sin(k_m) * sqrt(t))), 2.0)), 3.0) / (pow(l, 2.0) * cos(k_m)));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.7e-77) {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / Math.pow(Math.cbrt(k_m), 2.0)) / t), 3.0);
} else if (k_m <= 6.5e-8) {
tmp = 2.0 / Math.pow(((Math.pow(t, 1.5) / l) * Math.sqrt(((2.0 + Math.pow((k_m / t), 2.0)) * (Math.sin(k_m) * Math.tan(k_m))))), 2.0);
} else {
tmp = 2.0 / (Math.pow(Math.cbrt(Math.pow((k_m * (Math.sin(k_m) * Math.sqrt(t))), 2.0)), 3.0) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.7e-77) tmp = Float64(Float64((cbrt(l) ^ 2.0) / (cbrt(k_m) ^ 2.0)) / t) ^ 3.0; elseif (k_m <= 6.5e-8) tmp = Float64(2.0 / (Float64(Float64((t ^ 1.5) / l) * sqrt(Float64(Float64(2.0 + (Float64(k_m / t) ^ 2.0)) * Float64(sin(k_m) * tan(k_m))))) ^ 2.0)); else tmp = Float64(2.0 / Float64((cbrt((Float64(k_m * Float64(sin(k_m) * sqrt(t))) ^ 2.0)) ^ 3.0) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.7e-77], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 6.5e-8], N[(2.0 / N[Power[N[(N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(N[(2.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[Power[N[Power[N[(k$95$m * N[(N[Sin[k$95$m], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 1.7 \cdot 10^{-77}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k_m}\right)}^{2}}}{t}\right)}^{3}\\
\mathbf{elif}\;k_m \leq 6.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\left(2 + {\left(\frac{k_m}{t}\right)}^{2}\right) \cdot \left(\sin k_m \cdot \tan k_m\right)}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\sqrt[3]{{\left(k_m \cdot \left(\sin k_m \cdot \sqrt{t}\right)\right)}^{2}}\right)}^{3}}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 1.69999999999999991e-77Initial program 57.7%
Simplified57.1%
Taylor expanded in k around 0 54.4%
add-cube-cbrt54.4%
pow354.4%
associate-/r*55.0%
cbrt-div55.0%
rem-cbrt-cube61.9%
Applied egg-rr61.9%
cbrt-div62.4%
unpow262.4%
cbrt-prod68.5%
unpow268.5%
unpow268.5%
cbrt-prod79.9%
pow279.9%
Applied egg-rr79.9%
if 1.69999999999999991e-77 < k < 6.49999999999999997e-8Initial program 77.3%
associate-*l*77.3%
*-commutative77.3%
*-commutative77.3%
associate-/r*77.7%
distribute-rgt-in77.7%
unpow277.7%
times-frac77.7%
sqr-neg77.7%
times-frac77.7%
unpow277.7%
distribute-rgt-in77.7%
+-commutative77.7%
Simplified77.7%
add-sqr-sqrt15.4%
pow215.4%
associate-*l*15.4%
sqrt-prod15.4%
associate-/l/15.4%
sqrt-div15.4%
sqrt-pow115.3%
metadata-eval15.3%
sqrt-prod7.7%
add-sqr-sqrt15.3%
Applied egg-rr15.3%
associate-*r*15.3%
Simplified15.3%
if 6.49999999999999997e-8 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
add-cube-cbrt63.4%
pow363.4%
add-sqr-sqrt27.9%
pow227.9%
sqrt-prod27.9%
unpow227.9%
sqrt-prod29.5%
add-sqr-sqrt29.5%
*-commutative29.5%
sqrt-prod29.5%
unpow229.5%
sqrt-prod15.9%
add-sqr-sqrt29.5%
Applied egg-rr29.5%
Final simplification65.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 7.5e-77)
(pow (/ (/ (pow (cbrt l) 2.0) (pow (cbrt k_m) 2.0)) t) 3.0)
(if (<= k_m 5.1e-5)
(/
2.0
(pow
(*
(/ (pow t 1.5) l)
(sqrt (* (+ 2.0 (pow (/ k_m t) 2.0)) (* (sin k_m) (tan k_m)))))
2.0))
(/
2.0
(/
(pow (* (sqrt t) (* k_m (sin k_m))) 2.0)
(* (pow l 2.0) (cos k_m)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 7.5e-77) {
tmp = pow(((pow(cbrt(l), 2.0) / pow(cbrt(k_m), 2.0)) / t), 3.0);
} else if (k_m <= 5.1e-5) {
tmp = 2.0 / pow(((pow(t, 1.5) / l) * sqrt(((2.0 + pow((k_m / t), 2.0)) * (sin(k_m) * tan(k_m))))), 2.0);
} else {
tmp = 2.0 / (pow((sqrt(t) * (k_m * sin(k_m))), 2.0) / (pow(l, 2.0) * cos(k_m)));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 7.5e-77) {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / Math.pow(Math.cbrt(k_m), 2.0)) / t), 3.0);
} else if (k_m <= 5.1e-5) {
tmp = 2.0 / Math.pow(((Math.pow(t, 1.5) / l) * Math.sqrt(((2.0 + Math.pow((k_m / t), 2.0)) * (Math.sin(k_m) * Math.tan(k_m))))), 2.0);
} else {
tmp = 2.0 / (Math.pow((Math.sqrt(t) * (k_m * Math.sin(k_m))), 2.0) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 7.5e-77) tmp = Float64(Float64((cbrt(l) ^ 2.0) / (cbrt(k_m) ^ 2.0)) / t) ^ 3.0; elseif (k_m <= 5.1e-5) tmp = Float64(2.0 / (Float64(Float64((t ^ 1.5) / l) * sqrt(Float64(Float64(2.0 + (Float64(k_m / t) ^ 2.0)) * Float64(sin(k_m) * tan(k_m))))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(sqrt(t) * Float64(k_m * sin(k_m))) ^ 2.0) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 7.5e-77], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 5.1e-5], N[(2.0 / N[Power[N[(N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(N[(2.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Sqrt[t], $MachinePrecision] * N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 7.5 \cdot 10^{-77}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k_m}\right)}^{2}}}{t}\right)}^{3}\\
\mathbf{elif}\;k_m \leq 5.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\left(2 + {\left(\frac{k_m}{t}\right)}^{2}\right) \cdot \left(\sin k_m \cdot \tan k_m\right)}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\sqrt{t} \cdot \left(k_m \cdot \sin k_m\right)\right)}^{2}}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 7.5000000000000006e-77Initial program 57.7%
Simplified57.1%
Taylor expanded in k around 0 54.4%
add-cube-cbrt54.4%
pow354.4%
associate-/r*55.0%
cbrt-div55.0%
rem-cbrt-cube61.9%
Applied egg-rr61.9%
cbrt-div62.4%
unpow262.4%
cbrt-prod68.5%
unpow268.5%
unpow268.5%
cbrt-prod79.9%
pow279.9%
Applied egg-rr79.9%
if 7.5000000000000006e-77 < k < 5.09999999999999996e-5Initial program 77.3%
associate-*l*77.3%
*-commutative77.3%
*-commutative77.3%
associate-/r*77.7%
distribute-rgt-in77.7%
unpow277.7%
times-frac77.7%
sqr-neg77.7%
times-frac77.7%
unpow277.7%
distribute-rgt-in77.7%
+-commutative77.7%
Simplified77.7%
add-sqr-sqrt15.4%
pow215.4%
associate-*l*15.4%
sqrt-prod15.4%
associate-/l/15.4%
sqrt-div15.4%
sqrt-pow115.3%
metadata-eval15.3%
sqrt-prod7.7%
add-sqr-sqrt15.3%
Applied egg-rr15.3%
associate-*r*15.3%
Simplified15.3%
if 5.09999999999999996e-5 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
expm1-log1p-u47.7%
expm1-udef33.8%
Applied egg-rr10.7%
expm1-def17.7%
expm1-log1p29.5%
associate-*r*29.5%
Simplified29.5%
Final simplification65.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 7.2e-8)
(pow (/ (/ (pow (cbrt l) 2.0) (pow (cbrt k_m) 2.0)) t) 3.0)
(/
2.0
(/ (pow (* (sqrt t) (* k_m (sin k_m))) 2.0) (* (pow l 2.0) (cos k_m))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 7.2e-8) {
tmp = pow(((pow(cbrt(l), 2.0) / pow(cbrt(k_m), 2.0)) / t), 3.0);
} else {
tmp = 2.0 / (pow((sqrt(t) * (k_m * sin(k_m))), 2.0) / (pow(l, 2.0) * cos(k_m)));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 7.2e-8) {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / Math.pow(Math.cbrt(k_m), 2.0)) / t), 3.0);
} else {
tmp = 2.0 / (Math.pow((Math.sqrt(t) * (k_m * Math.sin(k_m))), 2.0) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 7.2e-8) tmp = Float64(Float64((cbrt(l) ^ 2.0) / (cbrt(k_m) ^ 2.0)) / t) ^ 3.0; else tmp = Float64(2.0 / Float64((Float64(sqrt(t) * Float64(k_m * sin(k_m))) ^ 2.0) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 7.2e-8], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Sqrt[t], $MachinePrecision] * N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 7.2 \cdot 10^{-8}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k_m}\right)}^{2}}}{t}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\sqrt{t} \cdot \left(k_m \cdot \sin k_m\right)\right)}^{2}}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 7.19999999999999962e-8Initial program 58.9%
Simplified58.4%
Taylor expanded in k around 0 55.9%
add-cube-cbrt55.9%
pow355.9%
associate-/r*55.9%
cbrt-div56.0%
rem-cbrt-cube62.4%
Applied egg-rr62.4%
cbrt-div63.3%
unpow263.3%
cbrt-prod69.5%
unpow269.5%
unpow269.5%
cbrt-prod80.1%
pow280.1%
Applied egg-rr80.1%
if 7.19999999999999962e-8 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
expm1-log1p-u47.7%
expm1-udef33.8%
Applied egg-rr10.7%
expm1-def17.7%
expm1-log1p29.5%
associate-*r*29.5%
Simplified29.5%
Final simplification68.9%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 7.5e-155)
(/ 2.0 (* (* k_m 2.0) (pow (* (/ (pow t 1.5) l) (sqrt (sin k_m))) 2.0)))
(if (<= k_m 8e-6)
(pow (/ (* (pow (cbrt l) 2.0) (cbrt (pow k_m -2.0))) t) 3.0)
(/
2.0
(/
(* (pow k_m 2.0) (* t (- 0.5 (/ (cos (* k_m 2.0)) 2.0))))
(* (pow l 2.0) (cos k_m)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 7.5e-155) {
tmp = 2.0 / ((k_m * 2.0) * pow(((pow(t, 1.5) / l) * sqrt(sin(k_m))), 2.0));
} else if (k_m <= 8e-6) {
tmp = pow(((pow(cbrt(l), 2.0) * cbrt(pow(k_m, -2.0))) / t), 3.0);
} else {
tmp = 2.0 / ((pow(k_m, 2.0) * (t * (0.5 - (cos((k_m * 2.0)) / 2.0)))) / (pow(l, 2.0) * cos(k_m)));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 7.5e-155) {
tmp = 2.0 / ((k_m * 2.0) * Math.pow(((Math.pow(t, 1.5) / l) * Math.sqrt(Math.sin(k_m))), 2.0));
} else if (k_m <= 8e-6) {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(Math.pow(k_m, -2.0))) / t), 3.0);
} else {
tmp = 2.0 / ((Math.pow(k_m, 2.0) * (t * (0.5 - (Math.cos((k_m * 2.0)) / 2.0)))) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 7.5e-155) tmp = Float64(2.0 / Float64(Float64(k_m * 2.0) * (Float64(Float64((t ^ 1.5) / l) * sqrt(sin(k_m))) ^ 2.0))); elseif (k_m <= 8e-6) tmp = Float64(Float64((cbrt(l) ^ 2.0) * cbrt((k_m ^ -2.0))) / t) ^ 3.0; else tmp = Float64(2.0 / Float64(Float64((k_m ^ 2.0) * Float64(t * Float64(0.5 - Float64(cos(Float64(k_m * 2.0)) / 2.0)))) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 7.5e-155], N[(2.0 / N[(N[(k$95$m * 2.0), $MachinePrecision] * N[Power[N[(N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k$95$m], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 8e-6], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[Power[k$95$m, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 / N[(N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[(0.5 - N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 7.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{2}{\left(k_m \cdot 2\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k_m}\right)}^{2}}\\
\mathbf{elif}\;k_m \leq 8 \cdot 10^{-6}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{{k_m}^{-2}}}{t}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k_m}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \left(k_m \cdot 2\right)}{2}\right)\right)}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 7.5000000000000006e-155Initial program 57.4%
associate-*l*57.4%
*-commutative57.4%
*-commutative57.4%
associate-/r*65.5%
distribute-rgt-in65.5%
unpow265.5%
times-frac48.9%
sqr-neg48.9%
times-frac65.5%
unpow265.5%
distribute-rgt-in65.5%
+-commutative65.5%
Simplified65.5%
add-sqr-sqrt33.1%
pow233.1%
sqrt-prod14.9%
associate-/l/11.3%
sqrt-div11.3%
sqrt-pow114.4%
metadata-eval14.4%
sqrt-prod10.7%
add-sqr-sqrt19.6%
Applied egg-rr19.6%
Taylor expanded in k around 0 15.6%
*-commutative64.4%
Simplified15.6%
if 7.5000000000000006e-155 < k < 7.99999999999999964e-6Initial program 67.5%
Simplified70.6%
Taylor expanded in k around 0 73.9%
add-cube-cbrt73.7%
pow373.7%
associate-/r*70.6%
cbrt-div70.5%
rem-cbrt-cube77.1%
Applied egg-rr77.1%
pow1/375.8%
div-inv75.8%
unpow-prod-down78.6%
pow1/378.5%
unpow278.5%
cbrt-prod84.4%
unpow284.4%
pow-flip84.4%
metadata-eval84.4%
Applied egg-rr84.4%
unpow1/386.4%
Simplified86.4%
if 7.99999999999999964e-6 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
unpow263.5%
sin-mult63.2%
Applied egg-rr63.2%
div-sub63.2%
+-inverses63.2%
cos-063.2%
metadata-eval63.2%
count-263.2%
*-commutative63.2%
Simplified63.2%
Final simplification34.5%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 3.5e-7)
(pow (/ (/ (pow (cbrt l) 2.0) (pow (cbrt k_m) 2.0)) t) 3.0)
(/
2.0
(/
(* (pow k_m 2.0) (* t (- 0.5 (/ (cos (* k_m 2.0)) 2.0))))
(* (pow l 2.0) (cos k_m))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 3.5e-7) {
tmp = pow(((pow(cbrt(l), 2.0) / pow(cbrt(k_m), 2.0)) / t), 3.0);
} else {
tmp = 2.0 / ((pow(k_m, 2.0) * (t * (0.5 - (cos((k_m * 2.0)) / 2.0)))) / (pow(l, 2.0) * cos(k_m)));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 3.5e-7) {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / Math.pow(Math.cbrt(k_m), 2.0)) / t), 3.0);
} else {
tmp = 2.0 / ((Math.pow(k_m, 2.0) * (t * (0.5 - (Math.cos((k_m * 2.0)) / 2.0)))) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 3.5e-7) tmp = Float64(Float64((cbrt(l) ^ 2.0) / (cbrt(k_m) ^ 2.0)) / t) ^ 3.0; else tmp = Float64(2.0 / Float64(Float64((k_m ^ 2.0) * Float64(t * Float64(0.5 - Float64(cos(Float64(k_m * 2.0)) / 2.0)))) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 3.5e-7], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 / N[(N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[(0.5 - N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 3.5 \cdot 10^{-7}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k_m}\right)}^{2}}}{t}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k_m}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \left(k_m \cdot 2\right)}{2}\right)\right)}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 3.49999999999999984e-7Initial program 58.9%
Simplified58.4%
Taylor expanded in k around 0 55.9%
add-cube-cbrt55.9%
pow355.9%
associate-/r*55.9%
cbrt-div56.0%
rem-cbrt-cube62.4%
Applied egg-rr62.4%
cbrt-div63.3%
unpow263.3%
cbrt-prod69.5%
unpow269.5%
unpow269.5%
cbrt-prod80.1%
pow280.1%
Applied egg-rr80.1%
if 3.49999999999999984e-7 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
unpow263.5%
sin-mult63.2%
Applied egg-rr63.2%
div-sub63.2%
+-inverses63.2%
cos-063.2%
metadata-eval63.2%
count-263.2%
*-commutative63.2%
Simplified63.2%
Final simplification76.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.9e-5)
(/ 2.0 (* (* k_m 2.0) (pow (* (/ (pow t 1.5) l) (sqrt (sin k_m))) 2.0)))
(/
2.0
(/
(* (pow k_m 2.0) (* t (- 0.5 (/ (cos (* k_m 2.0)) 2.0))))
(* (pow l 2.0) (cos k_m))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.9e-5) {
tmp = 2.0 / ((k_m * 2.0) * pow(((pow(t, 1.5) / l) * sqrt(sin(k_m))), 2.0));
} else {
tmp = 2.0 / ((pow(k_m, 2.0) * (t * (0.5 - (cos((k_m * 2.0)) / 2.0)))) / (pow(l, 2.0) * cos(k_m)));
}
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 <= 1.9d-5) then
tmp = 2.0d0 / ((k_m * 2.0d0) * ((((t ** 1.5d0) / l) * sqrt(sin(k_m))) ** 2.0d0))
else
tmp = 2.0d0 / (((k_m ** 2.0d0) * (t * (0.5d0 - (cos((k_m * 2.0d0)) / 2.0d0)))) / ((l ** 2.0d0) * cos(k_m)))
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 <= 1.9e-5) {
tmp = 2.0 / ((k_m * 2.0) * Math.pow(((Math.pow(t, 1.5) / l) * Math.sqrt(Math.sin(k_m))), 2.0));
} else {
tmp = 2.0 / ((Math.pow(k_m, 2.0) * (t * (0.5 - (Math.cos((k_m * 2.0)) / 2.0)))) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 1.9e-5: tmp = 2.0 / ((k_m * 2.0) * math.pow(((math.pow(t, 1.5) / l) * math.sqrt(math.sin(k_m))), 2.0)) else: tmp = 2.0 / ((math.pow(k_m, 2.0) * (t * (0.5 - (math.cos((k_m * 2.0)) / 2.0)))) / (math.pow(l, 2.0) * math.cos(k_m))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.9e-5) tmp = Float64(2.0 / Float64(Float64(k_m * 2.0) * (Float64(Float64((t ^ 1.5) / l) * sqrt(sin(k_m))) ^ 2.0))); else tmp = Float64(2.0 / Float64(Float64((k_m ^ 2.0) * Float64(t * Float64(0.5 - Float64(cos(Float64(k_m * 2.0)) / 2.0)))) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 1.9e-5) tmp = 2.0 / ((k_m * 2.0) * ((((t ^ 1.5) / l) * sqrt(sin(k_m))) ^ 2.0)); else tmp = 2.0 / (((k_m ^ 2.0) * (t * (0.5 - (cos((k_m * 2.0)) / 2.0)))) / ((l ^ 2.0) * cos(k_m))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.9e-5], N[(2.0 / N[(N[(k$95$m * 2.0), $MachinePrecision] * N[Power[N[(N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k$95$m], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[(0.5 - N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 1.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{\left(k_m \cdot 2\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k_m}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \left(k_m \cdot 2\right)}{2}\right)\right)}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 1.9000000000000001e-5Initial program 58.9%
associate-*l*59.0%
*-commutative59.0%
*-commutative59.0%
associate-/r*65.9%
distribute-rgt-in65.9%
unpow265.9%
times-frac50.2%
sqr-neg50.2%
times-frac65.9%
unpow265.9%
distribute-rgt-in65.9%
+-commutative65.9%
Simplified65.9%
add-sqr-sqrt31.7%
pow231.7%
sqrt-prod16.3%
associate-/l/13.2%
sqrt-div13.2%
sqrt-pow116.3%
metadata-eval16.3%
sqrt-prod12.6%
add-sqr-sqrt20.7%
Applied egg-rr20.7%
Taylor expanded in k around 0 17.3%
*-commutative65.5%
Simplified17.3%
if 1.9000000000000001e-5 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
unpow263.5%
sin-mult63.2%
Applied egg-rr63.2%
div-sub63.2%
+-inverses63.2%
cos-063.2%
metadata-eval63.2%
count-263.2%
*-commutative63.2%
Simplified63.2%
Final simplification27.5%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 7.5e-10)
(/ 2.0 (* (* k_m 2.0) (pow (* (/ (pow t 1.5) l) (sqrt (sin k_m))) 2.0)))
(/
2.0
(/ (* (pow k_m 2.0) (* t (pow k_m 2.0))) (* (pow l 2.0) (cos k_m))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 7.5e-10) {
tmp = 2.0 / ((k_m * 2.0) * pow(((pow(t, 1.5) / l) * sqrt(sin(k_m))), 2.0));
} else {
tmp = 2.0 / ((pow(k_m, 2.0) * (t * pow(k_m, 2.0))) / (pow(l, 2.0) * cos(k_m)));
}
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 <= 7.5d-10) then
tmp = 2.0d0 / ((k_m * 2.0d0) * ((((t ** 1.5d0) / l) * sqrt(sin(k_m))) ** 2.0d0))
else
tmp = 2.0d0 / (((k_m ** 2.0d0) * (t * (k_m ** 2.0d0))) / ((l ** 2.0d0) * cos(k_m)))
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 <= 7.5e-10) {
tmp = 2.0 / ((k_m * 2.0) * Math.pow(((Math.pow(t, 1.5) / l) * Math.sqrt(Math.sin(k_m))), 2.0));
} else {
tmp = 2.0 / ((Math.pow(k_m, 2.0) * (t * Math.pow(k_m, 2.0))) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 7.5e-10: tmp = 2.0 / ((k_m * 2.0) * math.pow(((math.pow(t, 1.5) / l) * math.sqrt(math.sin(k_m))), 2.0)) else: tmp = 2.0 / ((math.pow(k_m, 2.0) * (t * math.pow(k_m, 2.0))) / (math.pow(l, 2.0) * math.cos(k_m))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 7.5e-10) tmp = Float64(2.0 / Float64(Float64(k_m * 2.0) * (Float64(Float64((t ^ 1.5) / l) * sqrt(sin(k_m))) ^ 2.0))); else tmp = Float64(2.0 / Float64(Float64((k_m ^ 2.0) * Float64(t * (k_m ^ 2.0))) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 7.5e-10) tmp = 2.0 / ((k_m * 2.0) * ((((t ^ 1.5) / l) * sqrt(sin(k_m))) ^ 2.0)); else tmp = 2.0 / (((k_m ^ 2.0) * (t * (k_m ^ 2.0))) / ((l ^ 2.0) * cos(k_m))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 7.5e-10], N[(2.0 / N[(N[(k$95$m * 2.0), $MachinePrecision] * N[Power[N[(N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k$95$m], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 7.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{2}{\left(k_m \cdot 2\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k_m}^{2} \cdot \left(t \cdot {k_m}^{2}\right)}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 7.49999999999999995e-10Initial program 58.9%
associate-*l*59.0%
*-commutative59.0%
*-commutative59.0%
associate-/r*65.9%
distribute-rgt-in65.9%
unpow265.9%
times-frac50.2%
sqr-neg50.2%
times-frac65.9%
unpow265.9%
distribute-rgt-in65.9%
+-commutative65.9%
Simplified65.9%
add-sqr-sqrt31.7%
pow231.7%
sqrt-prod16.3%
associate-/l/13.2%
sqrt-div13.2%
sqrt-pow116.3%
metadata-eval16.3%
sqrt-prod12.6%
add-sqr-sqrt20.7%
Applied egg-rr20.7%
Taylor expanded in k around 0 17.3%
*-commutative65.5%
Simplified17.3%
if 7.49999999999999995e-10 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
Taylor expanded in k around 0 55.3%
Final simplification25.8%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 4.2e-12) (/ 2.0 (* (* k_m 2.0) (pow (* (/ (pow t 1.5) l) (sqrt (sin k_m))) 2.0))) (/ 2.0 (/ (* t (pow k_m 4.0)) (* (pow l 2.0) (cos k_m))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 4.2e-12) {
tmp = 2.0 / ((k_m * 2.0) * pow(((pow(t, 1.5) / l) * sqrt(sin(k_m))), 2.0));
} else {
tmp = 2.0 / ((t * pow(k_m, 4.0)) / (pow(l, 2.0) * cos(k_m)));
}
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 <= 4.2d-12) then
tmp = 2.0d0 / ((k_m * 2.0d0) * ((((t ** 1.5d0) / l) * sqrt(sin(k_m))) ** 2.0d0))
else
tmp = 2.0d0 / ((t * (k_m ** 4.0d0)) / ((l ** 2.0d0) * cos(k_m)))
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 <= 4.2e-12) {
tmp = 2.0 / ((k_m * 2.0) * Math.pow(((Math.pow(t, 1.5) / l) * Math.sqrt(Math.sin(k_m))), 2.0));
} else {
tmp = 2.0 / ((t * Math.pow(k_m, 4.0)) / (Math.pow(l, 2.0) * Math.cos(k_m)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 4.2e-12: tmp = 2.0 / ((k_m * 2.0) * math.pow(((math.pow(t, 1.5) / l) * math.sqrt(math.sin(k_m))), 2.0)) else: tmp = 2.0 / ((t * math.pow(k_m, 4.0)) / (math.pow(l, 2.0) * math.cos(k_m))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 4.2e-12) tmp = Float64(2.0 / Float64(Float64(k_m * 2.0) * (Float64(Float64((t ^ 1.5) / l) * sqrt(sin(k_m))) ^ 2.0))); else tmp = Float64(2.0 / Float64(Float64(t * (k_m ^ 4.0)) / Float64((l ^ 2.0) * cos(k_m)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 4.2e-12) tmp = 2.0 / ((k_m * 2.0) * ((((t ^ 1.5) / l) * sqrt(sin(k_m))) ^ 2.0)); else tmp = 2.0 / ((t * (k_m ^ 4.0)) / ((l ^ 2.0) * cos(k_m))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 4.2e-12], N[(2.0 / N[(N[(k$95$m * 2.0), $MachinePrecision] * N[Power[N[(N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k$95$m], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 4.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{2}{\left(k_m \cdot 2\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t \cdot {k_m}^{4}}{{\ell}^{2} \cdot \cos k_m}}\\
\end{array}
\end{array}
if k < 4.19999999999999988e-12Initial program 58.9%
associate-*l*59.0%
*-commutative59.0%
*-commutative59.0%
associate-/r*65.9%
distribute-rgt-in65.9%
unpow265.9%
times-frac50.2%
sqr-neg50.2%
times-frac65.9%
unpow265.9%
distribute-rgt-in65.9%
+-commutative65.9%
Simplified65.9%
add-sqr-sqrt31.7%
pow231.7%
sqrt-prod16.3%
associate-/l/13.2%
sqrt-div13.2%
sqrt-pow116.3%
metadata-eval16.3%
sqrt-prod12.6%
add-sqr-sqrt20.7%
Applied egg-rr20.7%
Taylor expanded in k around 0 17.3%
*-commutative65.5%
Simplified17.3%
if 4.19999999999999988e-12 < k Initial program 28.6%
associate-*l*28.6%
*-commutative28.6%
*-commutative28.6%
associate-/r*34.4%
distribute-rgt-in34.4%
unpow234.4%
times-frac27.1%
sqr-neg27.1%
times-frac34.4%
unpow234.4%
distribute-rgt-in34.4%
+-commutative34.4%
Simplified34.4%
Taylor expanded in t around 0 63.5%
Taylor expanded in k around 0 51.8%
Final simplification25.0%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 3.3e-92)
(pow (* l (sqrt (/ 2.0 (* t (pow k_m 4.0))))) 2.0)
(if (<= t 2.45e+59)
(/
2.0
(*
(* (tan k_m) (+ 2.0 (pow (/ k_m t) 2.0)))
(/ (/ k_m (/ l (pow t 3.0))) l)))
(/ (pow l 2.0) (pow (* (pow (cbrt k_m) 2.0) t) 3.0)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 3.3e-92) {
tmp = pow((l * sqrt((2.0 / (t * pow(k_m, 4.0))))), 2.0);
} else if (t <= 2.45e+59) {
tmp = 2.0 / ((tan(k_m) * (2.0 + pow((k_m / t), 2.0))) * ((k_m / (l / pow(t, 3.0))) / l));
} else {
tmp = pow(l, 2.0) / pow((pow(cbrt(k_m), 2.0) * t), 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.3e-92) {
tmp = Math.pow((l * Math.sqrt((2.0 / (t * Math.pow(k_m, 4.0))))), 2.0);
} else if (t <= 2.45e+59) {
tmp = 2.0 / ((Math.tan(k_m) * (2.0 + Math.pow((k_m / t), 2.0))) * ((k_m / (l / Math.pow(t, 3.0))) / l));
} else {
tmp = Math.pow(l, 2.0) / Math.pow((Math.pow(Math.cbrt(k_m), 2.0) * t), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 3.3e-92) tmp = Float64(l * sqrt(Float64(2.0 / Float64(t * (k_m ^ 4.0))))) ^ 2.0; elseif (t <= 2.45e+59) tmp = Float64(2.0 / Float64(Float64(tan(k_m) * Float64(2.0 + (Float64(k_m / t) ^ 2.0))) * Float64(Float64(k_m / Float64(l / (t ^ 3.0))) / l))); else tmp = Float64((l ^ 2.0) / (Float64((cbrt(k_m) ^ 2.0) * t) ^ 3.0)); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 3.3e-92], N[Power[N[(l * N[Sqrt[N[(2.0 / N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t, 2.45e+59], N[(2.0 / N[(N[(N[Tan[k$95$m], $MachinePrecision] * N[(2.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k$95$m / N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{-92}:\\
\;\;\;\;{\left(\ell \cdot \sqrt{\frac{2}{t \cdot {k_m}^{4}}}\right)}^{2}\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{+59}:\\
\;\;\;\;\frac{2}{\left(\tan k_m \cdot \left(2 + {\left(\frac{k_m}{t}\right)}^{2}\right)\right) \cdot \frac{\frac{k_m}{\frac{\ell}{{t}^{3}}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{\left({\left(\sqrt[3]{k_m}\right)}^{2} \cdot t\right)}^{3}}\\
\end{array}
\end{array}
if t < 3.29999999999999998e-92Initial program 48.8%
associate-*l*48.8%
*-commutative48.8%
*-commutative48.8%
associate-/r*55.9%
distribute-rgt-in55.9%
unpow255.9%
times-frac39.7%
sqr-neg39.7%
times-frac55.9%
unpow255.9%
distribute-rgt-in55.9%
+-commutative55.9%
Simplified55.9%
Taylor expanded in t around 0 63.6%
Taylor expanded in k around 0 53.1%
add-sqr-sqrt30.7%
pow230.7%
associate-/r/30.7%
sqrt-prod26.2%
*-commutative26.2%
unpow226.2%
sqrt-prod16.3%
add-sqr-sqrt29.8%
Applied egg-rr29.8%
if 3.29999999999999998e-92 < t < 2.45000000000000004e59Initial program 88.3%
associate-*l*88.4%
*-commutative88.4%
*-commutative88.4%
associate-/r*88.4%
distribute-rgt-in88.4%
unpow288.4%
times-frac88.5%
sqr-neg88.5%
times-frac88.4%
unpow288.4%
distribute-rgt-in88.4%
+-commutative88.4%
Simplified88.4%
associate-*l/94.1%
clear-num94.1%
associate-*l/94.1%
*-un-lft-identity94.1%
Applied egg-rr94.1%
Taylor expanded in k around 0 77.3%
associate-/l*77.2%
Simplified77.2%
if 2.45000000000000004e59 < t Initial program 51.9%
Simplified56.7%
Taylor expanded in k around 0 46.1%
add-cube-cbrt46.1%
pow346.1%
*-commutative46.1%
cbrt-prod46.1%
rem-cbrt-cube54.9%
unpow254.9%
cbrt-prod72.7%
pow272.7%
Applied egg-rr72.7%
Final simplification42.9%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 3.3e-92)
(pow (* l (sqrt (/ 2.0 (* t (pow k_m 4.0))))) 2.0)
(/
2.0
(*
(* (tan k_m) (+ 2.0 (pow (/ k_m t) 2.0)))
(/ (/ k_m (/ l (pow t 3.0))) l)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 3.3e-92) {
tmp = pow((l * sqrt((2.0 / (t * pow(k_m, 4.0))))), 2.0);
} else {
tmp = 2.0 / ((tan(k_m) * (2.0 + pow((k_m / t), 2.0))) * ((k_m / (l / pow(t, 3.0))) / 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 <= 3.3d-92) then
tmp = (l * sqrt((2.0d0 / (t * (k_m ** 4.0d0))))) ** 2.0d0
else
tmp = 2.0d0 / ((tan(k_m) * (2.0d0 + ((k_m / t) ** 2.0d0))) * ((k_m / (l / (t ** 3.0d0))) / 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 <= 3.3e-92) {
tmp = Math.pow((l * Math.sqrt((2.0 / (t * Math.pow(k_m, 4.0))))), 2.0);
} else {
tmp = 2.0 / ((Math.tan(k_m) * (2.0 + Math.pow((k_m / t), 2.0))) * ((k_m / (l / Math.pow(t, 3.0))) / l));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 3.3e-92: tmp = math.pow((l * math.sqrt((2.0 / (t * math.pow(k_m, 4.0))))), 2.0) else: tmp = 2.0 / ((math.tan(k_m) * (2.0 + math.pow((k_m / t), 2.0))) * ((k_m / (l / math.pow(t, 3.0))) / l)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 3.3e-92) tmp = Float64(l * sqrt(Float64(2.0 / Float64(t * (k_m ^ 4.0))))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(tan(k_m) * Float64(2.0 + (Float64(k_m / t) ^ 2.0))) * Float64(Float64(k_m / Float64(l / (t ^ 3.0))) / l))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 3.3e-92) tmp = (l * sqrt((2.0 / (t * (k_m ^ 4.0))))) ^ 2.0; else tmp = 2.0 / ((tan(k_m) * (2.0 + ((k_m / t) ^ 2.0))) * ((k_m / (l / (t ^ 3.0))) / l)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 3.3e-92], N[Power[N[(l * N[Sqrt[N[(2.0 / N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k$95$m], $MachinePrecision] * N[(2.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k$95$m / N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{-92}:\\
\;\;\;\;{\left(\ell \cdot \sqrt{\frac{2}{t \cdot {k_m}^{4}}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k_m \cdot \left(2 + {\left(\frac{k_m}{t}\right)}^{2}\right)\right) \cdot \frac{\frac{k_m}{\frac{\ell}{{t}^{3}}}}{\ell}}\\
\end{array}
\end{array}
if t < 3.29999999999999998e-92Initial program 48.8%
associate-*l*48.8%
*-commutative48.8%
*-commutative48.8%
associate-/r*55.9%
distribute-rgt-in55.9%
unpow255.9%
times-frac39.7%
sqr-neg39.7%
times-frac55.9%
unpow255.9%
distribute-rgt-in55.9%
+-commutative55.9%
Simplified55.9%
Taylor expanded in t around 0 63.6%
Taylor expanded in k around 0 53.1%
add-sqr-sqrt30.7%
pow230.7%
associate-/r/30.7%
sqrt-prod26.2%
*-commutative26.2%
unpow226.2%
sqrt-prod16.3%
add-sqr-sqrt29.8%
Applied egg-rr29.8%
if 3.29999999999999998e-92 < t Initial program 60.1%
associate-*l*60.1%
*-commutative60.1%
*-commutative60.1%
associate-/r*65.9%
distribute-rgt-in65.9%
unpow265.9%
times-frac57.8%
sqr-neg57.8%
times-frac65.9%
unpow265.9%
distribute-rgt-in65.9%
+-commutative65.9%
Simplified65.9%
associate-*l/67.2%
clear-num67.1%
associate-*l/69.4%
*-un-lft-identity69.4%
Applied egg-rr69.4%
Taylor expanded in k around 0 63.4%
associate-/l*63.2%
Simplified63.2%
Final simplification39.7%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= t 2.45e-25)
(pow (* l (sqrt (/ 2.0 (* t (pow k_m 4.0))))) 2.0)
(/
2.0
(* (* k_m 2.0) (* (sin k_m) (/ (* t (* (pow t 2.0) (/ 1.0 l))) l))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 2.45e-25) {
tmp = pow((l * sqrt((2.0 / (t * pow(k_m, 4.0))))), 2.0);
} else {
tmp = 2.0 / ((k_m * 2.0) * (sin(k_m) * ((t * (pow(t, 2.0) * (1.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 <= 2.45d-25) then
tmp = (l * sqrt((2.0d0 / (t * (k_m ** 4.0d0))))) ** 2.0d0
else
tmp = 2.0d0 / ((k_m * 2.0d0) * (sin(k_m) * ((t * ((t ** 2.0d0) * (1.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 <= 2.45e-25) {
tmp = Math.pow((l * Math.sqrt((2.0 / (t * Math.pow(k_m, 4.0))))), 2.0);
} else {
tmp = 2.0 / ((k_m * 2.0) * (Math.sin(k_m) * ((t * (Math.pow(t, 2.0) * (1.0 / l))) / l)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 2.45e-25: tmp = math.pow((l * math.sqrt((2.0 / (t * math.pow(k_m, 4.0))))), 2.0) else: tmp = 2.0 / ((k_m * 2.0) * (math.sin(k_m) * ((t * (math.pow(t, 2.0) * (1.0 / l))) / l))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 2.45e-25) tmp = Float64(l * sqrt(Float64(2.0 / Float64(t * (k_m ^ 4.0))))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(k_m * 2.0) * Float64(sin(k_m) * Float64(Float64(t * Float64((t ^ 2.0) * Float64(1.0 / l))) / l)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 2.45e-25) tmp = (l * sqrt((2.0 / (t * (k_m ^ 4.0))))) ^ 2.0; else tmp = 2.0 / ((k_m * 2.0) * (sin(k_m) * ((t * ((t ^ 2.0) * (1.0 / l))) / l))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 2.45e-25], N[Power[N[(l * N[Sqrt[N[(2.0 / N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(k$95$m * 2.0), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t * N[(N[Power[t, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.45 \cdot 10^{-25}:\\
\;\;\;\;{\left(\ell \cdot \sqrt{\frac{2}{t \cdot {k_m}^{4}}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(k_m \cdot 2\right) \cdot \left(\sin k_m \cdot \frac{t \cdot \left({t}^{2} \cdot \frac{1}{\ell}\right)}{\ell}\right)}\\
\end{array}
\end{array}
if t < 2.44999999999999995e-25Initial program 49.9%
associate-*l*49.9%
*-commutative49.9%
*-commutative49.9%
associate-/r*56.8%
distribute-rgt-in56.8%
unpow256.8%
times-frac41.0%
sqr-neg41.0%
times-frac56.8%
unpow256.8%
distribute-rgt-in56.8%
+-commutative56.8%
Simplified56.8%
Taylor expanded in t around 0 63.8%
Taylor expanded in k around 0 53.2%
add-sqr-sqrt31.2%
pow231.2%
associate-/r/31.2%
sqrt-prod26.8%
*-commutative26.8%
unpow226.8%
sqrt-prod17.1%
add-sqr-sqrt30.4%
Applied egg-rr30.4%
if 2.44999999999999995e-25 < t Initial program 57.9%
associate-*l*57.9%
*-commutative57.9%
*-commutative57.9%
associate-/r*64.0%
distribute-rgt-in64.0%
unpow264.0%
times-frac55.5%
sqr-neg55.5%
times-frac64.0%
unpow264.0%
distribute-rgt-in64.0%
+-commutative64.0%
Simplified64.0%
div-inv64.0%
cube-mult64.0%
associate-*l*72.1%
pow272.1%
Applied egg-rr72.1%
Taylor expanded in k around 0 64.3%
*-commutative62.5%
Simplified64.3%
Final simplification39.9%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 5.6e+128) (/ 2.0 (* (* k_m 2.0) (* (sin k_m) (/ (* t (* (pow t 2.0) (/ 1.0 l))) l)))) (* 2.0 (/ (/ (pow l 2.0) (pow k_m 4.0)) t))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 5.6e+128) {
tmp = 2.0 / ((k_m * 2.0) * (sin(k_m) * ((t * (pow(t, 2.0) * (1.0 / l))) / l)));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 4.0)) / 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 <= 5.6d+128) then
tmp = 2.0d0 / ((k_m * 2.0d0) * (sin(k_m) * ((t * ((t ** 2.0d0) * (1.0d0 / l))) / l)))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k_m ** 4.0d0)) / 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 <= 5.6e+128) {
tmp = 2.0 / ((k_m * 2.0) * (Math.sin(k_m) * ((t * (Math.pow(t, 2.0) * (1.0 / l))) / l)));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 4.0)) / t);
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 5.6e+128: tmp = 2.0 / ((k_m * 2.0) * (math.sin(k_m) * ((t * (math.pow(t, 2.0) * (1.0 / l))) / l))) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 4.0)) / t) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 5.6e+128) tmp = Float64(2.0 / Float64(Float64(k_m * 2.0) * Float64(sin(k_m) * Float64(Float64(t * Float64((t ^ 2.0) * Float64(1.0 / l))) / l)))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 4.0)) / t)); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 5.6e+128) tmp = 2.0 / ((k_m * 2.0) * (sin(k_m) * ((t * ((t ^ 2.0) * (1.0 / l))) / l))); else tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 4.0)) / t); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 5.6e+128], N[(2.0 / N[(N[(k$95$m * 2.0), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t * N[(N[Power[t, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 5.6 \cdot 10^{+128}:\\
\;\;\;\;\frac{2}{\left(k_m \cdot 2\right) \cdot \left(\sin k_m \cdot \frac{t \cdot \left({t}^{2} \cdot \frac{1}{\ell}\right)}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k_m}^{4}}}{t}\\
\end{array}
\end{array}
if k < 5.59999999999999965e128Initial program 56.5%
associate-*l*56.5%
*-commutative56.5%
*-commutative56.5%
associate-/r*63.1%
distribute-rgt-in63.1%
unpow263.1%
times-frac49.3%
sqr-neg49.3%
times-frac63.1%
unpow263.1%
distribute-rgt-in63.1%
+-commutative63.1%
Simplified63.1%
div-inv63.1%
cube-mult63.1%
associate-*l*69.0%
pow269.0%
Applied egg-rr69.0%
Taylor expanded in k around 0 63.8%
*-commutative63.6%
Simplified63.8%
if 5.59999999999999965e128 < k Initial program 22.0%
associate-*l*22.0%
*-commutative22.0%
*-commutative22.0%
associate-/r*29.0%
distribute-rgt-in29.0%
unpow229.0%
times-frac15.9%
sqr-neg15.9%
times-frac29.0%
unpow229.0%
distribute-rgt-in29.0%
+-commutative29.0%
Simplified29.0%
Taylor expanded in t around 0 51.2%
Taylor expanded in k around 0 51.2%
Taylor expanded in k around 0 51.2%
associate-/r*51.2%
Simplified51.2%
Final simplification62.2%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 1.02e+129) (/ 2.0 (* (* k_m 2.0) (/ (/ (sin k_m) (/ l (pow t 3.0))) l))) (* 2.0 (/ (/ (pow l 2.0) (pow k_m 4.0)) t))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.02e+129) {
tmp = 2.0 / ((k_m * 2.0) * ((sin(k_m) / (l / pow(t, 3.0))) / l));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 4.0)) / 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 <= 1.02d+129) then
tmp = 2.0d0 / ((k_m * 2.0d0) * ((sin(k_m) / (l / (t ** 3.0d0))) / l))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k_m ** 4.0d0)) / 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 <= 1.02e+129) {
tmp = 2.0 / ((k_m * 2.0) * ((Math.sin(k_m) / (l / Math.pow(t, 3.0))) / l));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 4.0)) / t);
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 1.02e+129: tmp = 2.0 / ((k_m * 2.0) * ((math.sin(k_m) / (l / math.pow(t, 3.0))) / l)) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 4.0)) / t) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.02e+129) tmp = Float64(2.0 / Float64(Float64(k_m * 2.0) * Float64(Float64(sin(k_m) / Float64(l / (t ^ 3.0))) / l))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 4.0)) / t)); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 1.02e+129) tmp = 2.0 / ((k_m * 2.0) * ((sin(k_m) / (l / (t ^ 3.0))) / l)); else tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 4.0)) / t); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.02e+129], N[(2.0 / N[(N[(k$95$m * 2.0), $MachinePrecision] * N[(N[(N[Sin[k$95$m], $MachinePrecision] / N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k_m \leq 1.02 \cdot 10^{+129}:\\
\;\;\;\;\frac{2}{\left(k_m \cdot 2\right) \cdot \frac{\frac{\sin k_m}{\frac{\ell}{{t}^{3}}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k_m}^{4}}}{t}\\
\end{array}
\end{array}
if k < 1.01999999999999996e129Initial program 56.5%
associate-*l*56.5%
*-commutative56.5%
*-commutative56.5%
associate-/r*63.1%
distribute-rgt-in63.1%
unpow263.1%
times-frac49.3%
sqr-neg49.3%
times-frac63.1%
unpow263.1%
distribute-rgt-in63.1%
+-commutative63.1%
Simplified63.1%
associate-*l/64.0%
clear-num64.0%
associate-*l/64.8%
*-un-lft-identity64.8%
Applied egg-rr64.8%
Taylor expanded in k around 0 63.6%
*-commutative63.6%
Simplified63.6%
if 1.01999999999999996e129 < k Initial program 22.0%
associate-*l*22.0%
*-commutative22.0%
*-commutative22.0%
associate-/r*29.0%
distribute-rgt-in29.0%
unpow229.0%
times-frac15.9%
sqr-neg15.9%
times-frac29.0%
unpow229.0%
distribute-rgt-in29.0%
+-commutative29.0%
Simplified29.0%
Taylor expanded in t around 0 51.2%
Taylor expanded in k around 0 51.2%
Taylor expanded in k around 0 51.2%
associate-/r*51.2%
Simplified51.2%
Final simplification62.1%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* 2.0 (/ (/ (pow l 2.0) (pow k_m 4.0)) t)))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return 2.0 * ((pow(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 = 2.0d0 * (((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 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 4.0)) / t);
}
k_m = math.fabs(k) def code(t, l, k_m): return 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 4.0)) / t)
k_m = abs(k) function code(t, l, k_m) return Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 4.0)) / t)) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 4.0)) / t); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
2 \cdot \frac{\frac{{\ell}^{2}}{{k_m}^{4}}}{t}
\end{array}
Initial program 52.2%
associate-*l*52.2%
*-commutative52.2%
*-commutative52.2%
associate-/r*58.9%
distribute-rgt-in58.9%
unpow258.9%
times-frac45.1%
sqr-neg45.1%
times-frac58.9%
unpow258.9%
distribute-rgt-in58.9%
+-commutative58.9%
Simplified58.9%
Taylor expanded in t around 0 58.7%
Taylor expanded in k around 0 49.6%
Taylor expanded in k around 0 49.6%
associate-/r*50.5%
Simplified50.5%
Final simplification50.5%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (/ 2.0 (/ (pow k_m 4.0) (/ (pow l 2.0) t))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return 2.0 / (pow(k_m, 4.0) / (pow(l, 2.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 = 2.0d0 / ((k_m ** 4.0d0) / ((l ** 2.0d0) / t))
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, 4.0) / (Math.pow(l, 2.0) / t));
}
k_m = math.fabs(k) def code(t, l, k_m): return 2.0 / (math.pow(k_m, 4.0) / (math.pow(l, 2.0) / t))
k_m = abs(k) function code(t, l, k_m) return Float64(2.0 / Float64((k_m ^ 4.0) / Float64((l ^ 2.0) / t))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = 2.0 / ((k_m ^ 4.0) / ((l ^ 2.0) / t)); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(2.0 / N[(N[Power[k$95$m, 4.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{2}{\frac{{k_m}^{4}}{\frac{{\ell}^{2}}{t}}}
\end{array}
Initial program 52.2%
associate-*l*52.2%
*-commutative52.2%
*-commutative52.2%
associate-/r*58.9%
distribute-rgt-in58.9%
unpow258.9%
times-frac45.1%
sqr-neg45.1%
times-frac58.9%
unpow258.9%
distribute-rgt-in58.9%
+-commutative58.9%
Simplified58.9%
Taylor expanded in t around 0 58.7%
Taylor expanded in k around 0 49.6%
associate-/l*50.8%
Simplified50.8%
Final simplification50.8%
herbie shell --seed 2024012
(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))))