
(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
(/
2.0
(pow
(*
(* (pow (* (cbrt k) (cbrt (/ 1.0 t))) 2.0) (cbrt (* (sin k) (tan k))))
(/ t (pow (cbrt l) 2.0)))
3.0)))
double code(double t, double l, double k) {
return 2.0 / pow(((pow((cbrt(k) * cbrt((1.0 / t))), 2.0) * cbrt((sin(k) * tan(k)))) * (t / pow(cbrt(l), 2.0))), 3.0);
}
public static double code(double t, double l, double k) {
return 2.0 / Math.pow(((Math.pow((Math.cbrt(k) * Math.cbrt((1.0 / t))), 2.0) * Math.cbrt((Math.sin(k) * Math.tan(k)))) * (t / Math.pow(Math.cbrt(l), 2.0))), 3.0);
}
function code(t, l, k) return Float64(2.0 / (Float64(Float64((Float64(cbrt(k) * cbrt(Float64(1.0 / t))) ^ 2.0) * cbrt(Float64(sin(k) * tan(k)))) * Float64(t / (cbrt(l) ^ 2.0))) ^ 3.0)) end
code[t_, l_, k_] := N[(2.0 / N[Power[N[(N[(N[Power[N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[(1.0 / t), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{{\left(\left({\left(\sqrt[3]{k} \cdot \sqrt[3]{\frac{1}{t}}\right)}^{2} \cdot \sqrt[3]{\sin k \cdot \tan k}\right) \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}
\end{array}
Initial program 36.7%
Simplified43.4%
unpow343.4%
times-frac57.3%
pow257.3%
Applied egg-rr57.3%
add-cube-cbrt57.2%
pow357.3%
Applied egg-rr76.8%
+-rgt-identity76.8%
unpow276.8%
frac-2neg76.8%
times-frac51.7%
associate-*l*51.7%
*-commutative51.7%
times-frac76.8%
frac-2neg76.8%
unpow276.8%
+-rgt-identity76.8%
cbrt-prod77.4%
Applied egg-rr88.6%
pow1/350.6%
div-inv50.6%
unpow-prod-down22.7%
pow1/343.5%
Applied egg-rr43.5%
unpow1/393.2%
Simplified93.2%
Final simplification93.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ t (pow (cbrt l) 2.0))))
(if (<= (* l l) 2e-316)
(/
2.0
(pow
(* t_1 (* (pow (cbrt (/ k t)) 2.0) (* (cbrt (tan k)) (cbrt (sin k)))))
3.0))
(if (<= (* l l) 5e+242)
(/
2.0
(/
(* (pow (* k (sqrt t)) 2.0) (pow (sin k) 2.0))
(* (cos k) (pow l 2.0))))
(/
2.0
(pow
(*
t_1
(* (cbrt (* (sin k) (tan k))) (pow (/ 1.0 (cbrt (/ t k))) 2.0)))
3.0))))))
double code(double t, double l, double k) {
double t_1 = t / pow(cbrt(l), 2.0);
double tmp;
if ((l * l) <= 2e-316) {
tmp = 2.0 / pow((t_1 * (pow(cbrt((k / t)), 2.0) * (cbrt(tan(k)) * cbrt(sin(k))))), 3.0);
} else if ((l * l) <= 5e+242) {
tmp = 2.0 / ((pow((k * sqrt(t)), 2.0) * pow(sin(k), 2.0)) / (cos(k) * pow(l, 2.0)));
} else {
tmp = 2.0 / pow((t_1 * (cbrt((sin(k) * tan(k))) * pow((1.0 / cbrt((t / k))), 2.0))), 3.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 tmp;
if ((l * l) <= 2e-316) {
tmp = 2.0 / Math.pow((t_1 * (Math.pow(Math.cbrt((k / t)), 2.0) * (Math.cbrt(Math.tan(k)) * Math.cbrt(Math.sin(k))))), 3.0);
} else if ((l * l) <= 5e+242) {
tmp = 2.0 / ((Math.pow((k * Math.sqrt(t)), 2.0) * Math.pow(Math.sin(k), 2.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
} else {
tmp = 2.0 / Math.pow((t_1 * (Math.cbrt((Math.sin(k) * Math.tan(k))) * Math.pow((1.0 / Math.cbrt((t / k))), 2.0))), 3.0);
}
return tmp;
}
function code(t, l, k) t_1 = Float64(t / (cbrt(l) ^ 2.0)) tmp = 0.0 if (Float64(l * l) <= 2e-316) tmp = Float64(2.0 / (Float64(t_1 * Float64((cbrt(Float64(k / t)) ^ 2.0) * Float64(cbrt(tan(k)) * cbrt(sin(k))))) ^ 3.0)); elseif (Float64(l * l) <= 5e+242) tmp = Float64(2.0 / Float64(Float64((Float64(k * sqrt(t)) ^ 2.0) * (sin(k) ^ 2.0)) / Float64(cos(k) * (l ^ 2.0)))); else tmp = Float64(2.0 / (Float64(t_1 * Float64(cbrt(Float64(sin(k) * tan(k))) * (Float64(1.0 / cbrt(Float64(t / k))) ^ 2.0))) ^ 3.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]}, If[LessEqual[N[(l * l), $MachinePrecision], 2e-316], N[(2.0 / N[Power[N[(t$95$1 * N[(N[Power[N[Power[N[(k / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+242], N[(2.0 / N[(N[(N[Power[N[(k * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$1 * N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(1.0 / N[Power[N[(t / k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-316}:\\
\;\;\;\;\frac{2}{{\left(t\_1 \cdot \left({\left(\sqrt[3]{\frac{k}{t}}\right)}^{2} \cdot \left(\sqrt[3]{\tan k} \cdot \sqrt[3]{\sin k}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+242}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t}\right)}^{2} \cdot {\sin k}^{2}}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_1 \cdot \left(\sqrt[3]{\sin k \cdot \tan k} \cdot {\left(\frac{1}{\sqrt[3]{\frac{t}{k}}}\right)}^{2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if (*.f64 l l) < 2.000000017e-316Initial program 15.9%
Simplified26.5%
unpow326.5%
times-frac52.7%
pow252.7%
Applied egg-rr52.7%
add-cube-cbrt52.7%
pow352.7%
Applied egg-rr77.4%
+-rgt-identity77.4%
unpow277.4%
frac-2neg77.4%
times-frac52.7%
associate-*l*52.7%
*-commutative52.7%
times-frac77.4%
frac-2neg77.4%
unpow277.4%
+-rgt-identity77.4%
cbrt-prod80.2%
Applied egg-rr88.4%
*-commutative88.4%
cbrt-prod91.2%
Applied egg-rr91.2%
if 2.000000017e-316 < (*.f64 l l) < 5.0000000000000004e242Initial program 44.6%
Simplified53.3%
unpow353.3%
times-frac59.1%
pow259.1%
Applied egg-rr59.1%
unpow259.1%
frac-2neg59.1%
frac-times35.5%
Applied egg-rr35.5%
Taylor expanded in t around 0 92.3%
associate-*r*92.4%
*-commutative92.4%
*-commutative92.4%
Simplified92.4%
add-sqr-sqrt46.6%
pow246.6%
*-commutative46.6%
sqrt-prod46.5%
unpow246.5%
sqrt-prod26.6%
add-sqr-sqrt48.0%
Applied egg-rr48.0%
if 5.0000000000000004e242 < (*.f64 l l) Initial program 39.2%
Simplified39.2%
unpow339.2%
times-frac57.8%
pow257.8%
Applied egg-rr57.8%
add-cube-cbrt57.7%
pow357.7%
Applied egg-rr83.0%
+-rgt-identity83.0%
unpow283.0%
frac-2neg83.0%
times-frac54.8%
associate-*l*54.8%
*-commutative54.8%
times-frac83.0%
frac-2neg83.0%
unpow283.0%
+-rgt-identity83.0%
cbrt-prod82.9%
Applied egg-rr90.8%
clear-num90.9%
metadata-eval90.9%
cbrt-div91.0%
metadata-eval91.0%
metadata-eval91.0%
Applied egg-rr91.0%
Final simplification69.7%
(FPCore (t l k)
:precision binary64
(/
2.0
(pow
(*
(/ t (pow (cbrt l) 2.0))
(* (cbrt (* (sin k) (tan k))) (pow (/ (cbrt k) (cbrt t)) 2.0)))
3.0)))
double code(double t, double l, double k) {
return 2.0 / pow(((t / pow(cbrt(l), 2.0)) * (cbrt((sin(k) * tan(k))) * pow((cbrt(k) / cbrt(t)), 2.0))), 3.0);
}
public static double code(double t, double l, double k) {
return 2.0 / Math.pow(((t / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt((Math.sin(k) * Math.tan(k))) * Math.pow((Math.cbrt(k) / Math.cbrt(t)), 2.0))), 3.0);
}
function code(t, l, k) return Float64(2.0 / (Float64(Float64(t / (cbrt(l) ^ 2.0)) * Float64(cbrt(Float64(sin(k) * tan(k))) * (Float64(cbrt(k) / cbrt(t)) ^ 2.0))) ^ 3.0)) end
code[t_, l_, k_] := N[(2.0 / N[Power[N[(N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[Power[k, 1/3], $MachinePrecision] / N[Power[t, 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k \cdot \tan k} \cdot {\left(\frac{\sqrt[3]{k}}{\sqrt[3]{t}}\right)}^{2}\right)\right)}^{3}}
\end{array}
Initial program 36.7%
Simplified43.4%
unpow343.4%
times-frac57.3%
pow257.3%
Applied egg-rr57.3%
add-cube-cbrt57.2%
pow357.3%
Applied egg-rr76.8%
+-rgt-identity76.8%
unpow276.8%
frac-2neg76.8%
times-frac51.7%
associate-*l*51.7%
*-commutative51.7%
times-frac76.8%
frac-2neg76.8%
unpow276.8%
+-rgt-identity76.8%
cbrt-prod77.4%
Applied egg-rr88.6%
cbrt-div93.0%
Applied egg-rr93.0%
Final simplification93.0%
(FPCore (t l k)
:precision binary64
(if (or (<= (* l l) 2e-316) (not (<= (* l l) 5e+242)))
(/
2.0
(pow
(*
(/ t (pow (cbrt l) 2.0))
(* (cbrt (* (sin k) (tan k))) (pow (/ 1.0 (cbrt (/ t k))) 2.0)))
3.0))
(/
2.0
(/
(* (pow (* k (sqrt t)) 2.0) (pow (sin k) 2.0))
(* (cos k) (pow l 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (((l * l) <= 2e-316) || !((l * l) <= 5e+242)) {
tmp = 2.0 / pow(((t / pow(cbrt(l), 2.0)) * (cbrt((sin(k) * tan(k))) * pow((1.0 / cbrt((t / k))), 2.0))), 3.0);
} else {
tmp = 2.0 / ((pow((k * sqrt(t)), 2.0) * pow(sin(k), 2.0)) / (cos(k) * pow(l, 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if (((l * l) <= 2e-316) || !((l * l) <= 5e+242)) {
tmp = 2.0 / Math.pow(((t / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt((Math.sin(k) * Math.tan(k))) * Math.pow((1.0 / Math.cbrt((t / k))), 2.0))), 3.0);
} else {
tmp = 2.0 / ((Math.pow((k * Math.sqrt(t)), 2.0) * Math.pow(Math.sin(k), 2.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((Float64(l * l) <= 2e-316) || !(Float64(l * l) <= 5e+242)) tmp = Float64(2.0 / (Float64(Float64(t / (cbrt(l) ^ 2.0)) * Float64(cbrt(Float64(sin(k) * tan(k))) * (Float64(1.0 / cbrt(Float64(t / k))) ^ 2.0))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64((Float64(k * sqrt(t)) ^ 2.0) * (sin(k) ^ 2.0)) / Float64(cos(k) * (l ^ 2.0)))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[N[(l * l), $MachinePrecision], 2e-316], N[Not[LessEqual[N[(l * l), $MachinePrecision], 5e+242]], $MachinePrecision]], N[(2.0 / N[Power[N[(N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(1.0 / N[Power[N[(t / k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-316} \lor \neg \left(\ell \cdot \ell \leq 5 \cdot 10^{+242}\right):\\
\;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k \cdot \tan k} \cdot {\left(\frac{1}{\sqrt[3]{\frac{t}{k}}}\right)}^{2}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t}\right)}^{2} \cdot {\sin k}^{2}}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if (*.f64 l l) < 2.000000017e-316 or 5.0000000000000004e242 < (*.f64 l l) Initial program 28.9%
Simplified33.6%
unpow333.6%
times-frac55.6%
pow255.6%
Applied egg-rr55.6%
add-cube-cbrt55.5%
pow355.5%
Applied egg-rr80.5%
+-rgt-identity80.5%
unpow280.5%
frac-2neg80.5%
times-frac53.9%
associate-*l*53.9%
*-commutative53.9%
times-frac80.5%
frac-2neg80.5%
unpow280.5%
+-rgt-identity80.5%
cbrt-prod81.7%
Applied egg-rr89.7%
clear-num89.8%
metadata-eval89.8%
cbrt-div89.9%
metadata-eval89.9%
metadata-eval89.9%
Applied egg-rr89.9%
if 2.000000017e-316 < (*.f64 l l) < 5.0000000000000004e242Initial program 44.6%
Simplified53.3%
unpow353.3%
times-frac59.1%
pow259.1%
Applied egg-rr59.1%
unpow259.1%
frac-2neg59.1%
frac-times35.5%
Applied egg-rr35.5%
Taylor expanded in t around 0 92.3%
associate-*r*92.4%
*-commutative92.4%
*-commutative92.4%
Simplified92.4%
add-sqr-sqrt46.6%
pow246.6%
*-commutative46.6%
sqrt-prod46.5%
unpow246.5%
sqrt-prod26.6%
add-sqr-sqrt48.0%
Applied egg-rr48.0%
Final simplification69.1%
(FPCore (t l k)
:precision binary64
(/
2.0
(pow
(*
(/ t (pow (cbrt l) 2.0))
(* (cbrt (* (sin k) (tan k))) (pow (cbrt (/ k t)) 2.0)))
3.0)))
double code(double t, double l, double k) {
return 2.0 / pow(((t / pow(cbrt(l), 2.0)) * (cbrt((sin(k) * tan(k))) * pow(cbrt((k / t)), 2.0))), 3.0);
}
public static double code(double t, double l, double k) {
return 2.0 / Math.pow(((t / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt((Math.sin(k) * Math.tan(k))) * Math.pow(Math.cbrt((k / t)), 2.0))), 3.0);
}
function code(t, l, k) return Float64(2.0 / (Float64(Float64(t / (cbrt(l) ^ 2.0)) * Float64(cbrt(Float64(sin(k) * tan(k))) * (cbrt(Float64(k / t)) ^ 2.0))) ^ 3.0)) end
code[t_, l_, k_] := N[(2.0 / N[Power[N[(N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[N[(k / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k \cdot \tan k} \cdot {\left(\sqrt[3]{\frac{k}{t}}\right)}^{2}\right)\right)}^{3}}
\end{array}
Initial program 36.7%
Simplified43.4%
unpow343.4%
times-frac57.3%
pow257.3%
Applied egg-rr57.3%
add-cube-cbrt57.2%
pow357.3%
Applied egg-rr76.8%
+-rgt-identity76.8%
unpow276.8%
frac-2neg76.8%
times-frac51.7%
associate-*l*51.7%
*-commutative51.7%
times-frac76.8%
frac-2neg76.8%
unpow276.8%
+-rgt-identity76.8%
cbrt-prod77.4%
Applied egg-rr88.6%
Final simplification88.6%
(FPCore (t l k)
:precision binary64
(if (or (<= l 4.7e-188) (not (<= l 2.8e+123)))
(/
2.0
(pow
(*
t
(* (cbrt (* (sin k) (* (tan k) (pow (/ k t) 2.0)))) (pow (cbrt l) -2.0)))
3.0))
(/
2.0
(/
(* (pow (* k (sqrt t)) 2.0) (pow (sin k) 2.0))
(* (cos k) (pow l 2.0))))))
double code(double t, double l, double k) {
double tmp;
if ((l <= 4.7e-188) || !(l <= 2.8e+123)) {
tmp = 2.0 / pow((t * (cbrt((sin(k) * (tan(k) * pow((k / t), 2.0)))) * pow(cbrt(l), -2.0))), 3.0);
} else {
tmp = 2.0 / ((pow((k * sqrt(t)), 2.0) * pow(sin(k), 2.0)) / (cos(k) * pow(l, 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if ((l <= 4.7e-188) || !(l <= 2.8e+123)) {
tmp = 2.0 / Math.pow((t * (Math.cbrt((Math.sin(k) * (Math.tan(k) * Math.pow((k / t), 2.0)))) * Math.pow(Math.cbrt(l), -2.0))), 3.0);
} else {
tmp = 2.0 / ((Math.pow((k * Math.sqrt(t)), 2.0) * Math.pow(Math.sin(k), 2.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((l <= 4.7e-188) || !(l <= 2.8e+123)) tmp = Float64(2.0 / (Float64(t * Float64(cbrt(Float64(sin(k) * Float64(tan(k) * (Float64(k / t) ^ 2.0)))) * (cbrt(l) ^ -2.0))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64((Float64(k * sqrt(t)) ^ 2.0) * (sin(k) ^ 2.0)) / Float64(cos(k) * (l ^ 2.0)))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[l, 4.7e-188], N[Not[LessEqual[l, 2.8e+123]], $MachinePrecision]], N[(2.0 / N[Power[N[(t * N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.7 \cdot 10^{-188} \lor \neg \left(\ell \leq 2.8 \cdot 10^{+123}\right):\\
\;\;\;\;\frac{2}{{\left(t \cdot \left(\sqrt[3]{\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t}\right)}^{2} \cdot {\sin k}^{2}}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if l < 4.69999999999999998e-188 or 2.80000000000000011e123 < l Initial program 31.9%
Simplified39.3%
unpow339.3%
times-frac55.6%
pow255.6%
Applied egg-rr55.6%
add-cube-cbrt55.5%
pow355.5%
Applied egg-rr77.8%
+-rgt-identity77.8%
unpow277.8%
frac-2neg77.8%
times-frac52.1%
associate-*l*52.1%
*-commutative52.1%
times-frac77.8%
frac-2neg77.8%
unpow277.8%
+-rgt-identity77.8%
cbrt-prod78.6%
Applied egg-rr88.0%
pow188.0%
Applied egg-rr77.8%
unpow177.8%
associate-*r*78.9%
*-commutative78.9%
associate-*l*78.9%
associate-*l*78.9%
Simplified78.9%
if 4.69999999999999998e-188 < l < 2.80000000000000011e123Initial program 50.9%
Simplified55.7%
unpow355.7%
times-frac62.6%
pow262.6%
Applied egg-rr62.6%
unpow262.6%
frac-2neg62.6%
frac-times39.1%
Applied egg-rr39.1%
Taylor expanded in t around 0 96.7%
associate-*r*96.7%
*-commutative96.7%
*-commutative96.7%
Simplified96.7%
add-sqr-sqrt49.9%
pow249.9%
*-commutative49.9%
sqrt-prod49.9%
unpow249.9%
sqrt-prod28.0%
add-sqr-sqrt51.4%
Applied egg-rr51.4%
Final simplification72.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (cbrt (* (sin k) (* (tan k) (pow (/ k t) 2.0))))))
(if (<= l 4.8e-188)
(/ 2.0 (pow (* t (* t_1 (pow (cbrt l) -2.0))) 3.0))
(if (<= l 1.02e+125)
(/
2.0
(/
(* (pow (* k (sqrt t)) 2.0) (pow (sin k) 2.0))
(* (cos k) (pow l 2.0))))
(/ 2.0 (pow (* (/ t (pow (cbrt l) 2.0)) t_1) 3.0))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * (tan(k) * pow((k / t), 2.0))));
double tmp;
if (l <= 4.8e-188) {
tmp = 2.0 / pow((t * (t_1 * pow(cbrt(l), -2.0))), 3.0);
} else if (l <= 1.02e+125) {
tmp = 2.0 / ((pow((k * sqrt(t)), 2.0) * pow(sin(k), 2.0)) / (cos(k) * pow(l, 2.0)));
} else {
tmp = 2.0 / pow(((t / pow(cbrt(l), 2.0)) * t_1), 3.0);
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * (Math.tan(k) * Math.pow((k / t), 2.0))));
double tmp;
if (l <= 4.8e-188) {
tmp = 2.0 / Math.pow((t * (t_1 * Math.pow(Math.cbrt(l), -2.0))), 3.0);
} else if (l <= 1.02e+125) {
tmp = 2.0 / ((Math.pow((k * Math.sqrt(t)), 2.0) * Math.pow(Math.sin(k), 2.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
} else {
tmp = 2.0 / Math.pow(((t / Math.pow(Math.cbrt(l), 2.0)) * t_1), 3.0);
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(Float64(sin(k) * Float64(tan(k) * (Float64(k / t) ^ 2.0)))) tmp = 0.0 if (l <= 4.8e-188) tmp = Float64(2.0 / (Float64(t * Float64(t_1 * (cbrt(l) ^ -2.0))) ^ 3.0)); elseif (l <= 1.02e+125) tmp = Float64(2.0 / Float64(Float64((Float64(k * sqrt(t)) ^ 2.0) * (sin(k) ^ 2.0)) / Float64(cos(k) * (l ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64(t / (cbrt(l) ^ 2.0)) * t_1) ^ 3.0)); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[l, 4.8e-188], N[(2.0 / N[Power[N[(t * N[(t$95$1 * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.02e+125], N[(2.0 / N[(N[(N[Power[N[(k * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)}\\
\mathbf{if}\;\ell \leq 4.8 \cdot 10^{-188}:\\
\;\;\;\;\frac{2}{{\left(t \cdot \left(t\_1 \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\mathbf{elif}\;\ell \leq 1.02 \cdot 10^{+125}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t}\right)}^{2} \cdot {\sin k}^{2}}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot t\_1\right)}^{3}}\\
\end{array}
\end{array}
if l < 4.8e-188Initial program 29.3%
Simplified38.0%
unpow338.0%
times-frac53.7%
pow253.7%
Applied egg-rr53.7%
add-cube-cbrt53.6%
pow353.6%
Applied egg-rr74.9%
+-rgt-identity74.9%
unpow274.9%
frac-2neg74.9%
times-frac49.8%
associate-*l*49.7%
*-commutative49.7%
times-frac74.9%
frac-2neg74.9%
unpow274.9%
+-rgt-identity74.9%
cbrt-prod75.9%
Applied egg-rr86.5%
pow186.5%
Applied egg-rr74.9%
unpow174.9%
associate-*r*76.3%
*-commutative76.3%
associate-*l*76.2%
associate-*l*76.2%
Simplified76.2%
if 4.8e-188 < l < 1.02e125Initial program 50.9%
Simplified55.7%
unpow355.7%
times-frac62.6%
pow262.6%
Applied egg-rr62.6%
unpow262.6%
frac-2neg62.6%
frac-times39.1%
Applied egg-rr39.1%
Taylor expanded in t around 0 96.7%
associate-*r*96.7%
*-commutative96.7%
*-commutative96.7%
Simplified96.7%
add-sqr-sqrt49.9%
pow249.9%
*-commutative49.9%
sqrt-prod49.9%
unpow249.9%
sqrt-prod28.0%
add-sqr-sqrt51.4%
Applied egg-rr51.4%
if 1.02e125 < l Initial program 45.8%
Simplified45.8%
unpow345.8%
times-frac65.4%
pow265.4%
Applied egg-rr65.4%
add-cube-cbrt65.3%
pow365.3%
Applied egg-rr92.8%
Final simplification72.0%
(FPCore (t l k)
:precision binary64
(if (<= l 9.5e-167)
(/ 2.0 (* t (log (pow (exp (pow k 4.0)) (pow l -2.0)))))
(if (<= l 5e+145)
(/
2.0
(/
(* (pow (* k (sqrt t)) 2.0) (pow (sin k) 2.0))
(* (cos k) (pow l 2.0))))
(/
2.0
(*
(* (* (sin k) (tan k)) (pow (/ k t) 2.0))
(pow (/ t (pow (cbrt l) 2.0)) 3.0))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 9.5e-167) {
tmp = 2.0 / (t * log(pow(exp(pow(k, 4.0)), pow(l, -2.0))));
} else if (l <= 5e+145) {
tmp = 2.0 / ((pow((k * sqrt(t)), 2.0) * pow(sin(k), 2.0)) / (cos(k) * pow(l, 2.0)));
} else {
tmp = 2.0 / (((sin(k) * tan(k)) * pow((k / t), 2.0)) * pow((t / pow(cbrt(l), 2.0)), 3.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if (l <= 9.5e-167) {
tmp = 2.0 / (t * Math.log(Math.pow(Math.exp(Math.pow(k, 4.0)), Math.pow(l, -2.0))));
} else if (l <= 5e+145) {
tmp = 2.0 / ((Math.pow((k * Math.sqrt(t)), 2.0) * Math.pow(Math.sin(k), 2.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
} else {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * Math.pow((k / t), 2.0)) * Math.pow((t / Math.pow(Math.cbrt(l), 2.0)), 3.0));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (l <= 9.5e-167) tmp = Float64(2.0 / Float64(t * log((exp((k ^ 4.0)) ^ (l ^ -2.0))))); elseif (l <= 5e+145) tmp = Float64(2.0 / Float64(Float64((Float64(k * sqrt(t)) ^ 2.0) * (sin(k) ^ 2.0)) / Float64(cos(k) * (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * (Float64(k / t) ^ 2.0)) * (Float64(t / (cbrt(l) ^ 2.0)) ^ 3.0))); end return tmp end
code[t_, l_, k_] := If[LessEqual[l, 9.5e-167], N[(2.0 / N[(t * N[Log[N[Power[N[Exp[N[Power[k, 4.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5e+145], N[(2.0 / N[(N[(N[Power[N[(k * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9.5 \cdot 10^{-167}:\\
\;\;\;\;\frac{2}{t \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\
\mathbf{elif}\;\ell \leq 5 \cdot 10^{+145}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t}\right)}^{2} \cdot {\sin k}^{2}}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}\right) \cdot {\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if l < 9.49999999999999955e-167Initial program 29.5%
Simplified38.2%
Taylor expanded in k around 0 59.3%
*-commutative59.3%
associate-/l*59.6%
Simplified59.6%
add-log-exp56.8%
div-inv56.8%
exp-prod64.7%
pow-flip65.3%
metadata-eval65.3%
Applied egg-rr65.3%
if 9.49999999999999955e-167 < l < 4.99999999999999967e145Initial program 52.4%
Simplified56.8%
unpow356.8%
times-frac61.8%
pow261.8%
Applied egg-rr61.8%
unpow261.8%
frac-2neg61.8%
frac-times35.3%
Applied egg-rr35.3%
Taylor expanded in t around 0 96.9%
associate-*r*96.9%
*-commutative96.9%
*-commutative96.9%
Simplified96.9%
add-sqr-sqrt49.9%
pow249.9%
*-commutative49.9%
sqrt-prod49.9%
unpow249.9%
sqrt-prod27.8%
add-sqr-sqrt51.3%
Applied egg-rr51.3%
if 4.99999999999999967e145 < l Initial program 40.7%
Simplified40.7%
unpow340.7%
times-frac65.1%
pow265.1%
Applied egg-rr65.1%
add-cube-cbrt65.0%
pow365.0%
Applied egg-rr91.1%
cube-prod80.4%
rem-cube-cbrt80.5%
associate-*r*80.6%
Simplified80.6%
Final simplification63.1%
(FPCore (t l k)
:precision binary64
(if (<= k 2.3e-151)
(/ 2.0 (* t (log (pow (exp (pow k 4.0)) (pow l -2.0)))))
(/
2.0
(/
(* (pow (* k (sqrt t)) 2.0) (pow (sin k) 2.0))
(* (cos k) (pow l 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.3e-151) {
tmp = 2.0 / (t * log(pow(exp(pow(k, 4.0)), pow(l, -2.0))));
} else {
tmp = 2.0 / ((pow((k * sqrt(t)), 2.0) * pow(sin(k), 2.0)) / (cos(k) * pow(l, 2.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.3d-151) then
tmp = 2.0d0 / (t * log((exp((k ** 4.0d0)) ** (l ** (-2.0d0)))))
else
tmp = 2.0d0 / ((((k * sqrt(t)) ** 2.0d0) * (sin(k) ** 2.0d0)) / (cos(k) * (l ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.3e-151) {
tmp = 2.0 / (t * Math.log(Math.pow(Math.exp(Math.pow(k, 4.0)), Math.pow(l, -2.0))));
} else {
tmp = 2.0 / ((Math.pow((k * Math.sqrt(t)), 2.0) * Math.pow(Math.sin(k), 2.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.3e-151: tmp = 2.0 / (t * math.log(math.pow(math.exp(math.pow(k, 4.0)), math.pow(l, -2.0)))) else: tmp = 2.0 / ((math.pow((k * math.sqrt(t)), 2.0) * math.pow(math.sin(k), 2.0)) / (math.cos(k) * math.pow(l, 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.3e-151) tmp = Float64(2.0 / Float64(t * log((exp((k ^ 4.0)) ^ (l ^ -2.0))))); else tmp = Float64(2.0 / Float64(Float64((Float64(k * sqrt(t)) ^ 2.0) * (sin(k) ^ 2.0)) / Float64(cos(k) * (l ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.3e-151) tmp = 2.0 / (t * log((exp((k ^ 4.0)) ^ (l ^ -2.0)))); else tmp = 2.0 / ((((k * sqrt(t)) ^ 2.0) * (sin(k) ^ 2.0)) / (cos(k) * (l ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.3e-151], N[(2.0 / N[(t * N[Log[N[Power[N[Exp[N[Power[k, 4.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.3 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{t \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t}\right)}^{2} \cdot {\sin k}^{2}}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 2.29999999999999996e-151Initial program 39.4%
Simplified43.0%
Taylor expanded in k around 0 64.2%
*-commutative64.2%
associate-/l*62.3%
Simplified62.3%
add-log-exp61.1%
div-inv61.1%
exp-prod69.2%
pow-flip69.7%
metadata-eval69.7%
Applied egg-rr69.7%
if 2.29999999999999996e-151 < k Initial program 31.6%
Simplified44.1%
unpow344.1%
times-frac62.7%
pow262.7%
Applied egg-rr62.7%
unpow262.7%
frac-2neg62.7%
frac-times42.2%
Applied egg-rr42.2%
Taylor expanded in t around 0 81.5%
associate-*r*81.5%
*-commutative81.5%
*-commutative81.5%
Simplified81.5%
add-sqr-sqrt43.8%
pow243.8%
*-commutative43.8%
sqrt-prod43.8%
unpow243.8%
sqrt-prod44.7%
add-sqr-sqrt44.9%
Applied egg-rr44.9%
Final simplification61.2%
(FPCore (t l k)
:precision binary64
(if (<= k 2.3e-151)
(/ 2.0 (* t (log (pow (exp (pow k 4.0)) (pow l -2.0)))))
(*
2.0
(*
(pow l 2.0)
(/ 1.0 (* (* t (pow k 2.0)) (/ (pow (sin k) 2.0) (cos k))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.3e-151) {
tmp = 2.0 / (t * log(pow(exp(pow(k, 4.0)), pow(l, -2.0))));
} else {
tmp = 2.0 * (pow(l, 2.0) * (1.0 / ((t * pow(k, 2.0)) * (pow(sin(k), 2.0) / cos(k)))));
}
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.3d-151) then
tmp = 2.0d0 / (t * log((exp((k ** 4.0d0)) ** (l ** (-2.0d0)))))
else
tmp = 2.0d0 * ((l ** 2.0d0) * (1.0d0 / ((t * (k ** 2.0d0)) * ((sin(k) ** 2.0d0) / cos(k)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.3e-151) {
tmp = 2.0 / (t * Math.log(Math.pow(Math.exp(Math.pow(k, 4.0)), Math.pow(l, -2.0))));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) * (1.0 / ((t * Math.pow(k, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.3e-151: tmp = 2.0 / (t * math.log(math.pow(math.exp(math.pow(k, 4.0)), math.pow(l, -2.0)))) else: tmp = 2.0 * (math.pow(l, 2.0) * (1.0 / ((t * math.pow(k, 2.0)) * (math.pow(math.sin(k), 2.0) / math.cos(k))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.3e-151) tmp = Float64(2.0 / Float64(t * log((exp((k ^ 4.0)) ^ (l ^ -2.0))))); else tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(1.0 / Float64(Float64(t * (k ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.3e-151) tmp = 2.0 / (t * log((exp((k ^ 4.0)) ^ (l ^ -2.0)))); else tmp = 2.0 * ((l ^ 2.0) * (1.0 / ((t * (k ^ 2.0)) * ((sin(k) ^ 2.0) / cos(k))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.3e-151], N[(2.0 / N[(t * N[Log[N[Power[N[Exp[N[Power[k, 4.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(1.0 / N[(N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.3 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{t \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{1}{\left(t \cdot {k}^{2}\right) \cdot \frac{{\sin k}^{2}}{\cos k}}\right)\\
\end{array}
\end{array}
if k < 2.29999999999999996e-151Initial program 39.4%
Simplified43.0%
Taylor expanded in k around 0 64.2%
*-commutative64.2%
associate-/l*62.3%
Simplified62.3%
add-log-exp61.1%
div-inv61.1%
exp-prod69.2%
pow-flip69.7%
metadata-eval69.7%
Applied egg-rr69.7%
if 2.29999999999999996e-151 < k Initial program 31.6%
associate-/r*31.6%
associate-/l/31.6%
associate-*l/31.5%
associate-/r/30.9%
+-commutative30.9%
unpow230.9%
sqr-neg30.9%
distribute-frac-neg230.9%
distribute-frac-neg230.9%
unpow230.9%
+-rgt-identity30.9%
metadata-eval30.9%
associate--l+30.9%
+-commutative30.9%
associate--l+30.9%
Simplified43.4%
Taylor expanded in k around inf 81.5%
associate-/l*81.5%
Simplified81.5%
clear-num81.5%
inv-pow81.5%
associate-*r*81.6%
Applied egg-rr81.6%
unpow-181.6%
associate-/l*81.6%
Simplified81.6%
Final simplification73.8%
(FPCore (t l k)
:precision binary64
(if (<= k 2.3e-151)
(/ 2.0 (* t (log (pow (exp (pow k 4.0)) (pow l -2.0)))))
(*
2.0
(* (pow 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 (k <= 2.3e-151) {
tmp = 2.0 / (t * log(pow(exp(pow(k, 4.0)), pow(l, -2.0))));
} else {
tmp = 2.0 * (pow(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 (k <= 2.3d-151) then
tmp = 2.0d0 / (t * log((exp((k ** 4.0d0)) ** (l ** (-2.0d0)))))
else
tmp = 2.0d0 * ((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 (k <= 2.3e-151) {
tmp = 2.0 / (t * Math.log(Math.pow(Math.exp(Math.pow(k, 4.0)), Math.pow(l, -2.0))));
} else {
tmp = 2.0 * (Math.pow(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 k <= 2.3e-151: tmp = 2.0 / (t * math.log(math.pow(math.exp(math.pow(k, 4.0)), math.pow(l, -2.0)))) else: tmp = 2.0 * (math.pow(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 (k <= 2.3e-151) tmp = Float64(2.0 / Float64(t * log((exp((k ^ 4.0)) ^ (l ^ -2.0))))); else tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / 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 (k <= 2.3e-151) tmp = 2.0 / (t * log((exp((k ^ 4.0)) ^ (l ^ -2.0)))); else tmp = 2.0 * ((l ^ 2.0) * (cos(k) / ((k ^ 2.0) * (t * (sin(k) ^ 2.0))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.3e-151], N[(2.0 / N[(t * N[Log[N[Power[N[Exp[N[Power[k, 4.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.3 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{t \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\right)\\
\end{array}
\end{array}
if k < 2.29999999999999996e-151Initial program 39.4%
Simplified43.0%
Taylor expanded in k around 0 64.2%
*-commutative64.2%
associate-/l*62.3%
Simplified62.3%
add-log-exp61.1%
div-inv61.1%
exp-prod69.2%
pow-flip69.7%
metadata-eval69.7%
Applied egg-rr69.7%
if 2.29999999999999996e-151 < k Initial program 31.6%
associate-/r*31.6%
associate-/l/31.6%
associate-*l/31.5%
associate-/r/30.9%
+-commutative30.9%
unpow230.9%
sqr-neg30.9%
distribute-frac-neg230.9%
distribute-frac-neg230.9%
unpow230.9%
+-rgt-identity30.9%
metadata-eval30.9%
associate--l+30.9%
+-commutative30.9%
associate--l+30.9%
Simplified43.4%
Taylor expanded in k around inf 81.5%
associate-/l*81.5%
Simplified81.5%
Final simplification73.8%
(FPCore (t l k)
:precision binary64
(if (<= k 1.12e-151)
(/ 2.0 (* t (log (pow (exp (pow k 4.0)) (pow l -2.0)))))
(if (<= k 5.2e-14)
(* 2.0 (* (pow l 2.0) (/ (cos k) (* (pow k 2.0) (* t (pow k 2.0))))))
(* 2.0 (* (pow l 2.0) (/ (/ (cos k) t) (pow (* k (sin k)) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.12e-151) {
tmp = 2.0 / (t * log(pow(exp(pow(k, 4.0)), pow(l, -2.0))));
} else if (k <= 5.2e-14) {
tmp = 2.0 * (pow(l, 2.0) * (cos(k) / (pow(k, 2.0) * (t * pow(k, 2.0)))));
} else {
tmp = 2.0 * (pow(l, 2.0) * ((cos(k) / t) / pow((k * 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 <= 1.12d-151) then
tmp = 2.0d0 / (t * log((exp((k ** 4.0d0)) ** (l ** (-2.0d0)))))
else if (k <= 5.2d-14) then
tmp = 2.0d0 * ((l ** 2.0d0) * (cos(k) / ((k ** 2.0d0) * (t * (k ** 2.0d0)))))
else
tmp = 2.0d0 * ((l ** 2.0d0) * ((cos(k) / t) / ((k * sin(k)) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.12e-151) {
tmp = 2.0 / (t * Math.log(Math.pow(Math.exp(Math.pow(k, 4.0)), Math.pow(l, -2.0))));
} else if (k <= 5.2e-14) {
tmp = 2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / (Math.pow(k, 2.0) * (t * Math.pow(k, 2.0)))));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) * ((Math.cos(k) / t) / Math.pow((k * Math.sin(k)), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.12e-151: tmp = 2.0 / (t * math.log(math.pow(math.exp(math.pow(k, 4.0)), math.pow(l, -2.0)))) elif k <= 5.2e-14: tmp = 2.0 * (math.pow(l, 2.0) * (math.cos(k) / (math.pow(k, 2.0) * (t * math.pow(k, 2.0))))) else: tmp = 2.0 * (math.pow(l, 2.0) * ((math.cos(k) / t) / math.pow((k * math.sin(k)), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.12e-151) tmp = Float64(2.0 / Float64(t * log((exp((k ^ 4.0)) ^ (l ^ -2.0))))); elseif (k <= 5.2e-14) tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / Float64((k ^ 2.0) * Float64(t * (k ^ 2.0)))))); else tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(Float64(cos(k) / t) / (Float64(k * sin(k)) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.12e-151) tmp = 2.0 / (t * log((exp((k ^ 4.0)) ^ (l ^ -2.0)))); elseif (k <= 5.2e-14) tmp = 2.0 * ((l ^ 2.0) * (cos(k) / ((k ^ 2.0) * (t * (k ^ 2.0))))); else tmp = 2.0 * ((l ^ 2.0) * ((cos(k) / t) / ((k * sin(k)) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.12e-151], N[(2.0 / N[(t * N[Log[N[Power[N[Exp[N[Power[k, 4.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.2e-14], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.12 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{t \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\
\mathbf{elif}\;k \leq 5.2 \cdot 10^{-14}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{{k}^{2} \cdot \left(t \cdot {k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{{\left(k \cdot \sin k\right)}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.11999999999999994e-151Initial program 39.4%
Simplified43.0%
Taylor expanded in k around 0 64.2%
*-commutative64.2%
associate-/l*62.3%
Simplified62.3%
add-log-exp61.1%
div-inv61.1%
exp-prod69.2%
pow-flip69.7%
metadata-eval69.7%
Applied egg-rr69.7%
if 1.11999999999999994e-151 < k < 5.19999999999999993e-14Initial program 44.6%
associate-/r*44.6%
associate-/l/44.6%
associate-*l/44.6%
associate-/r/44.6%
+-commutative44.6%
unpow244.6%
sqr-neg44.6%
distribute-frac-neg244.6%
distribute-frac-neg244.6%
unpow244.6%
+-rgt-identity44.6%
metadata-eval44.6%
associate--l+44.6%
+-commutative44.6%
associate--l+44.6%
Simplified48.3%
Taylor expanded in k around inf 85.4%
associate-/l*85.4%
Simplified85.4%
Taylor expanded in k around 0 85.4%
if 5.19999999999999993e-14 < k Initial program 25.8%
associate-/r*25.8%
associate-/l/25.8%
associate-*l/25.7%
associate-/r/24.9%
+-commutative24.9%
unpow224.9%
sqr-neg24.9%
distribute-frac-neg224.9%
distribute-frac-neg224.9%
unpow224.9%
+-rgt-identity24.9%
metadata-eval24.9%
associate--l+24.9%
+-commutative24.9%
associate--l+24.9%
Simplified41.2%
associate-*r*42.0%
unpow242.0%
times-frac50.2%
associate-/l/50.2%
associate-*l/51.0%
associate-*l*51.0%
Applied egg-rr51.0%
Taylor expanded in l around 0 79.7%
associate-/l*79.8%
*-commutative79.8%
associate-*r*79.8%
unpow279.8%
unpow279.8%
swap-sqr79.8%
unpow279.8%
*-commutative79.8%
associate-/r*79.9%
Simplified79.9%
Final simplification73.8%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ 2.0 (/ (* (pow (sin k) 2.0) (* t (pow k 2.0))) (pow l 2.0))))
(t_2 (* (sin k) (tan k))))
(if (<= t 6.5e-116)
t_1
(if (<= t 5.8e+102)
(* (/ l (/ k t)) (* (/ 2.0 (pow t 3.0)) (* t (/ l (* k t_2)))))
(if (<= t 1.04e+139)
(/
2.0
(*
(* (/ (pow t 2.0) l) (/ t l))
(* t_2 (/ 1.0 (* (/ t k) (/ t k))))))
(if (<= t 2e+197) (/ 2.0 (* (pow l -2.0) (* t (pow k 4.0)))) t_1))))))
double code(double t, double l, double k) {
double t_1 = 2.0 / ((pow(sin(k), 2.0) * (t * pow(k, 2.0))) / pow(l, 2.0));
double t_2 = sin(k) * tan(k);
double tmp;
if (t <= 6.5e-116) {
tmp = t_1;
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / pow(t, 3.0)) * (t * (l / (k * t_2))));
} else if (t <= 1.04e+139) {
tmp = 2.0 / (((pow(t, 2.0) / l) * (t / l)) * (t_2 * (1.0 / ((t / k) * (t / k)))));
} else if (t <= 2e+197) {
tmp = 2.0 / (pow(l, -2.0) * (t * pow(k, 4.0)));
} else {
tmp = t_1;
}
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) :: t_2
real(8) :: tmp
t_1 = 2.0d0 / (((sin(k) ** 2.0d0) * (t * (k ** 2.0d0))) / (l ** 2.0d0))
t_2 = sin(k) * tan(k)
if (t <= 6.5d-116) then
tmp = t_1
else if (t <= 5.8d+102) then
tmp = (l / (k / t)) * ((2.0d0 / (t ** 3.0d0)) * (t * (l / (k * t_2))))
else if (t <= 1.04d+139) then
tmp = 2.0d0 / ((((t ** 2.0d0) / l) * (t / l)) * (t_2 * (1.0d0 / ((t / k) * (t / k)))))
else if (t <= 2d+197) then
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t * (k ** 4.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 2.0 / ((Math.pow(Math.sin(k), 2.0) * (t * Math.pow(k, 2.0))) / Math.pow(l, 2.0));
double t_2 = Math.sin(k) * Math.tan(k);
double tmp;
if (t <= 6.5e-116) {
tmp = t_1;
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / Math.pow(t, 3.0)) * (t * (l / (k * t_2))));
} else if (t <= 1.04e+139) {
tmp = 2.0 / (((Math.pow(t, 2.0) / l) * (t / l)) * (t_2 * (1.0 / ((t / k) * (t / k)))));
} else if (t <= 2e+197) {
tmp = 2.0 / (Math.pow(l, -2.0) * (t * Math.pow(k, 4.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(t, l, k): t_1 = 2.0 / ((math.pow(math.sin(k), 2.0) * (t * math.pow(k, 2.0))) / math.pow(l, 2.0)) t_2 = math.sin(k) * math.tan(k) tmp = 0 if t <= 6.5e-116: tmp = t_1 elif t <= 5.8e+102: tmp = (l / (k / t)) * ((2.0 / math.pow(t, 3.0)) * (t * (l / (k * t_2)))) elif t <= 1.04e+139: tmp = 2.0 / (((math.pow(t, 2.0) / l) * (t / l)) * (t_2 * (1.0 / ((t / k) * (t / k))))) elif t <= 2e+197: tmp = 2.0 / (math.pow(l, -2.0) * (t * math.pow(k, 4.0))) else: tmp = t_1 return tmp
function code(t, l, k) t_1 = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) * Float64(t * (k ^ 2.0))) / (l ^ 2.0))) t_2 = Float64(sin(k) * tan(k)) tmp = 0.0 if (t <= 6.5e-116) tmp = t_1; elseif (t <= 5.8e+102) tmp = Float64(Float64(l / Float64(k / t)) * Float64(Float64(2.0 / (t ^ 3.0)) * Float64(t * Float64(l / Float64(k * t_2))))); elseif (t <= 1.04e+139) tmp = Float64(2.0 / Float64(Float64(Float64((t ^ 2.0) / l) * Float64(t / l)) * Float64(t_2 * Float64(1.0 / Float64(Float64(t / k) * Float64(t / k)))))); elseif (t <= 2e+197) tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t * (k ^ 4.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(t, l, k) t_1 = 2.0 / (((sin(k) ^ 2.0) * (t * (k ^ 2.0))) / (l ^ 2.0)); t_2 = sin(k) * tan(k); tmp = 0.0; if (t <= 6.5e-116) tmp = t_1; elseif (t <= 5.8e+102) tmp = (l / (k / t)) * ((2.0 / (t ^ 3.0)) * (t * (l / (k * t_2)))); elseif (t <= 1.04e+139) tmp = 2.0 / ((((t ^ 2.0) / l) * (t / l)) * (t_2 * (1.0 / ((t / k) * (t / k))))); elseif (t <= 2e+197) tmp = 2.0 / ((l ^ -2.0) * (t * (k ^ 4.0))); else tmp = t_1; end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 6.5e-116], t$95$1, If[LessEqual[t, 5.8e+102], N[(N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(t * N[(l / N[(k * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.04e+139], N[(2.0 / N[(N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[(1.0 / N[(N[(t / k), $MachinePrecision] * N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+197], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{\frac{{\sin k}^{2} \cdot \left(t \cdot {k}^{2}\right)}{{\ell}^{2}}}\\
t_2 := \sin k \cdot \tan k\\
\mathbf{if}\;t \leq 6.5 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{\frac{k}{t}} \cdot \left(\frac{2}{{t}^{3}} \cdot \left(t \cdot \frac{\ell}{k \cdot t\_2}\right)\right)\\
\mathbf{elif}\;t \leq 1.04 \cdot 10^{+139}:\\
\;\;\;\;\frac{2}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(t\_2 \cdot \frac{1}{\frac{t}{k} \cdot \frac{t}{k}}\right)}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+197}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < 6.5000000000000001e-116 or 1.9999999999999999e197 < t Initial program 31.8%
Simplified39.2%
unpow339.2%
times-frac52.3%
pow252.3%
Applied egg-rr52.3%
unpow252.3%
frac-2neg52.3%
frac-times27.9%
Applied egg-rr27.9%
Taylor expanded in t around 0 77.4%
associate-*r*77.4%
*-commutative77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in k around 0 71.0%
if 6.5000000000000001e-116 < t < 5.8000000000000005e102Initial program 70.2%
associate-/r*70.2%
associate-/l/70.2%
associate-*l/72.7%
associate-/r/71.4%
+-commutative71.4%
unpow271.4%
sqr-neg71.4%
distribute-frac-neg271.4%
distribute-frac-neg271.4%
unpow271.4%
+-rgt-identity71.4%
metadata-eval71.4%
associate--l+71.4%
+-commutative71.4%
associate--l+71.4%
Simplified71.4%
associate-*r*79.5%
unpow279.5%
times-frac82.3%
associate-/l/82.2%
associate-*l/83.5%
associate-*l*83.5%
Applied egg-rr83.5%
div-inv83.5%
times-frac84.7%
Applied egg-rr84.7%
associate-*r/84.7%
*-rgt-identity84.7%
associate-/r/84.5%
associate-/l*87.1%
associate-*l*87.3%
associate-/l/87.3%
Simplified87.3%
if 5.8000000000000005e102 < t < 1.04e139Initial program 12.5%
Simplified25.3%
unpow325.3%
times-frac86.7%
pow286.7%
Applied egg-rr86.7%
unpow286.7%
clear-num86.7%
clear-num86.9%
frac-times87.1%
metadata-eval87.1%
Applied egg-rr87.1%
if 1.04e139 < t < 1.9999999999999999e197Initial program 25.0%
Simplified37.5%
Taylor expanded in k around 0 75.0%
*-commutative75.0%
associate-/l*74.8%
Simplified74.8%
pow174.8%
div-inv74.8%
pow-flip74.8%
metadata-eval74.8%
Applied egg-rr74.8%
unpow174.8%
associate-*r*75.0%
Simplified75.0%
Final simplification74.1%
(FPCore (t l k)
:precision binary64
(if (<= k 8.5e-155)
(*
(/ (/ (* 2.0 l) (pow (* t (cbrt (* (sin k) (tan k)))) 3.0)) (/ k t))
(/ l (/ k t)))
(if (<= k 2e-14)
(* 2.0 (* (pow l 2.0) (/ (cos k) (* (pow k 2.0) (* t (pow k 2.0))))))
(* 2.0 (* (pow l 2.0) (/ (/ (cos k) t) (pow (* k (sin k)) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-155) {
tmp = (((2.0 * l) / pow((t * cbrt((sin(k) * tan(k)))), 3.0)) / (k / t)) * (l / (k / t));
} else if (k <= 2e-14) {
tmp = 2.0 * (pow(l, 2.0) * (cos(k) / (pow(k, 2.0) * (t * pow(k, 2.0)))));
} else {
tmp = 2.0 * (pow(l, 2.0) * ((cos(k) / t) / pow((k * sin(k)), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-155) {
tmp = (((2.0 * l) / Math.pow((t * Math.cbrt((Math.sin(k) * Math.tan(k)))), 3.0)) / (k / t)) * (l / (k / t));
} else if (k <= 2e-14) {
tmp = 2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / (Math.pow(k, 2.0) * (t * Math.pow(k, 2.0)))));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) * ((Math.cos(k) / t) / Math.pow((k * Math.sin(k)), 2.0)));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (k <= 8.5e-155) tmp = Float64(Float64(Float64(Float64(2.0 * l) / (Float64(t * cbrt(Float64(sin(k) * tan(k)))) ^ 3.0)) / Float64(k / t)) * Float64(l / Float64(k / t))); elseif (k <= 2e-14) tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / Float64((k ^ 2.0) * Float64(t * (k ^ 2.0)))))); else tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(Float64(cos(k) / t) / (Float64(k * sin(k)) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := If[LessEqual[k, 8.5e-155], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[N[(t * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e-14], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 8.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{\left(t \cdot \sqrt[3]{\sin k \cdot \tan k}\right)}^{3}}}{\frac{k}{t}} \cdot \frac{\ell}{\frac{k}{t}}\\
\mathbf{elif}\;k \leq 2 \cdot 10^{-14}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{{k}^{2} \cdot \left(t \cdot {k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{{\left(k \cdot \sin k\right)}^{2}}\right)\\
\end{array}
\end{array}
if k < 8.4999999999999996e-155Initial program 39.4%
associate-/r*39.4%
associate-/l/39.4%
associate-*l/40.6%
associate-/r/40.6%
+-commutative40.6%
unpow240.6%
sqr-neg40.6%
distribute-frac-neg240.6%
distribute-frac-neg240.6%
unpow240.6%
+-rgt-identity40.6%
metadata-eval40.6%
associate--l+40.6%
+-commutative40.6%
associate--l+40.6%
Simplified44.8%
associate-*r*52.8%
unpow252.8%
times-frac56.4%
associate-/l/56.4%
associate-*l/56.4%
associate-*l*56.4%
Applied egg-rr56.4%
add-cube-cbrt56.4%
pow356.4%
cbrt-prod56.4%
unpow356.4%
add-cbrt-cube69.0%
Applied egg-rr69.0%
if 8.4999999999999996e-155 < k < 2e-14Initial program 44.6%
associate-/r*44.6%
associate-/l/44.6%
associate-*l/44.6%
associate-/r/44.6%
+-commutative44.6%
unpow244.6%
sqr-neg44.6%
distribute-frac-neg244.6%
distribute-frac-neg244.6%
unpow244.6%
+-rgt-identity44.6%
metadata-eval44.6%
associate--l+44.6%
+-commutative44.6%
associate--l+44.6%
Simplified48.3%
Taylor expanded in k around inf 85.4%
associate-/l*85.4%
Simplified85.4%
Taylor expanded in k around 0 85.4%
if 2e-14 < k Initial program 25.8%
associate-/r*25.8%
associate-/l/25.8%
associate-*l/25.7%
associate-/r/24.9%
+-commutative24.9%
unpow224.9%
sqr-neg24.9%
distribute-frac-neg224.9%
distribute-frac-neg224.9%
unpow224.9%
+-rgt-identity24.9%
metadata-eval24.9%
associate--l+24.9%
+-commutative24.9%
associate--l+24.9%
Simplified41.2%
associate-*r*42.0%
unpow242.0%
times-frac50.2%
associate-/l/50.2%
associate-*l/51.0%
associate-*l*51.0%
Applied egg-rr51.0%
Taylor expanded in l around 0 79.7%
associate-/l*79.8%
*-commutative79.8%
associate-*r*79.8%
unpow279.8%
unpow279.8%
swap-sqr79.8%
unpow279.8%
*-commutative79.8%
associate-/r*79.9%
Simplified79.9%
Final simplification73.3%
(FPCore (t l k)
:precision binary64
(if (<= t 2.9e-105)
(* 2.0 (* (pow l 2.0) (/ (/ (cos k) t) (pow (* k (sin k)) 2.0))))
(if (<= t 5.8e+102)
(*
(/ l (/ k t))
(* (/ 2.0 (pow t 3.0)) (* t (/ l (* k (* (sin k) (tan k)))))))
(/ 2.0 (/ (* (pow (sin k) 2.0) (* t (pow k 2.0))) (pow l 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (t <= 2.9e-105) {
tmp = 2.0 * (pow(l, 2.0) * ((cos(k) / t) / pow((k * sin(k)), 2.0)));
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / pow(t, 3.0)) * (t * (l / (k * (sin(k) * tan(k))))));
} else {
tmp = 2.0 / ((pow(sin(k), 2.0) * (t * pow(k, 2.0))) / pow(l, 2.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 2.9d-105) then
tmp = 2.0d0 * ((l ** 2.0d0) * ((cos(k) / t) / ((k * sin(k)) ** 2.0d0)))
else if (t <= 5.8d+102) then
tmp = (l / (k / t)) * ((2.0d0 / (t ** 3.0d0)) * (t * (l / (k * (sin(k) * tan(k))))))
else
tmp = 2.0d0 / (((sin(k) ** 2.0d0) * (t * (k ** 2.0d0))) / (l ** 2.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= 2.9e-105) {
tmp = 2.0 * (Math.pow(l, 2.0) * ((Math.cos(k) / t) / Math.pow((k * Math.sin(k)), 2.0)));
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / Math.pow(t, 3.0)) * (t * (l / (k * (Math.sin(k) * Math.tan(k))))));
} else {
tmp = 2.0 / ((Math.pow(Math.sin(k), 2.0) * (t * Math.pow(k, 2.0))) / Math.pow(l, 2.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 2.9e-105: tmp = 2.0 * (math.pow(l, 2.0) * ((math.cos(k) / t) / math.pow((k * math.sin(k)), 2.0))) elif t <= 5.8e+102: tmp = (l / (k / t)) * ((2.0 / math.pow(t, 3.0)) * (t * (l / (k * (math.sin(k) * math.tan(k)))))) else: tmp = 2.0 / ((math.pow(math.sin(k), 2.0) * (t * math.pow(k, 2.0))) / math.pow(l, 2.0)) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 2.9e-105) tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(Float64(cos(k) / t) / (Float64(k * sin(k)) ^ 2.0)))); elseif (t <= 5.8e+102) tmp = Float64(Float64(l / Float64(k / t)) * Float64(Float64(2.0 / (t ^ 3.0)) * Float64(t * Float64(l / Float64(k * Float64(sin(k) * tan(k))))))); else tmp = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) * Float64(t * (k ^ 2.0))) / (l ^ 2.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 2.9e-105) tmp = 2.0 * ((l ^ 2.0) * ((cos(k) / t) / ((k * sin(k)) ^ 2.0))); elseif (t <= 5.8e+102) tmp = (l / (k / t)) * ((2.0 / (t ^ 3.0)) * (t * (l / (k * (sin(k) * tan(k)))))); else tmp = 2.0 / (((sin(k) ^ 2.0) * (t * (k ^ 2.0))) / (l ^ 2.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 2.9e-105], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+102], N[(N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(t * N[(l / N[(k * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.9 \cdot 10^{-105}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\frac{\cos k}{t}}{{\left(k \cdot \sin k\right)}^{2}}\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{\frac{k}{t}} \cdot \left(\frac{2}{{t}^{3}} \cdot \left(t \cdot \frac{\ell}{k \cdot \left(\sin k \cdot \tan k\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2} \cdot \left(t \cdot {k}^{2}\right)}{{\ell}^{2}}}\\
\end{array}
\end{array}
if t < 2.90000000000000003e-105Initial program 35.6%
associate-/r*35.6%
associate-/l/35.6%
associate-*l/36.2%
associate-/r/35.9%
+-commutative35.9%
unpow235.9%
sqr-neg35.9%
distribute-frac-neg235.9%
distribute-frac-neg235.9%
unpow235.9%
+-rgt-identity35.9%
metadata-eval35.9%
associate--l+35.9%
+-commutative35.9%
associate--l+35.9%
Simplified43.6%
associate-*r*49.9%
unpow249.9%
times-frac54.3%
associate-/l/54.3%
associate-*l/54.6%
associate-*l*54.6%
Applied egg-rr54.6%
Taylor expanded in l around 0 79.2%
associate-/l*79.2%
*-commutative79.2%
associate-*r*76.9%
unpow276.9%
unpow276.9%
swap-sqr76.9%
unpow276.9%
*-commutative76.9%
associate-/r*76.9%
Simplified76.9%
if 2.90000000000000003e-105 < t < 5.8000000000000005e102Initial program 70.8%
associate-/r*70.8%
associate-/l/70.9%
associate-*l/73.8%
associate-/r/73.8%
+-commutative73.8%
unpow273.8%
sqr-neg73.8%
distribute-frac-neg273.8%
distribute-frac-neg273.8%
unpow273.8%
+-rgt-identity73.8%
metadata-eval73.8%
associate--l+73.8%
+-commutative73.8%
associate--l+73.8%
Simplified73.8%
associate-*r*82.9%
unpow282.9%
times-frac85.9%
associate-/l/85.8%
associate-*l/85.9%
associate-*l*85.8%
Applied egg-rr85.8%
div-inv85.8%
times-frac88.5%
Applied egg-rr88.5%
associate-*r/88.6%
*-rgt-identity88.6%
associate-/r/88.4%
associate-/l*91.2%
associate-*l*91.5%
associate-/l/91.5%
Simplified91.5%
if 5.8000000000000005e102 < t Initial program 12.5%
Simplified22.6%
unpow322.6%
times-frac40.5%
pow240.5%
Applied egg-rr40.5%
unpow240.5%
frac-2neg40.5%
frac-times20.2%
Applied egg-rr20.2%
Taylor expanded in t around 0 65.6%
associate-*r*65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in k around 0 63.2%
Final simplification76.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (sin k) (tan k))))
(if (<= t 2.25e-116)
(/ (/ (* 2.0 (pow l 2.0)) (pow k 4.0)) t)
(if (<= t 5.8e+102)
(* (/ l (/ k t)) (* (/ 2.0 (pow t 3.0)) (* t (/ l (* k t_1)))))
(if (<= t 9.8e+138)
(/
2.0
(*
(* (/ (pow t 2.0) l) (/ t l))
(* t_1 (/ 1.0 (* (/ t k) (/ t k))))))
(/ 2.0 (* (pow l -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 (t <= 2.25e-116) {
tmp = ((2.0 * pow(l, 2.0)) / pow(k, 4.0)) / t;
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / pow(t, 3.0)) * (t * (l / (k * t_1))));
} else if (t <= 9.8e+138) {
tmp = 2.0 / (((pow(t, 2.0) / l) * (t / l)) * (t_1 * (1.0 / ((t / k) * (t / k)))));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t * pow(k, 4.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) * tan(k)
if (t <= 2.25d-116) then
tmp = ((2.0d0 * (l ** 2.0d0)) / (k ** 4.0d0)) / t
else if (t <= 5.8d+102) then
tmp = (l / (k / t)) * ((2.0d0 / (t ** 3.0d0)) * (t * (l / (k * t_1))))
else if (t <= 9.8d+138) then
tmp = 2.0d0 / ((((t ** 2.0d0) / l) * (t / l)) * (t_1 * (1.0d0 / ((t / k) * (t / k)))))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t * (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.sin(k) * Math.tan(k);
double tmp;
if (t <= 2.25e-116) {
tmp = ((2.0 * Math.pow(l, 2.0)) / Math.pow(k, 4.0)) / t;
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / Math.pow(t, 3.0)) * (t * (l / (k * t_1))));
} else if (t <= 9.8e+138) {
tmp = 2.0 / (((Math.pow(t, 2.0) / l) * (t / l)) * (t_1 * (1.0 / ((t / k) * (t / k)))));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t * Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): t_1 = math.sin(k) * math.tan(k) tmp = 0 if t <= 2.25e-116: tmp = ((2.0 * math.pow(l, 2.0)) / math.pow(k, 4.0)) / t elif t <= 5.8e+102: tmp = (l / (k / t)) * ((2.0 / math.pow(t, 3.0)) * (t * (l / (k * t_1)))) elif t <= 9.8e+138: tmp = 2.0 / (((math.pow(t, 2.0) / l) * (t / l)) * (t_1 * (1.0 / ((t / k) * (t / k))))) else: tmp = 2.0 / (math.pow(l, -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 (t <= 2.25e-116) tmp = Float64(Float64(Float64(2.0 * (l ^ 2.0)) / (k ^ 4.0)) / t); elseif (t <= 5.8e+102) tmp = Float64(Float64(l / Float64(k / t)) * Float64(Float64(2.0 / (t ^ 3.0)) * Float64(t * Float64(l / Float64(k * t_1))))); elseif (t <= 9.8e+138) tmp = Float64(2.0 / Float64(Float64(Float64((t ^ 2.0) / l) * Float64(t / l)) * Float64(t_1 * Float64(1.0 / Float64(Float64(t / k) * Float64(t / k)))))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t * (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) * tan(k); tmp = 0.0; if (t <= 2.25e-116) tmp = ((2.0 * (l ^ 2.0)) / (k ^ 4.0)) / t; elseif (t <= 5.8e+102) tmp = (l / (k / t)) * ((2.0 / (t ^ 3.0)) * (t * (l / (k * t_1)))); elseif (t <= 9.8e+138) tmp = 2.0 / ((((t ^ 2.0) / l) * (t / l)) * (t_1 * (1.0 / ((t / k) * (t / k))))); else tmp = 2.0 / ((l ^ -2.0) * (t * (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 2.25e-116], N[(N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 5.8e+102], N[(N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(t * N[(l / N[(k * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e+138], N[(2.0 / N[(N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(1.0 / N[(N[(t / k), $MachinePrecision] * N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin k \cdot \tan k\\
\mathbf{if}\;t \leq 2.25 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{2 \cdot {\ell}^{2}}{{k}^{4}}}{t}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{\frac{k}{t}} \cdot \left(\frac{2}{{t}^{3}} \cdot \left(t \cdot \frac{\ell}{k \cdot t\_1}\right)\right)\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+138}:\\
\;\;\;\;\frac{2}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(t\_1 \cdot \frac{1}{\frac{t}{k} \cdot \frac{t}{k}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if t < 2.25000000000000006e-116Initial program 35.0%
associate-/r*35.0%
associate-/l/35.0%
associate-*l/35.5%
associate-/r/35.5%
+-commutative35.5%
unpow235.5%
sqr-neg35.5%
distribute-frac-neg235.5%
distribute-frac-neg235.5%
unpow235.5%
+-rgt-identity35.5%
metadata-eval35.5%
associate--l+35.5%
+-commutative35.5%
associate--l+35.5%
Simplified43.4%
Taylor expanded in k around 0 67.1%
associate-*r/67.1%
associate-/r*67.5%
Simplified67.5%
if 2.25000000000000006e-116 < t < 5.8000000000000005e102Initial program 70.2%
associate-/r*70.2%
associate-/l/70.2%
associate-*l/72.7%
associate-/r/71.4%
+-commutative71.4%
unpow271.4%
sqr-neg71.4%
distribute-frac-neg271.4%
distribute-frac-neg271.4%
unpow271.4%
+-rgt-identity71.4%
metadata-eval71.4%
associate--l+71.4%
+-commutative71.4%
associate--l+71.4%
Simplified71.4%
associate-*r*79.5%
unpow279.5%
times-frac82.3%
associate-/l/82.2%
associate-*l/83.5%
associate-*l*83.5%
Applied egg-rr83.5%
div-inv83.5%
times-frac84.7%
Applied egg-rr84.7%
associate-*r/84.7%
*-rgt-identity84.7%
associate-/r/84.5%
associate-/l*87.1%
associate-*l*87.3%
associate-/l/87.3%
Simplified87.3%
if 5.8000000000000005e102 < t < 9.79999999999999966e138Initial program 12.5%
Simplified25.3%
unpow325.3%
times-frac86.7%
pow286.7%
Applied egg-rr86.7%
unpow286.7%
clear-num86.7%
clear-num86.9%
frac-times87.1%
metadata-eval87.1%
Applied egg-rr87.1%
if 9.79999999999999966e138 < t Initial program 12.5%
Simplified21.9%
Taylor expanded in k around 0 60.5%
*-commutative60.5%
associate-/l*54.7%
Simplified54.7%
pow154.7%
div-inv54.7%
pow-flip54.9%
metadata-eval54.9%
Applied egg-rr54.9%
unpow154.9%
associate-*r*60.8%
Simplified60.8%
Final simplification70.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (sin k) (tan k))))
(if (<= t 5.8e-116)
(/ (/ (* 2.0 (pow l 2.0)) (pow k 4.0)) t)
(if (<= t 5.8e+102)
(* (/ l (/ k t)) (* (/ 2.0 (pow t 3.0)) (* t (/ l (* k t_1)))))
(if (<= t 3.65e+140)
(/ 2.0 (* (* (/ (pow t 2.0) l) (/ t l)) (* t_1 (/ (/ k t) (/ t k)))))
(/ 2.0 (* (pow l -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 (t <= 5.8e-116) {
tmp = ((2.0 * pow(l, 2.0)) / pow(k, 4.0)) / t;
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / pow(t, 3.0)) * (t * (l / (k * t_1))));
} else if (t <= 3.65e+140) {
tmp = 2.0 / (((pow(t, 2.0) / l) * (t / l)) * (t_1 * ((k / t) / (t / k))));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t * pow(k, 4.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) * tan(k)
if (t <= 5.8d-116) then
tmp = ((2.0d0 * (l ** 2.0d0)) / (k ** 4.0d0)) / t
else if (t <= 5.8d+102) then
tmp = (l / (k / t)) * ((2.0d0 / (t ** 3.0d0)) * (t * (l / (k * t_1))))
else if (t <= 3.65d+140) then
tmp = 2.0d0 / ((((t ** 2.0d0) / l) * (t / l)) * (t_1 * ((k / t) / (t / k))))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t * (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.sin(k) * Math.tan(k);
double tmp;
if (t <= 5.8e-116) {
tmp = ((2.0 * Math.pow(l, 2.0)) / Math.pow(k, 4.0)) / t;
} else if (t <= 5.8e+102) {
tmp = (l / (k / t)) * ((2.0 / Math.pow(t, 3.0)) * (t * (l / (k * t_1))));
} else if (t <= 3.65e+140) {
tmp = 2.0 / (((Math.pow(t, 2.0) / l) * (t / l)) * (t_1 * ((k / t) / (t / k))));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t * Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): t_1 = math.sin(k) * math.tan(k) tmp = 0 if t <= 5.8e-116: tmp = ((2.0 * math.pow(l, 2.0)) / math.pow(k, 4.0)) / t elif t <= 5.8e+102: tmp = (l / (k / t)) * ((2.0 / math.pow(t, 3.0)) * (t * (l / (k * t_1)))) elif t <= 3.65e+140: tmp = 2.0 / (((math.pow(t, 2.0) / l) * (t / l)) * (t_1 * ((k / t) / (t / k)))) else: tmp = 2.0 / (math.pow(l, -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 (t <= 5.8e-116) tmp = Float64(Float64(Float64(2.0 * (l ^ 2.0)) / (k ^ 4.0)) / t); elseif (t <= 5.8e+102) tmp = Float64(Float64(l / Float64(k / t)) * Float64(Float64(2.0 / (t ^ 3.0)) * Float64(t * Float64(l / Float64(k * t_1))))); elseif (t <= 3.65e+140) tmp = Float64(2.0 / Float64(Float64(Float64((t ^ 2.0) / l) * Float64(t / l)) * Float64(t_1 * Float64(Float64(k / t) / Float64(t / k))))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t * (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) * tan(k); tmp = 0.0; if (t <= 5.8e-116) tmp = ((2.0 * (l ^ 2.0)) / (k ^ 4.0)) / t; elseif (t <= 5.8e+102) tmp = (l / (k / t)) * ((2.0 / (t ^ 3.0)) * (t * (l / (k * t_1)))); elseif (t <= 3.65e+140) tmp = 2.0 / ((((t ^ 2.0) / l) * (t / l)) * (t_1 * ((k / t) / (t / k)))); else tmp = 2.0 / ((l ^ -2.0) * (t * (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 5.8e-116], N[(N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 5.8e+102], N[(N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(t * N[(l / N[(k * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.65e+140], N[(2.0 / N[(N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(N[(k / t), $MachinePrecision] / N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin k \cdot \tan k\\
\mathbf{if}\;t \leq 5.8 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{2 \cdot {\ell}^{2}}{{k}^{4}}}{t}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{\frac{k}{t}} \cdot \left(\frac{2}{{t}^{3}} \cdot \left(t \cdot \frac{\ell}{k \cdot t\_1}\right)\right)\\
\mathbf{elif}\;t \leq 3.65 \cdot 10^{+140}:\\
\;\;\;\;\frac{2}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(t\_1 \cdot \frac{\frac{k}{t}}{\frac{t}{k}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if t < 5.7999999999999996e-116Initial program 35.0%
associate-/r*35.0%
associate-/l/35.0%
associate-*l/35.5%
associate-/r/35.5%
+-commutative35.5%
unpow235.5%
sqr-neg35.5%
distribute-frac-neg235.5%
distribute-frac-neg235.5%
unpow235.5%
+-rgt-identity35.5%
metadata-eval35.5%
associate--l+35.5%
+-commutative35.5%
associate--l+35.5%
Simplified43.4%
Taylor expanded in k around 0 67.1%
associate-*r/67.1%
associate-/r*67.5%
Simplified67.5%
if 5.7999999999999996e-116 < t < 5.8000000000000005e102Initial program 70.2%
associate-/r*70.2%
associate-/l/70.2%
associate-*l/72.7%
associate-/r/71.4%
+-commutative71.4%
unpow271.4%
sqr-neg71.4%
distribute-frac-neg271.4%
distribute-frac-neg271.4%
unpow271.4%
+-rgt-identity71.4%
metadata-eval71.4%
associate--l+71.4%
+-commutative71.4%
associate--l+71.4%
Simplified71.4%
associate-*r*79.5%
unpow279.5%
times-frac82.3%
associate-/l/82.2%
associate-*l/83.5%
associate-*l*83.5%
Applied egg-rr83.5%
div-inv83.5%
times-frac84.7%
Applied egg-rr84.7%
associate-*r/84.7%
*-rgt-identity84.7%
associate-/r/84.5%
associate-/l*87.1%
associate-*l*87.3%
associate-/l/87.3%
Simplified87.3%
if 5.8000000000000005e102 < t < 3.6500000000000002e140Initial program 12.5%
Simplified25.3%
unpow325.3%
times-frac86.7%
pow286.7%
Applied egg-rr86.7%
unpow286.7%
clear-num86.7%
un-div-inv86.9%
Applied egg-rr86.9%
if 3.6500000000000002e140 < t Initial program 12.5%
Simplified21.9%
Taylor expanded in k around 0 60.5%
*-commutative60.5%
associate-/l*54.7%
Simplified54.7%
pow154.7%
div-inv54.7%
pow-flip54.9%
metadata-eval54.9%
Applied egg-rr54.9%
unpow154.9%
associate-*r*60.8%
Simplified60.8%
Final simplification70.2%
(FPCore (t l k)
:precision binary64
(if (<= t 1.55e-116)
(/ (/ (* 2.0 (pow l 2.0)) (pow k 4.0)) t)
(if (<= t 1.1e+116)
(*
(/ l (/ k t))
(* (/ 2.0 (pow t 3.0)) (* t (/ l (* k (* (sin k) (tan k)))))))
(/ 2.0 (* (pow l -2.0) (* t (pow k 4.0)))))))
double code(double t, double l, double k) {
double tmp;
if (t <= 1.55e-116) {
tmp = ((2.0 * pow(l, 2.0)) / pow(k, 4.0)) / t;
} else if (t <= 1.1e+116) {
tmp = (l / (k / t)) * ((2.0 / pow(t, 3.0)) * (t * (l / (k * (sin(k) * tan(k))))));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t * pow(k, 4.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 1.55d-116) then
tmp = ((2.0d0 * (l ** 2.0d0)) / (k ** 4.0d0)) / t
else if (t <= 1.1d+116) then
tmp = (l / (k / t)) * ((2.0d0 / (t ** 3.0d0)) * (t * (l / (k * (sin(k) * tan(k))))))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t * (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= 1.55e-116) {
tmp = ((2.0 * Math.pow(l, 2.0)) / Math.pow(k, 4.0)) / t;
} else if (t <= 1.1e+116) {
tmp = (l / (k / t)) * ((2.0 / Math.pow(t, 3.0)) * (t * (l / (k * (Math.sin(k) * Math.tan(k))))));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t * Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 1.55e-116: tmp = ((2.0 * math.pow(l, 2.0)) / math.pow(k, 4.0)) / t elif t <= 1.1e+116: tmp = (l / (k / t)) * ((2.0 / math.pow(t, 3.0)) * (t * (l / (k * (math.sin(k) * math.tan(k)))))) else: tmp = 2.0 / (math.pow(l, -2.0) * (t * math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 1.55e-116) tmp = Float64(Float64(Float64(2.0 * (l ^ 2.0)) / (k ^ 4.0)) / t); elseif (t <= 1.1e+116) tmp = Float64(Float64(l / Float64(k / t)) * Float64(Float64(2.0 / (t ^ 3.0)) * Float64(t * Float64(l / Float64(k * Float64(sin(k) * tan(k))))))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t * (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 1.55e-116) tmp = ((2.0 * (l ^ 2.0)) / (k ^ 4.0)) / t; elseif (t <= 1.1e+116) tmp = (l / (k / t)) * ((2.0 / (t ^ 3.0)) * (t * (l / (k * (sin(k) * tan(k)))))); else tmp = 2.0 / ((l ^ -2.0) * (t * (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 1.55e-116], N[(N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.1e+116], N[(N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(t * N[(l / N[(k * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.55 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{2 \cdot {\ell}^{2}}{{k}^{4}}}{t}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+116}:\\
\;\;\;\;\frac{\ell}{\frac{k}{t}} \cdot \left(\frac{2}{{t}^{3}} \cdot \left(t \cdot \frac{\ell}{k \cdot \left(\sin k \cdot \tan k\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if t < 1.55000000000000009e-116Initial program 35.0%
associate-/r*35.0%
associate-/l/35.0%
associate-*l/35.5%
associate-/r/35.5%
+-commutative35.5%
unpow235.5%
sqr-neg35.5%
distribute-frac-neg235.5%
distribute-frac-neg235.5%
unpow235.5%
+-rgt-identity35.5%
metadata-eval35.5%
associate--l+35.5%
+-commutative35.5%
associate--l+35.5%
Simplified43.4%
Taylor expanded in k around 0 67.1%
associate-*r/67.1%
associate-/r*67.5%
Simplified67.5%
if 1.55000000000000009e-116 < t < 1.1e116Initial program 65.1%
associate-/r*65.1%
associate-/l/65.1%
associate-*l/67.4%
associate-/r/66.1%
+-commutative66.1%
unpow266.1%
sqr-neg66.1%
distribute-frac-neg266.1%
distribute-frac-neg266.1%
unpow266.1%
+-rgt-identity66.1%
metadata-eval66.1%
associate--l+66.1%
+-commutative66.1%
associate--l+66.1%
Simplified68.6%
associate-*r*76.3%
unpow276.3%
times-frac79.0%
associate-/l/78.9%
associate-*l/80.1%
associate-*l*80.1%
Applied egg-rr80.1%
div-inv80.0%
times-frac81.1%
Applied egg-rr81.1%
associate-*r/81.2%
*-rgt-identity81.2%
associate-/r/81.0%
associate-/l*83.4%
associate-*l*83.6%
associate-/l/83.6%
Simplified83.6%
if 1.1e116 < t Initial program 13.5%
Simplified21.7%
Taylor expanded in k around 0 58.0%
*-commutative58.0%
associate-/l*52.9%
Simplified52.9%
pow152.9%
div-inv52.9%
pow-flip53.1%
metadata-eval53.1%
Applied egg-rr53.1%
unpow153.1%
associate-*r*58.2%
Simplified58.2%
Final simplification68.7%
(FPCore (t l k) :precision binary64 (if (<= l 2.4e-194) (* (/ l (/ k t)) (* 2.0 (/ (/ l (pow k 3.0)) (pow t 2.0)))) (* 2.0 (* (pow l 2.0) (/ (cos k) (* t (pow k 4.0)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 2.4e-194) {
tmp = (l / (k / t)) * (2.0 * ((l / pow(k, 3.0)) / pow(t, 2.0)));
} else {
tmp = 2.0 * (pow(l, 2.0) * (cos(k) / (t * pow(k, 4.0))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 2.4d-194) then
tmp = (l / (k / t)) * (2.0d0 * ((l / (k ** 3.0d0)) / (t ** 2.0d0)))
else
tmp = 2.0d0 * ((l ** 2.0d0) * (cos(k) / (t * (k ** 4.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 2.4e-194) {
tmp = (l / (k / t)) * (2.0 * ((l / Math.pow(k, 3.0)) / Math.pow(t, 2.0)));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / (t * Math.pow(k, 4.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 2.4e-194: tmp = (l / (k / t)) * (2.0 * ((l / math.pow(k, 3.0)) / math.pow(t, 2.0))) else: tmp = 2.0 * (math.pow(l, 2.0) * (math.cos(k) / (t * math.pow(k, 4.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 2.4e-194) tmp = Float64(Float64(l / Float64(k / t)) * Float64(2.0 * Float64(Float64(l / (k ^ 3.0)) / (t ^ 2.0)))); else tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / Float64(t * (k ^ 4.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 2.4e-194) tmp = (l / (k / t)) * (2.0 * ((l / (k ^ 3.0)) / (t ^ 2.0))); else tmp = 2.0 * ((l ^ 2.0) * (cos(k) / (t * (k ^ 4.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 2.4e-194], N[(N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(l / N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.4 \cdot 10^{-194}:\\
\;\;\;\;\frac{\ell}{\frac{k}{t}} \cdot \left(2 \cdot \frac{\frac{\ell}{{k}^{3}}}{{t}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{t \cdot {k}^{4}}\right)\\
\end{array}
\end{array}
if l < 2.4e-194Initial program 29.5%
associate-/r*29.5%
associate-/l/29.5%
associate-*l/30.7%
associate-/r/30.7%
+-commutative30.7%
unpow230.7%
sqr-neg30.7%
distribute-frac-neg230.7%
distribute-frac-neg230.7%
unpow230.7%
+-rgt-identity30.7%
metadata-eval30.7%
associate--l+30.7%
+-commutative30.7%
associate--l+30.7%
Simplified40.1%
associate-*r*48.7%
unpow248.7%
times-frac52.6%
associate-/l/52.6%
associate-*l/52.6%
associate-*l*52.6%
Applied egg-rr52.6%
Taylor expanded in k around 0 57.7%
associate-/r*58.4%
Simplified58.4%
if 2.4e-194 < l Initial program 48.7%
associate-/r*48.7%
associate-/l/48.7%
associate-*l/48.7%
associate-/r/48.1%
+-commutative48.1%
unpow248.1%
sqr-neg48.1%
distribute-frac-neg248.1%
distribute-frac-neg248.1%
unpow248.1%
+-rgt-identity48.1%
metadata-eval48.1%
associate--l+48.1%
+-commutative48.1%
associate--l+48.1%
Simplified51.3%
Taylor expanded in k around inf 89.8%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in k around 0 75.8%
Final simplification64.9%
(FPCore (t l k)
:precision binary64
(if (<= t 3.3e-161)
(/ 2.0 (* t (/ (pow k 4.0) (pow l 2.0))))
(if (<= t 2.8e+171)
(* (/ l (/ k t)) (* 2.0 (/ (/ l (pow k 3.0)) (pow t 2.0))))
(/ 2.0 (* (pow l -2.0) (* t (pow k 4.0)))))))
double code(double t, double l, double k) {
double tmp;
if (t <= 3.3e-161) {
tmp = 2.0 / (t * (pow(k, 4.0) / pow(l, 2.0)));
} else if (t <= 2.8e+171) {
tmp = (l / (k / t)) * (2.0 * ((l / pow(k, 3.0)) / pow(t, 2.0)));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t * pow(k, 4.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 3.3d-161) then
tmp = 2.0d0 / (t * ((k ** 4.0d0) / (l ** 2.0d0)))
else if (t <= 2.8d+171) then
tmp = (l / (k / t)) * (2.0d0 * ((l / (k ** 3.0d0)) / (t ** 2.0d0)))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t * (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= 3.3e-161) {
tmp = 2.0 / (t * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else if (t <= 2.8e+171) {
tmp = (l / (k / t)) * (2.0 * ((l / Math.pow(k, 3.0)) / Math.pow(t, 2.0)));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t * Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 3.3e-161: tmp = 2.0 / (t * (math.pow(k, 4.0) / math.pow(l, 2.0))) elif t <= 2.8e+171: tmp = (l / (k / t)) * (2.0 * ((l / math.pow(k, 3.0)) / math.pow(t, 2.0))) else: tmp = 2.0 / (math.pow(l, -2.0) * (t * math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 3.3e-161) tmp = Float64(2.0 / Float64(t * Float64((k ^ 4.0) / (l ^ 2.0)))); elseif (t <= 2.8e+171) tmp = Float64(Float64(l / Float64(k / t)) * Float64(2.0 * Float64(Float64(l / (k ^ 3.0)) / (t ^ 2.0)))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t * (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 3.3e-161) tmp = 2.0 / (t * ((k ^ 4.0) / (l ^ 2.0))); elseif (t <= 2.8e+171) tmp = (l / (k / t)) * (2.0 * ((l / (k ^ 3.0)) / (t ^ 2.0))); else tmp = 2.0 / ((l ^ -2.0) * (t * (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 3.3e-161], N[(2.0 / N[(t * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+171], N[(N[(l / N[(k / t), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(l / N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{-161}:\\
\;\;\;\;\frac{2}{t \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+171}:\\
\;\;\;\;\frac{\ell}{\frac{k}{t}} \cdot \left(2 \cdot \frac{\frac{\ell}{{k}^{3}}}{{t}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if t < 3.2999999999999998e-161Initial program 36.3%
Simplified44.3%
Taylor expanded in k around 0 67.0%
*-commutative67.0%
associate-/l*67.4%
Simplified67.4%
if 3.2999999999999998e-161 < t < 2.80000000000000004e171Initial program 47.4%
associate-/r*47.4%
associate-/l/47.4%
associate-*l/48.8%
associate-/r/48.1%
+-commutative48.1%
unpow248.1%
sqr-neg48.1%
distribute-frac-neg248.1%
distribute-frac-neg248.1%
unpow248.1%
+-rgt-identity48.1%
metadata-eval48.1%
associate--l+48.1%
+-commutative48.1%
associate--l+48.1%
Simplified49.6%
associate-*r*56.0%
unpow256.0%
times-frac59.2%
associate-/l/59.2%
associate-*l/59.9%
associate-*l*59.9%
Applied egg-rr59.9%
Taylor expanded in k around 0 67.2%
associate-/r*70.1%
Simplified70.1%
if 2.80000000000000004e171 < t Initial program 11.5%
Simplified23.1%
Taylor expanded in k around 0 59.1%
*-commutative59.1%
associate-/l*52.0%
Simplified52.0%
pow152.0%
div-inv52.0%
pow-flip52.3%
metadata-eval52.3%
Applied egg-rr52.3%
unpow152.3%
associate-*r*59.4%
Simplified59.4%
Final simplification67.3%
(FPCore (t l k) :precision binary64 (* (/ 2.0 (pow k 4.0)) (/ (pow l 2.0) t)))
double code(double t, double l, double k) {
return (2.0 / pow(k, 4.0)) * (pow(l, 2.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 = (2.0d0 / (k ** 4.0d0)) * ((l ** 2.0d0) / t)
end function
public static double code(double t, double l, double k) {
return (2.0 / Math.pow(k, 4.0)) * (Math.pow(l, 2.0) / t);
}
def code(t, l, k): return (2.0 / math.pow(k, 4.0)) * (math.pow(l, 2.0) / t)
function code(t, l, k) return Float64(Float64(2.0 / (k ^ 4.0)) * Float64((l ^ 2.0) / t)) end
function tmp = code(t, l, k) tmp = (2.0 / (k ^ 4.0)) * ((l ^ 2.0) / t); end
code[t_, l_, k_] := N[(N[(2.0 / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{{k}^{4}} \cdot \frac{{\ell}^{2}}{t}
\end{array}
Initial program 36.7%
associate-/r*36.7%
associate-/l/36.7%
associate-*l/37.5%
associate-/r/37.3%
+-commutative37.3%
unpow237.3%
sqr-neg37.3%
distribute-frac-neg237.3%
distribute-frac-neg237.3%
unpow237.3%
+-rgt-identity37.3%
metadata-eval37.3%
associate--l+37.3%
+-commutative37.3%
associate--l+37.3%
Simplified44.3%
associate-*r*50.2%
unpow250.2%
times-frac54.9%
associate-/l/54.9%
associate-*l/55.1%
associate-*l*55.1%
Applied egg-rr55.1%
Taylor expanded in k around 0 64.9%
associate-*r/64.9%
times-frac64.3%
Simplified64.3%
Final simplification64.3%
(FPCore (t l k) :precision binary64 (/ 2.0 (* t (/ (pow k 4.0) (pow l 2.0)))))
double code(double t, double l, double k) {
return 2.0 / (t * (pow(k, 4.0) / pow(l, 2.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (t * ((k ** 4.0d0) / (l ** 2.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 / (t * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
}
def code(t, l, k): return 2.0 / (t * (math.pow(k, 4.0) / math.pow(l, 2.0)))
function code(t, l, k) return Float64(2.0 / Float64(t * Float64((k ^ 4.0) / (l ^ 2.0)))) end
function tmp = code(t, l, k) tmp = 2.0 / (t * ((k ^ 4.0) / (l ^ 2.0))); end
code[t_, l_, k_] := N[(2.0 / N[(t * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{t \cdot \frac{{k}^{4}}{{\ell}^{2}}}
\end{array}
Initial program 36.7%
Simplified43.4%
Taylor expanded in k around 0 64.9%
*-commutative64.9%
associate-/l*64.5%
Simplified64.5%
Final simplification64.5%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (pow l -2.0) (* t (pow k 4.0)))))
double code(double t, double l, double k) {
return 2.0 / (pow(l, -2.0) * (t * pow(k, 4.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / ((l ** (-2.0d0)) * (t * (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 / (Math.pow(l, -2.0) * (t * Math.pow(k, 4.0)));
}
def code(t, l, k): return 2.0 / (math.pow(l, -2.0) * (t * math.pow(k, 4.0)))
function code(t, l, k) return Float64(2.0 / Float64((l ^ -2.0) * Float64(t * (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = 2.0 / ((l ^ -2.0) * (t * (k ^ 4.0))); end
code[t_, l_, k_] := N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{{\ell}^{-2} \cdot \left(t \cdot {k}^{4}\right)}
\end{array}
Initial program 36.7%
Simplified43.4%
Taylor expanded in k around 0 64.9%
*-commutative64.9%
associate-/l*64.5%
Simplified64.5%
pow164.5%
div-inv64.5%
pow-flip64.9%
metadata-eval64.9%
Applied egg-rr64.9%
unpow164.9%
associate-*r*65.3%
Simplified65.3%
Final simplification65.3%
herbie shell --seed 2024052
(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))))