
(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 (* t_3 (/ t (pow (* t (* t_1 t_2)) 2.0)))))
(if (<= (* l l) 5e-309)
(* t_4 (/ (/ t_3 t_1) t_2))
(if (<= (* l l) 5e+255)
(*
(/ (* (pow l 2.0) (cos k)) (pow k 2.0))
(/ 2.0 (* t (pow (sin k) 2.0))))
(* t_4 (/ 1.0 (/ (/ t_2 t_3) (pow (cbrt l) 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 = t_3 * (t / pow((t * (t_1 * t_2)), 2.0));
double tmp;
if ((l * l) <= 5e-309) {
tmp = t_4 * ((t_3 / t_1) / t_2);
} else if ((l * l) <= 5e+255) {
tmp = ((pow(l, 2.0) * cos(k)) / pow(k, 2.0)) * (2.0 / (t * pow(sin(k), 2.0)));
} else {
tmp = t_4 * (1.0 / ((t_2 / t_3) / pow(cbrt(l), 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 = t_3 * (t / Math.pow((t * (t_1 * t_2)), 2.0));
double tmp;
if ((l * l) <= 5e-309) {
tmp = t_4 * ((t_3 / t_1) / t_2);
} else if ((l * l) <= 5e+255) {
tmp = ((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(k, 2.0)) * (2.0 / (t * Math.pow(Math.sin(k), 2.0)));
} else {
tmp = t_4 * (1.0 / ((t_2 / t_3) / Math.pow(Math.cbrt(l), 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(t_3 * Float64(t / (Float64(t * Float64(t_1 * t_2)) ^ 2.0))) tmp = 0.0 if (Float64(l * l) <= 5e-309) tmp = Float64(t_4 * Float64(Float64(t_3 / t_1) / t_2)); elseif (Float64(l * l) <= 5e+255) tmp = Float64(Float64(Float64((l ^ 2.0) * cos(k)) / (k ^ 2.0)) * Float64(2.0 / Float64(t * (sin(k) ^ 2.0)))); else tmp = Float64(t_4 * Float64(1.0 / Float64(Float64(t_2 / t_3) / (cbrt(l) ^ 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[(t$95$3 * N[(t / N[Power[N[(t * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-309], N[(t$95$4 * N[(N[(t$95$3 / t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+255], N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(1.0 / N[(N[(t$95$2 / t$95$3), $MachinePrecision] / N[Power[N[Power[l, 1/3], $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 := t\_3 \cdot \frac{t}{{\left(t \cdot \left(t\_1 \cdot t\_2\right)\right)}^{2}}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-309}:\\
\;\;\;\;t\_4 \cdot \frac{\frac{t\_3}{t\_1}}{t\_2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+255}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \cos k}{{k}^{2}} \cdot \frac{2}{t \cdot {\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \frac{1}{\frac{\frac{t\_2}{t\_3}}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.9999999999999995e-309Initial program 19.8%
*-commutative19.8%
associate-/r*19.8%
Simplified35.4%
add-sqr-sqrt35.4%
add-cube-cbrt35.4%
times-frac35.4%
Applied egg-rr76.5%
associate-/r/76.5%
associate-/r*76.4%
associate-/r/76.5%
Simplified76.5%
frac-times72.6%
div-inv72.6%
pow-flip72.6%
metadata-eval72.6%
div-inv72.7%
pow-flip72.7%
metadata-eval72.7%
Applied egg-rr72.7%
times-frac76.5%
associate-*r/76.5%
associate-*l*76.4%
associate-/r*76.5%
times-frac79.2%
Simplified79.2%
associate-*r/79.2%
Applied egg-rr79.2%
associate-/l*79.2%
associate-/l/79.2%
Applied egg-rr79.2%
associate-*r/79.2%
associate-*l/79.2%
associate-/l/76.4%
associate-/r*83.6%
associate-/l/85.2%
*-commutative85.2%
times-frac86.4%
*-inverses86.4%
*-rgt-identity86.4%
Simplified86.4%
if 4.9999999999999995e-309 < (*.f64 l l) < 5.0000000000000002e255Initial program 37.1%
*-commutative37.1%
associate-/r*37.1%
Simplified47.1%
add-sqr-sqrt47.1%
add-cube-cbrt47.0%
times-frac47.0%
Applied egg-rr81.6%
associate-/r/81.6%
associate-/r*81.6%
associate-/r/81.6%
Simplified81.6%
frac-times79.8%
div-inv79.8%
pow-flip79.9%
metadata-eval79.9%
div-inv79.9%
pow-flip79.9%
metadata-eval79.9%
Applied egg-rr79.9%
times-frac81.7%
associate-*r/81.7%
associate-*l*81.6%
associate-/r*81.6%
times-frac81.8%
Simplified81.8%
Taylor expanded in k around inf 91.7%
associate-*r*91.8%
unpow291.8%
rem-square-sqrt91.9%
times-frac93.4%
Simplified93.4%
if 5.0000000000000002e255 < (*.f64 l l) Initial program 31.9%
*-commutative31.9%
associate-/r*31.9%
Simplified33.2%
add-sqr-sqrt33.2%
add-cube-cbrt33.1%
times-frac33.1%
Applied egg-rr78.3%
associate-/r/78.3%
associate-/r*78.3%
associate-/r/78.4%
Simplified78.4%
frac-times74.4%
div-inv74.4%
pow-flip74.4%
metadata-eval74.4%
div-inv74.4%
pow-flip74.4%
metadata-eval74.4%
Applied egg-rr74.4%
times-frac78.3%
associate-*r/77.1%
associate-*l*77.2%
associate-/r*77.1%
times-frac79.5%
Simplified79.5%
associate-*r/79.5%
Applied egg-rr79.5%
clear-num79.5%
inv-pow79.5%
associate-*l/77.2%
metadata-eval77.2%
pow-flip77.2%
div-inv77.2%
associate-/r/77.2%
associate-*l/77.2%
Applied egg-rr77.2%
unpow-177.2%
associate-/r*77.2%
associate-/l/73.4%
*-commutative73.4%
times-frac80.7%
*-inverses80.7%
*-rgt-identity80.7%
Simplified80.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (cbrt (* (sin k) (tan k)))) (t_2 (/ (sqrt 2.0) k)))
(if (or (<= (* l l) 5e-309) (not (<= (* l l) 5e+255)))
(*
(* t_2 (/ t (pow (* t (* (pow (cbrt l) -2.0) t_1)) 2.0)))
(/ (* t_2 (pow (cbrt l) 2.0)) t_1))
(*
(/ (* (pow l 2.0) (cos k)) (pow k 2.0))
(/ 2.0 (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * tan(k)));
double t_2 = sqrt(2.0) / k;
double tmp;
if (((l * l) <= 5e-309) || !((l * l) <= 5e+255)) {
tmp = (t_2 * (t / pow((t * (pow(cbrt(l), -2.0) * t_1)), 2.0))) * ((t_2 * pow(cbrt(l), 2.0)) / t_1);
} else {
tmp = ((pow(l, 2.0) * cos(k)) / pow(k, 2.0)) * (2.0 / (t * pow(sin(k), 2.0)));
}
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 = Math.sqrt(2.0) / k;
double tmp;
if (((l * l) <= 5e-309) || !((l * l) <= 5e+255)) {
tmp = (t_2 * (t / Math.pow((t * (Math.pow(Math.cbrt(l), -2.0) * t_1)), 2.0))) * ((t_2 * Math.pow(Math.cbrt(l), 2.0)) / t_1);
} else {
tmp = ((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(k, 2.0)) * (2.0 / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(Float64(sin(k) * tan(k))) t_2 = Float64(sqrt(2.0) / k) tmp = 0.0 if ((Float64(l * l) <= 5e-309) || !(Float64(l * l) <= 5e+255)) tmp = Float64(Float64(t_2 * Float64(t / (Float64(t * Float64((cbrt(l) ^ -2.0) * t_1)) ^ 2.0))) * Float64(Float64(t_2 * (cbrt(l) ^ 2.0)) / t_1)); else tmp = Float64(Float64(Float64((l ^ 2.0) * cos(k)) / (k ^ 2.0)) * Float64(2.0 / Float64(t * (sin(k) ^ 2.0)))); 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[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, If[Or[LessEqual[N[(l * l), $MachinePrecision], 5e-309], N[Not[LessEqual[N[(l * l), $MachinePrecision], 5e+255]], $MachinePrecision]], N[(N[(t$95$2 * N[(t / N[Power[N[(t * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := \frac{\sqrt{2}}{k}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-309} \lor \neg \left(\ell \cdot \ell \leq 5 \cdot 10^{+255}\right):\\
\;\;\;\;\left(t\_2 \cdot \frac{t}{{\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot t\_1\right)\right)}^{2}}\right) \cdot \frac{t\_2 \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \cos k}{{k}^{2}} \cdot \frac{2}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.9999999999999995e-309 or 5.0000000000000002e255 < (*.f64 l l) Initial program 26.0%
*-commutative26.0%
associate-/r*26.0%
Simplified34.3%
add-sqr-sqrt34.2%
add-cube-cbrt34.2%
times-frac34.2%
Applied egg-rr77.4%
associate-/r/77.4%
associate-/r*77.4%
associate-/r/77.4%
Simplified77.4%
frac-times73.5%
div-inv73.5%
pow-flip73.5%
metadata-eval73.5%
div-inv73.6%
pow-flip73.5%
metadata-eval73.5%
Applied egg-rr73.5%
times-frac77.4%
associate-*r/76.8%
associate-*l*76.8%
associate-/r*76.8%
times-frac79.4%
Simplified79.4%
associate-*r/79.4%
Applied egg-rr79.4%
div-inv79.3%
associate-*l/76.8%
metadata-eval76.8%
pow-flip76.8%
div-inv76.8%
associate-/r/80.3%
associate-*l/80.3%
Applied egg-rr80.3%
*-commutative80.3%
associate-*l/80.3%
*-lft-identity80.3%
associate-/l/79.1%
*-commutative79.1%
times-frac83.4%
*-inverses83.4%
*-rgt-identity83.4%
Simplified83.4%
if 4.9999999999999995e-309 < (*.f64 l l) < 5.0000000000000002e255Initial program 37.1%
*-commutative37.1%
associate-/r*37.1%
Simplified47.1%
add-sqr-sqrt47.1%
add-cube-cbrt47.0%
times-frac47.0%
Applied egg-rr81.6%
associate-/r/81.6%
associate-/r*81.6%
associate-/r/81.6%
Simplified81.6%
frac-times79.8%
div-inv79.8%
pow-flip79.9%
metadata-eval79.9%
div-inv79.9%
pow-flip79.9%
metadata-eval79.9%
Applied egg-rr79.9%
times-frac81.7%
associate-*r/81.7%
associate-*l*81.6%
associate-/r*81.6%
times-frac81.8%
Simplified81.8%
Taylor expanded in k around inf 91.7%
associate-*r*91.8%
unpow291.8%
rem-square-sqrt91.9%
times-frac93.4%
Simplified93.4%
Final simplification87.7%
(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 (* t_3 (/ t (pow (* t (* t_1 t_2)) 2.0)))))
(if (<= (* l l) 5e-309)
(* t_4 (/ (/ t_3 t_1) t_2))
(if (<= (* l l) 5e+255)
(*
(/ (* (pow l 2.0) (cos k)) (pow k 2.0))
(/ 2.0 (* t (pow (sin k) 2.0))))
(* t_4 (/ (* t_3 (pow (cbrt l) 2.0)) t_2))))))
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 = t_3 * (t / pow((t * (t_1 * t_2)), 2.0));
double tmp;
if ((l * l) <= 5e-309) {
tmp = t_4 * ((t_3 / t_1) / t_2);
} else if ((l * l) <= 5e+255) {
tmp = ((pow(l, 2.0) * cos(k)) / pow(k, 2.0)) * (2.0 / (t * pow(sin(k), 2.0)));
} else {
tmp = t_4 * ((t_3 * pow(cbrt(l), 2.0)) / t_2);
}
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 = t_3 * (t / Math.pow((t * (t_1 * t_2)), 2.0));
double tmp;
if ((l * l) <= 5e-309) {
tmp = t_4 * ((t_3 / t_1) / t_2);
} else if ((l * l) <= 5e+255) {
tmp = ((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(k, 2.0)) * (2.0 / (t * Math.pow(Math.sin(k), 2.0)));
} else {
tmp = t_4 * ((t_3 * Math.pow(Math.cbrt(l), 2.0)) / t_2);
}
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(t_3 * Float64(t / (Float64(t * Float64(t_1 * t_2)) ^ 2.0))) tmp = 0.0 if (Float64(l * l) <= 5e-309) tmp = Float64(t_4 * Float64(Float64(t_3 / t_1) / t_2)); elseif (Float64(l * l) <= 5e+255) tmp = Float64(Float64(Float64((l ^ 2.0) * cos(k)) / (k ^ 2.0)) * Float64(2.0 / Float64(t * (sin(k) ^ 2.0)))); else tmp = Float64(t_4 * Float64(Float64(t_3 * (cbrt(l) ^ 2.0)) / t_2)); 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[(t$95$3 * N[(t / N[Power[N[(t * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-309], N[(t$95$4 * N[(N[(t$95$3 / t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+255], N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(N[(t$95$3 * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $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 := t\_3 \cdot \frac{t}{{\left(t \cdot \left(t\_1 \cdot t\_2\right)\right)}^{2}}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-309}:\\
\;\;\;\;t\_4 \cdot \frac{\frac{t\_3}{t\_1}}{t\_2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+255}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \cos k}{{k}^{2}} \cdot \frac{2}{t \cdot {\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \frac{t\_3 \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}{t\_2}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.9999999999999995e-309Initial program 19.8%
*-commutative19.8%
associate-/r*19.8%
Simplified35.4%
add-sqr-sqrt35.4%
add-cube-cbrt35.4%
times-frac35.4%
Applied egg-rr76.5%
associate-/r/76.5%
associate-/r*76.4%
associate-/r/76.5%
Simplified76.5%
frac-times72.6%
div-inv72.6%
pow-flip72.6%
metadata-eval72.6%
div-inv72.7%
pow-flip72.7%
metadata-eval72.7%
Applied egg-rr72.7%
times-frac76.5%
associate-*r/76.5%
associate-*l*76.4%
associate-/r*76.5%
times-frac79.2%
Simplified79.2%
associate-*r/79.2%
Applied egg-rr79.2%
associate-/l*79.2%
associate-/l/79.2%
Applied egg-rr79.2%
associate-*r/79.2%
associate-*l/79.2%
associate-/l/76.4%
associate-/r*83.6%
associate-/l/85.2%
*-commutative85.2%
times-frac86.4%
*-inverses86.4%
*-rgt-identity86.4%
Simplified86.4%
if 4.9999999999999995e-309 < (*.f64 l l) < 5.0000000000000002e255Initial program 37.1%
*-commutative37.1%
associate-/r*37.1%
Simplified47.1%
add-sqr-sqrt47.1%
add-cube-cbrt47.0%
times-frac47.0%
Applied egg-rr81.6%
associate-/r/81.6%
associate-/r*81.6%
associate-/r/81.6%
Simplified81.6%
frac-times79.8%
div-inv79.8%
pow-flip79.9%
metadata-eval79.9%
div-inv79.9%
pow-flip79.9%
metadata-eval79.9%
Applied egg-rr79.9%
times-frac81.7%
associate-*r/81.7%
associate-*l*81.6%
associate-/r*81.6%
times-frac81.8%
Simplified81.8%
Taylor expanded in k around inf 91.7%
associate-*r*91.8%
unpow291.8%
rem-square-sqrt91.9%
times-frac93.4%
Simplified93.4%
if 5.0000000000000002e255 < (*.f64 l l) Initial program 31.9%
*-commutative31.9%
associate-/r*31.9%
Simplified33.2%
add-sqr-sqrt33.2%
add-cube-cbrt33.1%
times-frac33.1%
Applied egg-rr78.3%
associate-/r/78.3%
associate-/r*78.3%
associate-/r/78.4%
Simplified78.4%
frac-times74.4%
div-inv74.4%
pow-flip74.4%
metadata-eval74.4%
div-inv74.4%
pow-flip74.4%
metadata-eval74.4%
Applied egg-rr74.4%
times-frac78.3%
associate-*r/77.1%
associate-*l*77.2%
associate-/r*77.1%
times-frac79.5%
Simplified79.5%
associate-*r/79.5%
Applied egg-rr79.5%
div-inv79.5%
associate-*l/77.2%
metadata-eval77.2%
pow-flip77.2%
div-inv77.2%
associate-/r/77.2%
associate-*l/77.2%
Applied egg-rr77.2%
*-commutative77.2%
associate-*l/77.2%
*-lft-identity77.2%
associate-/l/73.4%
*-commutative73.4%
times-frac80.7%
*-inverses80.7%
*-rgt-identity80.7%
Simplified80.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ (sqrt 2.0) k))
(t_2 (pow (cbrt l) 2.0))
(t_3 (cbrt (* (sin k) (tan k))))
(t_4 (* t (/ t_3 t_2))))
(if (<= l 4.8e-164)
(*
(sqrt 2.0)
(*
(/ t k)
(/
(/ (* t_1 t_2) (pow (cbrt k) 2.0))
(pow (* (pow (cbrt l) -2.0) (* t t_3)) 2.0))))
(if (<= l 1.55e+195)
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0)))))
(/ (/ (pow (* t_1 t) 2.0) t_4) (pow t_4 2.0))))))
double code(double t, double l, double k) {
double t_1 = sqrt(2.0) / k;
double t_2 = pow(cbrt(l), 2.0);
double t_3 = cbrt((sin(k) * tan(k)));
double t_4 = t * (t_3 / t_2);
double tmp;
if (l <= 4.8e-164) {
tmp = sqrt(2.0) * ((t / k) * (((t_1 * t_2) / pow(cbrt(k), 2.0)) / pow((pow(cbrt(l), -2.0) * (t * t_3)), 2.0)));
} else if (l <= 1.55e+195) {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 2.0))));
} else {
tmp = (pow((t_1 * t), 2.0) / t_4) / pow(t_4, 2.0);
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.sqrt(2.0) / k;
double t_2 = Math.pow(Math.cbrt(l), 2.0);
double t_3 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_4 = t * (t_3 / t_2);
double tmp;
if (l <= 4.8e-164) {
tmp = Math.sqrt(2.0) * ((t / k) * (((t_1 * t_2) / Math.pow(Math.cbrt(k), 2.0)) / Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t * t_3)), 2.0)));
} else if (l <= 1.55e+195) {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
} else {
tmp = (Math.pow((t_1 * t), 2.0) / t_4) / Math.pow(t_4, 2.0);
}
return tmp;
}
function code(t, l, k) t_1 = Float64(sqrt(2.0) / k) t_2 = cbrt(l) ^ 2.0 t_3 = cbrt(Float64(sin(k) * tan(k))) t_4 = Float64(t * Float64(t_3 / t_2)) tmp = 0.0 if (l <= 4.8e-164) tmp = Float64(sqrt(2.0) * Float64(Float64(t / k) * Float64(Float64(Float64(t_1 * t_2) / (cbrt(k) ^ 2.0)) / (Float64((cbrt(l) ^ -2.0) * Float64(t * t_3)) ^ 2.0)))); elseif (l <= 1.55e+195) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); else tmp = Float64(Float64((Float64(t_1 * t) ^ 2.0) / t_4) / (t_4 ^ 2.0)); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(t$95$3 / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.8e-164], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t / k), $MachinePrecision] * N[(N[(N[(t$95$1 * t$95$2), $MachinePrecision] / N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.55e+195], 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], N[(N[(N[Power[N[(t$95$1 * t), $MachinePrecision], 2.0], $MachinePrecision] / t$95$4), $MachinePrecision] / N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sqrt{2}}{k}\\
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_3 := \sqrt[3]{\sin k \cdot \tan k}\\
t_4 := t \cdot \frac{t\_3}{t\_2}\\
\mathbf{if}\;\ell \leq 4.8 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2} \cdot \left(\frac{t}{k} \cdot \frac{\frac{t\_1 \cdot t\_2}{{\left(\sqrt[3]{k}\right)}^{2}}}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t \cdot t\_3\right)\right)}^{2}}\right)\\
\mathbf{elif}\;\ell \leq 1.55 \cdot 10^{+195}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{\left(t\_1 \cdot t\right)}^{2}}{t\_4}}{{t\_4}^{2}}\\
\end{array}
\end{array}
if l < 4.79999999999999966e-164Initial program 28.5%
*-commutative28.5%
associate-/r*28.5%
Simplified39.8%
add-sqr-sqrt39.8%
add-cube-cbrt39.8%
times-frac39.8%
Applied egg-rr80.0%
associate-/r/80.1%
associate-/r*80.1%
associate-/r/80.1%
Simplified80.1%
Taylor expanded in k around 0 69.0%
frac-times66.9%
associate-*l/66.9%
associate-/r/66.9%
associate-*l/66.9%
Applied egg-rr67.5%
times-frac69.6%
associate-*l/67.4%
associate-/l*68.6%
associate-/l*68.6%
associate-*l*68.6%
Simplified71.6%
if 4.79999999999999966e-164 < l < 1.5500000000000001e195Initial program 37.7%
Simplified42.1%
Taylor expanded in t around 0 89.5%
associate-*r/89.5%
associate-*r*89.5%
Simplified89.5%
Taylor expanded in k around inf 89.5%
associate-/r*90.1%
Simplified90.1%
if 1.5500000000000001e195 < l Initial program 29.4%
*-commutative29.4%
associate-/r*29.4%
Simplified29.4%
add-sqr-sqrt29.4%
add-cube-cbrt29.4%
times-frac29.4%
Applied egg-rr78.6%
associate-*l/71.0%
associate-*r/58.5%
unpow258.5%
associate-/r/58.4%
associate-*l/58.4%
associate-/l*58.4%
associate-*l/58.5%
associate-/l*58.5%
Simplified58.5%
Final simplification74.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) 2.0))
(t_2 (cbrt (* (sin k) (tan k))))
(t_3 (* t_2 (/ t t_1))))
(if (<= l 4.8e-164)
(*
(sqrt 2.0)
(*
(/ t k)
(/
(/ (* (/ (sqrt 2.0) k) t_1) (pow (cbrt k) 2.0))
(pow (* (pow (cbrt l) -2.0) (* t t_2)) 2.0))))
(if (<= l 2.2e+195)
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0)))))
(* (/ 2.0 (pow t_3 2.0)) (/ (pow (/ k t) -2.0) t_3))))))
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 = t_2 * (t / t_1);
double tmp;
if (l <= 4.8e-164) {
tmp = sqrt(2.0) * ((t / k) * ((((sqrt(2.0) / k) * t_1) / pow(cbrt(k), 2.0)) / pow((pow(cbrt(l), -2.0) * (t * t_2)), 2.0)));
} else if (l <= 2.2e+195) {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 2.0))));
} else {
tmp = (2.0 / pow(t_3, 2.0)) * (pow((k / t), -2.0) / t_3);
}
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 = t_2 * (t / t_1);
double tmp;
if (l <= 4.8e-164) {
tmp = Math.sqrt(2.0) * ((t / k) * ((((Math.sqrt(2.0) / k) * t_1) / Math.pow(Math.cbrt(k), 2.0)) / Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t * t_2)), 2.0)));
} else if (l <= 2.2e+195) {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
} else {
tmp = (2.0 / Math.pow(t_3, 2.0)) * (Math.pow((k / t), -2.0) / t_3);
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ 2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) t_3 = Float64(t_2 * Float64(t / t_1)) tmp = 0.0 if (l <= 4.8e-164) tmp = Float64(sqrt(2.0) * Float64(Float64(t / k) * Float64(Float64(Float64(Float64(sqrt(2.0) / k) * t_1) / (cbrt(k) ^ 2.0)) / (Float64((cbrt(l) ^ -2.0) * Float64(t * t_2)) ^ 2.0)))); elseif (l <= 2.2e+195) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); else tmp = Float64(Float64(2.0 / (t_3 ^ 2.0)) * Float64((Float64(k / t) ^ -2.0) / t_3)); 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[(t$95$2 * N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.8e-164], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t / k), $MachinePrecision] * N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.2e+195], 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], N[(N[(2.0 / N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision] / t$95$3), $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 := t\_2 \cdot \frac{t}{t\_1}\\
\mathbf{if}\;\ell \leq 4.8 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2} \cdot \left(\frac{t}{k} \cdot \frac{\frac{\frac{\sqrt{2}}{k} \cdot t\_1}{{\left(\sqrt[3]{k}\right)}^{2}}}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t \cdot t\_2\right)\right)}^{2}}\right)\\
\mathbf{elif}\;\ell \leq 2.2 \cdot 10^{+195}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{t\_3}^{2}} \cdot \frac{{\left(\frac{k}{t}\right)}^{-2}}{t\_3}\\
\end{array}
\end{array}
if l < 4.79999999999999966e-164Initial program 28.5%
*-commutative28.5%
associate-/r*28.5%
Simplified39.8%
add-sqr-sqrt39.8%
add-cube-cbrt39.8%
times-frac39.8%
Applied egg-rr80.0%
associate-/r/80.1%
associate-/r*80.1%
associate-/r/80.1%
Simplified80.1%
Taylor expanded in k around 0 69.0%
frac-times66.9%
associate-*l/66.9%
associate-/r/66.9%
associate-*l/66.9%
Applied egg-rr67.5%
times-frac69.6%
associate-*l/67.4%
associate-/l*68.6%
associate-/l*68.6%
associate-*l*68.6%
Simplified71.6%
if 4.79999999999999966e-164 < l < 2.2e195Initial program 37.7%
Simplified42.1%
Taylor expanded in t around 0 89.5%
associate-*r/89.5%
associate-*r*89.5%
Simplified89.5%
Taylor expanded in k around inf 89.5%
associate-/r*90.1%
Simplified90.1%
if 2.2e195 < l Initial program 29.4%
*-commutative29.4%
associate-/r*29.4%
Simplified29.4%
add-cube-cbrt29.4%
div-inv29.4%
times-frac29.4%
Applied egg-rr58.5%
Final simplification74.7%
(FPCore (t l k)
:precision binary64
(if (<= l 4.8e-164)
(*
(sqrt 2.0)
(*
(/ t k)
(/
(/ (* (/ (sqrt 2.0) k) (pow (cbrt l) 2.0)) (pow (cbrt k) 2.0))
(pow (* (pow (cbrt l) -2.0) (* t (cbrt (* (sin k) (tan k))))) 2.0))))
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 4.8e-164) {
tmp = sqrt(2.0) * ((t / k) * ((((sqrt(2.0) / k) * pow(cbrt(l), 2.0)) / pow(cbrt(k), 2.0)) / pow((pow(cbrt(l), -2.0) * (t * cbrt((sin(k) * tan(k))))), 2.0)));
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if (l <= 4.8e-164) {
tmp = Math.sqrt(2.0) * ((t / k) * ((((Math.sqrt(2.0) / k) * Math.pow(Math.cbrt(l), 2.0)) / Math.pow(Math.cbrt(k), 2.0)) / Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t * Math.cbrt((Math.sin(k) * Math.tan(k))))), 2.0)));
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (l <= 4.8e-164) tmp = Float64(sqrt(2.0) * Float64(Float64(t / k) * Float64(Float64(Float64(Float64(sqrt(2.0) / k) * (cbrt(l) ^ 2.0)) / (cbrt(k) ^ 2.0)) / (Float64((cbrt(l) ^ -2.0) * Float64(t * cbrt(Float64(sin(k) * tan(k))))) ^ 2.0)))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
code[t_, l_, k_] := If[LessEqual[l, 4.8e-164], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t / k), $MachinePrecision] * N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.8 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2} \cdot \left(\frac{t}{k} \cdot \frac{\frac{\frac{\sqrt{2}}{k} \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k}\right)}^{2}}}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t \cdot \sqrt[3]{\sin k \cdot \tan k}\right)\right)}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if l < 4.79999999999999966e-164Initial program 28.5%
*-commutative28.5%
associate-/r*28.5%
Simplified39.8%
add-sqr-sqrt39.8%
add-cube-cbrt39.8%
times-frac39.8%
Applied egg-rr80.0%
associate-/r/80.1%
associate-/r*80.1%
associate-/r/80.1%
Simplified80.1%
Taylor expanded in k around 0 69.0%
frac-times66.9%
associate-*l/66.9%
associate-/r/66.9%
associate-*l/66.9%
Applied egg-rr67.5%
times-frac69.6%
associate-*l/67.4%
associate-/l*68.6%
associate-/l*68.6%
associate-*l*68.6%
Simplified71.6%
if 4.79999999999999966e-164 < l Initial program 35.3%
Simplified38.4%
Taylor expanded in t around 0 78.4%
associate-*r/78.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in k around inf 78.4%
associate-/r*79.1%
Simplified79.1%
Final simplification74.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ t (pow (cbrt l) 2.0)))
(t_2 (cbrt (pow k 2.0)))
(t_3 (* (/ (sqrt 2.0) k) t)))
(if (<= l 2.6e-164)
(* (/ t_3 (pow (* t_1 t_2) 2.0)) (/ (/ t_3 t_1) t_2))
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double t_1 = t / pow(cbrt(l), 2.0);
double t_2 = cbrt(pow(k, 2.0));
double t_3 = (sqrt(2.0) / k) * t;
double tmp;
if (l <= 2.6e-164) {
tmp = (t_3 / pow((t_1 * t_2), 2.0)) * ((t_3 / t_1) / t_2);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = t / Math.pow(Math.cbrt(l), 2.0);
double t_2 = Math.cbrt(Math.pow(k, 2.0));
double t_3 = (Math.sqrt(2.0) / k) * t;
double tmp;
if (l <= 2.6e-164) {
tmp = (t_3 / Math.pow((t_1 * t_2), 2.0)) * ((t_3 / t_1) / t_2);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(t / (cbrt(l) ^ 2.0)) t_2 = cbrt((k ^ 2.0)) t_3 = Float64(Float64(sqrt(2.0) / k) * t) tmp = 0.0 if (l <= 2.6e-164) tmp = Float64(Float64(t_3 / (Float64(t_1 * t_2) ^ 2.0)) * Float64(Float64(t_3 / t_1) / t_2)); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[l, 2.6e-164], N[(N[(t$95$3 / N[Power[N[(t$95$1 * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 / t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t_2 := \sqrt[3]{{k}^{2}}\\
t_3 := \frac{\sqrt{2}}{k} \cdot t\\
\mathbf{if}\;\ell \leq 2.6 \cdot 10^{-164}:\\
\;\;\;\;\frac{t\_3}{{\left(t\_1 \cdot t\_2\right)}^{2}} \cdot \frac{\frac{t\_3}{t\_1}}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if l < 2.6000000000000002e-164Initial program 28.5%
*-commutative28.5%
associate-/r*28.5%
Simplified39.8%
add-sqr-sqrt39.8%
add-cube-cbrt39.8%
times-frac39.8%
Applied egg-rr80.0%
associate-/r/80.1%
associate-/r*80.1%
associate-/r/80.1%
Simplified80.1%
Taylor expanded in k around 0 69.0%
Taylor expanded in k around 0 69.1%
if 2.6000000000000002e-164 < l Initial program 35.3%
Simplified38.4%
Taylor expanded in t around 0 78.4%
associate-*r/78.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in k around inf 78.4%
associate-/r*79.1%
Simplified79.1%
Final simplification72.4%
(FPCore (t l k)
:precision binary64
(if (<= k 2.1e-165)
(/
(/ 2.0 (* (/ k t) (/ k t)))
(log (pow (exp (/ (pow t 3.0) (pow l 2.0))) (* (sin k) (tan k)))))
(*
(/ (* (pow l 2.0) (cos k)) (pow k 2.0))
(/ 2.0 (* t (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.1e-165) {
tmp = (2.0 / ((k / t) * (k / t))) / log(pow(exp((pow(t, 3.0) / pow(l, 2.0))), (sin(k) * tan(k))));
} else {
tmp = ((pow(l, 2.0) * cos(k)) / pow(k, 2.0)) * (2.0 / (t * pow(sin(k), 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 <= 2.1d-165) then
tmp = (2.0d0 / ((k / t) * (k / t))) / log((exp(((t ** 3.0d0) / (l ** 2.0d0))) ** (sin(k) * tan(k))))
else
tmp = (((l ** 2.0d0) * cos(k)) / (k ** 2.0d0)) * (2.0d0 / (t * (sin(k) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.1e-165) {
tmp = (2.0 / ((k / t) * (k / t))) / Math.log(Math.pow(Math.exp((Math.pow(t, 3.0) / Math.pow(l, 2.0))), (Math.sin(k) * Math.tan(k))));
} else {
tmp = ((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(k, 2.0)) * (2.0 / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.1e-165: tmp = (2.0 / ((k / t) * (k / t))) / math.log(math.pow(math.exp((math.pow(t, 3.0) / math.pow(l, 2.0))), (math.sin(k) * math.tan(k)))) else: tmp = ((math.pow(l, 2.0) * math.cos(k)) / math.pow(k, 2.0)) * (2.0 / (t * math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.1e-165) tmp = Float64(Float64(2.0 / Float64(Float64(k / t) * Float64(k / t))) / log((exp(Float64((t ^ 3.0) / (l ^ 2.0))) ^ Float64(sin(k) * tan(k))))); else tmp = Float64(Float64(Float64((l ^ 2.0) * cos(k)) / (k ^ 2.0)) * Float64(2.0 / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.1e-165) tmp = (2.0 / ((k / t) * (k / t))) / log((exp(((t ^ 3.0) / (l ^ 2.0))) ^ (sin(k) * tan(k)))); else tmp = (((l ^ 2.0) * cos(k)) / (k ^ 2.0)) * (2.0 / (t * (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.1e-165], N[(N[(2.0 / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Log[N[Power[N[Exp[N[(N[Power[t, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.1 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{t} \cdot \frac{k}{t}}}{\log \left({\left(e^{\frac{{t}^{3}}{{\ell}^{2}}}\right)}^{\left(\sin k \cdot \tan k\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \cos k}{{k}^{2}} \cdot \frac{2}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if k < 2.09999999999999995e-165Initial program 29.2%
*-commutative29.2%
associate-/r*29.2%
Simplified38.3%
unpow338.3%
times-frac47.8%
pow247.8%
Applied egg-rr47.8%
+-rgt-identity47.8%
unpow247.8%
Applied egg-rr47.8%
add-log-exp28.4%
exp-prod35.7%
frac-times34.8%
unpow234.8%
unpow334.8%
pow234.8%
Applied egg-rr34.8%
if 2.09999999999999995e-165 < k Initial program 33.6%
*-commutative33.6%
associate-/r*33.6%
Simplified42.4%
add-sqr-sqrt42.4%
add-cube-cbrt42.4%
times-frac42.4%
Applied egg-rr71.3%
associate-/r/71.3%
associate-/r*71.3%
associate-/r/71.3%
Simplified71.3%
frac-times68.2%
div-inv68.2%
pow-flip68.2%
metadata-eval68.2%
div-inv68.2%
pow-flip68.2%
metadata-eval68.2%
Applied egg-rr68.2%
times-frac71.4%
associate-*r/71.4%
associate-*l*71.4%
associate-/r*71.4%
times-frac74.3%
Simplified74.3%
Taylor expanded in k around inf 74.9%
associate-*r*74.7%
unpow274.7%
rem-square-sqrt74.8%
times-frac74.4%
Simplified74.4%
(FPCore (t l k)
:precision binary64
(if (<= l 1.02e-259)
(log (pow (exp (pow l 2.0)) (/ 2.0 (* t (pow k 4.0)))))
(if (<= l 2.5e-170)
(pow
(/
(/ (sqrt 2.0) (/ k t))
(* (/ (pow t 1.5) l) (sqrt (* (sin k) (tan k)))))
2.0)
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1.02e-259) {
tmp = log(pow(exp(pow(l, 2.0)), (2.0 / (t * pow(k, 4.0)))));
} else if (l <= 2.5e-170) {
tmp = pow(((sqrt(2.0) / (k / t)) / ((pow(t, 1.5) / l) * sqrt((sin(k) * tan(k))))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 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 (l <= 1.02d-259) then
tmp = log((exp((l ** 2.0d0)) ** (2.0d0 / (t * (k ** 4.0d0)))))
else if (l <= 2.5d-170) then
tmp = ((sqrt(2.0d0) / (k / t)) / (((t ** 1.5d0) / l) * sqrt((sin(k) * tan(k))))) ** 2.0d0
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.02e-259) {
tmp = Math.log(Math.pow(Math.exp(Math.pow(l, 2.0)), (2.0 / (t * Math.pow(k, 4.0)))));
} else if (l <= 2.5e-170) {
tmp = Math.pow(((Math.sqrt(2.0) / (k / t)) / ((Math.pow(t, 1.5) / l) * Math.sqrt((Math.sin(k) * Math.tan(k))))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1.02e-259: tmp = math.log(math.pow(math.exp(math.pow(l, 2.0)), (2.0 / (t * math.pow(k, 4.0))))) elif l <= 2.5e-170: tmp = math.pow(((math.sqrt(2.0) / (k / t)) / ((math.pow(t, 1.5) / l) * math.sqrt((math.sin(k) * math.tan(k))))), 2.0) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1.02e-259) tmp = log((exp((l ^ 2.0)) ^ Float64(2.0 / Float64(t * (k ^ 4.0))))); elseif (l <= 2.5e-170) tmp = Float64(Float64(sqrt(2.0) / Float64(k / t)) / Float64(Float64((t ^ 1.5) / l) * sqrt(Float64(sin(k) * tan(k))))) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.02e-259) tmp = log((exp((l ^ 2.0)) ^ (2.0 / (t * (k ^ 4.0))))); elseif (l <= 2.5e-170) tmp = ((sqrt(2.0) / (k / t)) / (((t ^ 1.5) / l) * sqrt((sin(k) * tan(k))))) ^ 2.0; else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1.02e-259], 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], If[LessEqual[l, 2.5e-170], N[Power[N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.02 \cdot 10^{-259}:\\
\;\;\;\;\log \left({\left(e^{{\ell}^{2}}\right)}^{\left(\frac{2}{t \cdot {k}^{4}}\right)}\right)\\
\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{-170}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if l < 1.01999999999999995e-259Initial program 30.1%
Simplified43.4%
Taylor expanded in k around 0 62.1%
pow262.1%
add-log-exp57.8%
*-commutative57.8%
exp-prod52.5%
*-commutative52.5%
Applied egg-rr52.5%
if 1.01999999999999995e-259 < l < 2.50000000000000005e-170Initial program 15.9%
*-commutative15.9%
associate-/r*15.9%
Simplified21.6%
add-sqr-sqrt21.6%
pow221.6%
Applied egg-rr16.7%
if 2.50000000000000005e-170 < l Initial program 35.3%
Simplified38.4%
Taylor expanded in t around 0 78.4%
associate-*r/78.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in k around inf 78.4%
associate-/r*79.1%
Simplified79.1%
Final simplification58.6%
(FPCore (t l k)
:precision binary64
(if (<= l 9e-260)
(log (pow (exp (pow l 2.0)) (/ 2.0 (* t (pow k 4.0)))))
(if (<= l 2.9e-171)
(pow
(/
(* (/ (sqrt 2.0) k) (/ t (/ (pow t 1.5) l)))
(sqrt (* (sin k) (tan k))))
2.0)
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 9e-260) {
tmp = log(pow(exp(pow(l, 2.0)), (2.0 / (t * pow(k, 4.0)))));
} else if (l <= 2.9e-171) {
tmp = pow((((sqrt(2.0) / k) * (t / (pow(t, 1.5) / l))) / sqrt((sin(k) * tan(k)))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 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 (l <= 9d-260) then
tmp = log((exp((l ** 2.0d0)) ** (2.0d0 / (t * (k ** 4.0d0)))))
else if (l <= 2.9d-171) then
tmp = (((sqrt(2.0d0) / k) * (t / ((t ** 1.5d0) / l))) / sqrt((sin(k) * tan(k)))) ** 2.0d0
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 9e-260) {
tmp = Math.log(Math.pow(Math.exp(Math.pow(l, 2.0)), (2.0 / (t * Math.pow(k, 4.0)))));
} else if (l <= 2.9e-171) {
tmp = Math.pow((((Math.sqrt(2.0) / k) * (t / (Math.pow(t, 1.5) / l))) / Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 9e-260: tmp = math.log(math.pow(math.exp(math.pow(l, 2.0)), (2.0 / (t * math.pow(k, 4.0))))) elif l <= 2.9e-171: tmp = math.pow((((math.sqrt(2.0) / k) * (t / (math.pow(t, 1.5) / l))) / math.sqrt((math.sin(k) * math.tan(k)))), 2.0) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 9e-260) tmp = log((exp((l ^ 2.0)) ^ Float64(2.0 / Float64(t * (k ^ 4.0))))); elseif (l <= 2.9e-171) tmp = Float64(Float64(Float64(sqrt(2.0) / k) * Float64(t / Float64((t ^ 1.5) / l))) / sqrt(Float64(sin(k) * tan(k)))) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 9e-260) tmp = log((exp((l ^ 2.0)) ^ (2.0 / (t * (k ^ 4.0))))); elseif (l <= 2.9e-171) tmp = (((sqrt(2.0) / k) * (t / ((t ^ 1.5) / l))) / sqrt((sin(k) * tan(k)))) ^ 2.0; else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 9e-260], 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], If[LessEqual[l, 2.9e-171], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(t / N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9 \cdot 10^{-260}:\\
\;\;\;\;\log \left({\left(e^{{\ell}^{2}}\right)}^{\left(\frac{2}{t \cdot {k}^{4}}\right)}\right)\\
\mathbf{elif}\;\ell \leq 2.9 \cdot 10^{-171}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt{2}}{k} \cdot \frac{t}{\frac{{t}^{1.5}}{\ell}}}{\sqrt{\sin k \cdot \tan k}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if l < 8.9999999999999995e-260Initial program 30.1%
Simplified43.4%
Taylor expanded in k around 0 62.1%
pow262.1%
add-log-exp57.8%
*-commutative57.8%
exp-prod52.5%
*-commutative52.5%
Applied egg-rr52.5%
if 8.9999999999999995e-260 < l < 2.8999999999999999e-171Initial program 15.9%
*-commutative15.9%
associate-/r*15.9%
Simplified21.6%
add-sqr-sqrt21.6%
sqrt-div5.4%
sqrt-div5.4%
Applied egg-rr16.7%
unpow216.7%
associate-/r*16.6%
associate-/r/16.6%
associate-/l*16.6%
Simplified16.6%
if 2.8999999999999999e-171 < l Initial program 35.3%
Simplified38.4%
Taylor expanded in t around 0 78.4%
associate-*r/78.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in k around inf 78.4%
associate-/r*79.1%
Simplified79.1%
Final simplification58.5%
(FPCore (t l k)
:precision binary64
(if (<= l 1.05e-258)
(log (pow (exp (pow l 2.0)) (/ 2.0 (* t (pow k 4.0)))))
(if (<= l 6.2e-171)
(pow
(*
l
(/ (sqrt (/ 2.0 (pow t 3.0))) (* (/ k t) (sqrt (* (sin k) (tan k))))))
2.0)
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1.05e-258) {
tmp = log(pow(exp(pow(l, 2.0)), (2.0 / (t * pow(k, 4.0)))));
} else if (l <= 6.2e-171) {
tmp = pow((l * (sqrt((2.0 / pow(t, 3.0))) / ((k / t) * sqrt((sin(k) * tan(k)))))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 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 (l <= 1.05d-258) then
tmp = log((exp((l ** 2.0d0)) ** (2.0d0 / (t * (k ** 4.0d0)))))
else if (l <= 6.2d-171) then
tmp = (l * (sqrt((2.0d0 / (t ** 3.0d0))) / ((k / t) * sqrt((sin(k) * tan(k)))))) ** 2.0d0
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.05e-258) {
tmp = Math.log(Math.pow(Math.exp(Math.pow(l, 2.0)), (2.0 / (t * Math.pow(k, 4.0)))));
} else if (l <= 6.2e-171) {
tmp = Math.pow((l * (Math.sqrt((2.0 / Math.pow(t, 3.0))) / ((k / t) * Math.sqrt((Math.sin(k) * Math.tan(k)))))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1.05e-258: tmp = math.log(math.pow(math.exp(math.pow(l, 2.0)), (2.0 / (t * math.pow(k, 4.0))))) elif l <= 6.2e-171: tmp = math.pow((l * (math.sqrt((2.0 / math.pow(t, 3.0))) / ((k / t) * math.sqrt((math.sin(k) * math.tan(k)))))), 2.0) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1.05e-258) tmp = log((exp((l ^ 2.0)) ^ Float64(2.0 / Float64(t * (k ^ 4.0))))); elseif (l <= 6.2e-171) tmp = Float64(l * Float64(sqrt(Float64(2.0 / (t ^ 3.0))) / Float64(Float64(k / t) * sqrt(Float64(sin(k) * tan(k)))))) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.05e-258) tmp = log((exp((l ^ 2.0)) ^ (2.0 / (t * (k ^ 4.0))))); elseif (l <= 6.2e-171) tmp = (l * (sqrt((2.0 / (t ^ 3.0))) / ((k / t) * sqrt((sin(k) * tan(k)))))) ^ 2.0; else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1.05e-258], 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], If[LessEqual[l, 6.2e-171], N[Power[N[(l * N[(N[Sqrt[N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(k / t), $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.05 \cdot 10^{-258}:\\
\;\;\;\;\log \left({\left(e^{{\ell}^{2}}\right)}^{\left(\frac{2}{t \cdot {k}^{4}}\right)}\right)\\
\mathbf{elif}\;\ell \leq 6.2 \cdot 10^{-171}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{\frac{2}{{t}^{3}}}}{\frac{k}{t} \cdot \sqrt{\sin k \cdot \tan k}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if l < 1.05e-258Initial program 30.1%
Simplified43.4%
Taylor expanded in k around 0 62.1%
pow262.1%
add-log-exp57.8%
*-commutative57.8%
exp-prod52.5%
*-commutative52.5%
Applied egg-rr52.5%
if 1.05e-258 < l < 6.2000000000000001e-171Initial program 15.9%
Simplified21.1%
add-sqr-sqrt21.1%
pow221.1%
Applied egg-rr27.1%
*-commutative27.1%
Simplified27.1%
if 6.2000000000000001e-171 < l Initial program 35.3%
Simplified38.4%
Taylor expanded in t around 0 78.4%
associate-*r/78.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in k around inf 78.4%
associate-/r*79.1%
Simplified79.1%
Final simplification59.3%
(FPCore (t l k)
:precision binary64
(if (<= l 4.7e-170)
(/
(/ 2.0 (/ (/ k t) (/ t k)))
(* (* (sin k) (tan k)) (pow (/ (pow t 1.5) l) 2.0)))
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 4.7e-170) {
tmp = (2.0 / ((k / t) / (t / k))) / ((sin(k) * tan(k)) * pow((pow(t, 1.5) / l), 2.0));
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 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 (l <= 4.7d-170) then
tmp = (2.0d0 / ((k / t) / (t / k))) / ((sin(k) * tan(k)) * (((t ** 1.5d0) / l) ** 2.0d0))
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 4.7e-170) {
tmp = (2.0 / ((k / t) / (t / k))) / ((Math.sin(k) * Math.tan(k)) * Math.pow((Math.pow(t, 1.5) / l), 2.0));
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 4.7e-170: tmp = (2.0 / ((k / t) / (t / k))) / ((math.sin(k) * math.tan(k)) * math.pow((math.pow(t, 1.5) / l), 2.0)) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 4.7e-170) tmp = Float64(Float64(2.0 / Float64(Float64(k / t) / Float64(t / k))) / Float64(Float64(sin(k) * tan(k)) * (Float64((t ^ 1.5) / l) ^ 2.0))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 4.7e-170) tmp = (2.0 / ((k / t) / (t / k))) / ((sin(k) * tan(k)) * (((t ^ 1.5) / l) ^ 2.0)); else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 4.7e-170], N[(N[(2.0 / N[(N[(k / t), $MachinePrecision] / N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.7 \cdot 10^{-170}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k}{t}}{\frac{t}{k}}}}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if l < 4.7000000000000002e-170Initial program 28.5%
*-commutative28.5%
associate-/r*28.5%
Simplified39.8%
add-sqr-sqrt19.3%
pow219.3%
sqrt-div19.3%
sqrt-pow122.9%
metadata-eval22.9%
sqrt-prod4.2%
add-sqr-sqrt24.4%
Applied egg-rr24.4%
+-rgt-identity24.4%
unpow224.4%
clear-num24.4%
un-div-inv24.4%
Applied egg-rr24.4%
if 4.7000000000000002e-170 < l Initial program 35.3%
Simplified38.4%
Taylor expanded in t around 0 78.4%
associate-*r/78.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in k around inf 78.4%
associate-/r*79.1%
Simplified79.1%
Final simplification42.4%
(FPCore (t l k)
:precision binary64
(if (<= l 3.2e-171)
(/
(/ 2.0 (* (/ k t) (/ k t)))
(* (* (sin k) (tan k)) (pow (/ (pow t 1.5) l) 2.0)))
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 3.2e-171) {
tmp = (2.0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * pow((pow(t, 1.5) / l), 2.0));
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 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 (l <= 3.2d-171) then
tmp = (2.0d0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t ** 1.5d0) / l) ** 2.0d0))
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 3.2e-171) {
tmp = (2.0 / ((k / t) * (k / t))) / ((Math.sin(k) * Math.tan(k)) * Math.pow((Math.pow(t, 1.5) / l), 2.0));
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 3.2e-171: tmp = (2.0 / ((k / t) * (k / t))) / ((math.sin(k) * math.tan(k)) * math.pow((math.pow(t, 1.5) / l), 2.0)) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 3.2e-171) tmp = Float64(Float64(2.0 / Float64(Float64(k / t) * Float64(k / t))) / Float64(Float64(sin(k) * tan(k)) * (Float64((t ^ 1.5) / l) ^ 2.0))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 3.2e-171) tmp = (2.0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t ^ 1.5) / l) ^ 2.0)); else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 3.2e-171], N[(N[(2.0 / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.2 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{t} \cdot \frac{k}{t}}}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if l < 3.2000000000000001e-171Initial program 28.5%
*-commutative28.5%
associate-/r*28.5%
Simplified39.8%
add-sqr-sqrt19.3%
pow219.3%
sqrt-div19.3%
sqrt-pow122.9%
metadata-eval22.9%
sqrt-prod4.2%
add-sqr-sqrt24.4%
Applied egg-rr24.4%
+-rgt-identity50.7%
unpow250.7%
Applied egg-rr24.4%
if 3.2000000000000001e-171 < l Initial program 35.3%
Simplified38.4%
Taylor expanded in t around 0 78.4%
associate-*r/78.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in k around inf 78.4%
associate-/r*79.1%
Simplified79.1%
Final simplification42.4%
(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 30.7%
Simplified40.1%
Taylor expanded in t around 0 71.1%
associate-*r/71.1%
associate-*r*71.1%
Simplified71.1%
Taylor expanded in k around inf 71.1%
associate-/r*71.3%
Simplified71.3%
Final simplification71.3%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (pow l 2.0) (* (pow k 2.0) (* (tan k) (* t (sin k)))))))
double code(double t, double l, double k) {
return 2.0 * (pow(l, 2.0) / (pow(k, 2.0) * (tan(k) * (t * sin(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 * ((l ** 2.0d0) / ((k ** 2.0d0) * (tan(k) * (t * sin(k)))))
end function
public static double code(double t, double l, double k) {
return 2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (Math.tan(k) * (t * Math.sin(k)))));
}
def code(t, l, k): return 2.0 * (math.pow(l, 2.0) / (math.pow(k, 2.0) * (math.tan(k) * (t * math.sin(k)))))
function code(t, l, k) return Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(tan(k) * Float64(t * sin(k)))))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l ^ 2.0) / ((k ^ 2.0) * (tan(k) * (t * sin(k))))); end
code[t_, l_, k_] := N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(\tan k \cdot \left(t \cdot \sin k\right)\right)}
\end{array}
Initial program 30.7%
Simplified40.1%
add-log-exp37.1%
exp-prod40.8%
associate-/r*40.8%
associate-*r*40.8%
*-commutative40.8%
associate-*l*40.8%
pow240.8%
Applied egg-rr40.8%
associate-/r*40.8%
associate-/r*40.8%
associate-/l/40.8%
Simplified40.8%
Taylor expanded in k around 0 71.1%
associate-*r*71.1%
Simplified71.1%
Final simplification71.1%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (pow l 2.0) (* (* (sin k) (tan k)) (* t (pow k 2.0))))))
double code(double t, double l, double k) {
return 2.0 * (pow(l, 2.0) / ((sin(k) * tan(k)) * (t * pow(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 = 2.0d0 * ((l ** 2.0d0) / ((sin(k) * tan(k)) * (t * (k ** 2.0d0))))
end function
public static double code(double t, double l, double k) {
return 2.0 * (Math.pow(l, 2.0) / ((Math.sin(k) * Math.tan(k)) * (t * Math.pow(k, 2.0))));
}
def code(t, l, k): return 2.0 * (math.pow(l, 2.0) / ((math.sin(k) * math.tan(k)) * (t * math.pow(k, 2.0))))
function code(t, l, k) return Float64(2.0 * Float64((l ^ 2.0) / Float64(Float64(sin(k) * tan(k)) * Float64(t * (k ^ 2.0))))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l ^ 2.0) / ((sin(k) * tan(k)) * (t * (k ^ 2.0)))); end
code[t_, l_, k_] := N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{{\ell}^{2}}{\left(\sin k \cdot \tan k\right) \cdot \left(t \cdot {k}^{2}\right)}
\end{array}
Initial program 30.7%
Simplified40.1%
add-log-exp37.1%
exp-prod40.8%
associate-/r*40.8%
associate-*r*40.8%
*-commutative40.8%
associate-*l*40.8%
pow240.8%
Applied egg-rr40.8%
associate-/r*40.8%
associate-/r*40.8%
associate-/l/40.8%
Simplified40.8%
Taylor expanded in k around 0 71.1%
associate-*r*71.1%
*-commutative71.1%
Simplified71.1%
Final simplification71.1%
(FPCore (t l k)
:precision binary64
(if (or (<= t 3.5e-168) (not (<= t 1.12e+52)))
(* (* l l) (/ (* 2.0 (cos k)) (* (pow k 2.0) (* t (pow k 2.0)))))
(/
(/ 2.0 (* (/ k t) (/ k t)))
(* (* (sin k) (tan k)) (* (/ (* t t) l) (/ t l))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= 3.5e-168) || !(t <= 1.12e+52)) {
tmp = (l * l) * ((2.0 * cos(k)) / (pow(k, 2.0) * (t * pow(k, 2.0))));
} else {
tmp = (2.0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t * t) / l) * (t / l)));
}
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 ((t <= 3.5d-168) .or. (.not. (t <= 1.12d+52))) then
tmp = (l * l) * ((2.0d0 * cos(k)) / ((k ** 2.0d0) * (t * (k ** 2.0d0))))
else
tmp = (2.0d0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t * t) / l) * (t / l)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= 3.5e-168) || !(t <= 1.12e+52)) {
tmp = (l * l) * ((2.0 * Math.cos(k)) / (Math.pow(k, 2.0) * (t * Math.pow(k, 2.0))));
} else {
tmp = (2.0 / ((k / t) * (k / t))) / ((Math.sin(k) * Math.tan(k)) * (((t * t) / l) * (t / l)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= 3.5e-168) or not (t <= 1.12e+52): tmp = (l * l) * ((2.0 * math.cos(k)) / (math.pow(k, 2.0) * (t * math.pow(k, 2.0)))) else: tmp = (2.0 / ((k / t) * (k / t))) / ((math.sin(k) * math.tan(k)) * (((t * t) / l) * (t / l))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= 3.5e-168) || !(t <= 1.12e+52)) tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * cos(k)) / Float64((k ^ 2.0) * Float64(t * (k ^ 2.0))))); else tmp = Float64(Float64(2.0 / Float64(Float64(k / t) * Float64(k / t))) / Float64(Float64(sin(k) * tan(k)) * Float64(Float64(Float64(t * t) / l) * Float64(t / l)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= 3.5e-168) || ~((t <= 1.12e+52))) tmp = (l * l) * ((2.0 * cos(k)) / ((k ^ 2.0) * (t * (k ^ 2.0)))); else tmp = (2.0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t * t) / l) * (t / l))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, 3.5e-168], N[Not[LessEqual[t, 1.12e+52]], $MachinePrecision]], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.5 \cdot 10^{-168} \lor \neg \left(t \leq 1.12 \cdot 10^{+52}\right):\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {k}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{t} \cdot \frac{k}{t}}}{\left(\sin k \cdot \tan k\right) \cdot \left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)}\\
\end{array}
\end{array}
if t < 3.49999999999999982e-168 or 1.12000000000000002e52 < t Initial program 26.9%
Simplified37.3%
Taylor expanded in t around 0 72.1%
associate-*r/72.1%
associate-*r*72.1%
Simplified72.1%
Taylor expanded in k around 0 65.6%
if 3.49999999999999982e-168 < t < 1.12000000000000002e52Initial program 51.4%
*-commutative51.4%
associate-/r*51.4%
Simplified55.2%
unpow355.3%
times-frac60.8%
pow260.8%
Applied egg-rr60.8%
+-rgt-identity60.8%
unpow260.8%
Applied egg-rr60.8%
unpow260.8%
Applied egg-rr60.8%
Final simplification64.8%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* t (pow k 2.0))))
(if (<= k 3.4e-7)
(* (* l l) (/ 2.0 (* (pow (sin k) 2.0) t_1)))
(* (* l l) (/ (* 2.0 (cos k)) (* t_1 (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))))
double code(double t, double l, double k) {
double t_1 = t * pow(k, 2.0);
double tmp;
if (k <= 3.4e-7) {
tmp = (l * l) * (2.0 / (pow(sin(k), 2.0) * t_1));
} else {
tmp = (l * l) * ((2.0 * cos(k)) / (t_1 * (0.5 - (cos((2.0 * k)) / 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) :: t_1
real(8) :: tmp
t_1 = t * (k ** 2.0d0)
if (k <= 3.4d-7) then
tmp = (l * l) * (2.0d0 / ((sin(k) ** 2.0d0) * t_1))
else
tmp = (l * l) * ((2.0d0 * cos(k)) / (t_1 * (0.5d0 - (cos((2.0d0 * k)) / 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = t * Math.pow(k, 2.0);
double tmp;
if (k <= 3.4e-7) {
tmp = (l * l) * (2.0 / (Math.pow(Math.sin(k), 2.0) * t_1));
} else {
tmp = (l * l) * ((2.0 * Math.cos(k)) / (t_1 * (0.5 - (Math.cos((2.0 * k)) / 2.0))));
}
return tmp;
}
def code(t, l, k): t_1 = t * math.pow(k, 2.0) tmp = 0 if k <= 3.4e-7: tmp = (l * l) * (2.0 / (math.pow(math.sin(k), 2.0) * t_1)) else: tmp = (l * l) * ((2.0 * math.cos(k)) / (t_1 * (0.5 - (math.cos((2.0 * k)) / 2.0)))) return tmp
function code(t, l, k) t_1 = Float64(t * (k ^ 2.0)) tmp = 0.0 if (k <= 3.4e-7) tmp = Float64(Float64(l * l) * Float64(2.0 / Float64((sin(k) ^ 2.0) * t_1))); else tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * cos(k)) / Float64(t_1 * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = t * (k ^ 2.0); tmp = 0.0; if (k <= 3.4e-7) tmp = (l * l) * (2.0 / ((sin(k) ^ 2.0) * t_1)); else tmp = (l * l) * ((2.0 * cos(k)) / (t_1 * (0.5 - (cos((2.0 * k)) / 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 3.4e-7], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot {k}^{2}\\
\mathbf{if}\;k \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{{\sin k}^{2} \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot \cos k}{t\_1 \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\\
\end{array}
\end{array}
if k < 3.39999999999999974e-7Initial program 31.1%
Simplified39.6%
Taylor expanded in t around 0 70.3%
associate-*r/70.3%
associate-*r*70.3%
Simplified70.3%
Taylor expanded in k around 0 65.0%
if 3.39999999999999974e-7 < k Initial program 29.5%
Simplified41.6%
Taylor expanded in t around 0 73.9%
associate-*r/73.9%
associate-*r*73.9%
Simplified73.9%
unpow273.9%
sin-mult73.9%
Applied egg-rr73.9%
div-sub73.9%
+-inverses73.9%
cos-073.9%
metadata-eval73.9%
count-273.9%
Simplified73.9%
Final simplification67.1%
(FPCore (t l k)
:precision binary64
(if (<= t 1.1e-171)
(* (* l l) (/ (* 2.0 (cos k)) (* t (pow k 4.0))))
(if (<= t 1.9e+136)
(/
(/ 2.0 (* (/ k t) (/ k t)))
(* (* (sin k) (tan k)) (* (/ (* t t) l) (/ t l))))
(* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t)))))
double code(double t, double l, double k) {
double tmp;
if (t <= 1.1e-171) {
tmp = (l * l) * ((2.0 * cos(k)) / (t * pow(k, 4.0)));
} else if (t <= 1.9e+136) {
tmp = (2.0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t * t) / l) * (t / l)));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t);
}
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 (t <= 1.1d-171) then
tmp = (l * l) * ((2.0d0 * cos(k)) / (t * (k ** 4.0d0)))
else if (t <= 1.9d+136) then
tmp = (2.0d0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t * t) / l) * (t / l)))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= 1.1e-171) {
tmp = (l * l) * ((2.0 * Math.cos(k)) / (t * Math.pow(k, 4.0)));
} else if (t <= 1.9e+136) {
tmp = (2.0 / ((k / t) * (k / t))) / ((Math.sin(k) * Math.tan(k)) * (((t * t) / l) * (t / l)));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t);
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 1.1e-171: tmp = (l * l) * ((2.0 * math.cos(k)) / (t * math.pow(k, 4.0))) elif t <= 1.9e+136: tmp = (2.0 / ((k / t) * (k / t))) / ((math.sin(k) * math.tan(k)) * (((t * t) / l) * (t / l))) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 1.1e-171) tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * cos(k)) / Float64(t * (k ^ 4.0)))); elseif (t <= 1.9e+136) tmp = Float64(Float64(2.0 / Float64(Float64(k / t) * Float64(k / t))) / Float64(Float64(sin(k) * tan(k)) * Float64(Float64(Float64(t * t) / l) * Float64(t / l)))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 1.1e-171) tmp = (l * l) * ((2.0 * cos(k)) / (t * (k ^ 4.0))); elseif (t <= 1.9e+136) tmp = (2.0 / ((k / t) * (k / t))) / ((sin(k) * tan(k)) * (((t * t) / l) * (t / l))); else tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 1.1e-171], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+136], N[(N[(2.0 / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.1 \cdot 10^{-171}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot \cos k}{t \cdot {k}^{4}}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+136}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{t} \cdot \frac{k}{t}}}{\left(\sin k \cdot \tan k\right) \cdot \left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}\\
\end{array}
\end{array}
if t < 1.1000000000000001e-171Initial program 29.9%
Simplified38.1%
Taylor expanded in t around 0 70.8%
associate-*r/70.8%
associate-*r*70.8%
Simplified70.8%
Taylor expanded in k around 0 60.5%
if 1.1000000000000001e-171 < t < 1.90000000000000007e136Initial program 50.2%
*-commutative50.2%
associate-/r*50.2%
Simplified55.1%
unpow355.2%
times-frac61.8%
pow261.8%
Applied egg-rr61.8%
+-rgt-identity61.8%
unpow261.8%
Applied egg-rr61.8%
unpow261.8%
Applied egg-rr61.8%
if 1.90000000000000007e136 < t Initial program 7.7%
*-commutative7.7%
associate-/r*7.7%
Simplified23.2%
add-sqr-sqrt23.2%
add-cube-cbrt23.2%
times-frac23.2%
Applied egg-rr77.2%
associate-/r/77.2%
associate-/r*77.2%
associate-/r/77.2%
Simplified77.2%
Taylor expanded in k around 0 76.2%
*-commutative76.2%
unpow276.2%
rem-square-sqrt76.1%
associate-*r/76.1%
associate-/r*76.1%
Simplified76.1%
Final simplification63.2%
(FPCore (t l k) :precision binary64 (* (* l l) (/ (* 2.0 (cos k)) (* t (pow k 4.0)))))
double code(double t, double l, double k) {
return (l * l) * ((2.0 * cos(k)) / (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 * cos(k)) / (t * (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return (l * l) * ((2.0 * Math.cos(k)) / (t * Math.pow(k, 4.0)));
}
def code(t, l, k): return (l * l) * ((2.0 * math.cos(k)) / (t * math.pow(k, 4.0)))
function code(t, l, k) return Float64(Float64(l * l) * Float64(Float64(2.0 * cos(k)) / Float64(t * (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = (l * l) * ((2.0 * cos(k)) / (t * (k ^ 4.0))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot \cos k}{t \cdot {k}^{4}}
\end{array}
Initial program 30.7%
Simplified40.1%
Taylor expanded in t around 0 71.1%
associate-*r/71.1%
associate-*r*71.1%
Simplified71.1%
Taylor expanded in k around 0 62.1%
Final simplification62.1%
(FPCore (t l k) :precision binary64 (/ (* (pow l 2.0) (* 2.0 (pow k -4.0))) t))
double code(double t, double l, double k) {
return (pow(l, 2.0) * (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 ** 2.0d0) * (2.0d0 * (k ** (-4.0d0)))) / t
end function
public static double code(double t, double l, double k) {
return (Math.pow(l, 2.0) * (2.0 * Math.pow(k, -4.0))) / t;
}
def code(t, l, k): return (math.pow(l, 2.0) * (2.0 * math.pow(k, -4.0))) / t
function code(t, l, k) return Float64(Float64((l ^ 2.0) * Float64(2.0 * (k ^ -4.0))) / t) end
function tmp = code(t, l, k) tmp = ((l ^ 2.0) * (2.0 * (k ^ -4.0))) / t; end
code[t_, l_, k_] := N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]
\begin{array}{l}
\\
\frac{{\ell}^{2} \cdot \left(2 \cdot {k}^{-4}\right)}{t}
\end{array}
Initial program 30.7%
Simplified40.1%
Taylor expanded in k around 0 60.4%
*-commutative60.4%
associate-/r*60.4%
Simplified60.4%
div-inv60.4%
pow-flip60.8%
metadata-eval60.8%
Applied egg-rr60.8%
associate-*l/60.8%
Simplified60.8%
associate-*l/60.9%
pow260.9%
Applied egg-rr60.9%
Final simplification60.9%
(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 30.7%
Simplified40.1%
Taylor expanded in k around 0 60.4%
*-commutative60.4%
associate-/r*60.4%
Simplified60.4%
div-inv60.4%
pow-flip60.8%
metadata-eval60.8%
Applied egg-rr60.8%
associate-*l/60.8%
Simplified60.8%
Final simplification60.8%
(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 30.7%
Simplified40.1%
Taylor expanded in k around 0 60.4%
Final simplification60.4%
herbie shell --seed 2024185
(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))))