
(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 23 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}
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0))
(t_2 (cbrt (* (sin k) (tan k))))
(t_3 (/ (sqrt 2.0) k))
(t_4 (/ (/ (/ (sqrt 2.0) t_1) k) t_2)))
(if (<= (* l l) 0.0)
(* (* t (* t_3 (pow (* t (* t_1 (pow (cbrt t_2) 3.0))) -2.0))) t_4)
(if (<= (* l l) 1e+225)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(* t_4 (* t (pow (cbrt (* t_3 (pow (* t_2 (* t t_1)) -2.0))) 3.0)))))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = cbrt((sin(k) * tan(k)));
double t_3 = sqrt(2.0) / k;
double t_4 = ((sqrt(2.0) / t_1) / k) / t_2;
double tmp;
if ((l * l) <= 0.0) {
tmp = (t * (t_3 * pow((t * (t_1 * pow(cbrt(t_2), 3.0))), -2.0))) * t_4;
} else if ((l * l) <= 1e+225) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else {
tmp = t_4 * (t * pow(cbrt((t_3 * pow((t_2 * (t * t_1)), -2.0))), 3.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), -2.0);
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_3 = Math.sqrt(2.0) / k;
double t_4 = ((Math.sqrt(2.0) / t_1) / k) / t_2;
double tmp;
if ((l * l) <= 0.0) {
tmp = (t * (t_3 * Math.pow((t * (t_1 * Math.pow(Math.cbrt(t_2), 3.0))), -2.0))) * t_4;
} else if ((l * l) <= 1e+225) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else {
tmp = t_4 * (t * Math.pow(Math.cbrt((t_3 * Math.pow((t_2 * (t * t_1)), -2.0))), 3.0));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) t_3 = Float64(sqrt(2.0) / k) t_4 = Float64(Float64(Float64(sqrt(2.0) / t_1) / k) / t_2) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(t * Float64(t_3 * (Float64(t * Float64(t_1 * (cbrt(t_2) ^ 3.0))) ^ -2.0))) * t_4); elseif (Float64(l * l) <= 1e+225) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); else tmp = Float64(t_4 * Float64(t * (cbrt(Float64(t_3 * (Float64(t_2 * Float64(t * t_1)) ^ -2.0))) ^ 3.0))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / t$95$1), $MachinePrecision] / k), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(t * N[(t$95$3 * N[Power[N[(t * N[(t$95$1 * N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+225], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(t * N[Power[N[Power[N[(t$95$3 * N[Power[N[(t$95$2 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t_3 := \frac{\sqrt{2}}{k}\\
t_4 := \frac{\frac{\frac{\sqrt{2}}{t\_1}}{k}}{t\_2}\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\left(t \cdot \left(t\_3 \cdot {\left(t \cdot \left(t\_1 \cdot {\left(\sqrt[3]{t\_2}\right)}^{3}\right)\right)}^{-2}\right)\right) \cdot t\_4\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+225}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \left(t \cdot {\left(\sqrt[3]{t\_3 \cdot {\left(t\_2 \cdot \left(t \cdot t\_1\right)\right)}^{-2}}\right)}^{3}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 19.0%
*-commutative19.0%
associate-/r*19.0%
Simplified24.0%
add-sqr-sqrt24.0%
add-cube-cbrt24.0%
times-frac24.0%
Applied egg-rr81.4%
associate-/r/81.4%
associate-/r*81.4%
associate-/r/81.4%
Simplified81.4%
associate-/l*81.4%
div-inv81.4%
pow-flip81.4%
metadata-eval81.4%
Applied egg-rr81.4%
associate-*l/81.4%
associate-/r*81.4%
*-inverses81.4%
associate-*r/81.4%
Simplified81.4%
div-inv81.4%
pow-flip81.4%
div-inv81.4%
pow-flip81.4%
metadata-eval81.4%
metadata-eval81.4%
Applied egg-rr81.4%
*-commutative81.4%
associate-*l*87.5%
associate-*l*90.7%
Simplified90.7%
add-cube-cbrt90.7%
pow390.7%
Applied egg-rr90.7%
if 0.0 < (*.f64 l l) < 9.99999999999999928e224Initial program 46.1%
*-commutative46.1%
associate-/r*46.1%
Simplified52.4%
+-rgt-identity52.4%
associate-/l/52.3%
div-inv52.3%
*-commutative52.3%
associate-*l/53.0%
associate-/l*53.0%
pow253.0%
Applied egg-rr53.0%
associate-*r/53.0%
metadata-eval53.0%
*-commutative53.0%
*-commutative53.0%
associate-/r/52.6%
associate-/l*52.6%
associate-*l*52.6%
Simplified52.6%
Taylor expanded in k around inf 88.8%
times-frac93.3%
Simplified93.3%
if 9.99999999999999928e224 < (*.f64 l l) Initial program 36.6%
*-commutative36.6%
associate-/r*36.6%
Simplified36.7%
add-sqr-sqrt36.7%
add-cube-cbrt36.7%
times-frac36.7%
Applied egg-rr79.1%
associate-/r/79.1%
associate-/r*79.1%
associate-/r/79.1%
Simplified79.1%
associate-/l*79.1%
div-inv79.1%
pow-flip79.1%
metadata-eval79.1%
Applied egg-rr79.1%
associate-*l/79.1%
associate-/r*79.1%
*-inverses79.1%
associate-*r/79.1%
Simplified79.1%
div-inv79.1%
pow-flip79.1%
div-inv79.1%
pow-flip79.1%
metadata-eval79.1%
metadata-eval79.1%
Applied egg-rr79.1%
*-commutative79.1%
associate-*l*86.2%
associate-*l*86.3%
Simplified86.3%
add-cube-cbrt86.2%
pow386.2%
associate-*r*86.3%
Applied egg-rr86.3%
Final simplification90.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0))
(t_2 (cbrt (* (sin k) (tan k))))
(t_3 (/ (sqrt 2.0) k))
(t_4 (/ (/ (/ (sqrt 2.0) t_1) k) t_2)))
(if (<= (* l l) 0.0)
(* (* t (* t_3 (pow (* t (* t_1 (pow (cbrt t_2) 3.0))) -2.0))) t_4)
(if (<= (* l l) 1e+225)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(* t_4 (* t (* t_3 (pow (* t (* t_1 t_2)) -2.0))))))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = cbrt((sin(k) * tan(k)));
double t_3 = sqrt(2.0) / k;
double t_4 = ((sqrt(2.0) / t_1) / k) / t_2;
double tmp;
if ((l * l) <= 0.0) {
tmp = (t * (t_3 * pow((t * (t_1 * pow(cbrt(t_2), 3.0))), -2.0))) * t_4;
} else if ((l * l) <= 1e+225) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else {
tmp = t_4 * (t * (t_3 * pow((t * (t_1 * t_2)), -2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), -2.0);
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_3 = Math.sqrt(2.0) / k;
double t_4 = ((Math.sqrt(2.0) / t_1) / k) / t_2;
double tmp;
if ((l * l) <= 0.0) {
tmp = (t * (t_3 * Math.pow((t * (t_1 * Math.pow(Math.cbrt(t_2), 3.0))), -2.0))) * t_4;
} else if ((l * l) <= 1e+225) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else {
tmp = t_4 * (t * (t_3 * Math.pow((t * (t_1 * t_2)), -2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) t_3 = Float64(sqrt(2.0) / k) t_4 = Float64(Float64(Float64(sqrt(2.0) / t_1) / k) / t_2) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(t * Float64(t_3 * (Float64(t * Float64(t_1 * (cbrt(t_2) ^ 3.0))) ^ -2.0))) * t_4); elseif (Float64(l * l) <= 1e+225) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); else tmp = Float64(t_4 * Float64(t * Float64(t_3 * (Float64(t * Float64(t_1 * t_2)) ^ -2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / t$95$1), $MachinePrecision] / k), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(t * N[(t$95$3 * N[Power[N[(t * N[(t$95$1 * N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+225], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(t * N[(t$95$3 * N[Power[N[(t * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t_3 := \frac{\sqrt{2}}{k}\\
t_4 := \frac{\frac{\frac{\sqrt{2}}{t\_1}}{k}}{t\_2}\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\left(t \cdot \left(t\_3 \cdot {\left(t \cdot \left(t\_1 \cdot {\left(\sqrt[3]{t\_2}\right)}^{3}\right)\right)}^{-2}\right)\right) \cdot t\_4\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+225}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \left(t \cdot \left(t\_3 \cdot {\left(t \cdot \left(t\_1 \cdot t\_2\right)\right)}^{-2}\right)\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 19.0%
*-commutative19.0%
associate-/r*19.0%
Simplified24.0%
add-sqr-sqrt24.0%
add-cube-cbrt24.0%
times-frac24.0%
Applied egg-rr81.4%
associate-/r/81.4%
associate-/r*81.4%
associate-/r/81.4%
Simplified81.4%
associate-/l*81.4%
div-inv81.4%
pow-flip81.4%
metadata-eval81.4%
Applied egg-rr81.4%
associate-*l/81.4%
associate-/r*81.4%
*-inverses81.4%
associate-*r/81.4%
Simplified81.4%
div-inv81.4%
pow-flip81.4%
div-inv81.4%
pow-flip81.4%
metadata-eval81.4%
metadata-eval81.4%
Applied egg-rr81.4%
*-commutative81.4%
associate-*l*87.5%
associate-*l*90.7%
Simplified90.7%
add-cube-cbrt90.7%
pow390.7%
Applied egg-rr90.7%
if 0.0 < (*.f64 l l) < 9.99999999999999928e224Initial program 46.1%
*-commutative46.1%
associate-/r*46.1%
Simplified52.4%
+-rgt-identity52.4%
associate-/l/52.3%
div-inv52.3%
*-commutative52.3%
associate-*l/53.0%
associate-/l*53.0%
pow253.0%
Applied egg-rr53.0%
associate-*r/53.0%
metadata-eval53.0%
*-commutative53.0%
*-commutative53.0%
associate-/r/52.6%
associate-/l*52.6%
associate-*l*52.6%
Simplified52.6%
Taylor expanded in k around inf 88.8%
times-frac93.3%
Simplified93.3%
if 9.99999999999999928e224 < (*.f64 l l) Initial program 36.6%
*-commutative36.6%
associate-/r*36.6%
Simplified36.7%
add-sqr-sqrt36.7%
add-cube-cbrt36.7%
times-frac36.7%
Applied egg-rr79.1%
associate-/r/79.1%
associate-/r*79.1%
associate-/r/79.1%
Simplified79.1%
associate-/l*79.1%
div-inv79.1%
pow-flip79.1%
metadata-eval79.1%
Applied egg-rr79.1%
associate-*l/79.1%
associate-/r*79.1%
*-inverses79.1%
associate-*r/79.1%
Simplified79.1%
div-inv79.1%
pow-flip79.1%
div-inv79.1%
pow-flip79.1%
metadata-eval79.1%
metadata-eval79.1%
Applied egg-rr79.1%
*-commutative79.1%
associate-*l*86.2%
associate-*l*86.3%
Simplified86.3%
Final simplification90.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0)) (t_2 (cbrt (* (sin k) (tan k)))))
(if (or (<= (* l l) 0.0) (not (<= (* l l) 1e+225)))
(*
(/ (/ (/ (sqrt 2.0) t_1) k) t_2)
(* t (* (/ (sqrt 2.0) k) (pow (* t (* t_1 t_2)) -2.0))))
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k))))))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = cbrt((sin(k) * tan(k)));
double tmp;
if (((l * l) <= 0.0) || !((l * l) <= 1e+225)) {
tmp = (((sqrt(2.0) / t_1) / k) / t_2) * (t * ((sqrt(2.0) / k) * pow((t * (t_1 * t_2)), -2.0)));
} else {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), -2.0);
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if (((l * l) <= 0.0) || !((l * l) <= 1e+225)) {
tmp = (((Math.sqrt(2.0) / t_1) / k) / t_2) * (t * ((Math.sqrt(2.0) / k) * Math.pow((t * (t_1 * t_2)), -2.0)));
} else {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if ((Float64(l * l) <= 0.0) || !(Float64(l * l) <= 1e+225)) tmp = Float64(Float64(Float64(Float64(sqrt(2.0) / t_1) / k) / t_2) * Float64(t * Float64(Float64(sqrt(2.0) / k) * (Float64(t * Float64(t_1 * t_2)) ^ -2.0)))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, If[Or[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[Not[LessEqual[N[(l * l), $MachinePrecision], 1e+225]], $MachinePrecision]], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / t$95$1), $MachinePrecision] / k), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[Power[N[(t * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
\mathbf{if}\;\ell \cdot \ell \leq 0 \lor \neg \left(\ell \cdot \ell \leq 10^{+225}\right):\\
\;\;\;\;\frac{\frac{\frac{\sqrt{2}}{t\_1}}{k}}{t\_2} \cdot \left(t \cdot \left(\frac{\sqrt{2}}{k} \cdot {\left(t \cdot \left(t\_1 \cdot t\_2\right)\right)}^{-2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0 or 9.99999999999999928e224 < (*.f64 l l) Initial program 29.5%
*-commutative29.5%
associate-/r*29.5%
Simplified31.5%
add-sqr-sqrt31.5%
add-cube-cbrt31.5%
times-frac31.5%
Applied egg-rr80.0%
associate-/r/80.0%
associate-/r*80.0%
associate-/r/80.0%
Simplified80.0%
associate-/l*80.0%
div-inv80.0%
pow-flip80.0%
metadata-eval80.0%
Applied egg-rr80.0%
associate-*l/80.0%
associate-/r*80.0%
*-inverses80.0%
associate-*r/80.0%
Simplified80.0%
div-inv80.0%
pow-flip80.0%
div-inv80.0%
pow-flip80.0%
metadata-eval80.0%
metadata-eval80.0%
Applied egg-rr80.0%
*-commutative80.0%
associate-*l*86.8%
associate-*l*88.1%
Simplified88.1%
if 0.0 < (*.f64 l l) < 9.99999999999999928e224Initial program 46.1%
*-commutative46.1%
associate-/r*46.1%
Simplified52.4%
+-rgt-identity52.4%
associate-/l/52.3%
div-inv52.3%
*-commutative52.3%
associate-*l/53.0%
associate-/l*53.0%
pow253.0%
Applied egg-rr53.0%
associate-*r/53.0%
metadata-eval53.0%
*-commutative53.0%
*-commutative53.0%
associate-/r/52.6%
associate-/l*52.6%
associate-*l*52.6%
Simplified52.6%
Taylor expanded in k around inf 88.8%
times-frac93.3%
Simplified93.3%
Final simplification90.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0)) (t_2 (cbrt (* (sin k) (tan k)))))
(if (or (<= (* l l) 0.0) (not (<= (* l l) 1e+268)))
(*
(/ (/ (/ (sqrt 2.0) t_1) k) t_2)
(* t (* (sqrt 2.0) (/ (pow (* t_2 (* t t_1)) -2.0) k))))
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k))))))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = cbrt((sin(k) * tan(k)));
double tmp;
if (((l * l) <= 0.0) || !((l * l) <= 1e+268)) {
tmp = (((sqrt(2.0) / t_1) / k) / t_2) * (t * (sqrt(2.0) * (pow((t_2 * (t * t_1)), -2.0) / k)));
} else {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), -2.0);
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if (((l * l) <= 0.0) || !((l * l) <= 1e+268)) {
tmp = (((Math.sqrt(2.0) / t_1) / k) / t_2) * (t * (Math.sqrt(2.0) * (Math.pow((t_2 * (t * t_1)), -2.0) / k)));
} else {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if ((Float64(l * l) <= 0.0) || !(Float64(l * l) <= 1e+268)) tmp = Float64(Float64(Float64(Float64(sqrt(2.0) / t_1) / k) / t_2) * Float64(t * Float64(sqrt(2.0) * Float64((Float64(t_2 * Float64(t * t_1)) ^ -2.0) / k)))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, If[Or[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[Not[LessEqual[N[(l * l), $MachinePrecision], 1e+268]], $MachinePrecision]], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / t$95$1), $MachinePrecision] / k), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(t * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Power[N[(t$95$2 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
\mathbf{if}\;\ell \cdot \ell \leq 0 \lor \neg \left(\ell \cdot \ell \leq 10^{+268}\right):\\
\;\;\;\;\frac{\frac{\frac{\sqrt{2}}{t\_1}}{k}}{t\_2} \cdot \left(t \cdot \left(\sqrt{2} \cdot \frac{{\left(t\_2 \cdot \left(t \cdot t\_1\right)\right)}^{-2}}{k}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0 or 9.9999999999999997e267 < (*.f64 l l) Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified30.3%
add-sqr-sqrt30.3%
add-cube-cbrt30.3%
times-frac30.3%
Applied egg-rr80.4%
associate-/r/80.4%
associate-/r*80.4%
associate-/r/80.4%
Simplified80.4%
associate-/l*80.4%
div-inv80.4%
pow-flip80.4%
metadata-eval80.4%
Applied egg-rr80.4%
associate-*l/80.4%
associate-/r*80.4%
*-inverses80.4%
associate-*r/80.4%
Simplified80.4%
div-inv80.4%
pow-flip80.4%
div-inv80.4%
pow-flip80.4%
metadata-eval80.4%
metadata-eval80.4%
Applied egg-rr80.4%
*-commutative80.4%
associate-*l*87.4%
associate-*l*88.8%
Simplified88.8%
associate-*l/88.8%
associate-*r*87.4%
Applied egg-rr87.4%
associate-/l*87.4%
Simplified87.4%
if 0.0 < (*.f64 l l) < 9.9999999999999997e267Initial program 46.8%
*-commutative46.8%
associate-/r*46.8%
Simplified52.7%
+-rgt-identity52.7%
associate-/l/52.7%
div-inv52.7%
*-commutative52.7%
associate-*l/53.2%
associate-/l*53.3%
pow253.3%
Applied egg-rr53.3%
associate-*r/53.3%
metadata-eval53.3%
*-commutative53.3%
*-commutative53.3%
associate-/r/52.9%
associate-/l*52.9%
associate-*l*52.9%
Simplified52.9%
Taylor expanded in k around inf 86.8%
times-frac91.9%
Simplified91.9%
Final simplification89.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (cbrt (* (sin k) (tan k))) (/ t (pow (cbrt l) 2.0)))))
(if (<= k 1.6e-165)
(/
(/ 2.0 (pow (/ k t) 2.0))
(log (pow (exp (* (pow t 3.0) (pow l -2.0))) (pow k 2.0))))
(if (<= k 4.1e+152)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(/ (/ (pow (* t (/ (sqrt 2.0) k)) 2.0) (pow t_1 2.0)) t_1)))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * tan(k))) * (t / pow(cbrt(l), 2.0));
double tmp;
if (k <= 1.6e-165) {
tmp = (2.0 / pow((k / t), 2.0)) / log(pow(exp((pow(t, 3.0) * pow(l, -2.0))), pow(k, 2.0)));
} else if (k <= 4.1e+152) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else {
tmp = (pow((t * (sqrt(2.0) / k)), 2.0) / pow(t_1, 2.0)) / t_1;
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * Math.tan(k))) * (t / Math.pow(Math.cbrt(l), 2.0));
double tmp;
if (k <= 1.6e-165) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / Math.log(Math.pow(Math.exp((Math.pow(t, 3.0) * Math.pow(l, -2.0))), Math.pow(k, 2.0)));
} else if (k <= 4.1e+152) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else {
tmp = (Math.pow((t * (Math.sqrt(2.0) / k)), 2.0) / Math.pow(t_1, 2.0)) / t_1;
}
return tmp;
}
function code(t, l, k) t_1 = Float64(cbrt(Float64(sin(k) * tan(k))) * Float64(t / (cbrt(l) ^ 2.0))) tmp = 0.0 if (k <= 1.6e-165) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / log((exp(Float64((t ^ 3.0) * (l ^ -2.0))) ^ (k ^ 2.0)))); elseif (k <= 4.1e+152) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); else tmp = Float64(Float64((Float64(t * Float64(sqrt(2.0) / k)) ^ 2.0) / (t_1 ^ 2.0)) / t_1); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.6e-165], N[(N[(2.0 / N[Power[N[(k / 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], N[Power[k, 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.1e+152], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \tan k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
\mathbf{if}\;k \leq 1.6 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\log \left({\left(e^{{t}^{3} \cdot {\ell}^{-2}}\right)}^{\left({k}^{2}\right)}\right)}\\
\mathbf{elif}\;k \leq 4.1 \cdot 10^{+152}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{\left(t \cdot \frac{\sqrt{2}}{k}\right)}^{2}}{{t\_1}^{2}}}{t\_1}\\
\end{array}
\end{array}
if k < 1.60000000000000006e-165Initial program 38.6%
*-commutative38.6%
associate-/r*38.6%
Simplified40.6%
add-log-exp23.7%
exp-prod30.5%
div-inv30.5%
pow230.5%
pow-flip30.5%
metadata-eval30.5%
Applied egg-rr30.5%
Taylor expanded in k around 0 30.5%
if 1.60000000000000006e-165 < k < 4.0999999999999998e152Initial program 23.5%
*-commutative23.5%
associate-/r*23.5%
Simplified32.0%
+-rgt-identity32.0%
associate-/l/32.0%
div-inv32.0%
*-commutative32.0%
associate-*l/32.0%
associate-/l*32.0%
pow232.0%
Applied egg-rr32.0%
associate-*r/32.0%
metadata-eval32.0%
*-commutative32.0%
*-commutative32.0%
associate-/r/32.0%
associate-/l*32.0%
associate-*l*32.0%
Simplified32.0%
Taylor expanded in k around inf 79.0%
times-frac83.8%
Simplified83.8%
if 4.0999999999999998e152 < k Initial program 46.7%
*-commutative46.7%
associate-/r*46.7%
Simplified50.0%
add-sqr-sqrt50.0%
add-cube-cbrt50.0%
times-frac50.0%
Applied egg-rr83.0%
associate-*r/82.5%
associate-*l/76.8%
unpow276.8%
associate-/r/76.8%
Simplified76.8%
Final simplification48.4%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (cbrt (* (sin k) (tan k)))) (t_2 (/ t (pow (cbrt l) 2.0))))
(if (<= k 1.6e-165)
(/
(/ 2.0 (pow (/ k t) 2.0))
(log (pow (exp (* (pow t 3.0) (pow l -2.0))) (pow k 2.0))))
(if (<= k 2.6e+150)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(* (/ 2.0 (pow (* t_1 t_2) 2.0)) (/ (/ (pow (/ k t) -2.0) t_2) t_1))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * tan(k)));
double t_2 = t / pow(cbrt(l), 2.0);
double tmp;
if (k <= 1.6e-165) {
tmp = (2.0 / pow((k / t), 2.0)) / log(pow(exp((pow(t, 3.0) * pow(l, -2.0))), pow(k, 2.0)));
} else if (k <= 2.6e+150) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else {
tmp = (2.0 / pow((t_1 * t_2), 2.0)) * ((pow((k / t), -2.0) / t_2) / t_1);
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_2 = t / Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (k <= 1.6e-165) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / Math.log(Math.pow(Math.exp((Math.pow(t, 3.0) * Math.pow(l, -2.0))), Math.pow(k, 2.0)));
} else if (k <= 2.6e+150) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else {
tmp = (2.0 / Math.pow((t_1 * t_2), 2.0)) * ((Math.pow((k / t), -2.0) / t_2) / t_1);
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(Float64(sin(k) * tan(k))) t_2 = Float64(t / (cbrt(l) ^ 2.0)) tmp = 0.0 if (k <= 1.6e-165) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / log((exp(Float64((t ^ 3.0) * (l ^ -2.0))) ^ (k ^ 2.0)))); elseif (k <= 2.6e+150) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); else tmp = Float64(Float64(2.0 / (Float64(t_1 * t_2) ^ 2.0)) * Float64(Float64((Float64(k / t) ^ -2.0) / t_2) / t_1)); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.6e-165], N[(N[(2.0 / N[Power[N[(k / 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], N[Power[k, 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.6e+150], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(t$95$1 * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision] / t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
\mathbf{if}\;k \leq 1.6 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\log \left({\left(e^{{t}^{3} \cdot {\ell}^{-2}}\right)}^{\left({k}^{2}\right)}\right)}\\
\mathbf{elif}\;k \leq 2.6 \cdot 10^{+150}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_1 \cdot t\_2\right)}^{2}} \cdot \frac{\frac{{\left(\frac{k}{t}\right)}^{-2}}{t\_2}}{t\_1}\\
\end{array}
\end{array}
if k < 1.60000000000000006e-165Initial program 38.6%
*-commutative38.6%
associate-/r*38.6%
Simplified40.6%
add-log-exp23.7%
exp-prod30.5%
div-inv30.5%
pow230.5%
pow-flip30.5%
metadata-eval30.5%
Applied egg-rr30.5%
Taylor expanded in k around 0 30.5%
if 1.60000000000000006e-165 < k < 2.60000000000000006e150Initial program 23.5%
*-commutative23.5%
associate-/r*23.5%
Simplified32.0%
+-rgt-identity32.0%
associate-/l/32.0%
div-inv32.0%
*-commutative32.0%
associate-*l/32.0%
associate-/l*32.0%
pow232.0%
Applied egg-rr32.0%
associate-*r/32.0%
metadata-eval32.0%
*-commutative32.0%
*-commutative32.0%
associate-/r/32.0%
associate-/l*32.0%
associate-*l*32.0%
Simplified32.0%
Taylor expanded in k around inf 79.0%
times-frac83.8%
Simplified83.8%
if 2.60000000000000006e150 < k Initial program 46.7%
*-commutative46.7%
associate-/r*46.7%
Simplified50.0%
add-cube-cbrt50.0%
div-inv50.0%
times-frac50.0%
Applied egg-rr76.8%
associate-/r*76.8%
Simplified76.8%
Final simplification48.4%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<= k 1.6e-165)
(/ (/ 2.0 t_1) (log (pow (exp (* (pow t 3.0) (pow l -2.0))) (pow k 2.0))))
(if (<= k 1.7e+154)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(if (<= k 1.08e+204)
(/
2.0
(* (sin k) (* t_1 (/ (tan k) (pow (/ (pow (cbrt l) 2.0) t) 3.0)))))
(log (pow (exp (pow l 2.0)) (/ 2.0 (* t (pow k 4.0))))))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if (k <= 1.6e-165) {
tmp = (2.0 / t_1) / log(pow(exp((pow(t, 3.0) * pow(l, -2.0))), pow(k, 2.0)));
} else if (k <= 1.7e+154) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else if (k <= 1.08e+204) {
tmp = 2.0 / (sin(k) * (t_1 * (tan(k) / pow((pow(cbrt(l), 2.0) / t), 3.0))));
} else {
tmp = log(pow(exp(pow(l, 2.0)), (2.0 / (t * pow(k, 4.0)))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if (k <= 1.6e-165) {
tmp = (2.0 / t_1) / Math.log(Math.pow(Math.exp((Math.pow(t, 3.0) * Math.pow(l, -2.0))), Math.pow(k, 2.0)));
} else if (k <= 1.7e+154) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else if (k <= 1.08e+204) {
tmp = 2.0 / (Math.sin(k) * (t_1 * (Math.tan(k) / Math.pow((Math.pow(Math.cbrt(l), 2.0) / t), 3.0))));
} else {
tmp = Math.log(Math.pow(Math.exp(Math.pow(l, 2.0)), (2.0 / (t * Math.pow(k, 4.0)))));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (k <= 1.6e-165) tmp = Float64(Float64(2.0 / t_1) / log((exp(Float64((t ^ 3.0) * (l ^ -2.0))) ^ (k ^ 2.0)))); elseif (k <= 1.7e+154) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); elseif (k <= 1.08e+204) tmp = Float64(2.0 / Float64(sin(k) * Float64(t_1 * Float64(tan(k) / (Float64((cbrt(l) ^ 2.0) / t) ^ 3.0))))); else tmp = log((exp((l ^ 2.0)) ^ Float64(2.0 / Float64(t * (k ^ 4.0))))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 1.6e-165], N[(N[(2.0 / t$95$1), $MachinePrecision] / N[Log[N[Power[N[Exp[N[(N[Power[t, 3.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[k, 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.7e+154], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.08e+204], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(t$95$1 * N[(N[Tan[k], $MachinePrecision] / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[Power[N[Exp[N[Power[l, 2.0], $MachinePrecision]], $MachinePrecision], N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;k \leq 1.6 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{2}{t\_1}}{\log \left({\left(e^{{t}^{3} \cdot {\ell}^{-2}}\right)}^{\left({k}^{2}\right)}\right)}\\
\mathbf{elif}\;k \leq 1.7 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{elif}\;k \leq 1.08 \cdot 10^{+204}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(t\_1 \cdot \frac{\tan k}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}\right)}^{3}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\log \left({\left(e^{{\ell}^{2}}\right)}^{\left(\frac{2}{t \cdot {k}^{4}}\right)}\right)\\
\end{array}
\end{array}
if k < 1.60000000000000006e-165Initial program 38.6%
*-commutative38.6%
associate-/r*38.6%
Simplified40.6%
add-log-exp23.7%
exp-prod30.5%
div-inv30.5%
pow230.5%
pow-flip30.5%
metadata-eval30.5%
Applied egg-rr30.5%
Taylor expanded in k around 0 30.5%
if 1.60000000000000006e-165 < k < 1.69999999999999987e154Initial program 23.5%
*-commutative23.5%
associate-/r*23.5%
Simplified32.0%
+-rgt-identity32.0%
associate-/l/32.0%
div-inv32.0%
*-commutative32.0%
associate-*l/32.0%
associate-/l*32.0%
pow232.0%
Applied egg-rr32.0%
associate-*r/32.0%
metadata-eval32.0%
*-commutative32.0%
*-commutative32.0%
associate-/r/32.0%
associate-/l*32.0%
associate-*l*32.0%
Simplified32.0%
Taylor expanded in k around inf 79.0%
times-frac83.8%
Simplified83.8%
if 1.69999999999999987e154 < k < 1.08e204Initial program 20.0%
*-commutative20.0%
associate-/r*20.0%
Simplified40.0%
+-rgt-identity40.0%
associate-/l/40.0%
div-inv40.0%
*-commutative40.0%
associate-*l/40.0%
associate-/l*40.0%
pow240.0%
Applied egg-rr40.0%
associate-*r/40.0%
metadata-eval40.0%
*-commutative40.0%
*-commutative40.0%
associate-/r/40.0%
associate-/l*40.0%
associate-*l*40.0%
Simplified40.0%
pow240.0%
add-cube-cbrt40.0%
pow240.0%
cbrt-div40.0%
cbrt-prod40.0%
unpow240.0%
unpow340.0%
add-cbrt-cube40.0%
cbrt-div40.0%
cbrt-prod60.7%
unpow260.7%
unpow360.7%
add-cbrt-cube79.0%
Applied egg-rr79.0%
unpow279.0%
unpow379.0%
Simplified79.0%
if 1.08e204 < k Initial program 52.0%
Simplified55.6%
Taylor expanded in k around 0 71.9%
add-log-exp71.9%
*-commutative71.9%
exp-prod76.4%
pow276.4%
*-commutative76.4%
Applied egg-rr76.4%
Final simplification48.4%
(FPCore (t l k)
:precision binary64
(if (<= k 3.2e-166)
(pow
(* l (/ (sqrt 2.0) (* (sqrt (* (sin k) (tan k))) (* (/ k t) (pow t 1.5)))))
2.0)
(if (<= k 1.35e+154)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(if (<= k 1.4e+204)
(/
2.0
(*
(sin k)
(* (pow (/ k t) 2.0) (/ (tan k) (pow (/ (pow (cbrt l) 2.0) t) 3.0)))))
(log (pow (exp (pow l 2.0)) (/ 2.0 (* t (pow k 4.0)))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 3.2e-166) {
tmp = pow((l * (sqrt(2.0) / (sqrt((sin(k) * tan(k))) * ((k / t) * pow(t, 1.5))))), 2.0);
} else if (k <= 1.35e+154) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else if (k <= 1.4e+204) {
tmp = 2.0 / (sin(k) * (pow((k / t), 2.0) * (tan(k) / pow((pow(cbrt(l), 2.0) / t), 3.0))));
} else {
tmp = log(pow(exp(pow(l, 2.0)), (2.0 / (t * pow(k, 4.0)))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.2e-166) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (Math.sqrt((Math.sin(k) * Math.tan(k))) * ((k / t) * Math.pow(t, 1.5))))), 2.0);
} else if (k <= 1.35e+154) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else if (k <= 1.4e+204) {
tmp = 2.0 / (Math.sin(k) * (Math.pow((k / t), 2.0) * (Math.tan(k) / Math.pow((Math.pow(Math.cbrt(l), 2.0) / t), 3.0))));
} else {
tmp = Math.log(Math.pow(Math.exp(Math.pow(l, 2.0)), (2.0 / (t * Math.pow(k, 4.0)))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (k <= 3.2e-166) tmp = Float64(l * Float64(sqrt(2.0) / Float64(sqrt(Float64(sin(k) * tan(k))) * Float64(Float64(k / t) * (t ^ 1.5))))) ^ 2.0; elseif (k <= 1.35e+154) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); elseif (k <= 1.4e+204) tmp = Float64(2.0 / Float64(sin(k) * Float64((Float64(k / t) ^ 2.0) * Float64(tan(k) / (Float64((cbrt(l) ^ 2.0) / t) ^ 3.0))))); else tmp = log((exp((l ^ 2.0)) ^ Float64(2.0 / Float64(t * (k ^ 4.0))))); end return tmp end
code[t_, l_, k_] := If[LessEqual[k, 3.2e-166], N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(k / t), $MachinePrecision] * N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[k, 1.35e+154], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.4e+204], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[Power[N[Exp[N[Power[l, 2.0], $MachinePrecision]], $MachinePrecision], N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.2 \cdot 10^{-166}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{k}{t} \cdot {t}^{1.5}\right)}\right)}^{2}\\
\mathbf{elif}\;k \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{elif}\;k \leq 1.4 \cdot 10^{+204}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left({\left(\frac{k}{t}\right)}^{2} \cdot \frac{\tan k}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}\right)}^{3}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\log \left({\left(e^{{\ell}^{2}}\right)}^{\left(\frac{2}{t \cdot {k}^{4}}\right)}\right)\\
\end{array}
\end{array}
if k < 3.20000000000000001e-166Initial program 38.8%
Simplified40.3%
add-sqr-sqrt25.7%
pow225.7%
Applied egg-rr28.3%
associate-*l*28.2%
Simplified28.2%
if 3.20000000000000001e-166 < k < 1.35000000000000003e154Initial program 23.1%
*-commutative23.1%
associate-/r*23.2%
Simplified31.5%
+-rgt-identity31.5%
associate-/l/31.5%
div-inv31.5%
*-commutative31.5%
associate-*l/31.4%
associate-/l*31.4%
pow231.4%
Applied egg-rr31.4%
associate-*r/31.4%
metadata-eval31.4%
*-commutative31.4%
*-commutative31.4%
associate-/r/31.5%
associate-/l*31.5%
associate-*l*31.5%
Simplified31.5%
Taylor expanded in k around inf 77.9%
times-frac82.6%
Simplified82.6%
if 1.35000000000000003e154 < k < 1.40000000000000012e204Initial program 20.0%
*-commutative20.0%
associate-/r*20.0%
Simplified40.0%
+-rgt-identity40.0%
associate-/l/40.0%
div-inv40.0%
*-commutative40.0%
associate-*l/40.0%
associate-/l*40.0%
pow240.0%
Applied egg-rr40.0%
associate-*r/40.0%
metadata-eval40.0%
*-commutative40.0%
*-commutative40.0%
associate-/r/40.0%
associate-/l*40.0%
associate-*l*40.0%
Simplified40.0%
pow240.0%
add-cube-cbrt40.0%
pow240.0%
cbrt-div40.0%
cbrt-prod40.0%
unpow240.0%
unpow340.0%
add-cbrt-cube40.0%
cbrt-div40.0%
cbrt-prod60.7%
unpow260.7%
unpow360.7%
add-cbrt-cube79.0%
Applied egg-rr79.0%
unpow279.0%
unpow379.0%
Simplified79.0%
if 1.40000000000000012e204 < k Initial program 52.0%
Simplified55.6%
Taylor expanded in k around 0 71.9%
add-log-exp71.9%
*-commutative71.9%
exp-prod76.4%
pow276.4%
*-commutative76.4%
Applied egg-rr76.4%
Final simplification46.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (sqrt (* (sin k) (tan k)))))
(if (<= k 1.85e-166)
(pow (* l (/ (sqrt 2.0) (* t_1 (* (/ k t) (pow t 1.5))))) 2.0)
(if (<= k 1.3e+150)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(if (<= k 3.5e+201)
(pow (* (/ (/ (sqrt 2.0) k) (/ (pow t 1.5) l)) (/ t t_1)) 2.0)
(log (pow (exp (pow l 2.0)) (/ 2.0 (* t (pow k 4.0))))))))))
double code(double t, double l, double k) {
double t_1 = sqrt((sin(k) * tan(k)));
double tmp;
if (k <= 1.85e-166) {
tmp = pow((l * (sqrt(2.0) / (t_1 * ((k / t) * pow(t, 1.5))))), 2.0);
} else if (k <= 1.3e+150) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else if (k <= 3.5e+201) {
tmp = pow((((sqrt(2.0) / k) / (pow(t, 1.5) / l)) * (t / t_1)), 2.0);
} else {
tmp = log(pow(exp(pow(l, 2.0)), (2.0 / (t * pow(k, 4.0)))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((sin(k) * tan(k)))
if (k <= 1.85d-166) then
tmp = (l * (sqrt(2.0d0) / (t_1 * ((k / t) * (t ** 1.5d0))))) ** 2.0d0
else if (k <= 1.3d+150) then
tmp = 2.0d0 / (sin(k) * (((k ** 2.0d0) / (l ** 2.0d0)) * ((t * sin(k)) / cos(k))))
else if (k <= 3.5d+201) then
tmp = (((sqrt(2.0d0) / k) / ((t ** 1.5d0) / l)) * (t / t_1)) ** 2.0d0
else
tmp = log((exp((l ** 2.0d0)) ** (2.0d0 / (t * (k ** 4.0d0)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.sqrt((Math.sin(k) * Math.tan(k)));
double tmp;
if (k <= 1.85e-166) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (t_1 * ((k / t) * Math.pow(t, 1.5))))), 2.0);
} else if (k <= 1.3e+150) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else if (k <= 3.5e+201) {
tmp = Math.pow((((Math.sqrt(2.0) / k) / (Math.pow(t, 1.5) / l)) * (t / t_1)), 2.0);
} else {
tmp = Math.log(Math.pow(Math.exp(Math.pow(l, 2.0)), (2.0 / (t * Math.pow(k, 4.0)))));
}
return tmp;
}
def code(t, l, k): t_1 = math.sqrt((math.sin(k) * math.tan(k))) tmp = 0 if k <= 1.85e-166: tmp = math.pow((l * (math.sqrt(2.0) / (t_1 * ((k / t) * math.pow(t, 1.5))))), 2.0) elif k <= 1.3e+150: tmp = 2.0 / (math.sin(k) * ((math.pow(k, 2.0) / math.pow(l, 2.0)) * ((t * math.sin(k)) / math.cos(k)))) elif k <= 3.5e+201: tmp = math.pow((((math.sqrt(2.0) / k) / (math.pow(t, 1.5) / l)) * (t / t_1)), 2.0) else: tmp = math.log(math.pow(math.exp(math.pow(l, 2.0)), (2.0 / (t * math.pow(k, 4.0))))) return tmp
function code(t, l, k) t_1 = sqrt(Float64(sin(k) * tan(k))) tmp = 0.0 if (k <= 1.85e-166) tmp = Float64(l * Float64(sqrt(2.0) / Float64(t_1 * Float64(Float64(k / t) * (t ^ 1.5))))) ^ 2.0; elseif (k <= 1.3e+150) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); elseif (k <= 3.5e+201) tmp = Float64(Float64(Float64(sqrt(2.0) / k) / Float64((t ^ 1.5) / l)) * Float64(t / t_1)) ^ 2.0; else tmp = log((exp((l ^ 2.0)) ^ Float64(2.0 / Float64(t * (k ^ 4.0))))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sqrt((sin(k) * tan(k))); tmp = 0.0; if (k <= 1.85e-166) tmp = (l * (sqrt(2.0) / (t_1 * ((k / t) * (t ^ 1.5))))) ^ 2.0; elseif (k <= 1.3e+150) tmp = 2.0 / (sin(k) * (((k ^ 2.0) / (l ^ 2.0)) * ((t * sin(k)) / cos(k)))); elseif (k <= 3.5e+201) tmp = (((sqrt(2.0) / k) / ((t ^ 1.5) / l)) * (t / t_1)) ^ 2.0; else tmp = log((exp((l ^ 2.0)) ^ (2.0 / (t * (k ^ 4.0))))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[k, 1.85e-166], N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t$95$1 * N[(N[(k / t), $MachinePrecision] * N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[k, 1.3e+150], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.5e+201], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Log[N[Power[N[Exp[N[Power[l, 2.0], $MachinePrecision]], $MachinePrecision], N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\sin k \cdot \tan k}\\
\mathbf{if}\;k \leq 1.85 \cdot 10^{-166}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{t\_1 \cdot \left(\frac{k}{t} \cdot {t}^{1.5}\right)}\right)}^{2}\\
\mathbf{elif}\;k \leq 1.3 \cdot 10^{+150}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{elif}\;k \leq 3.5 \cdot 10^{+201}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt{2}}{k}}{\frac{{t}^{1.5}}{\ell}} \cdot \frac{t}{t\_1}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\log \left({\left(e^{{\ell}^{2}}\right)}^{\left(\frac{2}{t \cdot {k}^{4}}\right)}\right)\\
\end{array}
\end{array}
if k < 1.8500000000000001e-166Initial program 38.8%
Simplified40.3%
add-sqr-sqrt25.7%
pow225.7%
Applied egg-rr28.3%
associate-*l*28.2%
Simplified28.2%
if 1.8500000000000001e-166 < k < 1.30000000000000003e150Initial program 23.1%
*-commutative23.1%
associate-/r*23.2%
Simplified31.5%
+-rgt-identity31.5%
associate-/l/31.5%
div-inv31.5%
*-commutative31.5%
associate-*l/31.4%
associate-/l*31.4%
pow231.4%
Applied egg-rr31.4%
associate-*r/31.4%
metadata-eval31.4%
*-commutative31.4%
*-commutative31.4%
associate-/r/31.5%
associate-/l*31.5%
associate-*l*31.5%
Simplified31.5%
Taylor expanded in k around inf 77.9%
times-frac82.6%
Simplified82.6%
if 1.30000000000000003e150 < k < 3.5000000000000002e201Initial program 25.0%
*-commutative25.0%
associate-/r*25.0%
Simplified50.0%
add-sqr-sqrt50.0%
Applied egg-rr25.0%
unpow225.0%
associate-/r/25.0%
times-frac25.0%
Simplified25.0%
if 3.5000000000000002e201 < k Initial program 50.0%
Simplified53.4%
Taylor expanded in k around 0 69.2%
add-log-exp69.2%
*-commutative69.2%
exp-prod73.6%
pow273.6%
*-commutative73.6%
Applied egg-rr73.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (sin k) (tan k))))
(if (<= k 1.9e-166)
(pow (* l (/ (sqrt 2.0) (* (sqrt t_1) (* (/ k t) (pow t 1.5))))) 2.0)
(if (<= k 4e+154)
(/
2.0
(* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k)))))
(if (<= k 2.4e+203)
(/ (/ 2.0 (pow (/ k t) 2.0)) (* t_1 (* (/ (pow t 2.0) l) (/ t l))))
(log (pow (exp (pow l 2.0)) (/ 2.0 (* t (pow k 4.0))))))))))
double code(double t, double l, double k) {
double t_1 = sin(k) * tan(k);
double tmp;
if (k <= 1.9e-166) {
tmp = pow((l * (sqrt(2.0) / (sqrt(t_1) * ((k / t) * pow(t, 1.5))))), 2.0);
} else if (k <= 4e+154) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
} else if (k <= 2.4e+203) {
tmp = (2.0 / pow((k / t), 2.0)) / (t_1 * ((pow(t, 2.0) / l) * (t / l)));
} else {
tmp = log(pow(exp(pow(l, 2.0)), (2.0 / (t * pow(k, 4.0)))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) * tan(k)
if (k <= 1.9d-166) then
tmp = (l * (sqrt(2.0d0) / (sqrt(t_1) * ((k / t) * (t ** 1.5d0))))) ** 2.0d0
else if (k <= 4d+154) then
tmp = 2.0d0 / (sin(k) * (((k ** 2.0d0) / (l ** 2.0d0)) * ((t * sin(k)) / cos(k))))
else if (k <= 2.4d+203) then
tmp = (2.0d0 / ((k / t) ** 2.0d0)) / (t_1 * (((t ** 2.0d0) / l) * (t / l)))
else
tmp = log((exp((l ** 2.0d0)) ** (2.0d0 / (t * (k ** 4.0d0)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.sin(k) * Math.tan(k);
double tmp;
if (k <= 1.9e-166) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (Math.sqrt(t_1) * ((k / t) * Math.pow(t, 1.5))))), 2.0);
} else if (k <= 4e+154) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
} else if (k <= 2.4e+203) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / (t_1 * ((Math.pow(t, 2.0) / l) * (t / l)));
} else {
tmp = Math.log(Math.pow(Math.exp(Math.pow(l, 2.0)), (2.0 / (t * Math.pow(k, 4.0)))));
}
return tmp;
}
def code(t, l, k): t_1 = math.sin(k) * math.tan(k) tmp = 0 if k <= 1.9e-166: tmp = math.pow((l * (math.sqrt(2.0) / (math.sqrt(t_1) * ((k / t) * math.pow(t, 1.5))))), 2.0) elif k <= 4e+154: tmp = 2.0 / (math.sin(k) * ((math.pow(k, 2.0) / math.pow(l, 2.0)) * ((t * math.sin(k)) / math.cos(k)))) elif k <= 2.4e+203: tmp = (2.0 / math.pow((k / t), 2.0)) / (t_1 * ((math.pow(t, 2.0) / l) * (t / l))) else: tmp = math.log(math.pow(math.exp(math.pow(l, 2.0)), (2.0 / (t * math.pow(k, 4.0))))) return tmp
function code(t, l, k) t_1 = Float64(sin(k) * tan(k)) tmp = 0.0 if (k <= 1.9e-166) tmp = Float64(l * Float64(sqrt(2.0) / Float64(sqrt(t_1) * Float64(Float64(k / t) * (t ^ 1.5))))) ^ 2.0; elseif (k <= 4e+154) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))); elseif (k <= 2.4e+203) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64(t_1 * Float64(Float64((t ^ 2.0) / l) * Float64(t / l)))); else tmp = log((exp((l ^ 2.0)) ^ Float64(2.0 / Float64(t * (k ^ 4.0))))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) * tan(k); tmp = 0.0; if (k <= 1.9e-166) tmp = (l * (sqrt(2.0) / (sqrt(t_1) * ((k / t) * (t ^ 1.5))))) ^ 2.0; elseif (k <= 4e+154) tmp = 2.0 / (sin(k) * (((k ^ 2.0) / (l ^ 2.0)) * ((t * sin(k)) / cos(k)))); elseif (k <= 2.4e+203) tmp = (2.0 / ((k / t) ^ 2.0)) / (t_1 * (((t ^ 2.0) / l) * (t / l))); else tmp = log((exp((l ^ 2.0)) ^ (2.0 / (t * (k ^ 4.0))))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.9e-166], N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[(k / t), $MachinePrecision] * N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[k, 4e+154], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.4e+203], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[Power[N[Exp[N[Power[l, 2.0], $MachinePrecision]], $MachinePrecision], N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin k \cdot \tan k\\
\mathbf{if}\;k \leq 1.9 \cdot 10^{-166}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{\sqrt{t\_1} \cdot \left(\frac{k}{t} \cdot {t}^{1.5}\right)}\right)}^{2}\\
\mathbf{elif}\;k \leq 4 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}\\
\mathbf{elif}\;k \leq 2.4 \cdot 10^{+203}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{t\_1 \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\log \left({\left(e^{{\ell}^{2}}\right)}^{\left(\frac{2}{t \cdot {k}^{4}}\right)}\right)\\
\end{array}
\end{array}
if k < 1.89999999999999991e-166Initial program 38.8%
Simplified40.3%
add-sqr-sqrt25.7%
pow225.7%
Applied egg-rr28.3%
associate-*l*28.2%
Simplified28.2%
if 1.89999999999999991e-166 < k < 4.00000000000000015e154Initial program 23.1%
*-commutative23.1%
associate-/r*23.2%
Simplified31.5%
+-rgt-identity31.5%
associate-/l/31.5%
div-inv31.5%
*-commutative31.5%
associate-*l/31.4%
associate-/l*31.4%
pow231.4%
Applied egg-rr31.4%
associate-*r/31.4%
metadata-eval31.4%
*-commutative31.4%
*-commutative31.4%
associate-/r/31.5%
associate-/l*31.5%
associate-*l*31.5%
Simplified31.5%
Taylor expanded in k around inf 77.9%
times-frac82.6%
Simplified82.6%
if 4.00000000000000015e154 < k < 2.4000000000000001e203Initial program 20.0%
*-commutative20.0%
associate-/r*20.0%
Simplified40.0%
unpow340.0%
times-frac79.5%
pow279.5%
Applied egg-rr79.5%
if 2.4000000000000001e203 < k Initial program 52.0%
Simplified55.6%
Taylor expanded in k around 0 71.9%
add-log-exp71.9%
*-commutative71.9%
exp-prod76.4%
pow276.4%
*-commutative76.4%
Applied egg-rr76.4%
Final simplification46.9%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (sin k) (* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (sin k)) (cos k))))))
double code(double t, double l, double k) {
return 2.0 / (sin(k) * ((pow(k, 2.0) / pow(l, 2.0)) * ((t * sin(k)) / cos(k))));
}
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 / (sin(k) * (((k ** 2.0d0) / (l ** 2.0d0)) * ((t * sin(k)) / cos(k))))
end function
public static double code(double t, double l, double k) {
return 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.sin(k)) / Math.cos(k))));
}
def code(t, l, k): return 2.0 / (math.sin(k) * ((math.pow(k, 2.0) / math.pow(l, 2.0)) * ((t * math.sin(k)) / math.cos(k))))
function code(t, l, k) return Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * sin(k)) / cos(k))))) end
function tmp = code(t, l, k) tmp = 2.0 / (sin(k) * (((k ^ 2.0) / (l ^ 2.0)) * ((t * sin(k)) / cos(k)))); end
code[t_, l_, k_] := N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\sin k \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}\right)}
\end{array}
Initial program 36.0%
*-commutative36.0%
associate-/r*36.0%
Simplified39.7%
+-rgt-identity39.7%
associate-/l/39.7%
div-inv39.7%
*-commutative39.7%
associate-*l/39.9%
associate-/l*39.9%
pow239.9%
Applied egg-rr39.9%
associate-*r/39.9%
metadata-eval39.9%
*-commutative39.9%
*-commutative39.9%
associate-/r/39.8%
associate-/l*39.8%
associate-*l*39.8%
Simplified39.8%
Taylor expanded in k around inf 70.2%
times-frac72.4%
Simplified72.4%
(FPCore (t l k) :precision binary64 (* (/ (pow l 2.0) (pow k 2.0)) (* (/ (cos k) t) (/ 2.0 (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
return (pow(l, 2.0) / pow(k, 2.0)) * ((cos(k) / t) * (2.0 / pow(sin(k), 2.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((l ** 2.0d0) / (k ** 2.0d0)) * ((cos(k) / t) * (2.0d0 / (sin(k) ** 2.0d0)))
end function
public static double code(double t, double l, double k) {
return (Math.pow(l, 2.0) / Math.pow(k, 2.0)) * ((Math.cos(k) / t) * (2.0 / Math.pow(Math.sin(k), 2.0)));
}
def code(t, l, k): return (math.pow(l, 2.0) / math.pow(k, 2.0)) * ((math.cos(k) / t) * (2.0 / math.pow(math.sin(k), 2.0)))
function code(t, l, k) return Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(Float64(cos(k) / t) * Float64(2.0 / (sin(k) ^ 2.0)))) end
function tmp = code(t, l, k) tmp = ((l ^ 2.0) / (k ^ 2.0)) * ((cos(k) / t) * (2.0 / (sin(k) ^ 2.0))); end
code[t_, l_, k_] := N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] * N[(2.0 / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{{\ell}^{2}}{{k}^{2}} \cdot \left(\frac{\cos k}{t} \cdot \frac{2}{{\sin k}^{2}}\right)
\end{array}
Initial program 36.0%
*-commutative36.0%
associate-/r*36.0%
Simplified39.7%
add-sqr-sqrt39.7%
add-cube-cbrt39.6%
times-frac39.6%
Applied egg-rr79.6%
associate-/r/79.6%
associate-/r*79.6%
associate-/r/79.6%
Simplified79.6%
associate-/l*79.7%
div-inv79.7%
pow-flip79.7%
metadata-eval79.7%
Applied egg-rr79.7%
associate-*l/79.7%
associate-/r*79.7%
*-inverses79.7%
associate-*r/79.7%
Simplified79.7%
Taylor expanded in k around inf 70.1%
times-frac71.6%
*-commutative71.6%
unpow271.6%
rem-square-sqrt71.7%
rem-cube-cbrt71.5%
rem-cube-cbrt71.7%
*-commutative71.7%
times-frac71.7%
Simplified71.7%
(FPCore (t l k) :precision binary64 (* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
return (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 2.0))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0))))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
def code(t, l, k): return (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0))))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)
\end{array}
Initial program 36.0%
Simplified39.3%
Taylor expanded in t around 0 70.2%
associate-/r*70.4%
Simplified70.4%
Final simplification70.4%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* t (pow k 2.0)) (* (sin k) (/ (tan k) (pow l 2.0))))))
double code(double t, double l, double k) {
return 2.0 / ((t * pow(k, 2.0)) * (sin(k) * (tan(k) / pow(l, 2.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 * (k ** 2.0d0)) * (sin(k) * (tan(k) / (l ** 2.0d0))))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((t * Math.pow(k, 2.0)) * (Math.sin(k) * (Math.tan(k) / Math.pow(l, 2.0))));
}
def code(t, l, k): return 2.0 / ((t * math.pow(k, 2.0)) * (math.sin(k) * (math.tan(k) / math.pow(l, 2.0))))
function code(t, l, k) return Float64(2.0 / Float64(Float64(t * (k ^ 2.0)) * Float64(sin(k) * Float64(tan(k) / (l ^ 2.0))))) end
function tmp = code(t, l, k) tmp = 2.0 / ((t * (k ^ 2.0)) * (sin(k) * (tan(k) / (l ^ 2.0)))); end
code[t_, l_, k_] := N[(2.0 / N[(N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(t \cdot {k}^{2}\right) \cdot \left(\sin k \cdot \frac{\tan k}{{\ell}^{2}}\right)}
\end{array}
Initial program 36.0%
*-commutative36.0%
associate-/r*36.0%
Simplified39.7%
+-rgt-identity39.7%
associate-/l/39.7%
div-inv39.7%
*-commutative39.7%
associate-*l/39.9%
associate-/l*39.9%
pow239.9%
Applied egg-rr39.9%
associate-*r/39.9%
metadata-eval39.9%
associate-*r*39.6%
associate-/l*39.6%
Simplified39.6%
Taylor expanded in k around 0 70.2%
Final simplification70.2%
(FPCore (t l k)
:precision binary64
(if (<= k 5.2e+45)
(*
(* l l)
(/
(+ (* -0.3333333333333333 (/ (pow k 2.0) t)) (* 2.0 (/ 1.0 t)))
(pow k 4.0)))
(if (<= k 2.1e+166)
(pow
(pow (* (pow l 2.0) (/ -0.11666666666666667 t)) 3.0)
0.3333333333333333)
(* (* l l) (/ 2.0 (* t (pow k 4.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e+45) {
tmp = (l * l) * (((-0.3333333333333333 * (pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / pow(k, 4.0));
} else if (k <= 2.1e+166) {
tmp = pow(pow((pow(l, 2.0) * (-0.11666666666666667 / t)), 3.0), 0.3333333333333333);
} else {
tmp = (l * l) * (2.0 / (t * pow(k, 4.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5.2d+45) then
tmp = (l * l) * ((((-0.3333333333333333d0) * ((k ** 2.0d0) / t)) + (2.0d0 * (1.0d0 / t))) / (k ** 4.0d0))
else if (k <= 2.1d+166) then
tmp = (((l ** 2.0d0) * ((-0.11666666666666667d0) / t)) ** 3.0d0) ** 0.3333333333333333d0
else
tmp = (l * l) * (2.0d0 / (t * (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e+45) {
tmp = (l * l) * (((-0.3333333333333333 * (Math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / Math.pow(k, 4.0));
} else if (k <= 2.1e+166) {
tmp = Math.pow(Math.pow((Math.pow(l, 2.0) * (-0.11666666666666667 / t)), 3.0), 0.3333333333333333);
} else {
tmp = (l * l) * (2.0 / (t * Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5.2e+45: tmp = (l * l) * (((-0.3333333333333333 * (math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / math.pow(k, 4.0)) elif k <= 2.1e+166: tmp = math.pow(math.pow((math.pow(l, 2.0) * (-0.11666666666666667 / t)), 3.0), 0.3333333333333333) else: tmp = (l * l) * (2.0 / (t * math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5.2e+45) tmp = Float64(Float64(l * l) * Float64(Float64(Float64(-0.3333333333333333 * Float64((k ^ 2.0) / t)) + Float64(2.0 * Float64(1.0 / t))) / (k ^ 4.0))); elseif (k <= 2.1e+166) tmp = (Float64((l ^ 2.0) * Float64(-0.11666666666666667 / t)) ^ 3.0) ^ 0.3333333333333333; else tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(t * (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.2e+45) tmp = (l * l) * (((-0.3333333333333333 * ((k ^ 2.0) / t)) + (2.0 * (1.0 / t))) / (k ^ 4.0)); elseif (k <= 2.1e+166) tmp = (((l ^ 2.0) * (-0.11666666666666667 / t)) ^ 3.0) ^ 0.3333333333333333; else tmp = (l * l) * (2.0 / (t * (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5.2e+45], N[(N[(l * l), $MachinePrecision] * N[(N[(N[(-0.3333333333333333 * N[(N[Power[k, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.1e+166], N[Power[N[Power[N[(N[Power[l, 2.0], $MachinePrecision] * N[(-0.11666666666666667 / t), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.2 \cdot 10^{+45}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333 \cdot \frac{{k}^{2}}{t} + 2 \cdot \frac{1}{t}}{{k}^{4}}\\
\mathbf{elif}\;k \leq 2.1 \cdot 10^{+166}:\\
\;\;\;\;{\left({\left({\ell}^{2} \cdot \frac{-0.11666666666666667}{t}\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 5.20000000000000014e45Initial program 35.5%
Simplified37.6%
Taylor expanded in k around 0 48.7%
if 5.20000000000000014e45 < k < 2.1000000000000001e166Initial program 22.1%
Simplified39.5%
Taylor expanded in k around 0 28.0%
Taylor expanded in k around inf 62.7%
add-cbrt-cube73.0%
pow1/361.5%
pow361.5%
pow261.5%
Applied egg-rr61.5%
if 2.1000000000000001e166 < k Initial program 48.3%
Simplified51.4%
Taylor expanded in k around 0 65.5%
Final simplification51.5%
(FPCore (t l k) :precision binary64 (* (* l l) (* (/ 2.0 t) (/ (cos k) (pow (* k (sin k)) 2.0)))))
double code(double t, double l, double k) {
return (l * l) * ((2.0 / t) * (cos(k) / pow((k * sin(k)), 2.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * ((2.0d0 / t) * (cos(k) / ((k * sin(k)) ** 2.0d0)))
end function
public static double code(double t, double l, double k) {
return (l * l) * ((2.0 / t) * (Math.cos(k) / Math.pow((k * Math.sin(k)), 2.0)));
}
def code(t, l, k): return (l * l) * ((2.0 / t) * (math.cos(k) / math.pow((k * math.sin(k)), 2.0)))
function code(t, l, k) return Float64(Float64(l * l) * Float64(Float64(2.0 / t) * Float64(cos(k) / (Float64(k * sin(k)) ^ 2.0)))) end
function tmp = code(t, l, k) tmp = (l * l) * ((2.0 / t) * (cos(k) / ((k * sin(k)) ^ 2.0))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{t} \cdot \frac{\cos k}{{\left(k \cdot \sin k\right)}^{2}}\right)
\end{array}
Initial program 36.0%
Simplified39.3%
Taylor expanded in t around 0 70.2%
*-commutative70.2%
*-commutative70.2%
associate-*l*70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in k around inf 70.2%
associate-*r/70.2%
*-commutative70.2%
associate-*l*69.3%
unpow269.3%
unpow269.3%
swap-sqr69.3%
unpow269.3%
*-commutative69.3%
*-commutative69.3%
times-frac69.5%
*-commutative69.5%
Simplified69.5%
Final simplification69.5%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (sin k) (/ (* t (pow k 3.0)) (pow l 2.0)))))
double code(double t, double l, double k) {
return 2.0 / (sin(k) * ((t * pow(k, 3.0)) / pow(l, 2.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 / (sin(k) * ((t * (k ** 3.0d0)) / (l ** 2.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 / (Math.sin(k) * ((t * Math.pow(k, 3.0)) / Math.pow(l, 2.0)));
}
def code(t, l, k): return 2.0 / (math.sin(k) * ((t * math.pow(k, 3.0)) / math.pow(l, 2.0)))
function code(t, l, k) return Float64(2.0 / Float64(sin(k) * Float64(Float64(t * (k ^ 3.0)) / (l ^ 2.0)))) end
function tmp = code(t, l, k) tmp = 2.0 / (sin(k) * ((t * (k ^ 3.0)) / (l ^ 2.0))); end
code[t_, l_, k_] := N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(t * N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\sin k \cdot \frac{t \cdot {k}^{3}}{{\ell}^{2}}}
\end{array}
Initial program 36.0%
*-commutative36.0%
associate-/r*36.0%
Simplified39.7%
+-rgt-identity39.7%
associate-/l/39.7%
div-inv39.7%
*-commutative39.7%
associate-*l/39.9%
associate-/l*39.9%
pow239.9%
Applied egg-rr39.9%
associate-*r/39.9%
metadata-eval39.9%
*-commutative39.9%
*-commutative39.9%
associate-/r/39.8%
associate-/l*39.8%
associate-*l*39.8%
Simplified39.8%
Taylor expanded in k around 0 62.1%
Final simplification62.1%
(FPCore (t l k)
:precision binary64
(if (<= k 5.2e+45)
(*
(* l l)
(/
(+ (* -0.3333333333333333 (/ (pow k 2.0) t)) (* 2.0 (/ 1.0 t)))
(pow k 4.0)))
(/ 2.0 (* t (/ (pow k 4.0) (pow l 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e+45) {
tmp = (l * l) * (((-0.3333333333333333 * (pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / pow(k, 4.0));
} else {
tmp = 2.0 / (t * (pow(k, 4.0) / pow(l, 2.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5.2d+45) then
tmp = (l * l) * ((((-0.3333333333333333d0) * ((k ** 2.0d0) / t)) + (2.0d0 * (1.0d0 / t))) / (k ** 4.0d0))
else
tmp = 2.0d0 / (t * ((k ** 4.0d0) / (l ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e+45) {
tmp = (l * l) * (((-0.3333333333333333 * (Math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / Math.pow(k, 4.0));
} else {
tmp = 2.0 / (t * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5.2e+45: tmp = (l * l) * (((-0.3333333333333333 * (math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / math.pow(k, 4.0)) else: tmp = 2.0 / (t * (math.pow(k, 4.0) / math.pow(l, 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5.2e+45) tmp = Float64(Float64(l * l) * Float64(Float64(Float64(-0.3333333333333333 * Float64((k ^ 2.0) / t)) + Float64(2.0 * Float64(1.0 / t))) / (k ^ 4.0))); else tmp = Float64(2.0 / Float64(t * Float64((k ^ 4.0) / (l ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.2e+45) tmp = (l * l) * (((-0.3333333333333333 * ((k ^ 2.0) / t)) + (2.0 * (1.0 / t))) / (k ^ 4.0)); else tmp = 2.0 / (t * ((k ^ 4.0) / (l ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5.2e+45], N[(N[(l * l), $MachinePrecision] * N[(N[(N[(-0.3333333333333333 * N[(N[Power[k, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.2 \cdot 10^{+45}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333 \cdot \frac{{k}^{2}}{t} + 2 \cdot \frac{1}{t}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if k < 5.20000000000000014e45Initial program 35.5%
Simplified37.6%
Taylor expanded in k around 0 48.7%
if 5.20000000000000014e45 < k Initial program 38.3%
*-commutative38.3%
associate-/r*38.3%
Simplified46.9%
+-rgt-identity46.9%
associate-/l/46.8%
div-inv46.8%
*-commutative46.8%
associate-*l/46.8%
associate-/l*46.8%
pow246.8%
Applied egg-rr46.8%
associate-*r/46.8%
metadata-eval46.8%
*-commutative46.8%
*-commutative46.8%
associate-/r/46.8%
associate-/l*46.8%
associate-*l*46.8%
Simplified46.8%
Taylor expanded in k around 0 64.0%
*-commutative64.0%
associate-/l*64.0%
Simplified64.0%
Final simplification51.5%
(FPCore (t l k) :precision binary64 (/ 2.0 (* t (/ (pow k 4.0) (pow l 2.0)))))
double code(double t, double l, double k) {
return 2.0 / (t * (pow(k, 4.0) / pow(l, 2.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 * ((k ** 4.0d0) / (l ** 2.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 / (t * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
}
def code(t, l, k): return 2.0 / (t * (math.pow(k, 4.0) / math.pow(l, 2.0)))
function code(t, l, k) return Float64(2.0 / Float64(t * Float64((k ^ 4.0) / (l ^ 2.0)))) end
function tmp = code(t, l, k) tmp = 2.0 / (t * ((k ^ 4.0) / (l ^ 2.0))); end
code[t_, l_, k_] := N[(2.0 / N[(t * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{t \cdot \frac{{k}^{4}}{{\ell}^{2}}}
\end{array}
Initial program 36.0%
*-commutative36.0%
associate-/r*36.0%
Simplified39.7%
+-rgt-identity39.7%
associate-/l/39.7%
div-inv39.7%
*-commutative39.7%
associate-*l/39.9%
associate-/l*39.9%
pow239.9%
Applied egg-rr39.9%
associate-*r/39.9%
metadata-eval39.9%
*-commutative39.9%
*-commutative39.9%
associate-/r/39.8%
associate-/l*39.8%
associate-*l*39.8%
Simplified39.8%
Taylor expanded in k around 0 60.0%
*-commutative60.0%
associate-/l*60.2%
Simplified60.2%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (pow l 2.0) (* t (pow k 4.0)))))
double code(double t, double l, double k) {
return 2.0 * (pow(l, 2.0) / (t * pow(k, 4.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 * ((l ** 2.0d0) / (t * (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 * (Math.pow(l, 2.0) / (t * Math.pow(k, 4.0)));
}
def code(t, l, k): return 2.0 * (math.pow(l, 2.0) / (t * math.pow(k, 4.0)))
function code(t, l, k) return Float64(2.0 * Float64((l ^ 2.0) / Float64(t * (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l ^ 2.0) / (t * (k ^ 4.0))); end
code[t_, l_, k_] := N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}}
\end{array}
Initial program 36.0%
Simplified39.3%
Taylor expanded in k around 0 60.0%
Final simplification60.0%
(FPCore (t l k) :precision binary64 (* (* l l) (/ (* 2.0 (pow k -4.0)) t)))
double code(double t, double l, double k) {
return (l * l) * ((2.0 * pow(k, -4.0)) / t);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * ((2.0d0 * (k ** (-4.0d0))) / t)
end function
public static double code(double t, double l, double k) {
return (l * l) * ((2.0 * Math.pow(k, -4.0)) / t);
}
def code(t, l, k): return (l * l) * ((2.0 * math.pow(k, -4.0)) / t)
function code(t, l, k) return Float64(Float64(l * l) * Float64(Float64(2.0 * (k ^ -4.0)) / t)) end
function tmp = code(t, l, k) tmp = (l * l) * ((2.0 * (k ^ -4.0)) / t); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot {k}^{-4}}{t}
\end{array}
Initial program 36.0%
Simplified39.3%
Taylor expanded in t around 0 70.2%
*-commutative70.2%
*-commutative70.2%
associate-*l*70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in k around 0 60.0%
*-commutative60.0%
associate-/r*60.0%
Simplified60.0%
*-un-lft-identity60.0%
div-inv60.0%
div-inv60.0%
div-inv60.0%
pow-flip60.0%
metadata-eval60.0%
Applied egg-rr60.0%
*-lft-identity60.0%
associate-*l/60.0%
Simplified60.0%
Final simplification60.0%
(FPCore (t l k) :precision binary64 (* (* l l) (/ 2.0 (* t (pow k 4.0)))))
double code(double t, double l, double k) {
return (l * l) * (2.0 / (t * pow(k, 4.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * (2.0d0 / (t * (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 / (t * Math.pow(k, 4.0)));
}
def code(t, l, k): return (l * l) * (2.0 / (t * math.pow(k, 4.0)))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 / Float64(t * (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 / (t * (k ^ 4.0))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {k}^{4}}
\end{array}
Initial program 36.0%
Simplified39.3%
Taylor expanded in k around 0 60.0%
Final simplification60.0%
(FPCore (t l k) :precision binary64 (* (* l l) (/ -0.11666666666666667 t)))
double code(double t, double l, double k) {
return (l * l) * (-0.11666666666666667 / t);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * ((-0.11666666666666667d0) / t)
end function
public static double code(double t, double l, double k) {
return (l * l) * (-0.11666666666666667 / t);
}
def code(t, l, k): return (l * l) * (-0.11666666666666667 / t)
function code(t, l, k) return Float64(Float64(l * l) * Float64(-0.11666666666666667 / t)) end
function tmp = code(t, l, k) tmp = (l * l) * (-0.11666666666666667 / t); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(-0.11666666666666667 / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{-0.11666666666666667}{t}
\end{array}
Initial program 36.0%
Simplified39.3%
Taylor expanded in k around 0 40.3%
Taylor expanded in k around inf 22.1%
Final simplification22.1%
herbie shell --seed 2024090
(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))))