
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
(FPCore (t l k) :precision binary64 (pow (/ (/ (cbrt 2.0) (pow (/ (cbrt k) (cbrt t)) 2.0)) (* (* t (cbrt (* (sin k) (tan k)))) (pow (cbrt l) -2.0))) 3.0))
double code(double t, double l, double k) {
return pow(((cbrt(2.0) / pow((cbrt(k) / cbrt(t)), 2.0)) / ((t * cbrt((sin(k) * tan(k)))) * pow(cbrt(l), -2.0))), 3.0);
}
public static double code(double t, double l, double k) {
return Math.pow(((Math.cbrt(2.0) / Math.pow((Math.cbrt(k) / Math.cbrt(t)), 2.0)) / ((t * Math.cbrt((Math.sin(k) * Math.tan(k)))) * Math.pow(Math.cbrt(l), -2.0))), 3.0);
}
function code(t, l, k) return Float64(Float64(cbrt(2.0) / (Float64(cbrt(k) / cbrt(t)) ^ 2.0)) / Float64(Float64(t * cbrt(Float64(sin(k) * tan(k)))) * (cbrt(l) ^ -2.0))) ^ 3.0 end
code[t_, l_, k_] := N[Power[N[(N[(N[Power[2.0, 1/3], $MachinePrecision] / N[Power[N[(N[Power[k, 1/3], $MachinePrecision] / N[Power[t, 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{\frac{\sqrt[3]{2}}{{\left(\frac{\sqrt[3]{k}}{\sqrt[3]{t}}\right)}^{2}}}{\left(t \cdot \sqrt[3]{\sin k \cdot \tan k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}}\right)}^{3}
\end{array}
Initial program 33.4%
*-commutative33.4%
associate-/r*33.6%
Simplified41.0%
add-cube-cbrt41.0%
pow341.0%
cbrt-prod41.0%
cbrt-div41.8%
rem-cbrt-cube53.8%
cbrt-prod63.5%
pow263.5%
Applied egg-rr63.5%
add-cube-cbrt63.5%
Applied egg-rr68.4%
unpow268.4%
unpow368.4%
associate-*r*70.0%
*-commutative70.0%
Simplified70.0%
metadata-eval70.0%
pow-flip69.9%
+-rgt-identity69.9%
div-inv69.9%
cbrt-div70.8%
+-rgt-identity70.8%
unpow270.8%
cbrt-prod89.1%
pow289.1%
Applied egg-rr89.1%
cbrt-div95.5%
Applied egg-rr95.5%
Final simplification95.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0)))
(if (<= k 9.3e-101)
(pow
(/ (cbrt (* 2.0 (pow (/ k t) -2.0))) (* t_1 (* t (cbrt (pow k 2.0)))))
3.0)
(pow
(/
(/ (cbrt 2.0) (pow (cbrt (/ k t)) 2.0))
(* (cbrt (* (sin k) (tan k))) (* t t_1)))
3.0))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double tmp;
if (k <= 9.3e-101) {
tmp = pow((cbrt((2.0 * pow((k / t), -2.0))) / (t_1 * (t * cbrt(pow(k, 2.0))))), 3.0);
} else {
tmp = pow(((cbrt(2.0) / pow(cbrt((k / t)), 2.0)) / (cbrt((sin(k) * tan(k))) * (t * t_1))), 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 tmp;
if (k <= 9.3e-101) {
tmp = Math.pow((Math.cbrt((2.0 * Math.pow((k / t), -2.0))) / (t_1 * (t * Math.cbrt(Math.pow(k, 2.0))))), 3.0);
} else {
tmp = Math.pow(((Math.cbrt(2.0) / Math.pow(Math.cbrt((k / t)), 2.0)) / (Math.cbrt((Math.sin(k) * Math.tan(k))) * (t * t_1))), 3.0);
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 tmp = 0.0 if (k <= 9.3e-101) tmp = Float64(cbrt(Float64(2.0 * (Float64(k / t) ^ -2.0))) / Float64(t_1 * Float64(t * cbrt((k ^ 2.0))))) ^ 3.0; else tmp = Float64(Float64(cbrt(2.0) / (cbrt(Float64(k / t)) ^ 2.0)) / Float64(cbrt(Float64(sin(k) * tan(k))) * Float64(t * t_1))) ^ 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]}, If[LessEqual[k, 9.3e-101], N[Power[N[(N[Power[N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$1 * N[(t * N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[Power[N[(N[(N[Power[2.0, 1/3], $MachinePrecision] / N[Power[N[Power[N[(k / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
\mathbf{if}\;k \leq 9.3 \cdot 10^{-101}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}}{t\_1 \cdot \left(t \cdot \sqrt[3]{{k}^{2}}\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt[3]{2}}{{\left(\sqrt[3]{\frac{k}{t}}\right)}^{2}}}{\sqrt[3]{\sin k \cdot \tan k} \cdot \left(t \cdot t\_1\right)}\right)}^{3}\\
\end{array}
\end{array}
if k < 9.29999999999999983e-101Initial program 36.3%
*-commutative36.3%
associate-/r*36.3%
Simplified40.9%
add-cube-cbrt40.9%
pow340.9%
cbrt-prod40.9%
cbrt-div42.0%
rem-cbrt-cube56.7%
cbrt-prod70.1%
pow270.1%
Applied egg-rr70.1%
add-cube-cbrt70.0%
Applied egg-rr74.0%
unpow274.0%
unpow374.0%
associate-*r*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in k around 0 69.6%
if 9.29999999999999983e-101 < k Initial program 27.2%
*-commutative27.2%
associate-/r*28.0%
Simplified41.3%
add-cube-cbrt41.3%
pow341.3%
cbrt-prod41.2%
cbrt-div41.2%
rem-cbrt-cube47.8%
cbrt-prod49.9%
pow249.9%
Applied egg-rr49.9%
add-cube-cbrt49.9%
Applied egg-rr56.8%
unpow256.8%
unpow356.8%
associate-*r*56.8%
*-commutative56.8%
Simplified56.8%
metadata-eval56.8%
pow-flip56.8%
+-rgt-identity56.8%
div-inv56.8%
cbrt-div56.9%
+-rgt-identity56.9%
unpow256.9%
cbrt-prod83.0%
pow283.0%
Applied egg-rr83.0%
pow183.0%
associate-*l*83.1%
Applied egg-rr83.1%
unpow183.1%
associate-*r*83.0%
*-commutative83.0%
associate-*l*83.0%
Simplified83.0%
Final simplification74.0%
(FPCore (t l k) :precision binary64 (pow (/ (/ (cbrt 2.0) (pow (/ 1.0 (cbrt (/ t k))) 2.0)) (* (* t (cbrt (* (sin k) (tan k)))) (pow (cbrt l) -2.0))) 3.0))
double code(double t, double l, double k) {
return pow(((cbrt(2.0) / pow((1.0 / cbrt((t / k))), 2.0)) / ((t * cbrt((sin(k) * tan(k)))) * pow(cbrt(l), -2.0))), 3.0);
}
public static double code(double t, double l, double k) {
return Math.pow(((Math.cbrt(2.0) / Math.pow((1.0 / Math.cbrt((t / k))), 2.0)) / ((t * Math.cbrt((Math.sin(k) * Math.tan(k)))) * Math.pow(Math.cbrt(l), -2.0))), 3.0);
}
function code(t, l, k) return Float64(Float64(cbrt(2.0) / (Float64(1.0 / cbrt(Float64(t / k))) ^ 2.0)) / Float64(Float64(t * cbrt(Float64(sin(k) * tan(k)))) * (cbrt(l) ^ -2.0))) ^ 3.0 end
code[t_, l_, k_] := N[Power[N[(N[(N[Power[2.0, 1/3], $MachinePrecision] / N[Power[N[(1.0 / N[Power[N[(t / k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{\frac{\sqrt[3]{2}}{{\left(\frac{1}{\sqrt[3]{\frac{t}{k}}}\right)}^{2}}}{\left(t \cdot \sqrt[3]{\sin k \cdot \tan k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}}\right)}^{3}
\end{array}
Initial program 33.4%
*-commutative33.4%
associate-/r*33.6%
Simplified41.0%
add-cube-cbrt41.0%
pow341.0%
cbrt-prod41.0%
cbrt-div41.8%
rem-cbrt-cube53.8%
cbrt-prod63.5%
pow263.5%
Applied egg-rr63.5%
add-cube-cbrt63.5%
Applied egg-rr68.4%
unpow268.4%
unpow368.4%
associate-*r*70.0%
*-commutative70.0%
Simplified70.0%
metadata-eval70.0%
pow-flip69.9%
+-rgt-identity69.9%
div-inv69.9%
cbrt-div70.8%
+-rgt-identity70.8%
unpow270.8%
cbrt-prod89.1%
pow289.1%
Applied egg-rr89.1%
clear-num89.0%
cbrt-div90.4%
metadata-eval90.4%
Applied egg-rr90.4%
Final simplification90.4%
(FPCore (t l k) :precision binary64 (pow (/ (/ (cbrt 2.0) (pow (cbrt (/ k t)) 2.0)) (* (* t (cbrt (* (sin k) (tan k)))) (pow (cbrt l) -2.0))) 3.0))
double code(double t, double l, double k) {
return pow(((cbrt(2.0) / pow(cbrt((k / t)), 2.0)) / ((t * cbrt((sin(k) * tan(k)))) * pow(cbrt(l), -2.0))), 3.0);
}
public static double code(double t, double l, double k) {
return Math.pow(((Math.cbrt(2.0) / Math.pow(Math.cbrt((k / t)), 2.0)) / ((t * Math.cbrt((Math.sin(k) * Math.tan(k)))) * Math.pow(Math.cbrt(l), -2.0))), 3.0);
}
function code(t, l, k) return Float64(Float64(cbrt(2.0) / (cbrt(Float64(k / t)) ^ 2.0)) / Float64(Float64(t * cbrt(Float64(sin(k) * tan(k)))) * (cbrt(l) ^ -2.0))) ^ 3.0 end
code[t_, l_, k_] := N[Power[N[(N[(N[Power[2.0, 1/3], $MachinePrecision] / N[Power[N[Power[N[(k / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{\frac{\sqrt[3]{2}}{{\left(\sqrt[3]{\frac{k}{t}}\right)}^{2}}}{\left(t \cdot \sqrt[3]{\sin k \cdot \tan k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}}\right)}^{3}
\end{array}
Initial program 33.4%
*-commutative33.4%
associate-/r*33.6%
Simplified41.0%
add-cube-cbrt41.0%
pow341.0%
cbrt-prod41.0%
cbrt-div41.8%
rem-cbrt-cube53.8%
cbrt-prod63.5%
pow263.5%
Applied egg-rr63.5%
add-cube-cbrt63.5%
Applied egg-rr68.4%
unpow268.4%
unpow368.4%
associate-*r*70.0%
*-commutative70.0%
Simplified70.0%
metadata-eval70.0%
pow-flip69.9%
+-rgt-identity69.9%
div-inv69.9%
cbrt-div70.8%
+-rgt-identity70.8%
unpow270.8%
cbrt-prod89.1%
pow289.1%
Applied egg-rr89.1%
Final simplification89.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0)))
(if (<= k 1.02e-5)
(pow
(/
(/ (cbrt 2.0) (pow (cbrt (/ k t)) 2.0))
(* t_1 (* t (cbrt (pow k 2.0)))))
3.0)
(if (<= k 2.95e+153)
(* (* 2.0 (/ (/ (cos k) (* t (pow k 2.0))) (pow (sin k) 2.0))) (* l l))
(pow
(/
(cbrt (* 2.0 (pow (/ k t) -2.0)))
(* t (* (cbrt (* (sin k) (tan k))) t_1)))
3.0)))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double tmp;
if (k <= 1.02e-5) {
tmp = pow(((cbrt(2.0) / pow(cbrt((k / t)), 2.0)) / (t_1 * (t * cbrt(pow(k, 2.0))))), 3.0);
} else if (k <= 2.95e+153) {
tmp = (2.0 * ((cos(k) / (t * pow(k, 2.0))) / pow(sin(k), 2.0))) * (l * l);
} else {
tmp = pow((cbrt((2.0 * pow((k / t), -2.0))) / (t * (cbrt((sin(k) * tan(k))) * t_1))), 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 tmp;
if (k <= 1.02e-5) {
tmp = Math.pow(((Math.cbrt(2.0) / Math.pow(Math.cbrt((k / t)), 2.0)) / (t_1 * (t * Math.cbrt(Math.pow(k, 2.0))))), 3.0);
} else if (k <= 2.95e+153) {
tmp = (2.0 * ((Math.cos(k) / (t * Math.pow(k, 2.0))) / Math.pow(Math.sin(k), 2.0))) * (l * l);
} else {
tmp = Math.pow((Math.cbrt((2.0 * Math.pow((k / t), -2.0))) / (t * (Math.cbrt((Math.sin(k) * Math.tan(k))) * t_1))), 3.0);
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 tmp = 0.0 if (k <= 1.02e-5) tmp = Float64(Float64(cbrt(2.0) / (cbrt(Float64(k / t)) ^ 2.0)) / Float64(t_1 * Float64(t * cbrt((k ^ 2.0))))) ^ 3.0; elseif (k <= 2.95e+153) tmp = Float64(Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (k ^ 2.0))) / (sin(k) ^ 2.0))) * Float64(l * l)); else tmp = Float64(cbrt(Float64(2.0 * (Float64(k / t) ^ -2.0))) / Float64(t * Float64(cbrt(Float64(sin(k) * tan(k))) * t_1))) ^ 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]}, If[LessEqual[k, 1.02e-5], N[Power[N[(N[(N[Power[2.0, 1/3], $MachinePrecision] / N[Power[N[Power[N[(k / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[(t * N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k, 2.95e+153], N[(N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t * N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
\mathbf{if}\;k \leq 1.02 \cdot 10^{-5}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt[3]{2}}{{\left(\sqrt[3]{\frac{k}{t}}\right)}^{2}}}{t\_1 \cdot \left(t \cdot \sqrt[3]{{k}^{2}}\right)}\right)}^{3}\\
\mathbf{elif}\;k \leq 2.95 \cdot 10^{+153}:\\
\;\;\;\;\left(2 \cdot \frac{\frac{\cos k}{t \cdot {k}^{2}}}{{\sin k}^{2}}\right) \cdot \left(\ell \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}}{t \cdot \left(\sqrt[3]{\sin k \cdot \tan k} \cdot t\_1\right)}\right)}^{3}\\
\end{array}
\end{array}
if k < 1.0200000000000001e-5Initial program 34.9%
*-commutative34.9%
associate-/r*34.9%
Simplified39.6%
add-cube-cbrt39.6%
pow339.6%
cbrt-prod39.5%
cbrt-div40.6%
rem-cbrt-cube54.8%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
add-cube-cbrt66.9%
Applied egg-rr71.9%
unpow271.9%
unpow371.9%
associate-*r*74.0%
*-commutative74.0%
Simplified74.0%
metadata-eval74.0%
pow-flip73.8%
+-rgt-identity73.8%
div-inv73.8%
cbrt-div75.0%
+-rgt-identity75.0%
unpow275.0%
cbrt-prod91.6%
pow291.6%
Applied egg-rr91.6%
Taylor expanded in k around 0 78.5%
if 1.0200000000000001e-5 < k < 2.9500000000000001e153Initial program 22.9%
Simplified48.7%
Taylor expanded in t around 0 89.1%
associate-*r*89.2%
associate-/r*89.2%
Simplified89.2%
if 2.9500000000000001e153 < k Initial program 36.0%
*-commutative36.0%
associate-/r*38.1%
Simplified41.6%
add-cube-cbrt41.6%
pow341.6%
cbrt-prod41.6%
cbrt-div41.6%
rem-cbrt-cube52.2%
cbrt-prod55.2%
pow255.2%
Applied egg-rr55.2%
add-cube-cbrt55.1%
Applied egg-rr64.2%
unpow264.2%
unpow364.2%
associate-*r*64.2%
*-commutative64.2%
Simplified64.2%
div-inv64.0%
associate-*l*64.0%
Applied egg-rr64.0%
associate-*r/64.2%
*-rgt-identity64.2%
Simplified64.2%
Final simplification78.3%
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 5e-323)
(pow
(/
(/ (cbrt 2.0) (pow (cbrt (/ k t)) 2.0))
(* (pow (cbrt l) -2.0) (* t (cbrt (pow k 2.0)))))
3.0)
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (pow k 2.0) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = pow(((cbrt(2.0) / pow(cbrt((k / t)), 2.0)) / (pow(cbrt(l), -2.0) * (t * cbrt(pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (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 * l) <= 5e-323) {
tmp = Math.pow(((Math.cbrt(2.0) / Math.pow(Math.cbrt((k / t)), 2.0)) / (Math.pow(Math.cbrt(l), -2.0) * (t * Math.cbrt(Math.pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-323) tmp = Float64(Float64(cbrt(2.0) / (cbrt(Float64(k / t)) ^ 2.0)) / Float64((cbrt(l) ^ -2.0) * Float64(t * cbrt((k ^ 2.0))))) ^ 3.0; else tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64((k ^ 2.0) * Float64(t * (sin(k) ^ 2.0))))); end return tmp end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-323], N[Power[N[(N[(N[Power[2.0, 1/3], $MachinePrecision] / N[Power[N[Power[N[(k / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t * N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $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 \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt[3]{2}}{{\left(\sqrt[3]{\frac{k}{t}}\right)}^{2}}}{{\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t \cdot \sqrt[3]{{k}^{2}}\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
add-cube-cbrt34.1%
pow334.1%
cbrt-prod34.1%
cbrt-div34.1%
rem-cbrt-cube40.2%
cbrt-prod69.0%
pow269.0%
Applied egg-rr69.0%
add-cube-cbrt68.9%
Applied egg-rr76.2%
unpow276.2%
unpow376.2%
associate-*r*81.9%
*-commutative81.9%
Simplified81.9%
metadata-eval81.9%
pow-flip81.9%
+-rgt-identity81.9%
div-inv81.9%
cbrt-div83.8%
+-rgt-identity83.8%
unpow283.8%
cbrt-prod94.0%
pow294.0%
Applied egg-rr94.0%
Taylor expanded in k around 0 90.8%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.9%
Final simplification82.2%
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 5e-323)
(pow
(/
(cbrt (* 2.0 (pow (/ k t) -2.0)))
(* (pow (cbrt l) -2.0) (* t (cbrt (pow k 2.0)))))
3.0)
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (pow k 2.0) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = pow((cbrt((2.0 * pow((k / t), -2.0))) / (pow(cbrt(l), -2.0) * (t * cbrt(pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (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 * l) <= 5e-323) {
tmp = Math.pow((Math.cbrt((2.0 * Math.pow((k / t), -2.0))) / (Math.pow(Math.cbrt(l), -2.0) * (t * Math.cbrt(Math.pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-323) tmp = Float64(cbrt(Float64(2.0 * (Float64(k / t) ^ -2.0))) / Float64((cbrt(l) ^ -2.0) * Float64(t * cbrt((k ^ 2.0))))) ^ 3.0; else tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64((k ^ 2.0) * Float64(t * (sin(k) ^ 2.0))))); end return tmp end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-323], N[Power[N[(N[Power[N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t * N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $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 \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}}{{\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t \cdot \sqrt[3]{{k}^{2}}\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
add-cube-cbrt34.1%
pow334.1%
cbrt-prod34.1%
cbrt-div34.1%
rem-cbrt-cube40.2%
cbrt-prod69.0%
pow269.0%
Applied egg-rr69.0%
add-cube-cbrt68.9%
Applied egg-rr76.2%
unpow276.2%
unpow376.2%
associate-*r*81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in k around 0 81.9%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.9%
Final simplification80.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (sin k) (tan k))))
(if (<= k 9.5e-101)
(/ (/ 2.0 (pow (/ k t) 2.0)) (/ (pow (* t (cbrt (/ t_1 l))) 3.0) l))
(if (<= k 5.4e+191)
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (pow k 2.0) (* t (pow (sin k) 2.0)))))
(if (<= k 6e+286)
(/
(/ (* 2.0 (pow (/ k t) -2.0)) t_1)
(pow (* t (pow (cbrt l) -2.0)) 3.0))
(* (* l l) (log (pow (exp (/ 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 <= 9.5e-101) {
tmp = (2.0 / pow((k / t), 2.0)) / (pow((t * cbrt((t_1 / l))), 3.0) / l);
} else if (k <= 5.4e+191) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (pow(k, 2.0) * (t * pow(sin(k), 2.0))));
} else if (k <= 6e+286) {
tmp = ((2.0 * pow((k / t), -2.0)) / t_1) / pow((t * pow(cbrt(l), -2.0)), 3.0);
} else {
tmp = (l * l) * log(pow(exp((2.0 / t)), pow(k, -4.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.sin(k) * Math.tan(k);
double tmp;
if (k <= 9.5e-101) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / (Math.pow((t * Math.cbrt((t_1 / l))), 3.0) / l);
} else if (k <= 5.4e+191) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))));
} else if (k <= 6e+286) {
tmp = ((2.0 * Math.pow((k / t), -2.0)) / t_1) / Math.pow((t * Math.pow(Math.cbrt(l), -2.0)), 3.0);
} else {
tmp = (l * l) * Math.log(Math.pow(Math.exp((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 <= 9.5e-101) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64((Float64(t * cbrt(Float64(t_1 / l))) ^ 3.0) / l)); elseif (k <= 5.4e+191) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64((k ^ 2.0) * Float64(t * (sin(k) ^ 2.0))))); elseif (k <= 6e+286) tmp = Float64(Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / t_1) / (Float64(t * (cbrt(l) ^ -2.0)) ^ 3.0)); else tmp = Float64(Float64(l * l) * log((exp(Float64(2.0 / t)) ^ (k ^ -4.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 9.5e-101], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(t * N[Power[N[(t$95$1 / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.4e+191], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6e+286], N[(N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / N[Power[N[(t * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[Log[N[Power[N[Exp[N[(2.0 / t), $MachinePrecision]], $MachinePrecision], N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin k \cdot \tan k\\
\mathbf{if}\;k \leq 9.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\frac{{\left(t \cdot \sqrt[3]{\frac{t\_1}{\ell}}\right)}^{3}}{\ell}}\\
\mathbf{elif}\;k \leq 5.4 \cdot 10^{+191}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;k \leq 6 \cdot 10^{+286}:\\
\;\;\;\;\frac{\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{t\_1}}{{\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \log \left({\left(e^{\frac{2}{t}}\right)}^{\left({k}^{-4}\right)}\right)\\
\end{array}
\end{array}
if k < 9.49999999999999994e-101Initial program 36.3%
*-commutative36.3%
associate-/r*36.3%
Simplified40.9%
associate-*l/42.0%
associate-/r*52.4%
Applied egg-rr52.4%
add-cube-cbrt52.4%
pow352.4%
associate-/l*52.9%
cbrt-prod52.9%
unpow352.9%
add-cbrt-cube69.2%
Applied egg-rr69.2%
if 9.49999999999999994e-101 < k < 5.39999999999999992e191Initial program 21.9%
Simplified37.0%
Taylor expanded in t around 0 78.8%
if 5.39999999999999992e191 < k < 5.9999999999999998e286Initial program 35.4%
*-commutative35.4%
associate-/r*38.4%
Simplified43.1%
add-cube-cbrt43.1%
pow343.1%
cbrt-prod43.1%
cbrt-div43.1%
rem-cbrt-cube53.0%
cbrt-prod61.9%
pow261.9%
Applied egg-rr61.9%
*-un-lft-identity61.9%
div-inv61.9%
+-rgt-identity61.9%
pow-flip61.9%
metadata-eval61.9%
*-commutative61.9%
unpow-prod-down61.9%
pow361.9%
add-cube-cbrt61.8%
div-inv61.8%
pow-flip61.9%
metadata-eval61.9%
Applied egg-rr61.9%
*-lft-identity61.9%
associate-/r*62.0%
Simplified62.0%
if 5.9999999999999998e286 < k Initial program 100.0%
Simplified100.0%
Taylor expanded in k around 0 100.0%
*-commutative100.0%
associate-/r*100.0%
Simplified100.0%
add-log-exp100.0%
div-inv100.0%
exp-prod100.0%
pow-flip100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification71.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (sin k) (tan k))) (t_2 (/ 2.0 (pow (/ k t) 2.0))))
(if (<= k 9.5e-101)
(/ t_2 (/ (pow (* t (cbrt (/ t_1 l))) 3.0) l))
(if (<= k 8.2e+246)
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (pow k 2.0) (* t (pow (sin k) 2.0)))))
(if (<= k 1.25e+286)
(/ t_2 (* t_1 (pow (/ (pow t 1.5) l) 2.0)))
(* (* l l) (log (pow (exp (/ 2.0 t)) (pow k -4.0)))))))))
double code(double t, double l, double k) {
double t_1 = sin(k) * tan(k);
double t_2 = 2.0 / pow((k / t), 2.0);
double tmp;
if (k <= 9.5e-101) {
tmp = t_2 / (pow((t * cbrt((t_1 / l))), 3.0) / l);
} else if (k <= 8.2e+246) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (pow(k, 2.0) * (t * pow(sin(k), 2.0))));
} else if (k <= 1.25e+286) {
tmp = t_2 / (t_1 * pow((pow(t, 1.5) / l), 2.0));
} else {
tmp = (l * l) * log(pow(exp((2.0 / t)), pow(k, -4.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.sin(k) * Math.tan(k);
double t_2 = 2.0 / Math.pow((k / t), 2.0);
double tmp;
if (k <= 9.5e-101) {
tmp = t_2 / (Math.pow((t * Math.cbrt((t_1 / l))), 3.0) / l);
} else if (k <= 8.2e+246) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))));
} else if (k <= 1.25e+286) {
tmp = t_2 / (t_1 * Math.pow((Math.pow(t, 1.5) / l), 2.0));
} else {
tmp = (l * l) * Math.log(Math.pow(Math.exp((2.0 / t)), Math.pow(k, -4.0)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(sin(k) * tan(k)) t_2 = Float64(2.0 / (Float64(k / t) ^ 2.0)) tmp = 0.0 if (k <= 9.5e-101) tmp = Float64(t_2 / Float64((Float64(t * cbrt(Float64(t_1 / l))) ^ 3.0) / l)); elseif (k <= 8.2e+246) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64((k ^ 2.0) * Float64(t * (sin(k) ^ 2.0))))); elseif (k <= 1.25e+286) tmp = Float64(t_2 / Float64(t_1 * (Float64((t ^ 1.5) / l) ^ 2.0))); else tmp = Float64(Float64(l * l) * log((exp(Float64(2.0 / t)) ^ (k ^ -4.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 9.5e-101], N[(t$95$2 / N[(N[Power[N[(t * N[Power[N[(t$95$1 / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.2e+246], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.25e+286], N[(t$95$2 / N[(t$95$1 * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[Log[N[Power[N[Exp[N[(2.0 / t), $MachinePrecision]], $MachinePrecision], N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin k \cdot \tan k\\
t_2 := \frac{2}{{\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{if}\;k \leq 9.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{t\_2}{\frac{{\left(t \cdot \sqrt[3]{\frac{t\_1}{\ell}}\right)}^{3}}{\ell}}\\
\mathbf{elif}\;k \leq 8.2 \cdot 10^{+246}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;k \leq 1.25 \cdot 10^{+286}:\\
\;\;\;\;\frac{t\_2}{t\_1 \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \log \left({\left(e^{\frac{2}{t}}\right)}^{\left({k}^{-4}\right)}\right)\\
\end{array}
\end{array}
if k < 9.49999999999999994e-101Initial program 36.3%
*-commutative36.3%
associate-/r*36.3%
Simplified40.9%
associate-*l/42.0%
associate-/r*52.4%
Applied egg-rr52.4%
add-cube-cbrt52.4%
pow352.4%
associate-/l*52.9%
cbrt-prod52.9%
unpow352.9%
add-cbrt-cube69.2%
Applied egg-rr69.2%
if 9.49999999999999994e-101 < k < 8.19999999999999951e246Initial program 24.4%
Simplified37.6%
Taylor expanded in t around 0 73.9%
if 8.19999999999999951e246 < k < 1.2500000000000001e286Initial program 41.2%
*-commutative41.2%
associate-/r*41.2%
Simplified41.2%
add-sqr-sqrt40.0%
pow240.0%
sqrt-div40.0%
sqrt-pow140.4%
metadata-eval40.4%
sqrt-prod20.0%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
if 1.2500000000000001e286 < k Initial program 100.0%
Simplified100.0%
Taylor expanded in k around 0 100.0%
*-commutative100.0%
associate-/r*100.0%
Simplified100.0%
add-log-exp100.0%
div-inv100.0%
exp-prod100.0%
pow-flip100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification70.6%
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 5e-323)
(*
l
(/ (* 2.0 (pow (/ k t) -2.0)) (* (/ (* (sin k) (tan k)) l) (pow t 3.0))))
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (pow k 2.0) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = l * ((2.0 * pow((k / t), -2.0)) / (((sin(k) * tan(k)) / l) * pow(t, 3.0)));
} else {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (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 * l) <= 5d-323) then
tmp = l * ((2.0d0 * ((k / t) ** (-2.0d0))) / (((sin(k) * tan(k)) / l) * (t ** 3.0d0)))
else
tmp = 2.0d0 * ((cos(k) * (l ** 2.0d0)) / ((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 * l) <= 5e-323) {
tmp = l * ((2.0 * Math.pow((k / t), -2.0)) / (((Math.sin(k) * Math.tan(k)) / l) * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-323: tmp = l * ((2.0 * math.pow((k / t), -2.0)) / (((math.sin(k) * math.tan(k)) / l) * math.pow(t, 3.0))) else: tmp = 2.0 * ((math.cos(k) * math.pow(l, 2.0)) / (math.pow(k, 2.0) * (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-323) tmp = Float64(l * Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / Float64(Float64(Float64(sin(k) * tan(k)) / l) * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64((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 * l) <= 5e-323) tmp = l * ((2.0 * ((k / t) ^ -2.0)) / (((sin(k) * tan(k)) / l) * (t ^ 3.0))); else tmp = 2.0 * ((cos(k) * (l ^ 2.0)) / ((k ^ 2.0) * (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-323], N[(l * N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $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 \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;\ell \cdot \frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{\frac{\sin k \cdot \tan k}{\ell} \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
associate-*l/34.0%
associate-/r*59.7%
Applied egg-rr59.7%
associate-/r/63.2%
div-inv63.2%
+-rgt-identity63.2%
pow-flip63.2%
metadata-eval63.2%
associate-/l*64.9%
Applied egg-rr64.9%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.9%
Final simplification76.8%
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 5e-323)
(*
l
(/ (* 2.0 (pow (/ k t) -2.0)) (* (/ (* (sin k) (tan k)) l) (pow t 3.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 * l) <= 5e-323) {
tmp = l * ((2.0 * pow((k / t), -2.0)) / (((sin(k) * tan(k)) / l) * pow(t, 3.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 * l) <= 5d-323) then
tmp = l * ((2.0d0 * ((k / t) ** (-2.0d0))) / (((sin(k) * tan(k)) / l) * (t ** 3.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 * l) <= 5e-323) {
tmp = l * ((2.0 * Math.pow((k / t), -2.0)) / (((Math.sin(k) * Math.tan(k)) / l) * Math.pow(t, 3.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 * l) <= 5e-323: tmp = l * ((2.0 * math.pow((k / t), -2.0)) / (((math.sin(k) * math.tan(k)) / l) * math.pow(t, 3.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 (Float64(l * l) <= 5e-323) tmp = Float64(l * Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / Float64(Float64(Float64(sin(k) * tan(k)) / l) * (t ^ 3.0)))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(Float64(cos(k) / (k ^ 2.0)) / t) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-323) tmp = l * ((2.0 * ((k / t) ^ -2.0)) / (((sin(k) * tan(k)) / l) * (t ^ 3.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[N[(l * l), $MachinePrecision], 5e-323], N[(l * N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[(N[Cos[k], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;\ell \cdot \frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{\frac{\sin k \cdot \tan k}{\ell} \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\frac{\cos k}{{k}^{2}}}{t}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
associate-*l/34.0%
associate-/r*59.7%
Applied egg-rr59.7%
associate-/r/63.2%
div-inv63.2%
+-rgt-identity63.2%
pow-flip63.2%
metadata-eval63.2%
associate-/l*64.9%
Applied egg-rr64.9%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.6%
associate-*r*79.6%
associate-/r*79.6%
Simplified79.6%
*-un-lft-identity79.6%
associate-/r*79.6%
Applied egg-rr79.6%
Final simplification76.5%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-323) (/ (/ 2.0 (pow (/ k t) 2.0)) (* (pow k 2.0) (* (/ (pow t 2.0) l) (/ t l)))) (* (* 2.0 (/ (/ (cos k) (* t (pow k 2.0))) (pow (sin k) 2.0))) (* l l))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = (2.0 / pow((k / t), 2.0)) / (pow(k, 2.0) * ((pow(t, 2.0) / l) * (t / l)));
} else {
tmp = (2.0 * ((cos(k) / (t * pow(k, 2.0))) / pow(sin(k), 2.0))) * (l * 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 ((l * l) <= 5d-323) then
tmp = (2.0d0 / ((k / t) ** 2.0d0)) / ((k ** 2.0d0) * (((t ** 2.0d0) / l) * (t / l)))
else
tmp = (2.0d0 * ((cos(k) / (t * (k ** 2.0d0))) / (sin(k) ** 2.0d0))) * (l * l)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / (Math.pow(k, 2.0) * ((Math.pow(t, 2.0) / l) * (t / l)));
} else {
tmp = (2.0 * ((Math.cos(k) / (t * Math.pow(k, 2.0))) / Math.pow(Math.sin(k), 2.0))) * (l * l);
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-323: tmp = (2.0 / math.pow((k / t), 2.0)) / (math.pow(k, 2.0) * ((math.pow(t, 2.0) / l) * (t / l))) else: tmp = (2.0 * ((math.cos(k) / (t * math.pow(k, 2.0))) / math.pow(math.sin(k), 2.0))) * (l * l) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-323) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64((k ^ 2.0) * Float64(Float64((t ^ 2.0) / l) * Float64(t / l)))); else tmp = Float64(Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (k ^ 2.0))) / (sin(k) ^ 2.0))) * Float64(l * l)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-323) tmp = (2.0 / ((k / t) ^ 2.0)) / ((k ^ 2.0) * (((t ^ 2.0) / l) * (t / l))); else tmp = (2.0 * ((cos(k) / (t * (k ^ 2.0))) / (sin(k) ^ 2.0))) * (l * l); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-323], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{{k}^{2} \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \frac{\frac{\cos k}{t \cdot {k}^{2}}}{{\sin k}^{2}}\right) \cdot \left(\ell \cdot \ell\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
unpow334.1%
times-frac61.2%
pow261.2%
Applied egg-rr61.2%
Taylor expanded in k around 0 61.2%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.6%
associate-*r*79.6%
associate-/r*79.6%
Simplified79.6%
Final simplification75.7%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-323) (/ (/ 2.0 (pow (/ k t) 2.0)) (* (pow k 2.0) (* (/ (pow t 2.0) l) (/ t l)))) (* (* 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 * l) <= 5e-323) {
tmp = (2.0 / pow((k / t), 2.0)) / (pow(k, 2.0) * ((pow(t, 2.0) / l) * (t / l)));
} 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 * l) <= 5d-323) then
tmp = (2.0d0 / ((k / t) ** 2.0d0)) / ((k ** 2.0d0) * (((t ** 2.0d0) / l) * (t / l)))
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 * l) <= 5e-323) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / (Math.pow(k, 2.0) * ((Math.pow(t, 2.0) / l) * (t / l)));
} 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 * l) <= 5e-323: tmp = (2.0 / math.pow((k / t), 2.0)) / (math.pow(k, 2.0) * ((math.pow(t, 2.0) / l) * (t / l))) 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 (Float64(l * l) <= 5e-323) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64((k ^ 2.0) * Float64(Float64((t ^ 2.0) / l) * Float64(t / l)))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(Float64(cos(k) / (k ^ 2.0)) / t) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-323) tmp = (2.0 / ((k / t) ^ 2.0)) / ((k ^ 2.0) * (((t ^ 2.0) / l) * (t / l))); 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[N[(l * l), $MachinePrecision], 5e-323], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[(N[Cos[k], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{{k}^{2} \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\frac{\cos k}{{k}^{2}}}{t}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
unpow334.1%
times-frac61.2%
pow261.2%
Applied egg-rr61.2%
Taylor expanded in k around 0 61.2%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.6%
associate-*r*79.6%
associate-/r*79.6%
Simplified79.6%
*-un-lft-identity79.6%
associate-/r*79.6%
Applied egg-rr79.6%
Final simplification75.7%
(FPCore (t l k)
:precision binary64
(if (<= k 9.5e-215)
(* (* l l) (/ 2.0 (* t (pow k 4.0))))
(if (<= k 7e-174)
(/ (/ 2.0 (pow (/ k t) 2.0)) (/ (/ (* (pow k 2.0) (pow t 3.0)) l) l))
(if (<= k 1.6e-9)
(* (* l l) (* 2.0 (/ (/ (/ 1.0 (pow k 2.0)) t) (pow (sin k) 2.0))))
(*
(* l l)
(*
2.0
(/
(/ 1.0 (* t (/ (pow k 2.0) (cos k))))
(- 0.5 (/ (cos (* 2.0 k)) 2.0)))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-215) {
tmp = (l * l) * (2.0 / (t * pow(k, 4.0)));
} else if (k <= 7e-174) {
tmp = (2.0 / pow((k / t), 2.0)) / (((pow(k, 2.0) * pow(t, 3.0)) / l) / l);
} else if (k <= 1.6e-9) {
tmp = (l * l) * (2.0 * (((1.0 / pow(k, 2.0)) / t) / pow(sin(k), 2.0)));
} else {
tmp = (l * l) * (2.0 * ((1.0 / (t * (pow(k, 2.0) / cos(k)))) / (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) :: tmp
if (k <= 9.5d-215) then
tmp = (l * l) * (2.0d0 / (t * (k ** 4.0d0)))
else if (k <= 7d-174) then
tmp = (2.0d0 / ((k / t) ** 2.0d0)) / ((((k ** 2.0d0) * (t ** 3.0d0)) / l) / l)
else if (k <= 1.6d-9) then
tmp = (l * l) * (2.0d0 * (((1.0d0 / (k ** 2.0d0)) / t) / (sin(k) ** 2.0d0)))
else
tmp = (l * l) * (2.0d0 * ((1.0d0 / (t * ((k ** 2.0d0) / cos(k)))) / (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 tmp;
if (k <= 9.5e-215) {
tmp = (l * l) * (2.0 / (t * Math.pow(k, 4.0)));
} else if (k <= 7e-174) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / (((Math.pow(k, 2.0) * Math.pow(t, 3.0)) / l) / l);
} else if (k <= 1.6e-9) {
tmp = (l * l) * (2.0 * (((1.0 / Math.pow(k, 2.0)) / t) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = (l * l) * (2.0 * ((1.0 / (t * (Math.pow(k, 2.0) / Math.cos(k)))) / (0.5 - (Math.cos((2.0 * k)) / 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 9.5e-215: tmp = (l * l) * (2.0 / (t * math.pow(k, 4.0))) elif k <= 7e-174: tmp = (2.0 / math.pow((k / t), 2.0)) / (((math.pow(k, 2.0) * math.pow(t, 3.0)) / l) / l) elif k <= 1.6e-9: tmp = (l * l) * (2.0 * (((1.0 / math.pow(k, 2.0)) / t) / math.pow(math.sin(k), 2.0))) else: tmp = (l * l) * (2.0 * ((1.0 / (t * (math.pow(k, 2.0) / math.cos(k)))) / (0.5 - (math.cos((2.0 * k)) / 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 9.5e-215) tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(t * (k ^ 4.0)))); elseif (k <= 7e-174) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64(Float64(Float64((k ^ 2.0) * (t ^ 3.0)) / l) / l)); elseif (k <= 1.6e-9) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(Float64(1.0 / (k ^ 2.0)) / t) / (sin(k) ^ 2.0)))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(1.0 / Float64(t * Float64((k ^ 2.0) / cos(k)))) / Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9.5e-215) tmp = (l * l) * (2.0 / (t * (k ^ 4.0))); elseif (k <= 7e-174) tmp = (2.0 / ((k / t) ^ 2.0)) / ((((k ^ 2.0) * (t ^ 3.0)) / l) / l); elseif (k <= 1.6e-9) tmp = (l * l) * (2.0 * (((1.0 / (k ^ 2.0)) / t) / (sin(k) ^ 2.0))); else tmp = (l * l) * (2.0 * ((1.0 / (t * ((k ^ 2.0) / cos(k)))) / (0.5 - (cos((2.0 * k)) / 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 9.5e-215], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7e-174], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6e-9], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[(1.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(1.0 / N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-215}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {k}^{4}}\\
\mathbf{elif}\;k \leq 7 \cdot 10^{-174}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\frac{\frac{{k}^{2} \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;k \leq 1.6 \cdot 10^{-9}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\frac{1}{{k}^{2}}}{t}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{1}{t \cdot \frac{{k}^{2}}{\cos k}}}{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}\right)\\
\end{array}
\end{array}
if k < 9.5000000000000007e-215Initial program 33.9%
Simplified40.5%
Taylor expanded in k around 0 61.7%
if 9.5000000000000007e-215 < k < 6.99999999999999975e-174Initial program 33.3%
*-commutative33.3%
associate-/r*33.3%
Simplified33.3%
associate-*l/33.3%
associate-/r*83.3%
Applied egg-rr83.3%
Taylor expanded in k around 0 83.3%
if 6.99999999999999975e-174 < k < 1.60000000000000006e-9Initial program 38.0%
Simplified38.0%
Taylor expanded in t around 0 76.0%
associate-*r*76.0%
associate-/r*76.0%
Simplified76.0%
Taylor expanded in k around 0 76.0%
associate-/r*57.2%
Simplified76.0%
if 1.60000000000000006e-9 < k Initial program 29.9%
Simplified45.4%
Taylor expanded in t around 0 72.6%
associate-*r*72.7%
associate-/r*72.7%
Simplified72.7%
unpow272.7%
sin-mult72.7%
Applied egg-rr72.7%
div-sub72.7%
+-inverses72.7%
cos-072.7%
metadata-eval72.7%
count-272.7%
*-commutative72.7%
Simplified72.7%
clear-num72.7%
inv-pow72.7%
*-commutative72.7%
Applied egg-rr72.7%
unpow-172.7%
associate-/l*72.6%
Simplified72.6%
Final simplification66.8%
(FPCore (t l k)
:precision binary64
(if (<= k 9.5e-215)
(* (* l l) (/ 2.0 (* t (pow k 4.0))))
(if (<= k 3.8e-174)
(/ (/ 2.0 (pow (/ k t) 2.0)) (/ (/ (* (pow k 2.0) (pow t 3.0)) l) l))
(if (<= k 1.6e-9)
(* (* l l) (* 2.0 (/ (/ (/ 1.0 (pow k 2.0)) t) (pow (sin k) 2.0))))
(*
(* l l)
(*
2.0
(/
(/ (cos k) (* t (pow k 2.0)))
(- 0.5 (/ (cos (* 2.0 k)) 2.0)))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-215) {
tmp = (l * l) * (2.0 / (t * pow(k, 4.0)));
} else if (k <= 3.8e-174) {
tmp = (2.0 / pow((k / t), 2.0)) / (((pow(k, 2.0) * pow(t, 3.0)) / l) / l);
} else if (k <= 1.6e-9) {
tmp = (l * l) * (2.0 * (((1.0 / pow(k, 2.0)) / t) / pow(sin(k), 2.0)));
} else {
tmp = (l * l) * (2.0 * ((cos(k) / (t * pow(k, 2.0))) / (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) :: tmp
if (k <= 9.5d-215) then
tmp = (l * l) * (2.0d0 / (t * (k ** 4.0d0)))
else if (k <= 3.8d-174) then
tmp = (2.0d0 / ((k / t) ** 2.0d0)) / ((((k ** 2.0d0) * (t ** 3.0d0)) / l) / l)
else if (k <= 1.6d-9) then
tmp = (l * l) * (2.0d0 * (((1.0d0 / (k ** 2.0d0)) / t) / (sin(k) ** 2.0d0)))
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (t * (k ** 2.0d0))) / (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 tmp;
if (k <= 9.5e-215) {
tmp = (l * l) * (2.0 / (t * Math.pow(k, 4.0)));
} else if (k <= 3.8e-174) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / (((Math.pow(k, 2.0) * Math.pow(t, 3.0)) / l) / l);
} else if (k <= 1.6e-9) {
tmp = (l * l) * (2.0 * (((1.0 / Math.pow(k, 2.0)) / t) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / (t * Math.pow(k, 2.0))) / (0.5 - (Math.cos((2.0 * k)) / 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 9.5e-215: tmp = (l * l) * (2.0 / (t * math.pow(k, 4.0))) elif k <= 3.8e-174: tmp = (2.0 / math.pow((k / t), 2.0)) / (((math.pow(k, 2.0) * math.pow(t, 3.0)) / l) / l) elif k <= 1.6e-9: tmp = (l * l) * (2.0 * (((1.0 / math.pow(k, 2.0)) / t) / math.pow(math.sin(k), 2.0))) else: tmp = (l * l) * (2.0 * ((math.cos(k) / (t * math.pow(k, 2.0))) / (0.5 - (math.cos((2.0 * k)) / 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 9.5e-215) tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(t * (k ^ 4.0)))); elseif (k <= 3.8e-174) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64(Float64(Float64((k ^ 2.0) * (t ^ 3.0)) / l) / l)); elseif (k <= 1.6e-9) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(Float64(1.0 / (k ^ 2.0)) / t) / (sin(k) ^ 2.0)))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (k ^ 2.0))) / Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9.5e-215) tmp = (l * l) * (2.0 / (t * (k ^ 4.0))); elseif (k <= 3.8e-174) tmp = (2.0 / ((k / t) ^ 2.0)) / ((((k ^ 2.0) * (t ^ 3.0)) / l) / l); elseif (k <= 1.6e-9) tmp = (l * l) * (2.0 * (((1.0 / (k ^ 2.0)) / t) / (sin(k) ^ 2.0))); else tmp = (l * l) * (2.0 * ((cos(k) / (t * (k ^ 2.0))) / (0.5 - (cos((2.0 * k)) / 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 9.5e-215], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e-174], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6e-9], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[(1.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-215}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {k}^{4}}\\
\mathbf{elif}\;k \leq 3.8 \cdot 10^{-174}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\frac{\frac{{k}^{2} \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;k \leq 1.6 \cdot 10^{-9}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\frac{1}{{k}^{2}}}{t}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{t \cdot {k}^{2}}}{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}\right)\\
\end{array}
\end{array}
if k < 9.5000000000000007e-215Initial program 33.9%
Simplified40.5%
Taylor expanded in k around 0 61.7%
if 9.5000000000000007e-215 < k < 3.80000000000000021e-174Initial program 33.3%
*-commutative33.3%
associate-/r*33.3%
Simplified33.3%
associate-*l/33.3%
associate-/r*83.3%
Applied egg-rr83.3%
Taylor expanded in k around 0 83.3%
if 3.80000000000000021e-174 < k < 1.60000000000000006e-9Initial program 38.0%
Simplified38.0%
Taylor expanded in t around 0 76.0%
associate-*r*76.0%
associate-/r*76.0%
Simplified76.0%
Taylor expanded in k around 0 76.0%
associate-/r*57.2%
Simplified76.0%
if 1.60000000000000006e-9 < k Initial program 29.9%
Simplified45.4%
Taylor expanded in t around 0 72.6%
associate-*r*72.7%
associate-/r*72.7%
Simplified72.7%
unpow272.7%
sin-mult72.7%
Applied egg-rr72.7%
div-sub72.7%
+-inverses72.7%
cos-072.7%
metadata-eval72.7%
count-272.7%
*-commutative72.7%
Simplified72.7%
Final simplification66.8%
(FPCore (t l k)
:precision binary64
(if (<= t 1.02e-65)
(*
(* l l)
(* 2.0 (/ (/ (cos k) (* t (pow k 2.0))) (- 0.5 (/ (cos (* 2.0 k)) 2.0)))))
(if (<= t 1.4e+100)
(/
(/ 2.0 (* (/ k t) (/ k t)))
(/ (/ (* (* (sin k) (tan k)) (pow t 3.0)) l) l))
(* (* l l) (* 2.0 (/ (/ (/ 1.0 (pow k 2.0)) t) (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (t <= 1.02e-65) {
tmp = (l * l) * (2.0 * ((cos(k) / (t * pow(k, 2.0))) / (0.5 - (cos((2.0 * k)) / 2.0))));
} else if (t <= 1.4e+100) {
tmp = (2.0 / ((k / t) * (k / t))) / ((((sin(k) * tan(k)) * pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 * (((1.0 / 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 (t <= 1.02d-65) then
tmp = (l * l) * (2.0d0 * ((cos(k) / (t * (k ** 2.0d0))) / (0.5d0 - (cos((2.0d0 * k)) / 2.0d0))))
else if (t <= 1.4d+100) then
tmp = (2.0d0 / ((k / t) * (k / t))) / ((((sin(k) * tan(k)) * (t ** 3.0d0)) / l) / l)
else
tmp = (l * l) * (2.0d0 * (((1.0d0 / (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 (t <= 1.02e-65) {
tmp = (l * l) * (2.0 * ((Math.cos(k) / (t * Math.pow(k, 2.0))) / (0.5 - (Math.cos((2.0 * k)) / 2.0))));
} else if (t <= 1.4e+100) {
tmp = (2.0 / ((k / t) * (k / t))) / ((((Math.sin(k) * Math.tan(k)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 * (((1.0 / Math.pow(k, 2.0)) / t) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 1.02e-65: tmp = (l * l) * (2.0 * ((math.cos(k) / (t * math.pow(k, 2.0))) / (0.5 - (math.cos((2.0 * k)) / 2.0)))) elif t <= 1.4e+100: tmp = (2.0 / ((k / t) * (k / t))) / ((((math.sin(k) * math.tan(k)) * math.pow(t, 3.0)) / l) / l) else: tmp = (l * l) * (2.0 * (((1.0 / math.pow(k, 2.0)) / t) / math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 1.02e-65) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (k ^ 2.0))) / Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))); elseif (t <= 1.4e+100) tmp = Float64(Float64(2.0 / Float64(Float64(k / t) * Float64(k / t))) / Float64(Float64(Float64(Float64(sin(k) * tan(k)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(Float64(1.0 / (k ^ 2.0)) / t) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 1.02e-65) tmp = (l * l) * (2.0 * ((cos(k) / (t * (k ^ 2.0))) / (0.5 - (cos((2.0 * k)) / 2.0)))); elseif (t <= 1.4e+100) tmp = (2.0 / ((k / t) * (k / t))) / ((((sin(k) * tan(k)) * (t ^ 3.0)) / l) / l); else tmp = (l * l) * (2.0 * (((1.0 / (k ^ 2.0)) / t) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 1.02e-65], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+100], N[(N[(2.0 / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[(1.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.02 \cdot 10^{-65}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{t \cdot {k}^{2}}}{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}\right)\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+100}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{t} \cdot \frac{k}{t}}}{\frac{\frac{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\frac{1}{{k}^{2}}}{t}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if t < 1.02000000000000004e-65Initial program 35.7%
Simplified41.5%
Taylor expanded in t around 0 71.7%
associate-*r*71.7%
associate-/r*71.7%
Simplified71.7%
unpow271.7%
sin-mult67.7%
Applied egg-rr67.7%
div-sub67.7%
+-inverses67.7%
cos-067.7%
metadata-eval67.7%
count-267.7%
*-commutative67.7%
Simplified67.7%
if 1.02000000000000004e-65 < t < 1.3999999999999999e100Initial program 60.4%
*-commutative60.4%
associate-/r*62.3%
Simplified68.3%
associate-*l/68.2%
associate-/r*76.5%
Applied egg-rr76.5%
unpow276.5%
Applied egg-rr76.5%
if 1.3999999999999999e100 < t Initial program 6.3%
Simplified25.2%
Taylor expanded in t around 0 81.3%
associate-*r*81.4%
associate-/r*81.4%
Simplified81.4%
Taylor expanded in k around 0 73.8%
associate-/r*61.9%
Simplified73.8%
Final simplification70.0%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-323) (/ (/ 2.0 (pow (/ k t) 2.0)) (/ (* (pow k 2.0) (/ (pow t 3.0) l)) l)) (* (* l l) (* 2.0 (/ (/ (cos k) (* t (pow k 2.0))) (pow k 2.0))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = (2.0 / pow((k / t), 2.0)) / ((pow(k, 2.0) * (pow(t, 3.0) / l)) / l);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / (t * pow(k, 2.0))) / pow(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 * l) <= 5d-323) then
tmp = (2.0d0 / ((k / t) ** 2.0d0)) / (((k ** 2.0d0) * ((t ** 3.0d0) / l)) / l)
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (t * (k ** 2.0d0))) / (k ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / ((Math.pow(k, 2.0) * (Math.pow(t, 3.0) / l)) / l);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / (t * Math.pow(k, 2.0))) / Math.pow(k, 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-323: tmp = (2.0 / math.pow((k / t), 2.0)) / ((math.pow(k, 2.0) * (math.pow(t, 3.0) / l)) / l) else: tmp = (l * l) * (2.0 * ((math.cos(k) / (t * math.pow(k, 2.0))) / math.pow(k, 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-323) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64(Float64((k ^ 2.0) * Float64((t ^ 3.0) / l)) / l)); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (k ^ 2.0))) / (k ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-323) tmp = (2.0 / ((k / t) ^ 2.0)) / (((k ^ 2.0) * ((t ^ 3.0) / l)) / l); else tmp = (l * l) * (2.0 * ((cos(k) / (t * (k ^ 2.0))) / (k ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-323], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\frac{{k}^{2} \cdot \frac{{t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{t \cdot {k}^{2}}}{{k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
associate-*l/34.0%
associate-/r*59.7%
Applied egg-rr59.7%
Taylor expanded in k around 0 59.7%
associate-/l*57.8%
Simplified57.8%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.6%
associate-*r*79.6%
associate-/r*79.6%
Simplified79.6%
Taylor expanded in k around 0 70.2%
Final simplification67.6%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-323) (/ (/ 2.0 (pow (/ k t) 2.0)) (/ (/ (* (pow k 2.0) (pow t 3.0)) l) l)) (* (* l l) (* 2.0 (/ (/ (cos k) (* t (pow k 2.0))) (pow k 2.0))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = (2.0 / pow((k / t), 2.0)) / (((pow(k, 2.0) * pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / (t * pow(k, 2.0))) / pow(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 * l) <= 5d-323) then
tmp = (2.0d0 / ((k / t) ** 2.0d0)) / ((((k ** 2.0d0) * (t ** 3.0d0)) / l) / l)
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (t * (k ** 2.0d0))) / (k ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-323) {
tmp = (2.0 / Math.pow((k / t), 2.0)) / (((Math.pow(k, 2.0) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / (t * Math.pow(k, 2.0))) / Math.pow(k, 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-323: tmp = (2.0 / math.pow((k / t), 2.0)) / (((math.pow(k, 2.0) * math.pow(t, 3.0)) / l) / l) else: tmp = (l * l) * (2.0 * ((math.cos(k) / (t * math.pow(k, 2.0))) / math.pow(k, 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-323) tmp = Float64(Float64(2.0 / (Float64(k / t) ^ 2.0)) / Float64(Float64(Float64((k ^ 2.0) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (k ^ 2.0))) / (k ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-323) tmp = (2.0 / ((k / t) ^ 2.0)) / ((((k ^ 2.0) * (t ^ 3.0)) / l) / l); else tmp = (l * l) * (2.0 * ((cos(k) / (t * (k ^ 2.0))) / (k ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-323], N[(N[(2.0 / N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-323}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\frac{\frac{{k}^{2} \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{t \cdot {k}^{2}}}{{k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 4.94066e-323Initial program 20.9%
*-commutative20.9%
associate-/r*20.9%
Simplified34.1%
associate-*l/34.0%
associate-/r*59.7%
Applied egg-rr59.7%
Taylor expanded in k around 0 59.7%
if 4.94066e-323 < (*.f64 l l) Initial program 36.7%
Simplified42.7%
Taylor expanded in t around 0 79.6%
associate-*r*79.6%
associate-/r*79.6%
Simplified79.6%
Taylor expanded in k around 0 70.2%
Final simplification68.0%
(FPCore (t l k) :precision binary64 (* (* l l) (* 2.0 (/ (/ 1.0 (* t (pow k 2.0))) (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
return (l * l) * (2.0 * ((1.0 / (t * pow(k, 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 * l) * (2.0d0 * ((1.0d0 / (t * (k ** 2.0d0))) / (sin(k) ** 2.0d0)))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 * ((1.0 / (t * Math.pow(k, 2.0))) / Math.pow(Math.sin(k), 2.0)));
}
def code(t, l, k): return (l * l) * (2.0 * ((1.0 / (t * math.pow(k, 2.0))) / math.pow(math.sin(k), 2.0)))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(1.0 / Float64(t * (k ^ 2.0))) / (sin(k) ^ 2.0)))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 * ((1.0 / (t * (k ^ 2.0))) / (sin(k) ^ 2.0))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(1.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{1}{t \cdot {k}^{2}}}{{\sin k}^{2}}\right)
\end{array}
Initial program 33.4%
Simplified41.2%
Taylor expanded in t around 0 72.4%
associate-*r*72.5%
associate-/r*72.5%
Simplified72.5%
Taylor expanded in k around 0 63.4%
Final simplification63.4%
(FPCore (t l k) :precision binary64 (* (* l l) (* 2.0 (/ (/ (cos k) (* t (pow k 2.0))) (pow k 2.0)))))
double code(double t, double l, double k) {
return (l * l) * (2.0 * ((cos(k) / (t * pow(k, 2.0))) / 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 = (l * l) * (2.0d0 * ((cos(k) / (t * (k ** 2.0d0))) / (k ** 2.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, 2.0))) / Math.pow(k, 2.0)));
}
def code(t, l, k): return (l * l) * (2.0 * ((math.cos(k) / (t * math.pow(k, 2.0))) / math.pow(k, 2.0)))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (k ^ 2.0))) / (k ^ 2.0)))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 * ((cos(k) / (t * (k ^ 2.0))) / (k ^ 2.0))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{t \cdot {k}^{2}}}{{k}^{2}}\right)
\end{array}
Initial program 33.4%
Simplified41.2%
Taylor expanded in t around 0 72.4%
associate-*r*72.5%
associate-/r*72.5%
Simplified72.5%
Taylor expanded in k around 0 65.0%
Final simplification65.0%
(FPCore (t l k)
:precision binary64
(if (<= k 5.6e+74)
(*
(* l l)
(/
(+ (* -0.3333333333333333 (/ (pow k 2.0) t)) (* 2.0 (/ 1.0 t)))
(pow k 4.0)))
(*
(* l l)
(* 2.0 (/ (/ 1.0 (* t (pow k 2.0))) (- 0.5 (/ (cos (* 2.0 k)) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.6e+74) {
tmp = (l * l) * (((-0.3333333333333333 * (pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / pow(k, 4.0));
} else {
tmp = (l * l) * (2.0 * ((1.0 / (t * pow(k, 2.0))) / (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) :: tmp
if (k <= 5.6d+74) then
tmp = (l * l) * ((((-0.3333333333333333d0) * ((k ** 2.0d0) / t)) + (2.0d0 * (1.0d0 / t))) / (k ** 4.0d0))
else
tmp = (l * l) * (2.0d0 * ((1.0d0 / (t * (k ** 2.0d0))) / (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 tmp;
if (k <= 5.6e+74) {
tmp = (l * l) * (((-0.3333333333333333 * (Math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / Math.pow(k, 4.0));
} else {
tmp = (l * l) * (2.0 * ((1.0 / (t * Math.pow(k, 2.0))) / (0.5 - (Math.cos((2.0 * k)) / 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5.6e+74: tmp = (l * l) * (((-0.3333333333333333 * (math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / math.pow(k, 4.0)) else: tmp = (l * l) * (2.0 * ((1.0 / (t * math.pow(k, 2.0))) / (0.5 - (math.cos((2.0 * k)) / 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5.6e+74) 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(Float64(l * l) * Float64(2.0 * Float64(Float64(1.0 / Float64(t * (k ^ 2.0))) / Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.6e+74) tmp = (l * l) * (((-0.3333333333333333 * ((k ^ 2.0) / t)) + (2.0 * (1.0 / t))) / (k ^ 4.0)); else tmp = (l * l) * (2.0 * ((1.0 / (t * (k ^ 2.0))) / (0.5 - (cos((2.0 * k)) / 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5.6e+74], 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[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(1.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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}
\mathbf{if}\;k \leq 5.6 \cdot 10^{+74}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333 \cdot \frac{{k}^{2}}{t} + 2 \cdot \frac{1}{t}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{1}{t \cdot {k}^{2}}}{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}\right)\\
\end{array}
\end{array}
if k < 5.60000000000000003e74Initial program 33.6%
Simplified42.1%
Taylor expanded in k around 0 56.0%
if 5.60000000000000003e74 < k Initial program 32.0%
Simplified36.9%
Taylor expanded in t around 0 59.9%
associate-*r*59.9%
associate-/r*59.9%
Simplified59.9%
unpow259.9%
sin-mult60.0%
Applied egg-rr60.0%
div-sub60.0%
+-inverses60.0%
cos-060.0%
metadata-eval60.0%
count-260.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in k around 0 49.6%
Final simplification54.9%
(FPCore (t l k)
:precision binary64
(if (<= k 5.5e+74)
(*
(* l l)
(/
(+ (* -0.3333333333333333 (/ (pow k 2.0) t)) (* 2.0 (/ 1.0 t)))
(pow k 4.0)))
(*
(* l l)
(* 2.0 (/ (/ (/ 1.0 (pow k 2.0)) t) (- 0.5 (/ (cos (* 2.0 k)) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.5e+74) {
tmp = (l * l) * (((-0.3333333333333333 * (pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / pow(k, 4.0));
} else {
tmp = (l * l) * (2.0 * (((1.0 / pow(k, 2.0)) / t) / (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) :: tmp
if (k <= 5.5d+74) then
tmp = (l * l) * ((((-0.3333333333333333d0) * ((k ** 2.0d0) / t)) + (2.0d0 * (1.0d0 / t))) / (k ** 4.0d0))
else
tmp = (l * l) * (2.0d0 * (((1.0d0 / (k ** 2.0d0)) / t) / (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 tmp;
if (k <= 5.5e+74) {
tmp = (l * l) * (((-0.3333333333333333 * (Math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / Math.pow(k, 4.0));
} else {
tmp = (l * l) * (2.0 * (((1.0 / Math.pow(k, 2.0)) / t) / (0.5 - (Math.cos((2.0 * k)) / 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5.5e+74: tmp = (l * l) * (((-0.3333333333333333 * (math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / math.pow(k, 4.0)) else: tmp = (l * l) * (2.0 * (((1.0 / math.pow(k, 2.0)) / t) / (0.5 - (math.cos((2.0 * k)) / 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5.5e+74) 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(Float64(l * l) * Float64(2.0 * Float64(Float64(Float64(1.0 / (k ^ 2.0)) / t) / Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.5e+74) tmp = (l * l) * (((-0.3333333333333333 * ((k ^ 2.0) / t)) + (2.0 * (1.0 / t))) / (k ^ 4.0)); else tmp = (l * l) * (2.0 * (((1.0 / (k ^ 2.0)) / t) / (0.5 - (cos((2.0 * k)) / 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5.5e+74], 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[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[(1.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / 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}
\mathbf{if}\;k \leq 5.5 \cdot 10^{+74}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333 \cdot \frac{{k}^{2}}{t} + 2 \cdot \frac{1}{t}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\frac{1}{{k}^{2}}}{t}}{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}\right)\\
\end{array}
\end{array}
if k < 5.5000000000000003e74Initial program 33.6%
Simplified42.1%
Taylor expanded in k around 0 56.0%
if 5.5000000000000003e74 < k Initial program 32.0%
Simplified36.9%
Taylor expanded in t around 0 59.9%
associate-*r*59.9%
associate-/r*59.9%
Simplified59.9%
unpow259.9%
sin-mult60.0%
Applied egg-rr60.0%
div-sub60.0%
+-inverses60.0%
cos-060.0%
metadata-eval60.0%
count-260.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in k around 0 49.6%
associate-/r*49.6%
Simplified49.6%
Final simplification54.9%
(FPCore (t l k)
:precision binary64
(if (<= k 5e+73)
(*
(* l l)
(/
(+ (* -0.3333333333333333 (/ (pow k 2.0) t)) (* 2.0 (/ 1.0 t)))
(pow k 4.0)))
(* (/ 2.0 t) (* (pow l 2.0) (pow k -4.0)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5e+73) {
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(l, 2.0) * 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 <= 5d+73) then
tmp = (l * l) * ((((-0.3333333333333333d0) * ((k ** 2.0d0) / t)) + (2.0d0 * (1.0d0 / t))) / (k ** 4.0d0))
else
tmp = (2.0d0 / t) * ((l ** 2.0d0) * (k ** (-4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5e+73) {
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(l, 2.0) * Math.pow(k, -4.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5e+73: 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(l, 2.0) * math.pow(k, -4.0)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5e+73) 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(Float64(2.0 / t) * Float64((l ^ 2.0) * (k ^ -4.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5e+73) tmp = (l * l) * (((-0.3333333333333333 * ((k ^ 2.0) / t)) + (2.0 * (1.0 / t))) / (k ^ 4.0)); else tmp = (2.0 / t) * ((l ^ 2.0) * (k ^ -4.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5e+73], 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[(N[(2.0 / t), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{+73}:\\
\;\;\;\;\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 \left({\ell}^{2} \cdot {k}^{-4}\right)\\
\end{array}
\end{array}
if k < 4.99999999999999976e73Initial program 33.6%
Simplified42.1%
Taylor expanded in k around 0 56.0%
if 4.99999999999999976e73 < k Initial program 32.0%
Simplified36.9%
Taylor expanded in k around 0 45.7%
*-commutative45.7%
associate-/r*45.7%
Simplified45.7%
pow145.7%
div-inv45.7%
pow-flip45.7%
metadata-eval45.7%
pow245.7%
Applied egg-rr45.7%
unpow145.7%
associate-*l*45.8%
Simplified45.8%
Final simplification54.3%
(FPCore (t l k) :precision binary64 (* (* l l) (/ 2.0 (* (pow k 4.0) (+ t (* (* t (pow k 2.0)) 0.16666666666666666))))))
double code(double t, double l, double k) {
return (l * l) * (2.0 / (pow(k, 4.0) * (t + ((t * pow(k, 2.0)) * 0.16666666666666666))));
}
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 + ((t * (k ** 2.0d0)) * 0.16666666666666666d0))))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 / (Math.pow(k, 4.0) * (t + ((t * Math.pow(k, 2.0)) * 0.16666666666666666))));
}
def code(t, l, k): return (l * l) * (2.0 / (math.pow(k, 4.0) * (t + ((t * math.pow(k, 2.0)) * 0.16666666666666666))))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 4.0) * Float64(t + Float64(Float64(t * (k ^ 2.0)) * 0.16666666666666666))))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 / ((k ^ 4.0) * (t + ((t * (k ^ 2.0)) * 0.16666666666666666)))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t + N[(N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{4} \cdot \left(t + \left(t \cdot {k}^{2}\right) \cdot 0.16666666666666666\right)}
\end{array}
Initial program 33.4%
Simplified41.2%
Taylor expanded in k around 0 60.5%
Final simplification60.5%
(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 33.4%
Simplified41.2%
Taylor expanded in k around 0 60.5%
Final simplification60.5%
herbie shell --seed 2024059
(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))))