
(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 25 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))
(t_2 (* (sin k_m) (tan k_m)))
(t_3 (cbrt t_2))
(t_4 (/ (sqrt 2.0) k_m))
(t_5 (* t_4 (pow (cbrt l) 2.0))))
(if (<= (* l l) 1e-290)
(*
(* t_4 (* t (pow (* t (* t_1 t_3)) -2.0)))
(/ (pow (sqrt t_5) 2.0) t_3))
(if (<= (* l l) 2e+307)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_2)))
(*
(/ (* (sqrt 2.0) (* t (pow (* t_3 (* t t_1)) -2.0))) k_m)
(/ t_5 t_3))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = sin(k_m) * tan(k_m);
double t_3 = cbrt(t_2);
double t_4 = sqrt(2.0) / k_m;
double t_5 = t_4 * pow(cbrt(l), 2.0);
double tmp;
if ((l * l) <= 1e-290) {
tmp = (t_4 * (t * pow((t * (t_1 * t_3)), -2.0))) * (pow(sqrt(t_5), 2.0) / t_3);
} else if ((l * l) <= 2e+307) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_2));
} else {
tmp = ((sqrt(2.0) * (t * pow((t_3 * (t * t_1)), -2.0))) / k_m) * (t_5 / t_3);
}
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 t_2 = Math.sin(k_m) * Math.tan(k_m);
double t_3 = Math.cbrt(t_2);
double t_4 = Math.sqrt(2.0) / k_m;
double t_5 = t_4 * Math.pow(Math.cbrt(l), 2.0);
double tmp;
if ((l * l) <= 1e-290) {
tmp = (t_4 * (t * Math.pow((t * (t_1 * t_3)), -2.0))) * (Math.pow(Math.sqrt(t_5), 2.0) / t_3);
} else if ((l * l) <= 2e+307) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_2));
} else {
tmp = ((Math.sqrt(2.0) * (t * Math.pow((t_3 * (t * t_1)), -2.0))) / k_m) * (t_5 / t_3);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = cbrt(l) ^ -2.0 t_2 = Float64(sin(k_m) * tan(k_m)) t_3 = cbrt(t_2) t_4 = Float64(sqrt(2.0) / k_m) t_5 = Float64(t_4 * (cbrt(l) ^ 2.0)) tmp = 0.0 if (Float64(l * l) <= 1e-290) tmp = Float64(Float64(t_4 * Float64(t * (Float64(t * Float64(t_1 * t_3)) ^ -2.0))) * Float64((sqrt(t_5) ^ 2.0) / t_3)); elseif (Float64(l * l) <= 2e+307) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_2))); else tmp = Float64(Float64(Float64(sqrt(2.0) * Float64(t * (Float64(t_3 * Float64(t * t_1)) ^ -2.0))) / k_m) * Float64(t_5 / t_3)); 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]}, Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[t$95$2, 1/3], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 1e-290], N[(N[(t$95$4 * N[(t * N[Power[N[(t * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sqrt[t$95$5], $MachinePrecision], 2.0], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+307], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[Power[N[(t$95$3 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision] * N[(t$95$5 / t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sin k\_m \cdot \tan k\_m\\
t_3 := \sqrt[3]{t\_2}\\
t_4 := \frac{\sqrt{2}}{k\_m}\\
t_5 := t\_4 \cdot {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;\ell \cdot \ell \leq 10^{-290}:\\
\;\;\;\;\left(t\_4 \cdot \left(t \cdot {\left(t \cdot \left(t\_1 \cdot t\_3\right)\right)}^{-2}\right)\right) \cdot \frac{{\left(\sqrt{t\_5}\right)}^{2}}{t\_3}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+307}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot \left(t \cdot {\left(t\_3 \cdot \left(t \cdot t\_1\right)\right)}^{-2}\right)}{k\_m} \cdot \frac{t\_5}{t\_3}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.0000000000000001e-290Initial program 24.2%
*-commutative24.2%
associate-/r*24.2%
Simplified31.4%
add-sqr-sqrt31.4%
add-cube-cbrt31.4%
times-frac31.4%
Applied egg-rr81.1%
associate-/r/81.2%
associate-/r*81.2%
associate-/r/81.2%
Simplified81.2%
associate-*r/81.1%
Applied egg-rr81.2%
associate-/l*81.2%
associate-*l*81.2%
associate-*l*85.7%
associate-/l*87.1%
*-inverses87.1%
Simplified87.1%
add-sqr-sqrt49.5%
pow249.5%
*-rgt-identity49.5%
Applied egg-rr49.5%
if 1.0000000000000001e-290 < (*.f64 l l) < 1.99999999999999997e307Initial program 41.6%
Simplified52.7%
add-log-exp43.4%
*-commutative43.4%
exp-prod37.4%
pow237.4%
associate-/r*37.4%
associate-*r*37.4%
*-commutative37.4%
Applied egg-rr37.4%
Taylor expanded in t around 0 87.0%
associate-/r*91.7%
Simplified91.7%
if 1.99999999999999997e307 < (*.f64 l l) Initial program 29.1%
*-commutative29.1%
associate-/r*29.1%
Simplified29.1%
add-sqr-sqrt29.1%
add-cube-cbrt29.1%
times-frac29.1%
Applied egg-rr87.5%
associate-/r/87.5%
associate-/r*87.5%
associate-/r/87.5%
Simplified87.5%
associate-*r/87.5%
Applied egg-rr87.5%
associate-/l*87.6%
associate-*l*87.6%
associate-*l*87.6%
associate-/l*89.6%
*-inverses89.6%
Simplified89.6%
Taylor expanded in k around 0 89.6%
associate-*l/89.6%
Applied egg-rr89.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0))
(t_2 (* (sin k_m) (tan k_m)))
(t_3 (cbrt t_2))
(t_4 (/ (sqrt 2.0) k_m))
(t_5 (/ (* t_4 (pow (cbrt l) 2.0)) t_3)))
(if (<= l 3.05e-161)
(* (* t_4 (* t (pow (* t (* t_1 t_3)) -2.0))) t_5)
(if (<= l 3.9e+153)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_2)))
(* (/ (* (sqrt 2.0) (* t (pow (* t_3 (* t t_1)) -2.0))) k_m) t_5)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = sin(k_m) * tan(k_m);
double t_3 = cbrt(t_2);
double t_4 = sqrt(2.0) / k_m;
double t_5 = (t_4 * pow(cbrt(l), 2.0)) / t_3;
double tmp;
if (l <= 3.05e-161) {
tmp = (t_4 * (t * pow((t * (t_1 * t_3)), -2.0))) * t_5;
} else if (l <= 3.9e+153) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_2));
} else {
tmp = ((sqrt(2.0) * (t * pow((t_3 * (t * t_1)), -2.0))) / k_m) * t_5;
}
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 t_2 = Math.sin(k_m) * Math.tan(k_m);
double t_3 = Math.cbrt(t_2);
double t_4 = Math.sqrt(2.0) / k_m;
double t_5 = (t_4 * Math.pow(Math.cbrt(l), 2.0)) / t_3;
double tmp;
if (l <= 3.05e-161) {
tmp = (t_4 * (t * Math.pow((t * (t_1 * t_3)), -2.0))) * t_5;
} else if (l <= 3.9e+153) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_2));
} else {
tmp = ((Math.sqrt(2.0) * (t * Math.pow((t_3 * (t * t_1)), -2.0))) / k_m) * t_5;
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = cbrt(l) ^ -2.0 t_2 = Float64(sin(k_m) * tan(k_m)) t_3 = cbrt(t_2) t_4 = Float64(sqrt(2.0) / k_m) t_5 = Float64(Float64(t_4 * (cbrt(l) ^ 2.0)) / t_3) tmp = 0.0 if (l <= 3.05e-161) tmp = Float64(Float64(t_4 * Float64(t * (Float64(t * Float64(t_1 * t_3)) ^ -2.0))) * t_5); elseif (l <= 3.9e+153) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_2))); else tmp = Float64(Float64(Float64(sqrt(2.0) * Float64(t * (Float64(t_3 * Float64(t * t_1)) ^ -2.0))) / k_m) * t_5); 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]}, Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[t$95$2, 1/3], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[l, 3.05e-161], N[(N[(t$95$4 * N[(t * N[Power[N[(t * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision], If[LessEqual[l, 3.9e+153], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[Power[N[(t$95$3 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision] * t$95$5), $MachinePrecision]]]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sin k\_m \cdot \tan k\_m\\
t_3 := \sqrt[3]{t\_2}\\
t_4 := \frac{\sqrt{2}}{k\_m}\\
t_5 := \frac{t\_4 \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}{t\_3}\\
\mathbf{if}\;\ell \leq 3.05 \cdot 10^{-161}:\\
\;\;\;\;\left(t\_4 \cdot \left(t \cdot {\left(t \cdot \left(t\_1 \cdot t\_3\right)\right)}^{-2}\right)\right) \cdot t\_5\\
\mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2} \cdot \left(t \cdot {\left(t\_3 \cdot \left(t \cdot t\_1\right)\right)}^{-2}\right)}{k\_m} \cdot t\_5\\
\end{array}
\end{array}
if l < 3.05000000000000008e-161Initial program 29.8%
*-commutative29.8%
associate-/r*29.8%
Simplified36.1%
add-sqr-sqrt36.1%
add-cube-cbrt36.1%
times-frac36.1%
Applied egg-rr79.3%
associate-/r/79.3%
associate-/r*79.3%
associate-/r/79.3%
Simplified79.3%
associate-*r/79.3%
Applied egg-rr79.4%
associate-/l*79.4%
associate-*l*79.4%
associate-*l*81.4%
associate-/l*84.6%
*-inverses84.6%
Simplified84.6%
Taylor expanded in k around 0 84.6%
if 3.05000000000000008e-161 < l < 3.89999999999999983e153Initial program 43.2%
Simplified55.6%
add-log-exp45.4%
*-commutative45.4%
exp-prod40.3%
pow240.3%
associate-/r*40.3%
associate-*r*40.3%
*-commutative40.3%
Applied egg-rr40.3%
Taylor expanded in t around 0 89.8%
associate-/r*91.3%
Simplified91.3%
if 3.89999999999999983e153 < l Initial program 31.3%
*-commutative31.3%
associate-/r*31.3%
Simplified31.3%
add-sqr-sqrt31.3%
add-cube-cbrt31.3%
times-frac31.3%
Applied egg-rr83.6%
associate-/r/83.6%
associate-/r*83.6%
associate-/r/83.6%
Simplified83.6%
associate-*r/83.6%
Applied egg-rr83.6%
associate-/l*83.6%
associate-*l*83.6%
associate-*l*83.7%
associate-/l*84.4%
*-inverses84.4%
Simplified84.4%
Taylor expanded in k around 0 84.4%
associate-*l/84.4%
Applied egg-rr84.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0))
(t_2 (* (sin k_m) (tan k_m)))
(t_3 (cbrt t_2))
(t_4 (/ (sqrt 2.0) k_m))
(t_5 (/ (* t_4 (pow (cbrt l) 2.0)) t_3)))
(if (<= l 3.05e-161)
(* (* t_4 (* t (pow (* t (* t_1 t_3)) -2.0))) t_5)
(if (<= l 6.6e+153)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_2)))
(* t_5 (* (sqrt 2.0) (/ (* t (pow (* t_3 (* t t_1)) -2.0)) k_m)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = sin(k_m) * tan(k_m);
double t_3 = cbrt(t_2);
double t_4 = sqrt(2.0) / k_m;
double t_5 = (t_4 * pow(cbrt(l), 2.0)) / t_3;
double tmp;
if (l <= 3.05e-161) {
tmp = (t_4 * (t * pow((t * (t_1 * t_3)), -2.0))) * t_5;
} else if (l <= 6.6e+153) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_2));
} else {
tmp = t_5 * (sqrt(2.0) * ((t * pow((t_3 * (t * t_1)), -2.0)) / 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 t_2 = Math.sin(k_m) * Math.tan(k_m);
double t_3 = Math.cbrt(t_2);
double t_4 = Math.sqrt(2.0) / k_m;
double t_5 = (t_4 * Math.pow(Math.cbrt(l), 2.0)) / t_3;
double tmp;
if (l <= 3.05e-161) {
tmp = (t_4 * (t * Math.pow((t * (t_1 * t_3)), -2.0))) * t_5;
} else if (l <= 6.6e+153) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_2));
} else {
tmp = t_5 * (Math.sqrt(2.0) * ((t * Math.pow((t_3 * (t * t_1)), -2.0)) / k_m));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = cbrt(l) ^ -2.0 t_2 = Float64(sin(k_m) * tan(k_m)) t_3 = cbrt(t_2) t_4 = Float64(sqrt(2.0) / k_m) t_5 = Float64(Float64(t_4 * (cbrt(l) ^ 2.0)) / t_3) tmp = 0.0 if (l <= 3.05e-161) tmp = Float64(Float64(t_4 * Float64(t * (Float64(t * Float64(t_1 * t_3)) ^ -2.0))) * t_5); elseif (l <= 6.6e+153) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_2))); else tmp = Float64(t_5 * Float64(sqrt(2.0) * Float64(Float64(t * (Float64(t_3 * Float64(t * t_1)) ^ -2.0)) / 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]}, Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[t$95$2, 1/3], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[l, 3.05e-161], N[(N[(t$95$4 * N[(t * N[Power[N[(t * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision], If[LessEqual[l, 6.6e+153], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$5 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t * N[Power[N[(t$95$3 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sin k\_m \cdot \tan k\_m\\
t_3 := \sqrt[3]{t\_2}\\
t_4 := \frac{\sqrt{2}}{k\_m}\\
t_5 := \frac{t\_4 \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}{t\_3}\\
\mathbf{if}\;\ell \leq 3.05 \cdot 10^{-161}:\\
\;\;\;\;\left(t\_4 \cdot \left(t \cdot {\left(t \cdot \left(t\_1 \cdot t\_3\right)\right)}^{-2}\right)\right) \cdot t\_5\\
\mathbf{elif}\;\ell \leq 6.6 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_5 \cdot \left(\sqrt{2} \cdot \frac{t \cdot {\left(t\_3 \cdot \left(t \cdot t\_1\right)\right)}^{-2}}{k\_m}\right)\\
\end{array}
\end{array}
if l < 3.05000000000000008e-161Initial program 29.8%
*-commutative29.8%
associate-/r*29.8%
Simplified36.1%
add-sqr-sqrt36.1%
add-cube-cbrt36.1%
times-frac36.1%
Applied egg-rr79.3%
associate-/r/79.3%
associate-/r*79.3%
associate-/r/79.3%
Simplified79.3%
associate-*r/79.3%
Applied egg-rr79.4%
associate-/l*79.4%
associate-*l*79.4%
associate-*l*81.4%
associate-/l*84.6%
*-inverses84.6%
Simplified84.6%
Taylor expanded in k around 0 84.6%
if 3.05000000000000008e-161 < l < 6.59999999999999989e153Initial program 43.2%
Simplified55.6%
add-log-exp45.4%
*-commutative45.4%
exp-prod40.3%
pow240.3%
associate-/r*40.3%
associate-*r*40.3%
*-commutative40.3%
Applied egg-rr40.3%
Taylor expanded in t around 0 89.8%
associate-/r*91.3%
Simplified91.3%
if 6.59999999999999989e153 < l Initial program 31.3%
*-commutative31.3%
associate-/r*31.3%
Simplified31.3%
add-sqr-sqrt31.3%
add-cube-cbrt31.3%
times-frac31.3%
Applied egg-rr83.6%
associate-/r/83.6%
associate-/r*83.6%
associate-/r/83.6%
Simplified83.6%
associate-*r/83.6%
Applied egg-rr83.6%
associate-/l*83.6%
associate-*l*83.6%
associate-*l*83.7%
associate-/l*84.4%
*-inverses84.4%
Simplified84.4%
Taylor expanded in k around 0 84.4%
associate-*l/84.4%
Applied egg-rr84.4%
associate-/l*84.4%
Simplified84.4%
Final simplification86.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m)))
(t_2 (cbrt t_1))
(t_3 (/ (sqrt 2.0) k_m))
(t_4 (/ (* t_3 (pow (cbrt l) 2.0)) t_2))
(t_5 (pow (cbrt l) -2.0)))
(if (<= l 2.5e-156)
(* t_4 (* t_3 (* t (pow (* t (* t_5 (cbrt (pow k_m 2.0)))) -2.0))))
(if (<= l 4.2e+153)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1)))
(* t_4 (* (sqrt 2.0) (/ (* t (pow (* t_2 (* t t_5)) -2.0)) k_m)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double t_2 = cbrt(t_1);
double t_3 = sqrt(2.0) / k_m;
double t_4 = (t_3 * pow(cbrt(l), 2.0)) / t_2;
double t_5 = pow(cbrt(l), -2.0);
double tmp;
if (l <= 2.5e-156) {
tmp = t_4 * (t_3 * (t * pow((t * (t_5 * cbrt(pow(k_m, 2.0)))), -2.0)));
} else if (l <= 4.2e+153) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = t_4 * (sqrt(2.0) * ((t * pow((t_2 * (t * t_5)), -2.0)) / k_m));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * Math.tan(k_m);
double t_2 = Math.cbrt(t_1);
double t_3 = Math.sqrt(2.0) / k_m;
double t_4 = (t_3 * Math.pow(Math.cbrt(l), 2.0)) / t_2;
double t_5 = Math.pow(Math.cbrt(l), -2.0);
double tmp;
if (l <= 2.5e-156) {
tmp = t_4 * (t_3 * (t * Math.pow((t * (t_5 * Math.cbrt(Math.pow(k_m, 2.0)))), -2.0)));
} else if (l <= 4.2e+153) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = t_4 * (Math.sqrt(2.0) * ((t * Math.pow((t_2 * (t * t_5)), -2.0)) / k_m));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) t_2 = cbrt(t_1) t_3 = Float64(sqrt(2.0) / k_m) t_4 = Float64(Float64(t_3 * (cbrt(l) ^ 2.0)) / t_2) t_5 = cbrt(l) ^ -2.0 tmp = 0.0 if (l <= 2.5e-156) tmp = Float64(t_4 * Float64(t_3 * Float64(t * (Float64(t * Float64(t_5 * cbrt((k_m ^ 2.0)))) ^ -2.0)))); elseif (l <= 4.2e+153) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_1))); else tmp = Float64(t_4 * Float64(sqrt(2.0) * Float64(Float64(t * (Float64(t_2 * Float64(t * t_5)) ^ -2.0)) / k_m))); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, If[LessEqual[l, 2.5e-156], N[(t$95$4 * N[(t$95$3 * N[(t * N[Power[N[(t * N[(t$95$5 * N[Power[N[Power[k$95$m, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.2e+153], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t * N[Power[N[(t$95$2 * N[(t * t$95$5), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
t_2 := \sqrt[3]{t\_1}\\
t_3 := \frac{\sqrt{2}}{k\_m}\\
t_4 := \frac{t\_3 \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}{t\_2}\\
t_5 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{-156}:\\
\;\;\;\;t\_4 \cdot \left(t\_3 \cdot \left(t \cdot {\left(t \cdot \left(t\_5 \cdot \sqrt[3]{{k\_m}^{2}}\right)\right)}^{-2}\right)\right)\\
\mathbf{elif}\;\ell \leq 4.2 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \left(\sqrt{2} \cdot \frac{t \cdot {\left(t\_2 \cdot \left(t \cdot t\_5\right)\right)}^{-2}}{k\_m}\right)\\
\end{array}
\end{array}
if l < 2.50000000000000004e-156Initial program 29.8%
*-commutative29.8%
associate-/r*29.8%
Simplified36.1%
add-sqr-sqrt36.1%
add-cube-cbrt36.1%
times-frac36.1%
Applied egg-rr79.3%
associate-/r/79.3%
associate-/r*79.3%
associate-/r/79.3%
Simplified79.3%
associate-*r/79.3%
Applied egg-rr79.4%
associate-/l*79.4%
associate-*l*79.4%
associate-*l*81.4%
associate-/l*84.6%
*-inverses84.6%
Simplified84.6%
Taylor expanded in k around 0 84.6%
Taylor expanded in k around 0 75.4%
if 2.50000000000000004e-156 < l < 4.20000000000000033e153Initial program 43.2%
Simplified55.6%
add-log-exp45.4%
*-commutative45.4%
exp-prod40.3%
pow240.3%
associate-/r*40.3%
associate-*r*40.3%
*-commutative40.3%
Applied egg-rr40.3%
Taylor expanded in t around 0 89.8%
associate-/r*91.3%
Simplified91.3%
if 4.20000000000000033e153 < l Initial program 31.3%
*-commutative31.3%
associate-/r*31.3%
Simplified31.3%
add-sqr-sqrt31.3%
add-cube-cbrt31.3%
times-frac31.3%
Applied egg-rr83.6%
associate-/r/83.6%
associate-/r*83.6%
associate-/r/83.6%
Simplified83.6%
associate-*r/83.6%
Applied egg-rr83.6%
associate-/l*83.6%
associate-*l*83.6%
associate-*l*83.7%
associate-/l*84.4%
*-inverses84.4%
Simplified84.4%
Taylor expanded in k around 0 84.4%
associate-*l/84.4%
Applied egg-rr84.4%
associate-/l*84.4%
Simplified84.4%
Final simplification80.5%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m)))
(t_2 (cbrt t_1))
(t_3 (/ (sqrt 2.0) k_m))
(t_4 (pow (cbrt l) 2.0))
(t_5 (* t (/ t_2 t_4))))
(if (<= l 1e-160)
(*
(/ (* t_3 t_4) t_2)
(*
t_3
(* t (pow (* t (* (pow (cbrt l) -2.0) (cbrt (pow k_m 2.0)))) -2.0))))
(if (<= l 4.5e+198)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1)))
(/ (/ (pow (* t_3 t) 2.0) (pow t_5 2.0)) t_5)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double t_2 = cbrt(t_1);
double t_3 = sqrt(2.0) / k_m;
double t_4 = pow(cbrt(l), 2.0);
double t_5 = t * (t_2 / t_4);
double tmp;
if (l <= 1e-160) {
tmp = ((t_3 * t_4) / t_2) * (t_3 * (t * pow((t * (pow(cbrt(l), -2.0) * cbrt(pow(k_m, 2.0)))), -2.0)));
} else if (l <= 4.5e+198) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (pow((t_3 * t), 2.0) / pow(t_5, 2.0)) / t_5;
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * Math.tan(k_m);
double t_2 = Math.cbrt(t_1);
double t_3 = Math.sqrt(2.0) / k_m;
double t_4 = Math.pow(Math.cbrt(l), 2.0);
double t_5 = t * (t_2 / t_4);
double tmp;
if (l <= 1e-160) {
tmp = ((t_3 * t_4) / t_2) * (t_3 * (t * Math.pow((t * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.pow(k_m, 2.0)))), -2.0)));
} else if (l <= 4.5e+198) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (Math.pow((t_3 * t), 2.0) / Math.pow(t_5, 2.0)) / t_5;
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) t_2 = cbrt(t_1) t_3 = Float64(sqrt(2.0) / k_m) t_4 = cbrt(l) ^ 2.0 t_5 = Float64(t * Float64(t_2 / t_4)) tmp = 0.0 if (l <= 1e-160) tmp = Float64(Float64(Float64(t_3 * t_4) / t_2) * Float64(t_3 * Float64(t * (Float64(t * Float64((cbrt(l) ^ -2.0) * cbrt((k_m ^ 2.0)))) ^ -2.0)))); elseif (l <= 4.5e+198) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_1))); else tmp = Float64(Float64((Float64(t_3 * t) ^ 2.0) / (t_5 ^ 2.0)) / t_5); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$5 = N[(t * N[(t$95$2 / t$95$4), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 1e-160], N[(N[(N[(t$95$3 * t$95$4), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(t$95$3 * N[(t * N[Power[N[(t * 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]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.5e+198], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(t$95$3 * t), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$5, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$5), $MachinePrecision]]]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
t_2 := \sqrt[3]{t\_1}\\
t_3 := \frac{\sqrt{2}}{k\_m}\\
t_4 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_5 := t \cdot \frac{t\_2}{t\_4}\\
\mathbf{if}\;\ell \leq 10^{-160}:\\
\;\;\;\;\frac{t\_3 \cdot t\_4}{t\_2} \cdot \left(t\_3 \cdot \left(t \cdot {\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{{k\_m}^{2}}\right)\right)}^{-2}\right)\right)\\
\mathbf{elif}\;\ell \leq 4.5 \cdot 10^{+198}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{\left(t\_3 \cdot t\right)}^{2}}{{t\_5}^{2}}}{t\_5}\\
\end{array}
\end{array}
if l < 9.9999999999999999e-161Initial program 29.8%
*-commutative29.8%
associate-/r*29.8%
Simplified36.1%
add-sqr-sqrt36.1%
add-cube-cbrt36.1%
times-frac36.1%
Applied egg-rr79.3%
associate-/r/79.3%
associate-/r*79.3%
associate-/r/79.3%
Simplified79.3%
associate-*r/79.3%
Applied egg-rr79.4%
associate-/l*79.4%
associate-*l*79.4%
associate-*l*81.4%
associate-/l*84.6%
*-inverses84.6%
Simplified84.6%
Taylor expanded in k around 0 84.6%
Taylor expanded in k around 0 75.4%
if 9.9999999999999999e-161 < l < 4.50000000000000001e198Initial program 40.7%
Simplified51.5%
add-log-exp42.6%
*-commutative42.6%
exp-prod38.1%
pow238.1%
associate-/r*38.1%
associate-*r*38.1%
*-commutative38.1%
Applied egg-rr38.1%
Taylor expanded in t around 0 88.3%
associate-/r*89.6%
Simplified89.6%
if 4.50000000000000001e198 < l Initial program 34.8%
*-commutative34.8%
associate-/r*34.8%
Simplified34.8%
add-sqr-sqrt34.8%
add-cube-cbrt34.8%
times-frac34.8%
Applied egg-rr85.7%
associate-*r/85.7%
associate-*l/73.6%
unpow273.6%
associate-/r/73.6%
*-commutative73.6%
associate-*l/73.7%
associate-/l*73.6%
associate-*l/73.6%
associate-/l*73.5%
Simplified73.5%
Final simplification79.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m)))
(t_2 (cbrt t_1))
(t_3 (/ (sqrt 2.0) k_m))
(t_4 (pow (cbrt l) 2.0))
(t_5 (* t_2 (/ t t_4))))
(if (<= l 6.7e-158)
(*
(/ (* t_3 t_4) t_2)
(*
t_3
(* t (pow (* t (* (pow (cbrt l) -2.0) (cbrt (pow k_m 2.0)))) -2.0))))
(if (<= l 3.4e+198)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1)))
(* (/ 2.0 (pow t_5 2.0)) (/ (pow (/ k_m t) -2.0) t_5))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double t_2 = cbrt(t_1);
double t_3 = sqrt(2.0) / k_m;
double t_4 = pow(cbrt(l), 2.0);
double t_5 = t_2 * (t / t_4);
double tmp;
if (l <= 6.7e-158) {
tmp = ((t_3 * t_4) / t_2) * (t_3 * (t * pow((t * (pow(cbrt(l), -2.0) * cbrt(pow(k_m, 2.0)))), -2.0)));
} else if (l <= 3.4e+198) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 / pow(t_5, 2.0)) * (pow((k_m / t), -2.0) / t_5);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * Math.tan(k_m);
double t_2 = Math.cbrt(t_1);
double t_3 = Math.sqrt(2.0) / k_m;
double t_4 = Math.pow(Math.cbrt(l), 2.0);
double t_5 = t_2 * (t / t_4);
double tmp;
if (l <= 6.7e-158) {
tmp = ((t_3 * t_4) / t_2) * (t_3 * (t * Math.pow((t * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.pow(k_m, 2.0)))), -2.0)));
} else if (l <= 3.4e+198) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 / Math.pow(t_5, 2.0)) * (Math.pow((k_m / t), -2.0) / t_5);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) t_2 = cbrt(t_1) t_3 = Float64(sqrt(2.0) / k_m) t_4 = cbrt(l) ^ 2.0 t_5 = Float64(t_2 * Float64(t / t_4)) tmp = 0.0 if (l <= 6.7e-158) tmp = Float64(Float64(Float64(t_3 * t_4) / t_2) * Float64(t_3 * Float64(t * (Float64(t * Float64((cbrt(l) ^ -2.0) * cbrt((k_m ^ 2.0)))) ^ -2.0)))); elseif (l <= 3.4e+198) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_1))); else tmp = Float64(Float64(2.0 / (t_5 ^ 2.0)) * Float64((Float64(k_m / t) ^ -2.0) / t_5)); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * N[(t / t$95$4), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 6.7e-158], N[(N[(N[(t$95$3 * t$95$4), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(t$95$3 * N[(t * N[Power[N[(t * 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]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.4e+198], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[t$95$5, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(k$95$m / t), $MachinePrecision], -2.0], $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
t_2 := \sqrt[3]{t\_1}\\
t_3 := \frac{\sqrt{2}}{k\_m}\\
t_4 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_5 := t\_2 \cdot \frac{t}{t\_4}\\
\mathbf{if}\;\ell \leq 6.7 \cdot 10^{-158}:\\
\;\;\;\;\frac{t\_3 \cdot t\_4}{t\_2} \cdot \left(t\_3 \cdot \left(t \cdot {\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{{k\_m}^{2}}\right)\right)}^{-2}\right)\right)\\
\mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+198}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{t\_5}^{2}} \cdot \frac{{\left(\frac{k\_m}{t}\right)}^{-2}}{t\_5}\\
\end{array}
\end{array}
if l < 6.7000000000000001e-158Initial program 29.8%
*-commutative29.8%
associate-/r*29.8%
Simplified36.1%
add-sqr-sqrt36.1%
add-cube-cbrt36.1%
times-frac36.1%
Applied egg-rr79.3%
associate-/r/79.3%
associate-/r*79.3%
associate-/r/79.3%
Simplified79.3%
associate-*r/79.3%
Applied egg-rr79.4%
associate-/l*79.4%
associate-*l*79.4%
associate-*l*81.4%
associate-/l*84.6%
*-inverses84.6%
Simplified84.6%
Taylor expanded in k around 0 84.6%
Taylor expanded in k around 0 75.4%
if 6.7000000000000001e-158 < l < 3.4e198Initial program 40.7%
Simplified51.5%
add-log-exp42.6%
*-commutative42.6%
exp-prod38.1%
pow238.1%
associate-/r*38.1%
associate-*r*38.1%
*-commutative38.1%
Applied egg-rr38.1%
Taylor expanded in t around 0 88.3%
associate-/r*89.6%
Simplified89.6%
if 3.4e198 < l Initial program 34.8%
*-commutative34.8%
associate-/r*34.8%
Simplified34.8%
add-cube-cbrt34.8%
div-inv34.8%
times-frac34.8%
Applied egg-rr73.6%
Final simplification79.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m)))
(t_2 (cbrt t_1))
(t_3 (pow (cbrt l) 2.0))
(t_4 (/ (sqrt 2.0) k_m))
(t_5 (/ t t_3)))
(if (<= l 7.2e-162)
(*
(/ (* t_4 t_3) t_2)
(*
t_4
(* t (pow (* t (* (pow (cbrt l) -2.0) (cbrt (pow k_m 2.0)))) -2.0))))
(if (<= l 7.5e+198)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1)))
(*
(/ 2.0 (pow (* t_2 t_5) 2.0))
(/ (/ (pow (/ k_m t) -2.0) t_5) t_2))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double t_2 = cbrt(t_1);
double t_3 = pow(cbrt(l), 2.0);
double t_4 = sqrt(2.0) / k_m;
double t_5 = t / t_3;
double tmp;
if (l <= 7.2e-162) {
tmp = ((t_4 * t_3) / t_2) * (t_4 * (t * pow((t * (pow(cbrt(l), -2.0) * cbrt(pow(k_m, 2.0)))), -2.0)));
} else if (l <= 7.5e+198) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 / pow((t_2 * t_5), 2.0)) * ((pow((k_m / t), -2.0) / t_5) / t_2);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * Math.tan(k_m);
double t_2 = Math.cbrt(t_1);
double t_3 = Math.pow(Math.cbrt(l), 2.0);
double t_4 = Math.sqrt(2.0) / k_m;
double t_5 = t / t_3;
double tmp;
if (l <= 7.2e-162) {
tmp = ((t_4 * t_3) / t_2) * (t_4 * (t * Math.pow((t * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.pow(k_m, 2.0)))), -2.0)));
} else if (l <= 7.5e+198) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 / Math.pow((t_2 * t_5), 2.0)) * ((Math.pow((k_m / t), -2.0) / t_5) / t_2);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) t_2 = cbrt(t_1) t_3 = cbrt(l) ^ 2.0 t_4 = Float64(sqrt(2.0) / k_m) t_5 = Float64(t / t_3) tmp = 0.0 if (l <= 7.2e-162) tmp = Float64(Float64(Float64(t_4 * t_3) / t_2) * Float64(t_4 * Float64(t * (Float64(t * Float64((cbrt(l) ^ -2.0) * cbrt((k_m ^ 2.0)))) ^ -2.0)))); elseif (l <= 7.5e+198) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_1))); else tmp = Float64(Float64(2.0 / (Float64(t_2 * t_5) ^ 2.0)) * Float64(Float64((Float64(k_m / t) ^ -2.0) / t_5) / t_2)); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$5 = N[(t / t$95$3), $MachinePrecision]}, If[LessEqual[l, 7.2e-162], N[(N[(N[(t$95$4 * t$95$3), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(t$95$4 * N[(t * N[Power[N[(t * 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]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.5e+198], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(t$95$2 * t$95$5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(k$95$m / t), $MachinePrecision], -2.0], $MachinePrecision] / t$95$5), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
t_2 := \sqrt[3]{t\_1}\\
t_3 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_4 := \frac{\sqrt{2}}{k\_m}\\
t_5 := \frac{t}{t\_3}\\
\mathbf{if}\;\ell \leq 7.2 \cdot 10^{-162}:\\
\;\;\;\;\frac{t\_4 \cdot t\_3}{t\_2} \cdot \left(t\_4 \cdot \left(t \cdot {\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{{k\_m}^{2}}\right)\right)}^{-2}\right)\right)\\
\mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+198}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot t\_5\right)}^{2}} \cdot \frac{\frac{{\left(\frac{k\_m}{t}\right)}^{-2}}{t\_5}}{t\_2}\\
\end{array}
\end{array}
if l < 7.1999999999999996e-162Initial program 29.8%
*-commutative29.8%
associate-/r*29.8%
Simplified36.1%
add-sqr-sqrt36.1%
add-cube-cbrt36.1%
times-frac36.1%
Applied egg-rr79.3%
associate-/r/79.3%
associate-/r*79.3%
associate-/r/79.3%
Simplified79.3%
associate-*r/79.3%
Applied egg-rr79.4%
associate-/l*79.4%
associate-*l*79.4%
associate-*l*81.4%
associate-/l*84.6%
*-inverses84.6%
Simplified84.6%
Taylor expanded in k around 0 84.6%
Taylor expanded in k around 0 75.4%
if 7.1999999999999996e-162 < l < 7.5000000000000002e198Initial program 40.7%
Simplified51.5%
add-log-exp42.6%
*-commutative42.6%
exp-prod38.1%
pow238.1%
associate-/r*38.1%
associate-*r*38.1%
*-commutative38.1%
Applied egg-rr38.1%
Taylor expanded in t around 0 88.3%
associate-/r*89.6%
Simplified89.6%
if 7.5000000000000002e198 < l Initial program 34.8%
*-commutative34.8%
associate-/r*34.8%
Simplified34.8%
add-cube-cbrt34.8%
div-inv34.8%
times-frac34.8%
Applied egg-rr73.6%
associate-/r*73.6%
Simplified73.6%
Final simplification79.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m)))
(t_2 (/ (sqrt 2.0) k_m))
(t_3 (pow (cbrt l) 2.0)))
(if (<= l 1.2e-157)
(*
(/ (* t_2 t_3) (cbrt t_1))
(*
t_2
(* t (pow (* t (* (pow (cbrt l) -2.0) (cbrt (pow k_m 2.0)))) -2.0))))
(if (<= l 1.5e+249)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1)))
(/ (* 2.0 (pow (/ k_m t) -2.0)) (* t_1 (pow (/ t t_3) 3.0)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double t_2 = sqrt(2.0) / k_m;
double t_3 = pow(cbrt(l), 2.0);
double tmp;
if (l <= 1.2e-157) {
tmp = ((t_2 * t_3) / cbrt(t_1)) * (t_2 * (t * pow((t * (pow(cbrt(l), -2.0) * cbrt(pow(k_m, 2.0)))), -2.0)));
} else if (l <= 1.5e+249) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 * pow((k_m / t), -2.0)) / (t_1 * pow((t / t_3), 3.0));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * Math.tan(k_m);
double t_2 = Math.sqrt(2.0) / k_m;
double t_3 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (l <= 1.2e-157) {
tmp = ((t_2 * t_3) / Math.cbrt(t_1)) * (t_2 * (t * Math.pow((t * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.pow(k_m, 2.0)))), -2.0)));
} else if (l <= 1.5e+249) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 * Math.pow((k_m / t), -2.0)) / (t_1 * Math.pow((t / t_3), 3.0));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) t_2 = Float64(sqrt(2.0) / k_m) t_3 = cbrt(l) ^ 2.0 tmp = 0.0 if (l <= 1.2e-157) tmp = Float64(Float64(Float64(t_2 * t_3) / cbrt(t_1)) * Float64(t_2 * Float64(t * (Float64(t * Float64((cbrt(l) ^ -2.0) * cbrt((k_m ^ 2.0)))) ^ -2.0)))); elseif (l <= 1.5e+249) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_1))); else tmp = Float64(Float64(2.0 * (Float64(k_m / t) ^ -2.0)) / Float64(t_1 * (Float64(t / t_3) ^ 3.0))); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, 1.2e-157], N[(N[(N[(t$95$2 * t$95$3), $MachinePrecision] / N[Power[t$95$1, 1/3], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[(t * N[Power[N[(t * 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]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.5e+249], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[N[(k$95$m / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Power[N[(t / t$95$3), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
t_2 := \frac{\sqrt{2}}{k\_m}\\
t_3 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;\ell \leq 1.2 \cdot 10^{-157}:\\
\;\;\;\;\frac{t\_2 \cdot t\_3}{\sqrt[3]{t\_1}} \cdot \left(t\_2 \cdot \left(t \cdot {\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{{k\_m}^{2}}\right)\right)}^{-2}\right)\right)\\
\mathbf{elif}\;\ell \leq 1.5 \cdot 10^{+249}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k\_m}{t}\right)}^{-2}}{t\_1 \cdot {\left(\frac{t}{t\_3}\right)}^{3}}\\
\end{array}
\end{array}
if l < 1.2e-157Initial program 29.8%
*-commutative29.8%
associate-/r*29.8%
Simplified36.1%
add-sqr-sqrt36.1%
add-cube-cbrt36.1%
times-frac36.1%
Applied egg-rr79.3%
associate-/r/79.3%
associate-/r*79.3%
associate-/r/79.3%
Simplified79.3%
associate-*r/79.3%
Applied egg-rr79.4%
associate-/l*79.4%
associate-*l*79.4%
associate-*l*81.4%
associate-/l*84.6%
*-inverses84.6%
Simplified84.6%
Taylor expanded in k around 0 84.6%
Taylor expanded in k around 0 75.4%
if 1.2e-157 < l < 1.50000000000000008e249Initial program 41.0%
Simplified50.1%
add-log-exp42.7%
*-commutative42.7%
exp-prod39.0%
pow239.0%
associate-/r*39.0%
associate-*r*39.0%
*-commutative39.0%
Applied egg-rr39.0%
Taylor expanded in t around 0 85.7%
associate-/r*86.9%
Simplified86.9%
if 1.50000000000000008e249 < l Initial program 22.2%
*-commutative22.2%
associate-/r*22.2%
Simplified22.2%
add-cube-cbrt22.2%
div-inv22.2%
times-frac22.2%
Applied egg-rr75.8%
associate-*l/75.8%
associate-/l*75.8%
associate-/l/75.8%
unpow275.8%
unpow375.7%
*-commutative75.7%
Simplified76.0%
Final simplification79.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m))))
(if (<= k_m 1.75e-163)
(/
(/ 2.0 (pow (/ k_m t) 2.0))
(log (pow (exp (* (pow t 3.0) (pow l -2.0))) t_1)))
(if (<= k_m 2.7e+135)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1)))
(/
(* 2.0 (pow (/ k_m t) -2.0))
(* t_1 (pow (/ t (pow (cbrt l) 2.0)) 3.0)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double tmp;
if (k_m <= 1.75e-163) {
tmp = (2.0 / pow((k_m / t), 2.0)) / log(pow(exp((pow(t, 3.0) * pow(l, -2.0))), t_1));
} else if (k_m <= 2.7e+135) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 * pow((k_m / t), -2.0)) / (t_1 * pow((t / pow(cbrt(l), 2.0)), 3.0));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * Math.tan(k_m);
double tmp;
if (k_m <= 1.75e-163) {
tmp = (2.0 / Math.pow((k_m / t), 2.0)) / Math.log(Math.pow(Math.exp((Math.pow(t, 3.0) * Math.pow(l, -2.0))), t_1));
} else if (k_m <= 2.7e+135) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
} else {
tmp = (2.0 * Math.pow((k_m / t), -2.0)) / (t_1 * Math.pow((t / Math.pow(Math.cbrt(l), 2.0)), 3.0));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) tmp = 0.0 if (k_m <= 1.75e-163) tmp = Float64(Float64(2.0 / (Float64(k_m / t) ^ 2.0)) / log((exp(Float64((t ^ 3.0) * (l ^ -2.0))) ^ t_1))); elseif (k_m <= 2.7e+135) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_1))); else tmp = Float64(Float64(2.0 * (Float64(k_m / t) ^ -2.0)) / Float64(t_1 * (Float64(t / (cbrt(l) ^ 2.0)) ^ 3.0))); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k$95$m, 1.75e-163], N[(N[(2.0 / N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Log[N[Power[N[Exp[N[(N[Power[t, 3.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 2.7e+135], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[N[(k$95$m / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Power[N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
\mathbf{if}\;k\_m \leq 1.75 \cdot 10^{-163}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k\_m}{t}\right)}^{2}}}{\log \left({\left(e^{{t}^{3} \cdot {\ell}^{-2}}\right)}^{t\_1}\right)}\\
\mathbf{elif}\;k\_m \leq 2.7 \cdot 10^{+135}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k\_m}{t}\right)}^{-2}}{t\_1 \cdot {\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if k < 1.75000000000000014e-163Initial program 33.5%
*-commutative33.5%
associate-/r*33.5%
Simplified37.9%
add-log-exp17.6%
exp-prod25.3%
div-inv25.3%
pow225.3%
pow-flip25.3%
metadata-eval25.3%
Applied egg-rr25.3%
if 1.75000000000000014e-163 < k < 2.69999999999999985e135Initial program 27.2%
Simplified37.7%
add-log-exp29.2%
*-commutative29.2%
exp-prod37.0%
pow237.0%
associate-/r*37.0%
associate-*r*37.0%
*-commutative37.0%
Applied egg-rr37.0%
Taylor expanded in t around 0 82.8%
associate-/r*84.5%
Simplified84.5%
if 2.69999999999999985e135 < k Initial program 41.7%
*-commutative41.7%
associate-/r*41.7%
Simplified51.4%
add-cube-cbrt51.4%
div-inv51.4%
times-frac51.4%
Applied egg-rr73.1%
associate-*l/75.6%
associate-/l*75.6%
associate-/l/70.6%
unpow270.6%
unpow370.6%
*-commutative70.6%
Simplified70.6%
Final simplification45.5%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m))))
(if (or (<= l 6e-169) (not (<= l 2.1e+249)))
(/
(* 2.0 (pow (/ k_m t) -2.0))
(* t_1 (pow (/ t (pow (cbrt l) 2.0)) 3.0)))
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double tmp;
if ((l <= 6e-169) || !(l <= 2.1e+249)) {
tmp = (2.0 * pow((k_m / t), -2.0)) / (t_1 * pow((t / pow(cbrt(l), 2.0)), 3.0));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * t_1));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * Math.tan(k_m);
double tmp;
if ((l <= 6e-169) || !(l <= 2.1e+249)) {
tmp = (2.0 * Math.pow((k_m / t), -2.0)) / (t_1 * Math.pow((t / Math.pow(Math.cbrt(l), 2.0)), 3.0));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) tmp = 0.0 if ((l <= 6e-169) || !(l <= 2.1e+249)) tmp = Float64(Float64(2.0 * (Float64(k_m / t) ^ -2.0)) / Float64(t_1 * (Float64(t / (cbrt(l) ^ 2.0)) ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * t_1))); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[l, 6e-169], N[Not[LessEqual[l, 2.1e+249]], $MachinePrecision]], N[(N[(2.0 * N[Power[N[(k$95$m / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Power[N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
\mathbf{if}\;\ell \leq 6 \cdot 10^{-169} \lor \neg \left(\ell \leq 2.1 \cdot 10^{+249}\right):\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k\_m}{t}\right)}^{-2}}{t\_1 \cdot {\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\end{array}
\end{array}
if l < 5.9999999999999998e-169 or 2.0999999999999998e249 < l Initial program 29.2%
*-commutative29.2%
associate-/r*29.2%
Simplified35.2%
add-cube-cbrt35.1%
div-inv35.1%
times-frac35.1%
Applied egg-rr68.7%
associate-*l/68.7%
associate-/l*68.7%
associate-/l/66.4%
unpow266.4%
unpow366.4%
*-commutative66.4%
Simplified58.6%
if 5.9999999999999998e-169 < l < 2.0999999999999998e249Initial program 41.2%
Simplified50.1%
add-log-exp42.8%
*-commutative42.8%
exp-prod39.2%
pow239.2%
associate-/r*39.2%
associate-*r*39.2%
*-commutative39.2%
Applied egg-rr39.2%
Taylor expanded in t around 0 85.0%
associate-/r*86.1%
Simplified86.1%
Final simplification68.2%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m))))
(if (<= (* l l) 0.0)
(pow (* l (/ (sqrt 2.0) (* (sqrt t_1) (* (/ k_m t) (pow t 1.5))))) 2.0)
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = pow((l * (sqrt(2.0) / (sqrt(t_1) * ((k_m / t) * pow(t, 1.5))))), 2.0);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (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) * tan(k_m)
if ((l * l) <= 0.0d0) then
tmp = (l * (sqrt(2.0d0) / (sqrt(t_1) * ((k_m / t) * (t ** 1.5d0))))) ** 2.0d0
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k_m ** 2.0d0)) / (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.sin(k_m) * Math.tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (Math.sqrt(t_1) * ((k_m / t) * Math.pow(t, 1.5))))), 2.0);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.sin(k_m) * math.tan(k_m) tmp = 0 if (l * l) <= 0.0: tmp = math.pow((l * (math.sqrt(2.0) / (math.sqrt(t_1) * ((k_m / t) * math.pow(t, 1.5))))), 2.0) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / (t * t_1)) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(l * Float64(sqrt(2.0) / Float64(sqrt(t_1) * Float64(Float64(k_m / t) * (t ^ 1.5))))) ^ 2.0; else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / 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) * tan(k_m); tmp = 0.0; if ((l * l) <= 0.0) tmp = (l * (sqrt(2.0) / (sqrt(t_1) * ((k_m / t) * (t ^ 1.5))))) ^ 2.0; else tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 2.0)) / (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[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[(k$95$m / t), $MachinePrecision] * N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{\sqrt{t\_1} \cdot \left(\frac{k\_m}{t} \cdot {t}^{1.5}\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 24.2%
Simplified31.7%
add-sqr-sqrt31.7%
pow231.7%
Applied egg-rr27.4%
associate-*l*34.6%
Simplified34.6%
if 0.0 < (*.f64 l l) Initial program 36.7%
Simplified43.4%
add-log-exp37.8%
*-commutative37.8%
exp-prod35.0%
pow235.0%
associate-/r*35.0%
associate-*r*35.0%
*-commutative35.0%
Applied egg-rr35.0%
Taylor expanded in t around 0 76.8%
associate-/r*79.3%
Simplified79.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m))))
(if (<= (* l l) 0.0)
(/ (* 2.0 (pow (/ k_m t) -2.0)) (* t_1 (pow (/ (pow t 1.5) l) 2.0)))
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 * pow((k_m / t), -2.0)) / (t_1 * pow((pow(t, 1.5) / l), 2.0));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (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) * tan(k_m)
if ((l * l) <= 0.0d0) then
tmp = (2.0d0 * ((k_m / t) ** (-2.0d0))) / (t_1 * (((t ** 1.5d0) / l) ** 2.0d0))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k_m ** 2.0d0)) / (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.sin(k_m) * Math.tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 * Math.pow((k_m / t), -2.0)) / (t_1 * Math.pow((Math.pow(t, 1.5) / l), 2.0));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.sin(k_m) * math.tan(k_m) tmp = 0 if (l * l) <= 0.0: tmp = (2.0 * math.pow((k_m / t), -2.0)) / (t_1 * math.pow((math.pow(t, 1.5) / l), 2.0)) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / (t * t_1)) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(2.0 * (Float64(k_m / t) ^ -2.0)) / Float64(t_1 * (Float64((t ^ 1.5) / l) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / 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) * tan(k_m); tmp = 0.0; if ((l * l) <= 0.0) tmp = (2.0 * ((k_m / t) ^ -2.0)) / (t_1 * (((t ^ 1.5) / l) ^ 2.0)); else tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 2.0)) / (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[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(2.0 * N[Power[N[(k$95$m / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k\_m}{t}\right)}^{-2}}{t\_1 \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 24.2%
*-commutative24.2%
associate-/r*24.2%
Simplified31.8%
add-sqr-sqrt13.6%
pow213.6%
sqrt-div13.6%
sqrt-pow121.1%
metadata-eval21.1%
sqrt-prod16.4%
add-sqr-sqrt28.3%
Applied egg-rr28.3%
clear-num28.3%
+-rgt-identity28.3%
associate-/r/28.3%
pow-flip29.8%
metadata-eval29.8%
Applied egg-rr29.8%
if 0.0 < (*.f64 l l) Initial program 36.7%
Simplified43.4%
add-log-exp37.8%
*-commutative37.8%
exp-prod35.0%
pow235.0%
associate-/r*35.0%
associate-*r*35.0%
*-commutative35.0%
Applied egg-rr35.0%
Taylor expanded in t around 0 76.8%
associate-/r*79.3%
Simplified79.3%
Final simplification66.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m))))
(if (<= (* l l) 0.0)
(/
(/ 2.0 (/ 1.0 (* (/ t k_m) (/ t k_m))))
(* t_1 (pow (/ (pow t 1.5) l) 2.0)))
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 / (1.0 / ((t / k_m) * (t / k_m)))) / (t_1 * pow((pow(t, 1.5) / l), 2.0));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (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) * tan(k_m)
if ((l * l) <= 0.0d0) then
tmp = (2.0d0 / (1.0d0 / ((t / k_m) * (t / k_m)))) / (t_1 * (((t ** 1.5d0) / l) ** 2.0d0))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k_m ** 2.0d0)) / (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.sin(k_m) * Math.tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 / (1.0 / ((t / k_m) * (t / k_m)))) / (t_1 * Math.pow((Math.pow(t, 1.5) / l), 2.0));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.sin(k_m) * math.tan(k_m) tmp = 0 if (l * l) <= 0.0: tmp = (2.0 / (1.0 / ((t / k_m) * (t / k_m)))) / (t_1 * math.pow((math.pow(t, 1.5) / l), 2.0)) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / (t * t_1)) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(2.0 / Float64(1.0 / Float64(Float64(t / k_m) * Float64(t / k_m)))) / Float64(t_1 * (Float64((t ^ 1.5) / l) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / 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) * tan(k_m); tmp = 0.0; if ((l * l) <= 0.0) tmp = (2.0 / (1.0 / ((t / k_m) * (t / k_m)))) / (t_1 * (((t ^ 1.5) / l) ^ 2.0)); else tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 2.0)) / (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[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(2.0 / N[(1.0 / N[(N[(t / k$95$m), $MachinePrecision] * N[(t / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\frac{\frac{2}{\frac{1}{\frac{t}{k\_m} \cdot \frac{t}{k\_m}}}}{t\_1 \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 24.2%
*-commutative24.2%
associate-/r*24.2%
Simplified31.8%
add-sqr-sqrt13.6%
pow213.6%
sqrt-div13.6%
sqrt-pow121.1%
metadata-eval21.1%
sqrt-prod16.4%
add-sqr-sqrt28.3%
Applied egg-rr28.3%
unpow228.3%
clear-num28.3%
clear-num28.4%
frac-times28.3%
metadata-eval28.3%
Applied egg-rr28.3%
if 0.0 < (*.f64 l l) Initial program 36.7%
Simplified43.4%
add-log-exp37.8%
*-commutative37.8%
exp-prod35.0%
pow235.0%
associate-/r*35.0%
associate-*r*35.0%
*-commutative35.0%
Applied egg-rr35.0%
Taylor expanded in t around 0 76.8%
associate-/r*79.3%
Simplified79.3%
Final simplification66.0%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m))))
(if (<= t 1.95e-109)
(*
(* l l)
(/ 2.0 (* (* k_m k_m) (/ (* t (pow (sin k_m) 2.0)) (cos k_m)))))
(if (<= t 1.45e+73)
(/ (/ 2.0 (pow (/ k_m t) 2.0)) (/ (* t_1 (/ (pow t 3.0) l)) l))
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double tmp;
if (t <= 1.95e-109) {
tmp = (l * l) * (2.0 / ((k_m * k_m) * ((t * pow(sin(k_m), 2.0)) / cos(k_m))));
} else if (t <= 1.45e+73) {
tmp = (2.0 / pow((k_m / t), 2.0)) / ((t_1 * (pow(t, 3.0) / l)) / l);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (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) * tan(k_m)
if (t <= 1.95d-109) then
tmp = (l * l) * (2.0d0 / ((k_m * k_m) * ((t * (sin(k_m) ** 2.0d0)) / cos(k_m))))
else if (t <= 1.45d+73) then
tmp = (2.0d0 / ((k_m / t) ** 2.0d0)) / ((t_1 * ((t ** 3.0d0) / l)) / l)
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k_m ** 2.0d0)) / (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.sin(k_m) * Math.tan(k_m);
double tmp;
if (t <= 1.95e-109) {
tmp = (l * l) * (2.0 / ((k_m * k_m) * ((t * Math.pow(Math.sin(k_m), 2.0)) / Math.cos(k_m))));
} else if (t <= 1.45e+73) {
tmp = (2.0 / Math.pow((k_m / t), 2.0)) / ((t_1 * (Math.pow(t, 3.0) / l)) / l);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.sin(k_m) * math.tan(k_m) tmp = 0 if t <= 1.95e-109: tmp = (l * l) * (2.0 / ((k_m * k_m) * ((t * math.pow(math.sin(k_m), 2.0)) / math.cos(k_m)))) elif t <= 1.45e+73: tmp = (2.0 / math.pow((k_m / t), 2.0)) / ((t_1 * (math.pow(t, 3.0) / l)) / l) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / (t * t_1)) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) tmp = 0.0 if (t <= 1.95e-109) tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(Float64(k_m * k_m) * Float64(Float64(t * (sin(k_m) ^ 2.0)) / cos(k_m))))); elseif (t <= 1.45e+73) tmp = Float64(Float64(2.0 / (Float64(k_m / t) ^ 2.0)) / Float64(Float64(t_1 * Float64((t ^ 3.0) / l)) / l)); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / 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) * tan(k_m); tmp = 0.0; if (t <= 1.95e-109) tmp = (l * l) * (2.0 / ((k_m * k_m) * ((t * (sin(k_m) ^ 2.0)) / cos(k_m)))); elseif (t <= 1.45e+73) tmp = (2.0 / ((k_m / t) ^ 2.0)) / ((t_1 * ((t ^ 3.0) / l)) / l); else tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 2.0)) / (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[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 1.95e-109], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[(k$95$m * k$95$m), $MachinePrecision] * N[(N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+73], N[(N[(2.0 / N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$1 * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
\mathbf{if}\;t \leq 1.95 \cdot 10^{-109}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{\left(k\_m \cdot k\_m\right) \cdot \frac{t \cdot {\sin k\_m}^{2}}{\cos k\_m}}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+73}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k\_m}{t}\right)}^{2}}}{\frac{t\_1 \cdot \frac{{t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\end{array}
\end{array}
if t < 1.95000000000000011e-109Initial program 35.4%
Simplified40.7%
Taylor expanded in t around 0 70.7%
associate-/l*70.7%
Simplified70.7%
unpow270.7%
Applied egg-rr70.7%
if 1.95000000000000011e-109 < t < 1.4500000000000001e73Initial program 57.5%
*-commutative57.5%
associate-/r*57.5%
Simplified62.7%
associate-/r*78.5%
associate-*l/83.8%
Applied egg-rr83.8%
if 1.4500000000000001e73 < t Initial program 8.2%
Simplified22.4%
add-log-exp22.4%
*-commutative22.4%
exp-prod31.6%
pow231.6%
associate-/r*31.6%
associate-*r*31.6%
*-commutative31.6%
Applied egg-rr31.6%
Taylor expanded in t around 0 72.0%
associate-/r*75.9%
Simplified75.9%
Final simplification73.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) (tan k_m))))
(if (<= (* l l) 0.0)
(/ (/ 2.0 (* (/ k_m t) (/ k_m t))) (* t_1 (pow (/ (pow t 1.5) l) 2.0)))
(* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t t_1))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 / ((k_m / t) * (k_m / t))) / (t_1 * pow((pow(t, 1.5) / l), 2.0));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (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) * tan(k_m)
if ((l * l) <= 0.0d0) then
tmp = (2.0d0 / ((k_m / t) * (k_m / t))) / (t_1 * (((t ** 1.5d0) / l) ** 2.0d0))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k_m ** 2.0d0)) / (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.sin(k_m) * Math.tan(k_m);
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 / ((k_m / t) * (k_m / t))) / (t_1 * Math.pow((Math.pow(t, 1.5) / l), 2.0));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / (t * t_1));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.sin(k_m) * math.tan(k_m) tmp = 0 if (l * l) <= 0.0: tmp = (2.0 / ((k_m / t) * (k_m / t))) / (t_1 * math.pow((math.pow(t, 1.5) / l), 2.0)) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / (t * t_1)) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * tan(k_m)) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(2.0 / Float64(Float64(k_m / t) * Float64(k_m / t))) / Float64(t_1 * (Float64((t ^ 1.5) / l) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / 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) * tan(k_m); tmp = 0.0; if ((l * l) <= 0.0) tmp = (2.0 / ((k_m / t) * (k_m / t))) / (t_1 * (((t ^ 1.5) / l) ^ 2.0)); else tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 2.0)) / (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[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(2.0 / N[(N[(k$95$m / t), $MachinePrecision] * N[(k$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot \tan k\_m\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\frac{\frac{2}{\frac{k\_m}{t} \cdot \frac{k\_m}{t}}}{t\_1 \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot t\_1}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 24.2%
*-commutative24.2%
associate-/r*24.2%
Simplified31.8%
add-sqr-sqrt13.6%
pow213.6%
sqrt-div13.6%
sqrt-pow121.1%
metadata-eval21.1%
sqrt-prod16.4%
add-sqr-sqrt28.3%
Applied egg-rr28.3%
unpow228.3%
Applied egg-rr28.3%
if 0.0 < (*.f64 l l) Initial program 36.7%
Simplified43.4%
add-log-exp37.8%
*-commutative37.8%
exp-prod35.0%
pow235.0%
associate-/r*35.0%
associate-*r*35.0%
*-commutative35.0%
Applied egg-rr35.0%
Taylor expanded in t around 0 76.8%
associate-/r*79.3%
Simplified79.3%
Final simplification66.0%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* 2.0 (/ (/ (pow l 2.0) (pow k_m 2.0)) (* t (* (sin k_m) (tan k_m))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) / (t * (sin(k_m) * tan(k_m))));
}
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 ** 2.0d0)) / (t * (sin(k_m) * tan(k_m))))
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, 2.0)) / (t * (Math.sin(k_m) * Math.tan(k_m))));
}
k_m = math.fabs(k) def code(t, l, k_m): return 2.0 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / (t * (math.sin(k_m) * math.tan(k_m))))
k_m = abs(k) function code(t, l, k_m) return Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / Float64(t * Float64(sin(k_m) * tan(k_m))))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = 2.0 * (((l ^ 2.0) / (k_m ^ 2.0)) / (t * (sin(k_m) * tan(k_m)))); 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, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t \cdot \left(\sin k\_m \cdot \tan k\_m\right)}
\end{array}
Initial program 33.4%
Simplified40.4%
add-log-exp36.2%
*-commutative36.2%
exp-prod39.5%
pow239.5%
associate-/r*39.5%
associate-*r*39.5%
*-commutative39.5%
Applied egg-rr39.5%
Taylor expanded in t around 0 70.1%
associate-/r*72.0%
Simplified72.0%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 32000.0) (* (* l l) (/ 2.0 (exp (+ (log t) (* 4.0 (log k_m)))))) (* -0.3333333333333333 (/ (/ (pow l 2.0) (pow k_m 2.0)) t))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 32000.0) {
tmp = (l * l) * (2.0 / exp((log(t) + (4.0 * log(k_m)))));
} else {
tmp = -0.3333333333333333 * ((pow(l, 2.0) / pow(k_m, 2.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 <= 32000.0d0) then
tmp = (l * l) * (2.0d0 / exp((log(t) + (4.0d0 * log(k_m)))))
else
tmp = (-0.3333333333333333d0) * (((l ** 2.0d0) / (k_m ** 2.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 <= 32000.0) {
tmp = (l * l) * (2.0 / Math.exp((Math.log(t) + (4.0 * Math.log(k_m)))));
} else {
tmp = -0.3333333333333333 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / t);
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 32000.0: tmp = (l * l) * (2.0 / math.exp((math.log(t) + (4.0 * math.log(k_m))))) else: tmp = -0.3333333333333333 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / t) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 32000.0) tmp = Float64(Float64(l * l) * Float64(2.0 / exp(Float64(log(t) + Float64(4.0 * log(k_m)))))); else tmp = Float64(-0.3333333333333333 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / t)); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 32000.0) tmp = (l * l) * (2.0 / exp((log(t) + (4.0 * log(k_m))))); else tmp = -0.3333333333333333 * (((l ^ 2.0) / (k_m ^ 2.0)) / t); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 32000.0], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[Exp[N[(N[Log[t], $MachinePrecision] + N[(4.0 * N[Log[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 32000:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{e^{\log t + 4 \cdot \log k\_m}}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t}\\
\end{array}
\end{array}
if k < 32000Initial program 32.0%
Simplified37.2%
Taylor expanded in k around 0 59.8%
add-log-exp30.9%
*-commutative30.9%
exp-prod28.4%
Applied egg-rr28.4%
pow-exp30.9%
rem-log-exp59.8%
add-exp-log28.9%
pow-to-exp8.5%
prod-exp9.4%
rem-log-exp8.5%
pow-to-exp28.9%
log-pow9.4%
Applied egg-rr9.4%
if 32000 < k Initial program 37.4%
Simplified49.2%
Taylor expanded in k around 0 20.1%
fma-define20.1%
associate-/l*23.0%
associate-*r/23.0%
*-commutative23.0%
associate-/l*23.0%
Simplified23.0%
Taylor expanded in k around inf 61.0%
associate-/r*61.1%
Simplified61.1%
Final simplification22.9%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* l l) (/ 2.0 (* (* k_m k_m) (/ (* t (pow (sin k_m) 2.0)) (cos k_m))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (l * l) * (2.0 / ((k_m * k_m) * ((t * pow(sin(k_m), 2.0)) / cos(k_m))));
}
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 * k_m) * ((t * (sin(k_m) ** 2.0d0)) / cos(k_m))))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return (l * l) * (2.0 / ((k_m * k_m) * ((t * Math.pow(Math.sin(k_m), 2.0)) / Math.cos(k_m))));
}
k_m = math.fabs(k) def code(t, l, k_m): return (l * l) * (2.0 / ((k_m * k_m) * ((t * math.pow(math.sin(k_m), 2.0)) / math.cos(k_m))))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(l * l) * Float64(2.0 / Float64(Float64(k_m * k_m) * Float64(Float64(t * (sin(k_m) ^ 2.0)) / cos(k_m))))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (l * l) * (2.0 / ((k_m * k_m) * ((t * (sin(k_m) ^ 2.0)) / cos(k_m)))); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[(k$95$m * k$95$m), $MachinePrecision] * N[(N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{\left(k\_m \cdot k\_m\right) \cdot \frac{t \cdot {\sin k\_m}^{2}}{\cos k\_m}}
\end{array}
Initial program 33.4%
Simplified40.4%
Taylor expanded in t around 0 70.1%
associate-/l*70.1%
Simplified70.1%
unpow270.1%
Applied egg-rr70.1%
Final simplification70.1%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* l l) (/ 2.0 (* (pow k_m 2.0) (/ (* t (pow k_m 2.0)) (cos k_m))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (l * l) * (2.0 / (pow(k_m, 2.0) * ((t * pow(k_m, 2.0)) / cos(k_m))));
}
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 ** 2.0d0) * ((t * (k_m ** 2.0d0)) / cos(k_m))))
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, 2.0) * ((t * Math.pow(k_m, 2.0)) / Math.cos(k_m))));
}
k_m = math.fabs(k) def code(t, l, k_m): return (l * l) * (2.0 / (math.pow(k_m, 2.0) * ((t * math.pow(k_m, 2.0)) / math.cos(k_m))))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(l * l) * Float64(2.0 / Float64((k_m ^ 2.0) * Float64(Float64(t * (k_m ^ 2.0)) / cos(k_m))))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (l * l) * (2.0 / ((k_m ^ 2.0) * ((t * (k_m ^ 2.0)) / cos(k_m)))); 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, 2.0], $MachinePrecision] * N[(N[(t * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \frac{t \cdot {k\_m}^{2}}{\cos k\_m}}
\end{array}
Initial program 33.4%
Simplified40.4%
Taylor expanded in t around 0 70.1%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in k around 0 62.3%
Final simplification62.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 5e+14)
(*
(* l l)
(/
(+ (* -0.3333333333333333 (/ (pow k_m 2.0) t)) (* 2.0 (/ 1.0 t)))
(pow k_m 4.0)))
(* -0.3333333333333333 (/ (/ (pow l 2.0) (pow k_m 2.0)) t))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 5e+14) {
tmp = (l * l) * (((-0.3333333333333333 * (pow(k_m, 2.0) / t)) + (2.0 * (1.0 / t))) / pow(k_m, 4.0));
} else {
tmp = -0.3333333333333333 * ((pow(l, 2.0) / pow(k_m, 2.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 <= 5d+14) then
tmp = (l * l) * ((((-0.3333333333333333d0) * ((k_m ** 2.0d0) / t)) + (2.0d0 * (1.0d0 / t))) / (k_m ** 4.0d0))
else
tmp = (-0.3333333333333333d0) * (((l ** 2.0d0) / (k_m ** 2.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 <= 5e+14) {
tmp = (l * l) * (((-0.3333333333333333 * (Math.pow(k_m, 2.0) / t)) + (2.0 * (1.0 / t))) / Math.pow(k_m, 4.0));
} else {
tmp = -0.3333333333333333 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / t);
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 5e+14: tmp = (l * l) * (((-0.3333333333333333 * (math.pow(k_m, 2.0) / t)) + (2.0 * (1.0 / t))) / math.pow(k_m, 4.0)) else: tmp = -0.3333333333333333 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / t) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 5e+14) tmp = Float64(Float64(l * l) * Float64(Float64(Float64(-0.3333333333333333 * Float64((k_m ^ 2.0) / t)) + Float64(2.0 * Float64(1.0 / t))) / (k_m ^ 4.0))); else tmp = Float64(-0.3333333333333333 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / t)); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 5e+14) tmp = (l * l) * (((-0.3333333333333333 * ((k_m ^ 2.0) / t)) + (2.0 * (1.0 / t))) / (k_m ^ 4.0)); else tmp = -0.3333333333333333 * (((l ^ 2.0) / (k_m ^ 2.0)) / t); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 5e+14], N[(N[(l * l), $MachinePrecision] * N[(N[(N[(-0.3333333333333333 * N[(N[Power[k$95$m, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 5 \cdot 10^{+14}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333 \cdot \frac{{k\_m}^{2}}{t} + 2 \cdot \frac{1}{t}}{{k\_m}^{4}}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t}\\
\end{array}
\end{array}
if k < 5e14Initial program 32.0%
Simplified37.1%
Taylor expanded in k around 0 54.0%
if 5e14 < k Initial program 37.6%
Simplified50.0%
Taylor expanded in k around 0 20.7%
fma-define20.7%
associate-/l*23.8%
associate-*r/23.8%
*-commutative23.8%
associate-/l*23.8%
Simplified23.8%
Taylor expanded in k around inf 60.4%
associate-/r*60.5%
Simplified60.5%
Final simplification55.6%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 32000.0) (* (* l l) (/ (/ 2.0 t) (pow k_m 4.0))) (* -0.3333333333333333 (/ (/ (pow l 2.0) (pow k_m 2.0)) t))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 32000.0) {
tmp = (l * l) * ((2.0 / t) / pow(k_m, 4.0));
} else {
tmp = -0.3333333333333333 * ((pow(l, 2.0) / pow(k_m, 2.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 <= 32000.0d0) then
tmp = (l * l) * ((2.0d0 / t) / (k_m ** 4.0d0))
else
tmp = (-0.3333333333333333d0) * (((l ** 2.0d0) / (k_m ** 2.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 <= 32000.0) {
tmp = (l * l) * ((2.0 / t) / Math.pow(k_m, 4.0));
} else {
tmp = -0.3333333333333333 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) / t);
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 32000.0: tmp = (l * l) * ((2.0 / t) / math.pow(k_m, 4.0)) else: tmp = -0.3333333333333333 * ((math.pow(l, 2.0) / math.pow(k_m, 2.0)) / t) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 32000.0) tmp = Float64(Float64(l * l) * Float64(Float64(2.0 / t) / (k_m ^ 4.0))); else tmp = Float64(-0.3333333333333333 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) / t)); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 32000.0) tmp = (l * l) * ((2.0 / t) / (k_m ^ 4.0)); else tmp = -0.3333333333333333 * (((l ^ 2.0) / (k_m ^ 2.0)) / t); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 32000.0], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / t), $MachinePrecision] / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 32000:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{\frac{2}{t}}{{k\_m}^{4}}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{2}}}{t}\\
\end{array}
\end{array}
if k < 32000Initial program 32.0%
Simplified37.2%
unpow237.2%
clear-num37.2%
frac-times30.9%
*-un-lft-identity30.9%
Applied egg-rr30.9%
Taylor expanded in k around 0 59.8%
*-commutative59.8%
associate-/r*59.8%
Simplified59.8%
if 32000 < k Initial program 37.4%
Simplified49.2%
Taylor expanded in k around 0 20.1%
fma-define20.1%
associate-/l*23.0%
associate-*r/23.0%
*-commutative23.0%
associate-/l*23.0%
Simplified23.0%
Taylor expanded in k around inf 61.0%
associate-/r*61.1%
Simplified61.1%
Final simplification60.1%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* l l) (/ (/ 2.0 t) (pow k_m 4.0))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (l * l) * ((2.0 / 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 / 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 / t) / Math.pow(k_m, 4.0));
}
k_m = math.fabs(k) def code(t, l, k_m): return (l * l) * ((2.0 / t) / math.pow(k_m, 4.0))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(l * l) * Float64(Float64(2.0 / t) / (k_m ^ 4.0))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (l * l) * ((2.0 / t) / (k_m ^ 4.0)); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / t), $MachinePrecision] / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\ell \cdot \ell\right) \cdot \frac{\frac{2}{t}}{{k\_m}^{4}}
\end{array}
Initial program 33.4%
Simplified40.4%
unpow240.4%
clear-num40.4%
frac-times33.7%
*-un-lft-identity33.7%
Applied egg-rr33.7%
Taylor expanded in k around 0 59.2%
*-commutative59.2%
associate-/r*59.2%
Simplified59.2%
Final simplification59.2%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* l l) (/ 2.0 (* t (pow k_m 4.0)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (l * l) * (2.0 / (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 / (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 / (t * Math.pow(k_m, 4.0)));
}
k_m = math.fabs(k) def code(t, l, k_m): return (l * l) * (2.0 / (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(t * (k_m ^ 4.0)))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (l * l) * (2.0 / (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[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {k\_m}^{4}}
\end{array}
Initial program 33.4%
Simplified40.4%
Taylor expanded in k around 0 59.2%
Final simplification59.2%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 1.15e-5) (* (* l l) (/ 2.0 0.0)) 0.0))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.15e-5) {
tmp = (l * l) * (2.0 / 0.0);
} else {
tmp = 0.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 (k_m <= 1.15d-5) then
tmp = (l * l) * (2.0d0 / 0.0d0)
else
tmp = 0.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 (k_m <= 1.15e-5) {
tmp = (l * l) * (2.0 / 0.0);
} else {
tmp = 0.0;
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 1.15e-5: tmp = (l * l) * (2.0 / 0.0) else: tmp = 0.0 return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.15e-5) tmp = Float64(Float64(l * l) * Float64(2.0 / 0.0)); else tmp = 0.0; end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 1.15e-5) tmp = (l * l) * (2.0 / 0.0); else tmp = 0.0; end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.15e-5], N[(N[(l * l), $MachinePrecision] * N[(2.0 / 0.0), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.15 \cdot 10^{-5}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{0}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if k < 1.15e-5Initial program 32.0%
Simplified37.2%
Taylor expanded in k around 0 59.8%
add-log-exp30.9%
*-commutative30.9%
exp-prod28.4%
Applied egg-rr28.4%
Taylor expanded in t around 0 20.3%
if 1.15e-5 < k Initial program 37.4%
Simplified49.2%
add-log-exp45.0%
*-commutative45.0%
exp-prod57.6%
pow257.6%
associate-/r*57.6%
associate-*r*57.6%
*-commutative57.6%
Applied egg-rr57.6%
Taylor expanded in l around 0 55.2%
metadata-eval55.2%
Applied egg-rr55.2%
Final simplification29.5%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 0.0)
k_m = fabs(k);
double code(double t, double l, double k_m) {
return 0.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 = 0.0d0
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return 0.0;
}
k_m = math.fabs(k) def code(t, l, k_m): return 0.0
k_m = abs(k) function code(t, l, k_m) return 0.0 end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = 0.0; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := 0.0
\begin{array}{l}
k_m = \left|k\right|
\\
0
\end{array}
Initial program 33.4%
Simplified40.4%
add-log-exp36.2%
*-commutative36.2%
exp-prod39.5%
pow239.5%
associate-/r*39.5%
associate-*r*39.5%
*-commutative39.5%
Applied egg-rr39.5%
Taylor expanded in l around 0 26.6%
metadata-eval26.6%
Applied egg-rr26.6%
herbie shell --seed 2024110
(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))))