
(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}
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) 2.0)))
(if (<= l 2.7e-162)
(* 2.0 (pow (* t_1 (cbrt (/ (/ 1.0 t) (pow k 4.0)))) 3.0))
(if (<= l 1.4e+157)
(/
2.0
(* (pow k 2.0) (* (pow l -2.0) (* (pow (sin k) 2.0) (/ t (cos k))))))
(if (<= l 2.8e+227)
(/
2.0
(pow
(* (cbrt (* (* (sin k) (tan k)) (pow (/ k t) 2.0))) (/ t t_1))
3.0))
(/
2.0
(*
(log (pow (exp (pow k 2.0)) (pow l -2.0)))
(/ (* t (- 0.5 (/ (cos (* 2.0 k)) 2.0))) (cos k)))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), 2.0);
double tmp;
if (l <= 2.7e-162) {
tmp = 2.0 * pow((t_1 * cbrt(((1.0 / t) / pow(k, 4.0)))), 3.0);
} else if (l <= 1.4e+157) {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (pow(sin(k), 2.0) * (t / cos(k)))));
} else if (l <= 2.8e+227) {
tmp = 2.0 / pow((cbrt(((sin(k) * tan(k)) * pow((k / t), 2.0))) * (t / t_1)), 3.0);
} else {
tmp = 2.0 / (log(pow(exp(pow(k, 2.0)), pow(l, -2.0))) * ((t * (0.5 - (cos((2.0 * k)) / 2.0))) / cos(k)));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (l <= 2.7e-162) {
tmp = 2.0 * Math.pow((t_1 * Math.cbrt(((1.0 / t) / Math.pow(k, 4.0)))), 3.0);
} else if (l <= 1.4e+157) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (Math.pow(Math.sin(k), 2.0) * (t / Math.cos(k)))));
} else if (l <= 2.8e+227) {
tmp = 2.0 / Math.pow((Math.cbrt(((Math.sin(k) * Math.tan(k)) * Math.pow((k / t), 2.0))) * (t / t_1)), 3.0);
} else {
tmp = 2.0 / (Math.log(Math.pow(Math.exp(Math.pow(k, 2.0)), Math.pow(l, -2.0))) * ((t * (0.5 - (Math.cos((2.0 * k)) / 2.0))) / Math.cos(k)));
}
return tmp;
}
l = abs(l) function code(t, l, k) t_1 = cbrt(l) ^ 2.0 tmp = 0.0 if (l <= 2.7e-162) tmp = Float64(2.0 * (Float64(t_1 * cbrt(Float64(Float64(1.0 / t) / (k ^ 4.0)))) ^ 3.0)); elseif (l <= 1.4e+157) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64((sin(k) ^ 2.0) * Float64(t / cos(k)))))); elseif (l <= 2.8e+227) tmp = Float64(2.0 / (Float64(cbrt(Float64(Float64(sin(k) * tan(k)) * (Float64(k / t) ^ 2.0))) * Float64(t / t_1)) ^ 3.0)); else tmp = Float64(2.0 / Float64(log((exp((k ^ 2.0)) ^ (l ^ -2.0))) * Float64(Float64(t * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))) / cos(k)))); end return tmp end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, 2.7e-162], N[(2.0 * N[Power[N[(t$95$1 * N[Power[N[(N[(1.0 / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.4e+157], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.8e+227], N[(2.0 / N[Power[N[(N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Log[N[Power[N[Exp[N[Power[k, 2.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[(t * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;\ell \leq 2.7 \cdot 10^{-162}:\\
\;\;\;\;2 \cdot {\left(t_1 \cdot \sqrt[3]{\frac{\frac{1}{t}}{{k}^{4}}}\right)}^{3}\\
\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+157}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left({\sin k}^{2} \cdot \frac{t}{\cos k}\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.8 \cdot 10^{+227}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}} \cdot \frac{t}{t_1}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\log \left({\left(e^{{k}^{2}}\right)}^{\left({\ell}^{-2}\right)}\right) \cdot \frac{t \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}{\cos k}}\\
\end{array}
\end{array}
if l < 2.69999999999999984e-162Initial program 34.3%
associate-/r*34.4%
associate-*l/34.4%
associate--l+34.4%
Simplified34.4%
Taylor expanded in k around 0 57.1%
add-cube-cbrt57.1%
pow357.1%
*-commutative57.1%
Applied egg-rr57.1%
pow1/338.9%
div-inv38.9%
unpow-prod-down34.0%
pow1/334.0%
pow234.0%
cbrt-prod38.2%
pow238.2%
Applied egg-rr38.2%
unpow1/366.8%
associate-/r*66.8%
Simplified66.8%
if 2.69999999999999984e-162 < l < 1.4000000000000001e157Initial program 37.9%
Simplified49.7%
Taylor expanded in t around 0 85.3%
times-frac89.8%
Simplified89.8%
expm1-log1p-u64.0%
expm1-udef34.1%
div-inv34.1%
pow-flip35.4%
metadata-eval35.4%
associate-/l*35.4%
Applied egg-rr35.4%
expm1-def64.3%
expm1-log1p90.1%
associate-*l*90.1%
associate-/r/91.0%
*-commutative91.0%
Simplified91.0%
if 1.4000000000000001e157 < l < 2.79999999999999984e227Initial program 16.0%
Simplified16.0%
unpow316.0%
times-frac40.3%
pow240.3%
Applied egg-rr40.3%
add-cube-cbrt39.9%
pow339.8%
Applied egg-rr78.4%
associate-*r*77.9%
*-commutative77.9%
Simplified77.9%
if 2.79999999999999984e227 < l Initial program 35.7%
Simplified35.7%
Taylor expanded in t around 0 71.4%
times-frac71.7%
Simplified71.7%
unpow271.7%
sin-mult71.7%
Applied egg-rr71.7%
div-sub71.7%
+-inverses71.7%
cos-071.7%
metadata-eval71.7%
count-271.7%
*-commutative71.7%
Simplified71.7%
add-log-exp71.7%
div-inv71.7%
exp-prod72.4%
pow-flip72.4%
metadata-eval72.4%
Applied egg-rr72.4%
Final simplification75.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) 2.0)))
(if (<= (* l l) 0.0)
(* 2.0 (pow (* t_1 (cbrt (/ (/ 1.0 t) (pow k 4.0)))) 3.0))
(if (<= (* l l) 2e+296)
(/
2.0
(* (pow k 2.0) (* (pow l -2.0) (* (pow (sin k) 2.0) (/ t (cos k))))))
(/
2.0
(pow
(* (cbrt (* (* (sin k) (tan k)) (pow (/ k t) 2.0))) (/ t t_1))
3.0))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), 2.0);
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * pow((t_1 * cbrt(((1.0 / t) / pow(k, 4.0)))), 3.0);
} else if ((l * l) <= 2e+296) {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (pow(sin(k), 2.0) * (t / cos(k)))));
} else {
tmp = 2.0 / pow((cbrt(((sin(k) * tan(k)) * pow((k / t), 2.0))) * (t / t_1)), 3.0);
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * Math.pow((t_1 * Math.cbrt(((1.0 / t) / Math.pow(k, 4.0)))), 3.0);
} else if ((l * l) <= 2e+296) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (Math.pow(Math.sin(k), 2.0) * (t / Math.cos(k)))));
} else {
tmp = 2.0 / Math.pow((Math.cbrt(((Math.sin(k) * Math.tan(k)) * Math.pow((k / t), 2.0))) * (t / t_1)), 3.0);
}
return tmp;
}
l = abs(l) function code(t, l, k) t_1 = cbrt(l) ^ 2.0 tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(2.0 * (Float64(t_1 * cbrt(Float64(Float64(1.0 / t) / (k ^ 4.0)))) ^ 3.0)); elseif (Float64(l * l) <= 2e+296) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64((sin(k) ^ 2.0) * Float64(t / cos(k)))))); else tmp = Float64(2.0 / (Float64(cbrt(Float64(Float64(sin(k) * tan(k)) * (Float64(k / t) ^ 2.0))) * Float64(t / t_1)) ^ 3.0)); end return tmp end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(2.0 * N[Power[N[(t$95$1 * N[Power[N[(N[(1.0 / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+296], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;2 \cdot {\left(t_1 \cdot \sqrt[3]{\frac{\frac{1}{t}}{{k}^{4}}}\right)}^{3}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+296}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left({\sin k}^{2} \cdot \frac{t}{\cos k}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t}\right)}^{2}} \cdot \frac{t}{t_1}\right)}^{3}}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 16.1%
associate-/r*16.1%
associate-*l/16.1%
associate--l+16.1%
Simplified16.1%
Taylor expanded in k around 0 49.0%
add-cube-cbrt49.0%
pow349.0%
*-commutative49.0%
Applied egg-rr49.0%
pow1/349.0%
div-inv49.0%
unpow-prod-down39.7%
pow1/339.7%
pow239.7%
cbrt-prod50.6%
pow250.6%
Applied egg-rr50.6%
unpow1/376.2%
associate-/r*76.2%
Simplified76.2%
if 0.0 < (*.f64 l l) < 1.99999999999999996e296Initial program 42.9%
Simplified53.5%
Taylor expanded in t around 0 85.4%
times-frac87.9%
Simplified87.9%
expm1-log1p-u61.2%
expm1-udef29.2%
div-inv29.2%
pow-flip29.2%
metadata-eval29.2%
associate-/l*29.2%
Applied egg-rr29.2%
expm1-def60.7%
expm1-log1p87.3%
associate-*l*88.6%
associate-/r/89.0%
*-commutative89.0%
Simplified89.0%
if 1.99999999999999996e296 < (*.f64 l l) Initial program 31.4%
Simplified31.4%
unpow331.4%
times-frac46.3%
pow246.3%
Applied egg-rr46.3%
add-cube-cbrt46.1%
pow346.1%
Applied egg-rr67.1%
associate-*r*67.0%
*-commutative67.0%
Simplified67.0%
Final simplification81.5%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 0.0)
(* 2.0 (pow (* (pow (cbrt l) 2.0) (cbrt (/ (/ 1.0 t) (pow k 4.0)))) 3.0))
(*
2.0
(* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t (pow (sin k) 2.0)))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * pow((pow(cbrt(l), 2.0) * cbrt(((1.0 / t) / pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * Math.pow((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(((1.0 / t) / Math.pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(2.0 * (Float64((cbrt(l) ^ 2.0) * cbrt(Float64(Float64(1.0 / t) / (k ^ 4.0)))) ^ 3.0)); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(2.0 * N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(1.0 / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;2 \cdot {\left({\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{\frac{\frac{1}{t}}{{k}^{4}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 16.1%
associate-/r*16.1%
associate-*l/16.1%
associate--l+16.1%
Simplified16.1%
Taylor expanded in k around 0 49.0%
add-cube-cbrt49.0%
pow349.0%
*-commutative49.0%
Applied egg-rr49.0%
pow1/349.0%
div-inv49.0%
unpow-prod-down39.7%
pow1/339.7%
pow239.7%
cbrt-prod50.6%
pow250.6%
Applied egg-rr50.6%
unpow1/376.2%
associate-/r*76.2%
Simplified76.2%
if 0.0 < (*.f64 l l) Initial program 39.7%
associate-/r*39.7%
associate-*l/39.7%
associate--l+39.7%
Simplified39.7%
Taylor expanded in t around 0 76.7%
times-frac78.2%
Simplified78.2%
Final simplification77.8%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 0.0)
(* 2.0 (pow (* (pow (cbrt l) 2.0) (cbrt (/ (/ 1.0 t) (pow k 4.0)))) 3.0))
(*
2.0
(* (/ (pow l 2.0) (pow k 2.0)) (/ (/ (cos k) t) (pow (sin k) 2.0))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * pow((pow(cbrt(l), 2.0) * cbrt(((1.0 / t) / pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * ((cos(k) / t) / pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * Math.pow((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(((1.0 / t) / Math.pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * ((Math.cos(k) / t) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(2.0 * (Float64((cbrt(l) ^ 2.0) * cbrt(Float64(Float64(1.0 / t) / (k ^ 4.0)))) ^ 3.0)); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(Float64(cos(k) / t) / (sin(k) ^ 2.0)))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(2.0 * N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(1.0 / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;2 \cdot {\left({\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{\frac{\frac{1}{t}}{{k}^{4}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\frac{\cos k}{t}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 16.1%
associate-/r*16.1%
associate-*l/16.1%
associate--l+16.1%
Simplified16.1%
Taylor expanded in k around 0 49.0%
add-cube-cbrt49.0%
pow349.0%
*-commutative49.0%
Applied egg-rr49.0%
pow1/349.0%
div-inv49.0%
unpow-prod-down39.7%
pow1/339.7%
pow239.7%
cbrt-prod50.6%
pow250.6%
Applied egg-rr50.6%
unpow1/376.2%
associate-/r*76.2%
Simplified76.2%
if 0.0 < (*.f64 l l) Initial program 39.7%
associate-/r*39.7%
associate-*l/39.7%
associate--l+39.7%
Simplified39.7%
unpow246.5%
clear-num46.5%
un-div-inv46.5%
Applied egg-rr39.8%
associate-+r-39.7%
add-exp-log39.5%
log1p-udef39.5%
expm1-udef46.7%
expm1-log1p-u47.0%
associate-/r/41.9%
Applied egg-rr41.9%
Taylor expanded in t around 0 76.7%
times-frac78.2%
associate-/r*78.3%
Simplified78.3%
Final simplification77.8%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 0.0)
(* 2.0 (pow (* (pow (cbrt l) 2.0) (cbrt (/ (/ 1.0 t) (pow k 4.0)))) 3.0))
(*
2.0
(/ (/ (* (cos k) (pow l 2.0)) (pow k 2.0)) (* t (pow (sin k) 2.0))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * pow((pow(cbrt(l), 2.0) * cbrt(((1.0 / t) / pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 * (((cos(k) * pow(l, 2.0)) / pow(k, 2.0)) / (t * pow(sin(k), 2.0)));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * Math.pow((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(((1.0 / t) / Math.pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 * (((Math.cos(k) * Math.pow(l, 2.0)) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(2.0 * (Float64((cbrt(l) ^ 2.0) * cbrt(Float64(Float64(1.0 / t) / (k ^ 4.0)))) ^ 3.0)); else tmp = Float64(2.0 * Float64(Float64(Float64(cos(k) * (l ^ 2.0)) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(2.0 * N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(1.0 / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;2 \cdot {\left({\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{\frac{\frac{1}{t}}{{k}^{4}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\cos k \cdot {\ell}^{2}}{{k}^{2}}}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 16.1%
associate-/r*16.1%
associate-*l/16.1%
associate--l+16.1%
Simplified16.1%
Taylor expanded in k around 0 49.0%
add-cube-cbrt49.0%
pow349.0%
*-commutative49.0%
Applied egg-rr49.0%
pow1/349.0%
div-inv49.0%
unpow-prod-down39.7%
pow1/339.7%
pow239.7%
cbrt-prod50.6%
pow250.6%
Applied egg-rr50.6%
unpow1/376.2%
associate-/r*76.2%
Simplified76.2%
if 0.0 < (*.f64 l l) Initial program 39.7%
associate-/r*39.7%
associate-*l/39.7%
associate--l+39.7%
Simplified39.7%
unpow246.5%
clear-num46.5%
un-div-inv46.5%
Applied egg-rr39.8%
Taylor expanded in t around 0 76.7%
associate-/r*78.3%
Simplified78.3%
Final simplification77.8%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 2e-298)
(* 2.0 (pow (* (pow (cbrt l) 2.0) (cbrt (/ (/ 1.0 t) (pow k 4.0)))) 3.0))
(/
2.0
(* (/ (pow k 2.0) (pow l 2.0)) (/ (* t (pow (sin k) 2.0)) (cos k))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-298) {
tmp = 2.0 * pow((pow(cbrt(l), 2.0) * cbrt(((1.0 / t) / pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 / ((pow(k, 2.0) / pow(l, 2.0)) * ((t * pow(sin(k), 2.0)) / cos(k)));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-298) {
tmp = 2.0 * Math.pow((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(((1.0 / t) / Math.pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 / ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * ((t * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 2e-298) tmp = Float64(2.0 * (Float64((cbrt(l) ^ 2.0) * cbrt(Float64(Float64(1.0 / t) / (k ^ 4.0)))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(Float64(t * (sin(k) ^ 2.0)) / cos(k)))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 2e-298], N[(2.0 * N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(1.0 / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-298}:\\
\;\;\;\;2 \cdot {\left({\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{\frac{\frac{1}{t}}{{k}^{4}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.99999999999999982e-298Initial program 16.9%
associate-/r*16.9%
associate-*l/16.9%
associate--l+16.9%
Simplified16.9%
Taylor expanded in k around 0 50.1%
add-cube-cbrt50.1%
pow350.1%
*-commutative50.1%
Applied egg-rr50.1%
pow1/350.1%
div-inv50.1%
unpow-prod-down39.5%
pow1/339.5%
pow239.5%
cbrt-prod49.8%
pow249.8%
Applied egg-rr49.8%
unpow1/375.8%
associate-/r*75.8%
Simplified75.8%
if 1.99999999999999982e-298 < (*.f64 l l) Initial program 39.8%
Simplified47.6%
Taylor expanded in t around 0 76.3%
times-frac78.7%
Simplified78.7%
Final simplification78.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 0.0)
(* 2.0 (pow (* (pow (cbrt l) 2.0) (cbrt (/ (/ 1.0 t) (pow k 4.0)))) 3.0))
(/
2.0
(* (pow k 2.0) (* (pow l -2.0) (* (pow (sin k) 2.0) (/ t (cos k))))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * pow((pow(cbrt(l), 2.0) * cbrt(((1.0 / t) / pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (pow(sin(k), 2.0) * (t / cos(k)))));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = 2.0 * Math.pow((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(((1.0 / t) / Math.pow(k, 4.0)))), 3.0);
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (Math.pow(Math.sin(k), 2.0) * (t / Math.cos(k)))));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(2.0 * (Float64((cbrt(l) ^ 2.0) * cbrt(Float64(Float64(1.0 / t) / (k ^ 4.0)))) ^ 3.0)); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64((sin(k) ^ 2.0) * Float64(t / cos(k)))))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(2.0 * N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(1.0 / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;2 \cdot {\left({\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{\frac{\frac{1}{t}}{{k}^{4}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left({\sin k}^{2} \cdot \frac{t}{\cos k}\right)\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 16.1%
associate-/r*16.1%
associate-*l/16.1%
associate--l+16.1%
Simplified16.1%
Taylor expanded in k around 0 49.0%
add-cube-cbrt49.0%
pow349.0%
*-commutative49.0%
Applied egg-rr49.0%
pow1/349.0%
div-inv49.0%
unpow-prod-down39.7%
pow1/339.7%
pow239.7%
cbrt-prod50.6%
pow250.6%
Applied egg-rr50.6%
unpow1/376.2%
associate-/r*76.2%
Simplified76.2%
if 0.0 < (*.f64 l l) Initial program 39.7%
Simplified47.4%
Taylor expanded in t around 0 76.6%
times-frac78.5%
Simplified78.5%
expm1-log1p-u59.2%
expm1-udef24.3%
div-inv24.3%
pow-flip24.8%
metadata-eval24.8%
associate-/l*24.8%
Applied egg-rr24.8%
expm1-def59.4%
expm1-log1p78.7%
associate-*l*79.6%
associate-/r/80.0%
*-commutative80.0%
Simplified80.0%
Final simplification79.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 1.85e-151)
(* 2.0 (pow (/ (pow (cbrt l) 2.0) (cbrt (* t (pow k 4.0)))) 3.0))
(if (<= k 9.5e-5)
(/ 2.0 (* (pow k 2.0) (/ (pow k 2.0) (/ (pow l 2.0) t))))
(/
2.0
(*
(pow k 2.0)
(* (pow l -2.0) (* (/ t (cos k)) (- 0.5 (/ (cos (* 2.0 k)) 2.0)))))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.85e-151) {
tmp = 2.0 * pow((pow(cbrt(l), 2.0) / cbrt((t * pow(k, 4.0)))), 3.0);
} else if (k <= 9.5e-5) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) / (pow(l, 2.0) / t)));
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * ((t / cos(k)) * (0.5 - (cos((2.0 * k)) / 2.0)))));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.85e-151) {
tmp = 2.0 * Math.pow((Math.pow(Math.cbrt(l), 2.0) / Math.cbrt((t * Math.pow(k, 4.0)))), 3.0);
} else if (k <= 9.5e-5) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) / (Math.pow(l, 2.0) / t)));
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * ((t / Math.cos(k)) * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 1.85e-151) tmp = Float64(2.0 * (Float64((cbrt(l) ^ 2.0) / cbrt(Float64(t * (k ^ 4.0)))) ^ 3.0)); elseif (k <= 9.5e-5) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) / Float64((l ^ 2.0) / t)))); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64(Float64(t / cos(k)) * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0)))))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.85e-151], N[(2.0 * N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.5e-5], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.85 \cdot 10^{-151}:\\
\;\;\;\;2 \cdot {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{t \cdot {k}^{4}}}\right)}^{3}\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \frac{{k}^{2}}{\frac{{\ell}^{2}}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left(\frac{t}{\cos k} \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)\right)\right)}\\
\end{array}
\end{array}
if k < 1.85e-151Initial program 39.7%
associate-/r*39.7%
associate-*l/39.7%
associate--l+39.7%
Simplified39.7%
Taylor expanded in k around 0 59.1%
add-cube-cbrt59.1%
pow359.1%
*-commutative59.1%
Applied egg-rr59.1%
cbrt-div59.1%
pow259.1%
cbrt-prod68.0%
pow268.0%
Applied egg-rr68.0%
if 1.85e-151 < k < 9.5000000000000005e-5Initial program 26.7%
Simplified37.0%
Taylor expanded in t around 0 71.7%
times-frac75.4%
Simplified75.4%
expm1-log1p-u64.0%
expm1-udef20.4%
div-inv20.4%
pow-flip20.4%
metadata-eval20.4%
associate-/l*20.4%
Applied egg-rr20.4%
expm1-def63.9%
expm1-log1p75.3%
associate-*l*75.3%
associate-/r/75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in k around 0 74.3%
associate-/l*77.6%
Simplified77.6%
if 9.5000000000000005e-5 < k Initial program 26.8%
Simplified43.4%
Taylor expanded in t around 0 69.2%
times-frac75.6%
Simplified75.6%
expm1-log1p-u37.3%
expm1-udef27.9%
div-inv27.9%
pow-flip29.2%
metadata-eval29.2%
associate-/l*29.2%
Applied egg-rr29.2%
expm1-def38.6%
expm1-log1p76.9%
associate-*l*76.8%
associate-/r/76.8%
*-commutative76.8%
Simplified76.8%
unpow275.6%
sin-mult75.4%
Applied egg-rr76.6%
div-sub75.4%
+-inverses75.4%
cos-075.4%
metadata-eval75.4%
count-275.4%
*-commutative75.4%
Simplified76.6%
Final simplification71.6%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ t (cos k)))
(t_2 (/ 2.0 (* (pow k 2.0) (* (pow l -2.0) (* (pow k 2.0) t_1)))))
(t_3 (pow (/ k t) 2.0))
(t_4 (sqrt t_1)))
(if (<= t -5.5e+102)
t_2
(if (<= t -7.2e-112)
(/ 2.0 (/ (* (* (tan k) (* (sin k) t_3)) (/ (pow t 3.0) l)) l))
(if (<= t -2e-310)
t_2
(if (<= t 1.05e-77)
(/ 2.0 (pow (* (* (sin k) (/ k l)) t_4) 2.0))
(if (<= t 5.6e+102)
(/ 2.0 (/ (* (* (tan k) t_3) (/ (* (sin k) (pow t 3.0)) l)) l))
(if (<= t 2.8e+191)
(/ 2.0 (pow (* t_4 (/ (* k (sin k)) l)) 2.0))
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = t / cos(k);
double t_2 = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (pow(k, 2.0) * t_1)));
double t_3 = pow((k / t), 2.0);
double t_4 = sqrt(t_1);
double tmp;
if (t <= -5.5e+102) {
tmp = t_2;
} else if (t <= -7.2e-112) {
tmp = 2.0 / (((tan(k) * (sin(k) * t_3)) * (pow(t, 3.0) / l)) / l);
} else if (t <= -2e-310) {
tmp = t_2;
} else if (t <= 1.05e-77) {
tmp = 2.0 / pow(((sin(k) * (k / l)) * t_4), 2.0);
} else if (t <= 5.6e+102) {
tmp = 2.0 / (((tan(k) * t_3) * ((sin(k) * pow(t, 3.0)) / l)) / l);
} else if (t <= 2.8e+191) {
tmp = 2.0 / pow((t_4 * ((k * sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = t / cos(k)
t_2 = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * ((k ** 2.0d0) * t_1)))
t_3 = (k / t) ** 2.0d0
t_4 = sqrt(t_1)
if (t <= (-5.5d+102)) then
tmp = t_2
else if (t <= (-7.2d-112)) then
tmp = 2.0d0 / (((tan(k) * (sin(k) * t_3)) * ((t ** 3.0d0) / l)) / l)
else if (t <= (-2d-310)) then
tmp = t_2
else if (t <= 1.05d-77) then
tmp = 2.0d0 / (((sin(k) * (k / l)) * t_4) ** 2.0d0)
else if (t <= 5.6d+102) then
tmp = 2.0d0 / (((tan(k) * t_3) * ((sin(k) * (t ** 3.0d0)) / l)) / l)
else if (t <= 2.8d+191) then
tmp = 2.0d0 / ((t_4 * ((k * sin(k)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = t / Math.cos(k);
double t_2 = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (Math.pow(k, 2.0) * t_1)));
double t_3 = Math.pow((k / t), 2.0);
double t_4 = Math.sqrt(t_1);
double tmp;
if (t <= -5.5e+102) {
tmp = t_2;
} else if (t <= -7.2e-112) {
tmp = 2.0 / (((Math.tan(k) * (Math.sin(k) * t_3)) * (Math.pow(t, 3.0) / l)) / l);
} else if (t <= -2e-310) {
tmp = t_2;
} else if (t <= 1.05e-77) {
tmp = 2.0 / Math.pow(((Math.sin(k) * (k / l)) * t_4), 2.0);
} else if (t <= 5.6e+102) {
tmp = 2.0 / (((Math.tan(k) * t_3) * ((Math.sin(k) * Math.pow(t, 3.0)) / l)) / l);
} else if (t <= 2.8e+191) {
tmp = 2.0 / Math.pow((t_4 * ((k * Math.sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = t / math.cos(k) t_2 = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * (math.pow(k, 2.0) * t_1))) t_3 = math.pow((k / t), 2.0) t_4 = math.sqrt(t_1) tmp = 0 if t <= -5.5e+102: tmp = t_2 elif t <= -7.2e-112: tmp = 2.0 / (((math.tan(k) * (math.sin(k) * t_3)) * (math.pow(t, 3.0) / l)) / l) elif t <= -2e-310: tmp = t_2 elif t <= 1.05e-77: tmp = 2.0 / math.pow(((math.sin(k) * (k / l)) * t_4), 2.0) elif t <= 5.6e+102: tmp = 2.0 / (((math.tan(k) * t_3) * ((math.sin(k) * math.pow(t, 3.0)) / l)) / l) elif t <= 2.8e+191: tmp = 2.0 / math.pow((t_4 * ((k * math.sin(k)) / l)), 2.0) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(t / cos(k)) t_2 = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64((k ^ 2.0) * t_1)))) t_3 = Float64(k / t) ^ 2.0 t_4 = sqrt(t_1) tmp = 0.0 if (t <= -5.5e+102) tmp = t_2; elseif (t <= -7.2e-112) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(sin(k) * t_3)) * Float64((t ^ 3.0) / l)) / l)); elseif (t <= -2e-310) tmp = t_2; elseif (t <= 1.05e-77) tmp = Float64(2.0 / (Float64(Float64(sin(k) * Float64(k / l)) * t_4) ^ 2.0)); elseif (t <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * t_3) * Float64(Float64(sin(k) * (t ^ 3.0)) / l)) / l)); elseif (t <= 2.8e+191) tmp = Float64(2.0 / (Float64(t_4 * Float64(Float64(k * sin(k)) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = t / cos(k); t_2 = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * ((k ^ 2.0) * t_1))); t_3 = (k / t) ^ 2.0; t_4 = sqrt(t_1); tmp = 0.0; if (t <= -5.5e+102) tmp = t_2; elseif (t <= -7.2e-112) tmp = 2.0 / (((tan(k) * (sin(k) * t_3)) * ((t ^ 3.0) / l)) / l); elseif (t <= -2e-310) tmp = t_2; elseif (t <= 1.05e-77) tmp = 2.0 / (((sin(k) * (k / l)) * t_4) ^ 2.0); elseif (t <= 5.6e+102) tmp = 2.0 / (((tan(k) * t_3) * ((sin(k) * (t ^ 3.0)) / l)) / l); elseif (t <= 2.8e+191) tmp = 2.0 / ((t_4 * ((k * sin(k)) / l)) ^ 2.0); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[t$95$1], $MachinePrecision]}, If[LessEqual[t, -5.5e+102], t$95$2, If[LessEqual[t, -7.2e-112], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2e-310], t$95$2, If[LessEqual[t, 1.05e-77], N[(2.0 / N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+102], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * t$95$3), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+191], N[(2.0 / N[Power[N[(t$95$4 * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\cos k}\\
t_2 := \frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left({k}^{2} \cdot t_1\right)\right)}\\
t_3 := {\left(\frac{k}{t}\right)}^{2}\\
t_4 := \sqrt{t_1}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-112}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(\sin k \cdot t_3\right)\right) \cdot \frac{{t}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-77}:\\
\;\;\;\;\frac{2}{{\left(\left(\sin k \cdot \frac{k}{\ell}\right) \cdot t_4\right)}^{2}}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot t_3\right) \cdot \frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+191}:\\
\;\;\;\;\frac{2}{{\left(t_4 \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -5.49999999999999981e102 or -7.2000000000000002e-112 < t < -1.999999999999994e-310Initial program 17.5%
Simplified20.1%
Taylor expanded in t around 0 73.2%
times-frac73.0%
Simplified73.0%
expm1-log1p-u56.5%
expm1-udef10.5%
div-inv10.5%
pow-flip11.8%
metadata-eval11.8%
associate-/l*11.8%
Applied egg-rr11.8%
expm1-def57.0%
expm1-log1p73.6%
associate-*l*74.8%
associate-/r/75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in k around 0 65.2%
if -5.49999999999999981e102 < t < -7.2000000000000002e-112Initial program 66.1%
Simplified71.9%
associate-*l*71.9%
+-rgt-identity71.9%
*-commutative71.9%
associate-*r*71.9%
*-commutative71.9%
*-commutative71.9%
associate-/r*77.2%
associate-*r/85.7%
Applied egg-rr85.7%
if -1.999999999999994e-310 < t < 1.05000000000000008e-77Initial program 26.0%
Simplified28.5%
associate-*l*26.0%
+-rgt-identity26.0%
*-commutative26.0%
associate-*r*26.0%
*-commutative26.0%
add-sqr-sqrt26.1%
pow226.1%
Applied egg-rr49.3%
Taylor expanded in k around inf 76.7%
associate-/l*76.6%
associate-/r/76.8%
Simplified76.8%
if 1.05000000000000008e-77 < t < 5.60000000000000037e102Initial program 68.4%
Simplified71.1%
*-commutative71.1%
associate-*l/71.1%
associate-/r*76.7%
associate-*r/82.9%
+-rgt-identity82.9%
Applied egg-rr82.9%
if 5.60000000000000037e102 < t < 2.7999999999999999e191Initial program 15.0%
Simplified30.5%
associate-*l*30.5%
+-rgt-identity30.5%
*-commutative30.5%
associate-*r*30.5%
*-commutative30.5%
add-sqr-sqrt29.2%
pow229.2%
Applied egg-rr51.2%
Taylor expanded in k around inf 70.8%
if 2.7999999999999999e191 < t Initial program 8.1%
Simplified40.7%
associate-*l*40.7%
+-rgt-identity40.7%
*-commutative40.7%
associate-*r*40.7%
*-commutative40.7%
add-sqr-sqrt10.8%
pow210.8%
Applied egg-rr19.1%
Taylor expanded in k around 0 71.5%
Final simplification74.8%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1
(/
(/ 2.0 (/ (* (tan k) (/ (* (sin k) (pow t 3.0)) l)) l))
(* k (/ (/ k t) t))))
(t_2 (/ 2.0 (pow (* (* (sin k) (/ k l)) (sqrt (/ t (cos k)))) 2.0))))
(if (<= t -5.6e+102)
(/ 2.0 (* (pow k 2.0) (* (pow l -2.0) (* t (pow k 2.0)))))
(if (<= t -7.2e-112)
t_1
(if (<= t -2e-310)
(/ 2.0 (* (pow k 2.0) (* t (/ (pow k 2.0) (pow l 2.0)))))
(if (<= t 3.5e-76)
t_2
(if (<= t 2.6e+102)
t_1
(if (<= t 1.02e+197)
t_2
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = (2.0 / ((tan(k) * ((sin(k) * pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double t_2 = 2.0 / pow(((sin(k) * (k / l)) * sqrt((t / cos(k)))), 2.0);
double tmp;
if (t <= -5.6e+102) {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (t * pow(k, 2.0))));
} else if (t <= -7.2e-112) {
tmp = t_1;
} else if (t <= -2e-310) {
tmp = 2.0 / (pow(k, 2.0) * (t * (pow(k, 2.0) / pow(l, 2.0))));
} else if (t <= 3.5e-76) {
tmp = t_2;
} else if (t <= 2.6e+102) {
tmp = t_1;
} else if (t <= 1.02e+197) {
tmp = t_2;
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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 / ((tan(k) * ((sin(k) * (t ** 3.0d0)) / l)) / l)) / (k * ((k / t) / t))
t_2 = 2.0d0 / (((sin(k) * (k / l)) * sqrt((t / cos(k)))) ** 2.0d0)
if (t <= (-5.6d+102)) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * (t * (k ** 2.0d0))))
else if (t <= (-7.2d-112)) then
tmp = t_1
else if (t <= (-2d-310)) then
tmp = 2.0d0 / ((k ** 2.0d0) * (t * ((k ** 2.0d0) / (l ** 2.0d0))))
else if (t <= 3.5d-76) then
tmp = t_2
else if (t <= 2.6d+102) then
tmp = t_1
else if (t <= 1.02d+197) then
tmp = t_2
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = (2.0 / ((Math.tan(k) * ((Math.sin(k) * Math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double t_2 = 2.0 / Math.pow(((Math.sin(k) * (k / l)) * Math.sqrt((t / Math.cos(k)))), 2.0);
double tmp;
if (t <= -5.6e+102) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (t * Math.pow(k, 2.0))));
} else if (t <= -7.2e-112) {
tmp = t_1;
} else if (t <= -2e-310) {
tmp = 2.0 / (Math.pow(k, 2.0) * (t * (Math.pow(k, 2.0) / Math.pow(l, 2.0))));
} else if (t <= 3.5e-76) {
tmp = t_2;
} else if (t <= 2.6e+102) {
tmp = t_1;
} else if (t <= 1.02e+197) {
tmp = t_2;
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = (2.0 / ((math.tan(k) * ((math.sin(k) * math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t)) t_2 = 2.0 / math.pow(((math.sin(k) * (k / l)) * math.sqrt((t / math.cos(k)))), 2.0) tmp = 0 if t <= -5.6e+102: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * (t * math.pow(k, 2.0)))) elif t <= -7.2e-112: tmp = t_1 elif t <= -2e-310: tmp = 2.0 / (math.pow(k, 2.0) * (t * (math.pow(k, 2.0) / math.pow(l, 2.0)))) elif t <= 3.5e-76: tmp = t_2 elif t <= 2.6e+102: tmp = t_1 elif t <= 1.02e+197: tmp = t_2 else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(sin(k) * (t ^ 3.0)) / l)) / l)) / Float64(k * Float64(Float64(k / t) / t))) t_2 = Float64(2.0 / (Float64(Float64(sin(k) * Float64(k / l)) * sqrt(Float64(t / cos(k)))) ^ 2.0)) tmp = 0.0 if (t <= -5.6e+102) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64(t * (k ^ 2.0))))); elseif (t <= -7.2e-112) tmp = t_1; elseif (t <= -2e-310) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t * Float64((k ^ 2.0) / (l ^ 2.0))))); elseif (t <= 3.5e-76) tmp = t_2; elseif (t <= 2.6e+102) tmp = t_1; elseif (t <= 1.02e+197) tmp = t_2; else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = (2.0 / ((tan(k) * ((sin(k) * (t ^ 3.0)) / l)) / l)) / (k * ((k / t) / t)); t_2 = 2.0 / (((sin(k) * (k / l)) * sqrt((t / cos(k)))) ^ 2.0); tmp = 0.0; if (t <= -5.6e+102) tmp = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * (t * (k ^ 2.0)))); elseif (t <= -7.2e-112) tmp = t_1; elseif (t <= -2e-310) tmp = 2.0 / ((k ^ 2.0) * (t * ((k ^ 2.0) / (l ^ 2.0)))); elseif (t <= 3.5e-76) tmp = t_2; elseif (t <= 2.6e+102) tmp = t_1; elseif (t <= 1.02e+197) tmp = t_2; else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(k / t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 / N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+102], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e-112], t$95$1, If[LessEqual[t, -2e-310], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-76], t$95$2, If[LessEqual[t, 2.6e+102], t$95$1, If[LessEqual[t, 1.02e+197], t$95$2, N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\frac{2}{\frac{\tan k \cdot \frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}}{k \cdot \frac{\frac{k}{t}}{t}}\\
t_2 := \frac{2}{{\left(\left(\sin k \cdot \frac{k}{\ell}\right) \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot \frac{{k}^{2}}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+197}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -5.60000000000000037e102Initial program 8.3%
Simplified14.1%
Taylor expanded in t around 0 72.9%
times-frac77.6%
Simplified77.6%
expm1-log1p-u52.4%
expm1-udef5.7%
div-inv5.7%
pow-flip8.5%
metadata-eval8.5%
associate-/l*8.5%
Applied egg-rr8.5%
expm1-def53.5%
expm1-log1p78.7%
associate-*l*76.3%
associate-/r/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in k around 0 75.2%
if -5.60000000000000037e102 < t < -7.2000000000000002e-112 or 3.49999999999999997e-76 < t < 2.60000000000000006e102Initial program 67.0%
associate-/r*66.9%
associate-*l/66.9%
associate--l+67.0%
Simplified67.0%
unpow270.6%
clear-num70.6%
un-div-inv70.6%
Applied egg-rr67.0%
associate-+r-67.0%
add-exp-log66.5%
log1p-udef66.5%
expm1-udef71.1%
expm1-log1p-u71.6%
associate-/r/71.6%
Applied egg-rr71.6%
associate-*l/71.7%
*-commutative71.7%
associate-*l/71.6%
associate-/r*79.2%
associate-*r/81.0%
Applied egg-rr81.0%
if -7.2000000000000002e-112 < t < -1.999999999999994e-310Initial program 25.0%
Simplified25.0%
Taylor expanded in t around 0 73.5%
times-frac69.3%
Simplified69.3%
expm1-log1p-u59.9%
expm1-udef14.5%
div-inv14.5%
pow-flip14.5%
metadata-eval14.5%
associate-/l*14.5%
Applied egg-rr14.5%
expm1-def59.9%
expm1-log1p69.3%
associate-*l*73.5%
associate-/r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in k around 0 49.7%
associate-/l*53.8%
associate-/r/53.9%
Simplified53.9%
if -1.999999999999994e-310 < t < 3.49999999999999997e-76 or 2.60000000000000006e102 < t < 1.02000000000000008e197Initial program 22.9%
Simplified29.1%
associate-*l*27.3%
+-rgt-identity27.3%
*-commutative27.3%
associate-*r*27.3%
*-commutative27.3%
add-sqr-sqrt27.0%
pow227.0%
Applied egg-rr49.8%
Taylor expanded in k around inf 75.0%
associate-/l*74.8%
associate-/r/75.0%
Simplified75.0%
if 1.02000000000000008e197 < t Initial program 8.1%
Simplified40.7%
associate-*l*40.7%
+-rgt-identity40.7%
*-commutative40.7%
associate-*r*40.7%
*-commutative40.7%
add-sqr-sqrt10.8%
pow210.8%
Applied egg-rr19.1%
Taylor expanded in k around 0 71.5%
Final simplification73.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (sqrt (/ t (cos k))))
(t_2
(/
(/ 2.0 (/ (* (tan k) (/ (* (sin k) (pow t 3.0)) l)) l))
(* k (/ (/ k t) t)))))
(if (<= t -5.6e+102)
(/ 2.0 (* (pow k 2.0) (* (pow l -2.0) (* t (pow k 2.0)))))
(if (<= t -7.2e-112)
t_2
(if (<= t -2e-309)
(/ 2.0 (* (pow k 2.0) (* t (/ (pow k 2.0) (pow l 2.0)))))
(if (<= t 3e-71)
(/ 2.0 (pow (* (* (sin k) (/ k l)) t_1) 2.0))
(if (<= t 2.6e+102)
t_2
(if (<= t 4e+194)
(/ 2.0 (pow (* t_1 (/ (* k (sin k)) l)) 2.0))
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = sqrt((t / cos(k)));
double t_2 = (2.0 / ((tan(k) * ((sin(k) * pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double tmp;
if (t <= -5.6e+102) {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (t * pow(k, 2.0))));
} else if (t <= -7.2e-112) {
tmp = t_2;
} else if (t <= -2e-309) {
tmp = 2.0 / (pow(k, 2.0) * (t * (pow(k, 2.0) / pow(l, 2.0))));
} else if (t <= 3e-71) {
tmp = 2.0 / pow(((sin(k) * (k / l)) * t_1), 2.0);
} else if (t <= 2.6e+102) {
tmp = t_2;
} else if (t <= 4e+194) {
tmp = 2.0 / pow((t_1 * ((k * sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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 = sqrt((t / cos(k)))
t_2 = (2.0d0 / ((tan(k) * ((sin(k) * (t ** 3.0d0)) / l)) / l)) / (k * ((k / t) / t))
if (t <= (-5.6d+102)) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * (t * (k ** 2.0d0))))
else if (t <= (-7.2d-112)) then
tmp = t_2
else if (t <= (-2d-309)) then
tmp = 2.0d0 / ((k ** 2.0d0) * (t * ((k ** 2.0d0) / (l ** 2.0d0))))
else if (t <= 3d-71) then
tmp = 2.0d0 / (((sin(k) * (k / l)) * t_1) ** 2.0d0)
else if (t <= 2.6d+102) then
tmp = t_2
else if (t <= 4d+194) then
tmp = 2.0d0 / ((t_1 * ((k * sin(k)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = Math.sqrt((t / Math.cos(k)));
double t_2 = (2.0 / ((Math.tan(k) * ((Math.sin(k) * Math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double tmp;
if (t <= -5.6e+102) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (t * Math.pow(k, 2.0))));
} else if (t <= -7.2e-112) {
tmp = t_2;
} else if (t <= -2e-309) {
tmp = 2.0 / (Math.pow(k, 2.0) * (t * (Math.pow(k, 2.0) / Math.pow(l, 2.0))));
} else if (t <= 3e-71) {
tmp = 2.0 / Math.pow(((Math.sin(k) * (k / l)) * t_1), 2.0);
} else if (t <= 2.6e+102) {
tmp = t_2;
} else if (t <= 4e+194) {
tmp = 2.0 / Math.pow((t_1 * ((k * Math.sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = math.sqrt((t / math.cos(k))) t_2 = (2.0 / ((math.tan(k) * ((math.sin(k) * math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t)) tmp = 0 if t <= -5.6e+102: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * (t * math.pow(k, 2.0)))) elif t <= -7.2e-112: tmp = t_2 elif t <= -2e-309: tmp = 2.0 / (math.pow(k, 2.0) * (t * (math.pow(k, 2.0) / math.pow(l, 2.0)))) elif t <= 3e-71: tmp = 2.0 / math.pow(((math.sin(k) * (k / l)) * t_1), 2.0) elif t <= 2.6e+102: tmp = t_2 elif t <= 4e+194: tmp = 2.0 / math.pow((t_1 * ((k * math.sin(k)) / l)), 2.0) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) t_1 = sqrt(Float64(t / cos(k))) t_2 = Float64(Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(sin(k) * (t ^ 3.0)) / l)) / l)) / Float64(k * Float64(Float64(k / t) / t))) tmp = 0.0 if (t <= -5.6e+102) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64(t * (k ^ 2.0))))); elseif (t <= -7.2e-112) tmp = t_2; elseif (t <= -2e-309) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t * Float64((k ^ 2.0) / (l ^ 2.0))))); elseif (t <= 3e-71) tmp = Float64(2.0 / (Float64(Float64(sin(k) * Float64(k / l)) * t_1) ^ 2.0)); elseif (t <= 2.6e+102) tmp = t_2; elseif (t <= 4e+194) tmp = Float64(2.0 / (Float64(t_1 * Float64(Float64(k * sin(k)) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = sqrt((t / cos(k))); t_2 = (2.0 / ((tan(k) * ((sin(k) * (t ^ 3.0)) / l)) / l)) / (k * ((k / t) / t)); tmp = 0.0; if (t <= -5.6e+102) tmp = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * (t * (k ^ 2.0)))); elseif (t <= -7.2e-112) tmp = t_2; elseif (t <= -2e-309) tmp = 2.0 / ((k ^ 2.0) * (t * ((k ^ 2.0) / (l ^ 2.0)))); elseif (t <= 3e-71) tmp = 2.0 / (((sin(k) * (k / l)) * t_1) ^ 2.0); elseif (t <= 2.6e+102) tmp = t_2; elseif (t <= 4e+194) tmp = 2.0 / ((t_1 * ((k * sin(k)) / l)) ^ 2.0); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(k / t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+102], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e-112], t$95$2, If[LessEqual[t, -2e-309], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-71], N[(2.0 / N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+102], t$95$2, If[LessEqual[t, 4e+194], N[(2.0 / N[Power[N[(t$95$1 * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{t}{\cos k}}\\
t_2 := \frac{\frac{2}{\frac{\tan k \cdot \frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}}{k \cdot \frac{\frac{k}{t}}{t}}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-309}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot \frac{{k}^{2}}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-71}:\\
\;\;\;\;\frac{2}{{\left(\left(\sin k \cdot \frac{k}{\ell}\right) \cdot t_1\right)}^{2}}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+194}:\\
\;\;\;\;\frac{2}{{\left(t_1 \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -5.60000000000000037e102Initial program 8.3%
Simplified14.1%
Taylor expanded in t around 0 72.9%
times-frac77.6%
Simplified77.6%
expm1-log1p-u52.4%
expm1-udef5.7%
div-inv5.7%
pow-flip8.5%
metadata-eval8.5%
associate-/l*8.5%
Applied egg-rr8.5%
expm1-def53.5%
expm1-log1p78.7%
associate-*l*76.3%
associate-/r/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in k around 0 75.2%
if -5.60000000000000037e102 < t < -7.2000000000000002e-112 or 3.0000000000000001e-71 < t < 2.60000000000000006e102Initial program 67.0%
associate-/r*66.9%
associate-*l/66.9%
associate--l+67.0%
Simplified67.0%
unpow270.6%
clear-num70.6%
un-div-inv70.6%
Applied egg-rr67.0%
associate-+r-67.0%
add-exp-log66.5%
log1p-udef66.5%
expm1-udef71.1%
expm1-log1p-u71.6%
associate-/r/71.6%
Applied egg-rr71.6%
associate-*l/71.7%
*-commutative71.7%
associate-*l/71.6%
associate-/r*79.2%
associate-*r/81.0%
Applied egg-rr81.0%
if -7.2000000000000002e-112 < t < -1.9999999999999988e-309Initial program 25.0%
Simplified25.0%
Taylor expanded in t around 0 73.5%
times-frac69.3%
Simplified69.3%
expm1-log1p-u59.9%
expm1-udef14.5%
div-inv14.5%
pow-flip14.5%
metadata-eval14.5%
associate-/l*14.5%
Applied egg-rr14.5%
expm1-def59.9%
expm1-log1p69.3%
associate-*l*73.5%
associate-/r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in k around 0 49.7%
associate-/l*53.8%
associate-/r/53.9%
Simplified53.9%
if -1.9999999999999988e-309 < t < 3.0000000000000001e-71Initial program 26.0%
Simplified28.5%
associate-*l*26.0%
+-rgt-identity26.0%
*-commutative26.0%
associate-*r*26.0%
*-commutative26.0%
add-sqr-sqrt26.1%
pow226.1%
Applied egg-rr49.3%
Taylor expanded in k around inf 76.7%
associate-/l*76.6%
associate-/r/76.8%
Simplified76.8%
if 2.60000000000000006e102 < t < 3.99999999999999978e194Initial program 15.0%
Simplified30.5%
associate-*l*30.5%
+-rgt-identity30.5%
*-commutative30.5%
associate-*r*30.5%
*-commutative30.5%
add-sqr-sqrt29.2%
pow229.2%
Applied egg-rr51.2%
Taylor expanded in k around inf 70.8%
if 3.99999999999999978e194 < t Initial program 8.1%
Simplified40.7%
associate-*l*40.7%
+-rgt-identity40.7%
*-commutative40.7%
associate-*r*40.7%
*-commutative40.7%
add-sqr-sqrt10.8%
pow210.8%
Applied egg-rr19.1%
Taylor expanded in k around 0 71.5%
Final simplification73.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* t (pow k 2.0)))
(t_2 (sqrt (/ t (cos k))))
(t_3
(/
(/ 2.0 (/ (* (tan k) (/ (* (sin k) (pow t 3.0)) l)) l))
(* k (/ (/ k t) t)))))
(if (<= t -5.6e+102)
(/ 2.0 (* (pow k 2.0) (* (pow l -2.0) t_1)))
(if (<= t -7.2e-112)
t_3
(if (<= t -2e-310)
(/ 2.0 (* (/ (pow k 2.0) (pow l 2.0)) (/ t_1 (cos k))))
(if (<= t 1.1e-76)
(/ 2.0 (pow (* (* (sin k) (/ k l)) t_2) 2.0))
(if (<= t 5.6e+102)
t_3
(if (<= t 3.1e+190)
(/ 2.0 (pow (* t_2 (/ (* k (sin k)) l)) 2.0))
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = t * pow(k, 2.0);
double t_2 = sqrt((t / cos(k)));
double t_3 = (2.0 / ((tan(k) * ((sin(k) * pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double tmp;
if (t <= -5.6e+102) {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * t_1));
} else if (t <= -7.2e-112) {
tmp = t_3;
} else if (t <= -2e-310) {
tmp = 2.0 / ((pow(k, 2.0) / pow(l, 2.0)) * (t_1 / cos(k)));
} else if (t <= 1.1e-76) {
tmp = 2.0 / pow(((sin(k) * (k / l)) * t_2), 2.0);
} else if (t <= 5.6e+102) {
tmp = t_3;
} else if (t <= 3.1e+190) {
tmp = 2.0 / pow((t_2 * ((k * sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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) :: t_3
real(8) :: tmp
t_1 = t * (k ** 2.0d0)
t_2 = sqrt((t / cos(k)))
t_3 = (2.0d0 / ((tan(k) * ((sin(k) * (t ** 3.0d0)) / l)) / l)) / (k * ((k / t) / t))
if (t <= (-5.6d+102)) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * t_1))
else if (t <= (-7.2d-112)) then
tmp = t_3
else if (t <= (-2d-310)) then
tmp = 2.0d0 / (((k ** 2.0d0) / (l ** 2.0d0)) * (t_1 / cos(k)))
else if (t <= 1.1d-76) then
tmp = 2.0d0 / (((sin(k) * (k / l)) * t_2) ** 2.0d0)
else if (t <= 5.6d+102) then
tmp = t_3
else if (t <= 3.1d+190) then
tmp = 2.0d0 / ((t_2 * ((k * sin(k)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = t * Math.pow(k, 2.0);
double t_2 = Math.sqrt((t / Math.cos(k)));
double t_3 = (2.0 / ((Math.tan(k) * ((Math.sin(k) * Math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double tmp;
if (t <= -5.6e+102) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * t_1));
} else if (t <= -7.2e-112) {
tmp = t_3;
} else if (t <= -2e-310) {
tmp = 2.0 / ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * (t_1 / Math.cos(k)));
} else if (t <= 1.1e-76) {
tmp = 2.0 / Math.pow(((Math.sin(k) * (k / l)) * t_2), 2.0);
} else if (t <= 5.6e+102) {
tmp = t_3;
} else if (t <= 3.1e+190) {
tmp = 2.0 / Math.pow((t_2 * ((k * Math.sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = t * math.pow(k, 2.0) t_2 = math.sqrt((t / math.cos(k))) t_3 = (2.0 / ((math.tan(k) * ((math.sin(k) * math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t)) tmp = 0 if t <= -5.6e+102: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * t_1)) elif t <= -7.2e-112: tmp = t_3 elif t <= -2e-310: tmp = 2.0 / ((math.pow(k, 2.0) / math.pow(l, 2.0)) * (t_1 / math.cos(k))) elif t <= 1.1e-76: tmp = 2.0 / math.pow(((math.sin(k) * (k / l)) * t_2), 2.0) elif t <= 5.6e+102: tmp = t_3 elif t <= 3.1e+190: tmp = 2.0 / math.pow((t_2 * ((k * math.sin(k)) / l)), 2.0) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(t * (k ^ 2.0)) t_2 = sqrt(Float64(t / cos(k))) t_3 = Float64(Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(sin(k) * (t ^ 3.0)) / l)) / l)) / Float64(k * Float64(Float64(k / t) / t))) tmp = 0.0 if (t <= -5.6e+102) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * t_1))); elseif (t <= -7.2e-112) tmp = t_3; elseif (t <= -2e-310) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(t_1 / cos(k)))); elseif (t <= 1.1e-76) tmp = Float64(2.0 / (Float64(Float64(sin(k) * Float64(k / l)) * t_2) ^ 2.0)); elseif (t <= 5.6e+102) tmp = t_3; elseif (t <= 3.1e+190) tmp = Float64(2.0 / (Float64(t_2 * Float64(Float64(k * sin(k)) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = t * (k ^ 2.0); t_2 = sqrt((t / cos(k))); t_3 = (2.0 / ((tan(k) * ((sin(k) * (t ^ 3.0)) / l)) / l)) / (k * ((k / t) / t)); tmp = 0.0; if (t <= -5.6e+102) tmp = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * t_1)); elseif (t <= -7.2e-112) tmp = t_3; elseif (t <= -2e-310) tmp = 2.0 / (((k ^ 2.0) / (l ^ 2.0)) * (t_1 / cos(k))); elseif (t <= 1.1e-76) tmp = 2.0 / (((sin(k) * (k / l)) * t_2) ^ 2.0); elseif (t <= 5.6e+102) tmp = t_3; elseif (t <= 3.1e+190) tmp = 2.0 / ((t_2 * ((k * sin(k)) / l)) ^ 2.0); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(k / t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+102], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e-112], t$95$3, If[LessEqual[t, -2e-310], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-76], N[(2.0 / N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+102], t$95$3, If[LessEqual[t, 3.1e+190], N[(2.0 / N[Power[N[(t$95$2 * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot {k}^{2}\\
t_2 := \sqrt{\frac{t}{\cos k}}\\
t_3 := \frac{\frac{2}{\frac{\tan k \cdot \frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}}{k \cdot \frac{\frac{k}{t}}{t}}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot t_1\right)}\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-112}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t_1}{\cos k}}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-76}:\\
\;\;\;\;\frac{2}{{\left(\left(\sin k \cdot \frac{k}{\ell}\right) \cdot t_2\right)}^{2}}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+190}:\\
\;\;\;\;\frac{2}{{\left(t_2 \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -5.60000000000000037e102Initial program 8.3%
Simplified14.1%
Taylor expanded in t around 0 72.9%
times-frac77.6%
Simplified77.6%
expm1-log1p-u52.4%
expm1-udef5.7%
div-inv5.7%
pow-flip8.5%
metadata-eval8.5%
associate-/l*8.5%
Applied egg-rr8.5%
expm1-def53.5%
expm1-log1p78.7%
associate-*l*76.3%
associate-/r/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in k around 0 75.2%
if -5.60000000000000037e102 < t < -7.2000000000000002e-112 or 1.1e-76 < t < 5.60000000000000037e102Initial program 67.0%
associate-/r*66.9%
associate-*l/66.9%
associate--l+67.0%
Simplified67.0%
unpow270.6%
clear-num70.6%
un-div-inv70.6%
Applied egg-rr67.0%
associate-+r-67.0%
add-exp-log66.5%
log1p-udef66.5%
expm1-udef71.1%
expm1-log1p-u71.6%
associate-/r/71.6%
Applied egg-rr71.6%
associate-*l/71.7%
*-commutative71.7%
associate-*l/71.6%
associate-/r*79.2%
associate-*r/81.0%
Applied egg-rr81.0%
if -7.2000000000000002e-112 < t < -1.999999999999994e-310Initial program 25.0%
Simplified25.0%
Taylor expanded in t around 0 73.5%
times-frac69.3%
Simplified69.3%
Taylor expanded in k around 0 56.8%
if -1.999999999999994e-310 < t < 1.1e-76Initial program 26.0%
Simplified28.5%
associate-*l*26.0%
+-rgt-identity26.0%
*-commutative26.0%
associate-*r*26.0%
*-commutative26.0%
add-sqr-sqrt26.1%
pow226.1%
Applied egg-rr49.3%
Taylor expanded in k around inf 76.7%
associate-/l*76.6%
associate-/r/76.8%
Simplified76.8%
if 5.60000000000000037e102 < t < 3.1000000000000001e190Initial program 15.0%
Simplified30.5%
associate-*l*30.5%
+-rgt-identity30.5%
*-commutative30.5%
associate-*r*30.5%
*-commutative30.5%
add-sqr-sqrt29.2%
pow229.2%
Applied egg-rr51.2%
Taylor expanded in k around inf 70.8%
if 3.1000000000000001e190 < t Initial program 8.1%
Simplified40.7%
associate-*l*40.7%
+-rgt-identity40.7%
*-commutative40.7%
associate-*r*40.7%
*-commutative40.7%
add-sqr-sqrt10.8%
pow210.8%
Applied egg-rr19.1%
Taylor expanded in k around 0 71.5%
Final simplification73.5%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ t (cos k)))
(t_2
(/
(/ 2.0 (/ (* (tan k) (/ (* (sin k) (pow t 3.0)) l)) l))
(* k (/ (/ k t) t))))
(t_3 (/ 2.0 (* (pow k 2.0) (* (pow l -2.0) (* (pow k 2.0) t_1)))))
(t_4 (sqrt t_1)))
(if (<= t -1.05e+101)
t_3
(if (<= t -7.2e-112)
t_2
(if (<= t -2e-310)
t_3
(if (<= t 1.35e-67)
(/ 2.0 (pow (* (* (sin k) (/ k l)) t_4) 2.0))
(if (<= t 5.6e+102)
t_2
(if (<= t 4.8e+191)
(/ 2.0 (pow (* t_4 (/ (* k (sin k)) l)) 2.0))
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = t / cos(k);
double t_2 = (2.0 / ((tan(k) * ((sin(k) * pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double t_3 = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (pow(k, 2.0) * t_1)));
double t_4 = sqrt(t_1);
double tmp;
if (t <= -1.05e+101) {
tmp = t_3;
} else if (t <= -7.2e-112) {
tmp = t_2;
} else if (t <= -2e-310) {
tmp = t_3;
} else if (t <= 1.35e-67) {
tmp = 2.0 / pow(((sin(k) * (k / l)) * t_4), 2.0);
} else if (t <= 5.6e+102) {
tmp = t_2;
} else if (t <= 4.8e+191) {
tmp = 2.0 / pow((t_4 * ((k * sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = t / cos(k)
t_2 = (2.0d0 / ((tan(k) * ((sin(k) * (t ** 3.0d0)) / l)) / l)) / (k * ((k / t) / t))
t_3 = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * ((k ** 2.0d0) * t_1)))
t_4 = sqrt(t_1)
if (t <= (-1.05d+101)) then
tmp = t_3
else if (t <= (-7.2d-112)) then
tmp = t_2
else if (t <= (-2d-310)) then
tmp = t_3
else if (t <= 1.35d-67) then
tmp = 2.0d0 / (((sin(k) * (k / l)) * t_4) ** 2.0d0)
else if (t <= 5.6d+102) then
tmp = t_2
else if (t <= 4.8d+191) then
tmp = 2.0d0 / ((t_4 * ((k * sin(k)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = t / Math.cos(k);
double t_2 = (2.0 / ((Math.tan(k) * ((Math.sin(k) * Math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
double t_3 = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (Math.pow(k, 2.0) * t_1)));
double t_4 = Math.sqrt(t_1);
double tmp;
if (t <= -1.05e+101) {
tmp = t_3;
} else if (t <= -7.2e-112) {
tmp = t_2;
} else if (t <= -2e-310) {
tmp = t_3;
} else if (t <= 1.35e-67) {
tmp = 2.0 / Math.pow(((Math.sin(k) * (k / l)) * t_4), 2.0);
} else if (t <= 5.6e+102) {
tmp = t_2;
} else if (t <= 4.8e+191) {
tmp = 2.0 / Math.pow((t_4 * ((k * Math.sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = t / math.cos(k) t_2 = (2.0 / ((math.tan(k) * ((math.sin(k) * math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t)) t_3 = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * (math.pow(k, 2.0) * t_1))) t_4 = math.sqrt(t_1) tmp = 0 if t <= -1.05e+101: tmp = t_3 elif t <= -7.2e-112: tmp = t_2 elif t <= -2e-310: tmp = t_3 elif t <= 1.35e-67: tmp = 2.0 / math.pow(((math.sin(k) * (k / l)) * t_4), 2.0) elif t <= 5.6e+102: tmp = t_2 elif t <= 4.8e+191: tmp = 2.0 / math.pow((t_4 * ((k * math.sin(k)) / l)), 2.0) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(t / cos(k)) t_2 = Float64(Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(sin(k) * (t ^ 3.0)) / l)) / l)) / Float64(k * Float64(Float64(k / t) / t))) t_3 = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64((k ^ 2.0) * t_1)))) t_4 = sqrt(t_1) tmp = 0.0 if (t <= -1.05e+101) tmp = t_3; elseif (t <= -7.2e-112) tmp = t_2; elseif (t <= -2e-310) tmp = t_3; elseif (t <= 1.35e-67) tmp = Float64(2.0 / (Float64(Float64(sin(k) * Float64(k / l)) * t_4) ^ 2.0)); elseif (t <= 5.6e+102) tmp = t_2; elseif (t <= 4.8e+191) tmp = Float64(2.0 / (Float64(t_4 * Float64(Float64(k * sin(k)) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = t / cos(k); t_2 = (2.0 / ((tan(k) * ((sin(k) * (t ^ 3.0)) / l)) / l)) / (k * ((k / t) / t)); t_3 = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * ((k ^ 2.0) * t_1))); t_4 = sqrt(t_1); tmp = 0.0; if (t <= -1.05e+101) tmp = t_3; elseif (t <= -7.2e-112) tmp = t_2; elseif (t <= -2e-310) tmp = t_3; elseif (t <= 1.35e-67) tmp = 2.0 / (((sin(k) * (k / l)) * t_4) ^ 2.0); elseif (t <= 5.6e+102) tmp = t_2; elseif (t <= 4.8e+191) tmp = 2.0 / ((t_4 * ((k * sin(k)) / l)) ^ 2.0); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(k / t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[t$95$1], $MachinePrecision]}, If[LessEqual[t, -1.05e+101], t$95$3, If[LessEqual[t, -7.2e-112], t$95$2, If[LessEqual[t, -2e-310], t$95$3, If[LessEqual[t, 1.35e-67], N[(2.0 / N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+102], t$95$2, If[LessEqual[t, 4.8e+191], N[(2.0 / N[Power[N[(t$95$4 * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\cos k}\\
t_2 := \frac{\frac{2}{\frac{\tan k \cdot \frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}}{k \cdot \frac{\frac{k}{t}}{t}}\\
t_3 := \frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left({k}^{2} \cdot t_1\right)\right)}\\
t_4 := \sqrt{t_1}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+101}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-67}:\\
\;\;\;\;\frac{2}{{\left(\left(\sin k \cdot \frac{k}{\ell}\right) \cdot t_4\right)}^{2}}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+191}:\\
\;\;\;\;\frac{2}{{\left(t_4 \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -1.05e101 or -7.2000000000000002e-112 < t < -1.999999999999994e-310Initial program 17.5%
Simplified20.1%
Taylor expanded in t around 0 73.2%
times-frac73.0%
Simplified73.0%
expm1-log1p-u56.5%
expm1-udef10.5%
div-inv10.5%
pow-flip11.8%
metadata-eval11.8%
associate-/l*11.8%
Applied egg-rr11.8%
expm1-def57.0%
expm1-log1p73.6%
associate-*l*74.8%
associate-/r/75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in k around 0 65.2%
if -1.05e101 < t < -7.2000000000000002e-112 or 1.35000000000000008e-67 < t < 5.60000000000000037e102Initial program 67.0%
associate-/r*66.9%
associate-*l/66.9%
associate--l+67.0%
Simplified67.0%
unpow270.6%
clear-num70.6%
un-div-inv70.6%
Applied egg-rr67.0%
associate-+r-67.0%
add-exp-log66.5%
log1p-udef66.5%
expm1-udef71.1%
expm1-log1p-u71.6%
associate-/r/71.6%
Applied egg-rr71.6%
associate-*l/71.7%
*-commutative71.7%
associate-*l/71.6%
associate-/r*79.2%
associate-*r/81.0%
Applied egg-rr81.0%
if -1.999999999999994e-310 < t < 1.35000000000000008e-67Initial program 26.0%
Simplified28.5%
associate-*l*26.0%
+-rgt-identity26.0%
*-commutative26.0%
associate-*r*26.0%
*-commutative26.0%
add-sqr-sqrt26.1%
pow226.1%
Applied egg-rr49.3%
Taylor expanded in k around inf 76.7%
associate-/l*76.6%
associate-/r/76.8%
Simplified76.8%
if 5.60000000000000037e102 < t < 4.79999999999999972e191Initial program 15.0%
Simplified30.5%
associate-*l*30.5%
+-rgt-identity30.5%
*-commutative30.5%
associate-*r*30.5%
*-commutative30.5%
add-sqr-sqrt29.2%
pow229.2%
Applied egg-rr51.2%
Taylor expanded in k around inf 70.8%
if 4.79999999999999972e191 < t Initial program 8.1%
Simplified40.7%
associate-*l*40.7%
+-rgt-identity40.7%
*-commutative40.7%
associate-*r*40.7%
*-commutative40.7%
add-sqr-sqrt10.8%
pow210.8%
Applied egg-rr19.1%
Taylor expanded in k around 0 71.5%
Final simplification73.5%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ t (cos k)))
(t_2 (/ 2.0 (* (pow k 2.0) (* (pow l -2.0) (* (pow k 2.0) t_1)))))
(t_3 (sqrt t_1)))
(if (<= t -5.2e+102)
t_2
(if (<= t -7.2e-112)
(/
2.0
(/ (* (* (tan k) (* (sin k) (pow (/ k t) 2.0))) (/ (pow t 3.0) l)) l))
(if (<= t 9.8e-307)
t_2
(if (<= t 2.75e-73)
(/ 2.0 (pow (* (* (sin k) (/ k l)) t_3) 2.0))
(if (<= t 9.5e+99)
(/
(/ 2.0 (/ (* (tan k) (/ (* (sin k) (pow t 3.0)) l)) l))
(* k (/ (/ k t) t)))
(if (<= t 3e+193)
(/ 2.0 (pow (* t_3 (/ (* k (sin k)) l)) 2.0))
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = t / cos(k);
double t_2 = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (pow(k, 2.0) * t_1)));
double t_3 = sqrt(t_1);
double tmp;
if (t <= -5.2e+102) {
tmp = t_2;
} else if (t <= -7.2e-112) {
tmp = 2.0 / (((tan(k) * (sin(k) * pow((k / t), 2.0))) * (pow(t, 3.0) / l)) / l);
} else if (t <= 9.8e-307) {
tmp = t_2;
} else if (t <= 2.75e-73) {
tmp = 2.0 / pow(((sin(k) * (k / l)) * t_3), 2.0);
} else if (t <= 9.5e+99) {
tmp = (2.0 / ((tan(k) * ((sin(k) * pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
} else if (t <= 3e+193) {
tmp = 2.0 / pow((t_3 * ((k * sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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) :: t_3
real(8) :: tmp
t_1 = t / cos(k)
t_2 = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * ((k ** 2.0d0) * t_1)))
t_3 = sqrt(t_1)
if (t <= (-5.2d+102)) then
tmp = t_2
else if (t <= (-7.2d-112)) then
tmp = 2.0d0 / (((tan(k) * (sin(k) * ((k / t) ** 2.0d0))) * ((t ** 3.0d0) / l)) / l)
else if (t <= 9.8d-307) then
tmp = t_2
else if (t <= 2.75d-73) then
tmp = 2.0d0 / (((sin(k) * (k / l)) * t_3) ** 2.0d0)
else if (t <= 9.5d+99) then
tmp = (2.0d0 / ((tan(k) * ((sin(k) * (t ** 3.0d0)) / l)) / l)) / (k * ((k / t) / t))
else if (t <= 3d+193) then
tmp = 2.0d0 / ((t_3 * ((k * sin(k)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = t / Math.cos(k);
double t_2 = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (Math.pow(k, 2.0) * t_1)));
double t_3 = Math.sqrt(t_1);
double tmp;
if (t <= -5.2e+102) {
tmp = t_2;
} else if (t <= -7.2e-112) {
tmp = 2.0 / (((Math.tan(k) * (Math.sin(k) * Math.pow((k / t), 2.0))) * (Math.pow(t, 3.0) / l)) / l);
} else if (t <= 9.8e-307) {
tmp = t_2;
} else if (t <= 2.75e-73) {
tmp = 2.0 / Math.pow(((Math.sin(k) * (k / l)) * t_3), 2.0);
} else if (t <= 9.5e+99) {
tmp = (2.0 / ((Math.tan(k) * ((Math.sin(k) * Math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
} else if (t <= 3e+193) {
tmp = 2.0 / Math.pow((t_3 * ((k * Math.sin(k)) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = t / math.cos(k) t_2 = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * (math.pow(k, 2.0) * t_1))) t_3 = math.sqrt(t_1) tmp = 0 if t <= -5.2e+102: tmp = t_2 elif t <= -7.2e-112: tmp = 2.0 / (((math.tan(k) * (math.sin(k) * math.pow((k / t), 2.0))) * (math.pow(t, 3.0) / l)) / l) elif t <= 9.8e-307: tmp = t_2 elif t <= 2.75e-73: tmp = 2.0 / math.pow(((math.sin(k) * (k / l)) * t_3), 2.0) elif t <= 9.5e+99: tmp = (2.0 / ((math.tan(k) * ((math.sin(k) * math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t)) elif t <= 3e+193: tmp = 2.0 / math.pow((t_3 * ((k * math.sin(k)) / l)), 2.0) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(t / cos(k)) t_2 = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64((k ^ 2.0) * t_1)))) t_3 = sqrt(t_1) tmp = 0.0 if (t <= -5.2e+102) tmp = t_2; elseif (t <= -7.2e-112) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(sin(k) * (Float64(k / t) ^ 2.0))) * Float64((t ^ 3.0) / l)) / l)); elseif (t <= 9.8e-307) tmp = t_2; elseif (t <= 2.75e-73) tmp = Float64(2.0 / (Float64(Float64(sin(k) * Float64(k / l)) * t_3) ^ 2.0)); elseif (t <= 9.5e+99) tmp = Float64(Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(sin(k) * (t ^ 3.0)) / l)) / l)) / Float64(k * Float64(Float64(k / t) / t))); elseif (t <= 3e+193) tmp = Float64(2.0 / (Float64(t_3 * Float64(Float64(k * sin(k)) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = t / cos(k); t_2 = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * ((k ^ 2.0) * t_1))); t_3 = sqrt(t_1); tmp = 0.0; if (t <= -5.2e+102) tmp = t_2; elseif (t <= -7.2e-112) tmp = 2.0 / (((tan(k) * (sin(k) * ((k / t) ^ 2.0))) * ((t ^ 3.0) / l)) / l); elseif (t <= 9.8e-307) tmp = t_2; elseif (t <= 2.75e-73) tmp = 2.0 / (((sin(k) * (k / l)) * t_3) ^ 2.0); elseif (t <= 9.5e+99) tmp = (2.0 / ((tan(k) * ((sin(k) * (t ^ 3.0)) / l)) / l)) / (k * ((k / t) / t)); elseif (t <= 3e+193) tmp = 2.0 / ((t_3 * ((k * sin(k)) / l)) ^ 2.0); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[t$95$1], $MachinePrecision]}, If[LessEqual[t, -5.2e+102], t$95$2, If[LessEqual[t, -7.2e-112], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e-307], t$95$2, If[LessEqual[t, 2.75e-73], N[(2.0 / N[Power[N[(N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+99], N[(N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(k / t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+193], N[(2.0 / N[Power[N[(t$95$3 * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\cos k}\\
t_2 := \frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left({k}^{2} \cdot t_1\right)\right)}\\
t_3 := \sqrt{t_1}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-112}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \frac{{t}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-307}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-73}:\\
\;\;\;\;\frac{2}{{\left(\left(\sin k \cdot \frac{k}{\ell}\right) \cdot t_3\right)}^{2}}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+99}:\\
\;\;\;\;\frac{\frac{2}{\frac{\tan k \cdot \frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}}{k \cdot \frac{\frac{k}{t}}{t}}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+193}:\\
\;\;\;\;\frac{2}{{\left(t_3 \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -5.20000000000000013e102 or -7.2000000000000002e-112 < t < 9.8000000000000005e-307Initial program 17.5%
Simplified20.1%
Taylor expanded in t around 0 73.2%
times-frac73.0%
Simplified73.0%
expm1-log1p-u56.5%
expm1-udef10.5%
div-inv10.5%
pow-flip11.8%
metadata-eval11.8%
associate-/l*11.8%
Applied egg-rr11.8%
expm1-def57.0%
expm1-log1p73.6%
associate-*l*74.8%
associate-/r/75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in k around 0 65.2%
if -5.20000000000000013e102 < t < -7.2000000000000002e-112Initial program 66.1%
Simplified71.9%
associate-*l*71.9%
+-rgt-identity71.9%
*-commutative71.9%
associate-*r*71.9%
*-commutative71.9%
*-commutative71.9%
associate-/r*77.2%
associate-*r/85.7%
Applied egg-rr85.7%
if 9.8000000000000005e-307 < t < 2.75000000000000003e-73Initial program 26.0%
Simplified28.5%
associate-*l*26.0%
+-rgt-identity26.0%
*-commutative26.0%
associate-*r*26.0%
*-commutative26.0%
add-sqr-sqrt26.1%
pow226.1%
Applied egg-rr49.3%
Taylor expanded in k around inf 76.7%
associate-/l*76.6%
associate-/r/76.8%
Simplified76.8%
if 2.75000000000000003e-73 < t < 9.49999999999999908e99Initial program 68.4%
associate-/r*68.4%
associate-*l/68.4%
associate--l+68.4%
Simplified68.4%
unpow268.4%
clear-num68.4%
un-div-inv68.4%
Applied egg-rr68.5%
associate-+r-68.5%
add-exp-log67.9%
log1p-udef67.9%
expm1-udef70.7%
expm1-log1p-u71.3%
associate-/r/71.2%
Applied egg-rr71.2%
associate-*l/71.3%
*-commutative71.3%
associate-*l/71.2%
associate-/r*76.8%
associate-*r/81.5%
Applied egg-rr81.5%
if 9.49999999999999908e99 < t < 3e193Initial program 15.0%
Simplified30.5%
associate-*l*30.5%
+-rgt-identity30.5%
*-commutative30.5%
associate-*r*30.5%
*-commutative30.5%
add-sqr-sqrt29.2%
pow229.2%
Applied egg-rr51.2%
Taylor expanded in k around inf 70.8%
if 3e193 < t Initial program 8.1%
Simplified40.7%
associate-*l*40.7%
+-rgt-identity40.7%
*-commutative40.7%
associate-*r*40.7%
*-commutative40.7%
add-sqr-sqrt10.8%
pow210.8%
Applied egg-rr19.1%
Taylor expanded in k around 0 71.5%
Final simplification74.6%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ (pow k 2.0) (pow l 2.0))))
(if (<= k 9.5e-5)
(/ 2.0 (* (pow k 2.0) (* t t_1)))
(/ 2.0 (* t_1 (/ t (/ (cos k) (+ 0.5 (* -0.5 (cos (* 2.0 k)))))))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = pow(k, 2.0) / pow(l, 2.0);
double tmp;
if (k <= 9.5e-5) {
tmp = 2.0 / (pow(k, 2.0) * (t * t_1));
} else {
tmp = 2.0 / (t_1 * (t / (cos(k) / (0.5 + (-0.5 * cos((2.0 * k)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
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 = (k ** 2.0d0) / (l ** 2.0d0)
if (k <= 9.5d-5) then
tmp = 2.0d0 / ((k ** 2.0d0) * (t * t_1))
else
tmp = 2.0d0 / (t_1 * (t / (cos(k) / (0.5d0 + ((-0.5d0) * cos((2.0d0 * k)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(k, 2.0) / Math.pow(l, 2.0);
double tmp;
if (k <= 9.5e-5) {
tmp = 2.0 / (Math.pow(k, 2.0) * (t * t_1));
} else {
tmp = 2.0 / (t_1 * (t / (Math.cos(k) / (0.5 + (-0.5 * Math.cos((2.0 * k)))))));
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = math.pow(k, 2.0) / math.pow(l, 2.0) tmp = 0 if k <= 9.5e-5: tmp = 2.0 / (math.pow(k, 2.0) * (t * t_1)) else: tmp = 2.0 / (t_1 * (t / (math.cos(k) / (0.5 + (-0.5 * math.cos((2.0 * k))))))) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64((k ^ 2.0) / (l ^ 2.0)) tmp = 0.0 if (k <= 9.5e-5) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t * t_1))); else tmp = Float64(2.0 / Float64(t_1 * Float64(t / Float64(cos(k) / Float64(0.5 + Float64(-0.5 * cos(Float64(2.0 * k)))))))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = (k ^ 2.0) / (l ^ 2.0); tmp = 0.0; if (k <= 9.5e-5) tmp = 2.0 / ((k ^ 2.0) * (t * t_1)); else tmp = 2.0 / (t_1 * (t / (cos(k) / (0.5 + (-0.5 * cos((2.0 * k))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 9.5e-5], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$1 * N[(t / N[(N[Cos[k], $MachinePrecision] / N[(0.5 + N[(-0.5 * N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{{k}^{2}}{{\ell}^{2}}\\
\mathbf{if}\;k \leq 9.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_1 \cdot \frac{t}{\frac{\cos k}{0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)}}}\\
\end{array}
\end{array}
if k < 9.5000000000000005e-5Initial program 37.8%
Simplified42.7%
Taylor expanded in t around 0 71.3%
times-frac70.8%
Simplified70.8%
expm1-log1p-u55.2%
expm1-udef20.6%
div-inv20.6%
pow-flip20.6%
metadata-eval20.6%
associate-/l*20.6%
Applied egg-rr20.6%
expm1-def54.9%
expm1-log1p70.4%
associate-*l*71.4%
associate-/r/71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in k around 0 63.6%
associate-/l*62.9%
associate-/r/64.6%
Simplified64.6%
if 9.5000000000000005e-5 < k Initial program 26.8%
Simplified43.4%
Taylor expanded in t around 0 69.2%
times-frac75.6%
Simplified75.6%
unpow275.6%
sin-mult75.4%
Applied egg-rr75.4%
div-sub75.4%
+-inverses75.4%
cos-075.4%
metadata-eval75.4%
count-275.4%
*-commutative75.4%
Simplified75.4%
associate-*l/69.1%
associate-/l*69.0%
div-inv69.0%
metadata-eval69.0%
Applied egg-rr69.0%
Taylor expanded in k around inf 69.1%
times-frac75.4%
associate-/l*75.4%
cancel-sign-sub-inv75.4%
metadata-eval75.4%
Simplified75.4%
Final simplification67.7%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 9.5e-5)
(/ 2.0 (* (pow k 2.0) (* t (/ (pow k 2.0) (pow l 2.0)))))
(/
2.0
(*
(pow k 2.0)
(* (pow l -2.0) (* (/ t (cos k)) (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-5) {
tmp = 2.0 / (pow(k, 2.0) * (t * (pow(k, 2.0) / pow(l, 2.0))));
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * ((t / cos(k)) * (0.5 - (cos((2.0 * k)) / 2.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 9.5d-5) then
tmp = 2.0d0 / ((k ** 2.0d0) * (t * ((k ** 2.0d0) / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * ((t / cos(k)) * (0.5d0 - (cos((2.0d0 * k)) / 2.0d0)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-5) {
tmp = 2.0 / (Math.pow(k, 2.0) * (t * (Math.pow(k, 2.0) / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * ((t / Math.cos(k)) * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 9.5e-5: tmp = 2.0 / (math.pow(k, 2.0) * (t * (math.pow(k, 2.0) / math.pow(l, 2.0)))) else: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * ((t / math.cos(k)) * (0.5 - (math.cos((2.0 * k)) / 2.0))))) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 9.5e-5) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t * Float64((k ^ 2.0) / (l ^ 2.0))))); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64(Float64(t / cos(k)) * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9.5e-5) tmp = 2.0 / ((k ^ 2.0) * (t * ((k ^ 2.0) / (l ^ 2.0)))); else tmp = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * ((t / cos(k)) * (0.5 - (cos((2.0 * k)) / 2.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 9.5e-5], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot \frac{{k}^{2}}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left(\frac{t}{\cos k} \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)\right)\right)}\\
\end{array}
\end{array}
if k < 9.5000000000000005e-5Initial program 37.8%
Simplified42.7%
Taylor expanded in t around 0 71.3%
times-frac70.8%
Simplified70.8%
expm1-log1p-u55.2%
expm1-udef20.6%
div-inv20.6%
pow-flip20.6%
metadata-eval20.6%
associate-/l*20.6%
Applied egg-rr20.6%
expm1-def54.9%
expm1-log1p70.4%
associate-*l*71.4%
associate-/r/71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in k around 0 63.6%
associate-/l*62.9%
associate-/r/64.6%
Simplified64.6%
if 9.5000000000000005e-5 < k Initial program 26.8%
Simplified43.4%
Taylor expanded in t around 0 69.2%
times-frac75.6%
Simplified75.6%
expm1-log1p-u37.3%
expm1-udef27.9%
div-inv27.9%
pow-flip29.2%
metadata-eval29.2%
associate-/l*29.2%
Applied egg-rr29.2%
expm1-def38.6%
expm1-log1p76.9%
associate-*l*76.8%
associate-/r/76.8%
*-commutative76.8%
Simplified76.8%
unpow275.6%
sin-mult75.4%
Applied egg-rr76.6%
div-sub75.4%
+-inverses75.4%
cos-075.4%
metadata-eval75.4%
count-275.4%
*-commutative75.4%
Simplified76.6%
Final simplification68.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -4.6e+101)
(/ 2.0 (* (pow k 2.0) (* (pow l -2.0) (* t (pow k 2.0)))))
(if (<= t -1.35e-103)
(/
2.0
(* (/ (pow t 3.0) (* l l)) (* (tan k) (* (sin k) (/ (/ k t) (/ t k))))))
(if (<= t 2.5e-309)
(/ 2.0 (* (pow k 2.0) (* t (/ (pow k 2.0) (pow l 2.0)))))
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= -4.6e+101) {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (t * pow(k, 2.0))));
} else if (t <= -1.35e-103) {
tmp = 2.0 / ((pow(t, 3.0) / (l * l)) * (tan(k) * (sin(k) * ((k / t) / (t / k)))));
} else if (t <= 2.5e-309) {
tmp = 2.0 / (pow(k, 2.0) * (t * (pow(k, 2.0) / pow(l, 2.0))));
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-4.6d+101)) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * (t * (k ** 2.0d0))))
else if (t <= (-1.35d-103)) then
tmp = 2.0d0 / (((t ** 3.0d0) / (l * l)) * (tan(k) * (sin(k) * ((k / t) / (t / k)))))
else if (t <= 2.5d-309) then
tmp = 2.0d0 / ((k ** 2.0d0) * (t * ((k ** 2.0d0) / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -4.6e+101) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (t * Math.pow(k, 2.0))));
} else if (t <= -1.35e-103) {
tmp = 2.0 / ((Math.pow(t, 3.0) / (l * l)) * (Math.tan(k) * (Math.sin(k) * ((k / t) / (t / k)))));
} else if (t <= 2.5e-309) {
tmp = 2.0 / (Math.pow(k, 2.0) * (t * (Math.pow(k, 2.0) / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= -4.6e+101: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * (t * math.pow(k, 2.0)))) elif t <= -1.35e-103: tmp = 2.0 / ((math.pow(t, 3.0) / (l * l)) * (math.tan(k) * (math.sin(k) * ((k / t) / (t / k))))) elif t <= 2.5e-309: tmp = 2.0 / (math.pow(k, 2.0) * (t * (math.pow(k, 2.0) / math.pow(l, 2.0)))) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= -4.6e+101) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64(t * (k ^ 2.0))))); elseif (t <= -1.35e-103) tmp = Float64(2.0 / Float64(Float64((t ^ 3.0) / Float64(l * l)) * Float64(tan(k) * Float64(sin(k) * Float64(Float64(k / t) / Float64(t / k)))))); elseif (t <= 2.5e-309) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t * Float64((k ^ 2.0) / (l ^ 2.0))))); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -4.6e+101) tmp = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * (t * (k ^ 2.0)))); elseif (t <= -1.35e-103) tmp = 2.0 / (((t ^ 3.0) / (l * l)) * (tan(k) * (sin(k) * ((k / t) / (t / k))))); elseif (t <= 2.5e-309) tmp = 2.0 / ((k ^ 2.0) * (t * ((k ^ 2.0) / (l ^ 2.0)))); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -4.6e+101], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-103], N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(k / t), $MachinePrecision] / N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-309], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-309}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot \frac{{k}^{2}}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -4.6000000000000003e101Initial program 8.3%
Simplified14.1%
Taylor expanded in t around 0 72.9%
times-frac77.6%
Simplified77.6%
expm1-log1p-u52.4%
expm1-udef5.7%
div-inv5.7%
pow-flip8.5%
metadata-eval8.5%
associate-/l*8.5%
Applied egg-rr8.5%
expm1-def53.5%
expm1-log1p78.7%
associate-*l*76.3%
associate-/r/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in k around 0 75.2%
if -4.6000000000000003e101 < t < -1.35000000000000005e-103Initial program 66.1%
Simplified72.2%
unpow272.2%
clear-num72.2%
un-div-inv72.2%
Applied egg-rr72.2%
if -1.35000000000000005e-103 < t < 2.5000000000000022e-309Initial program 27.7%
Simplified27.7%
Taylor expanded in t around 0 73.1%
times-frac69.1%
Simplified69.1%
expm1-log1p-u60.3%
expm1-udef13.5%
div-inv13.5%
pow-flip13.5%
metadata-eval13.5%
associate-/l*13.5%
Applied egg-rr13.5%
expm1-def60.3%
expm1-log1p69.1%
associate-*l*73.1%
associate-/r/73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in k around 0 50.8%
associate-/l*54.6%
associate-/r/54.7%
Simplified54.7%
if 2.5000000000000022e-309 < t Initial program 31.2%
Simplified44.6%
associate-*l*43.1%
+-rgt-identity43.1%
*-commutative43.1%
associate-*r*43.1%
*-commutative43.1%
add-sqr-sqrt25.3%
pow225.3%
Applied egg-rr41.2%
Taylor expanded in k around 0 67.2%
Final simplification67.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -4.3e+102)
(/ 2.0 (* (pow k 2.0) (* (pow l -2.0) (* t (pow k 2.0)))))
(if (<= t -7.2e-112)
(/
(/ 2.0 (/ (* (tan k) (/ (* (sin k) (pow t 3.0)) l)) l))
(* k (/ (/ k t) t)))
(if (<= t 6e-309)
(/ 2.0 (* (pow k 2.0) (* t (/ (pow k 2.0) (pow l 2.0)))))
(/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= -4.3e+102) {
tmp = 2.0 / (pow(k, 2.0) * (pow(l, -2.0) * (t * pow(k, 2.0))));
} else if (t <= -7.2e-112) {
tmp = (2.0 / ((tan(k) * ((sin(k) * pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
} else if (t <= 6e-309) {
tmp = 2.0 / (pow(k, 2.0) * (t * (pow(k, 2.0) / pow(l, 2.0))));
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-4.3d+102)) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((l ** (-2.0d0)) * (t * (k ** 2.0d0))))
else if (t <= (-7.2d-112)) then
tmp = (2.0d0 / ((tan(k) * ((sin(k) * (t ** 3.0d0)) / l)) / l)) / (k * ((k / t) / t))
else if (t <= 6d-309) then
tmp = 2.0d0 / ((k ** 2.0d0) * (t * ((k ** 2.0d0) / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -4.3e+102) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(l, -2.0) * (t * Math.pow(k, 2.0))));
} else if (t <= -7.2e-112) {
tmp = (2.0 / ((Math.tan(k) * ((Math.sin(k) * Math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t));
} else if (t <= 6e-309) {
tmp = 2.0 / (Math.pow(k, 2.0) * (t * (Math.pow(k, 2.0) / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= -4.3e+102: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(l, -2.0) * (t * math.pow(k, 2.0)))) elif t <= -7.2e-112: tmp = (2.0 / ((math.tan(k) * ((math.sin(k) * math.pow(t, 3.0)) / l)) / l)) / (k * ((k / t) / t)) elif t <= 6e-309: tmp = 2.0 / (math.pow(k, 2.0) * (t * (math.pow(k, 2.0) / math.pow(l, 2.0)))) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= -4.3e+102) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((l ^ -2.0) * Float64(t * (k ^ 2.0))))); elseif (t <= -7.2e-112) tmp = Float64(Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(sin(k) * (t ^ 3.0)) / l)) / l)) / Float64(k * Float64(Float64(k / t) / t))); elseif (t <= 6e-309) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t * Float64((k ^ 2.0) / (l ^ 2.0))))); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -4.3e+102) tmp = 2.0 / ((k ^ 2.0) * ((l ^ -2.0) * (t * (k ^ 2.0)))); elseif (t <= -7.2e-112) tmp = (2.0 / ((tan(k) * ((sin(k) * (t ^ 3.0)) / l)) / l)) / (k * ((k / t) / t)); elseif (t <= 6e-309) tmp = 2.0 / ((k ^ 2.0) * (t * ((k ^ 2.0) / (l ^ 2.0)))); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -4.3e+102], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e-112], N[(N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(k / t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-309], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({\ell}^{-2} \cdot \left(t \cdot {k}^{2}\right)\right)}\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{2}{\frac{\tan k \cdot \frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}}{k \cdot \frac{\frac{k}{t}}{t}}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-309}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot \frac{{k}^{2}}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -4.3000000000000001e102Initial program 8.3%
Simplified14.1%
Taylor expanded in t around 0 72.9%
times-frac77.6%
Simplified77.6%
expm1-log1p-u52.4%
expm1-udef5.7%
div-inv5.7%
pow-flip8.5%
metadata-eval8.5%
associate-/l*8.5%
Applied egg-rr8.5%
expm1-def53.5%
expm1-log1p78.7%
associate-*l*76.3%
associate-/r/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in k around 0 75.2%
if -4.3000000000000001e102 < t < -7.2000000000000002e-112Initial program 66.1%
associate-/r*66.1%
associate-*l/66.1%
associate--l+66.1%
Simplified66.1%
unpow271.9%
clear-num71.9%
un-div-inv71.9%
Applied egg-rr66.1%
associate-+r-66.1%
add-exp-log65.6%
log1p-udef65.6%
expm1-udef71.3%
expm1-log1p-u71.8%
associate-/r/71.8%
Applied egg-rr71.8%
associate-*l/71.9%
*-commutative71.9%
associate-*l/71.8%
associate-/r*80.7%
associate-*r/80.7%
Applied egg-rr80.7%
if -7.2000000000000002e-112 < t < 6.000000000000001e-309Initial program 25.0%
Simplified25.0%
Taylor expanded in t around 0 73.5%
times-frac69.3%
Simplified69.3%
expm1-log1p-u59.9%
expm1-udef14.5%
div-inv14.5%
pow-flip14.5%
metadata-eval14.5%
associate-/l*14.5%
Applied egg-rr14.5%
expm1-def59.9%
expm1-log1p69.3%
associate-*l*73.5%
associate-/r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in k around 0 49.7%
associate-/l*53.8%
associate-/r/53.9%
Simplified53.9%
if 6.000000000000001e-309 < t Initial program 31.2%
Simplified44.6%
associate-*l*43.1%
+-rgt-identity43.1%
*-commutative43.1%
associate-*r*43.1%
*-commutative43.1%
add-sqr-sqrt25.3%
pow225.3%
Applied egg-rr41.2%
Taylor expanded in k around 0 67.2%
Final simplification69.0%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= t -2e-310) (/ 2.0 (* (pow k 2.0) (* t (/ (pow k 2.0) (pow l 2.0))))) (/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= -2e-310) {
tmp = 2.0 / (pow(k, 2.0) * (t * (pow(k, 2.0) / pow(l, 2.0))));
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-2d-310)) then
tmp = 2.0d0 / ((k ** 2.0d0) * (t * ((k ** 2.0d0) / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -2e-310) {
tmp = 2.0 / (Math.pow(k, 2.0) * (t * (Math.pow(k, 2.0) / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= -2e-310: tmp = 2.0 / (math.pow(k, 2.0) * (t * (math.pow(k, 2.0) / math.pow(l, 2.0)))) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= -2e-310) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t * Float64((k ^ 2.0) / (l ^ 2.0))))); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -2e-310) tmp = 2.0 / ((k ^ 2.0) * (t * ((k ^ 2.0) / (l ^ 2.0)))); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -2e-310], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t \cdot \frac{{k}^{2}}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -1.999999999999994e-310Initial program 37.5%
Simplified41.4%
Taylor expanded in t around 0 74.8%
times-frac74.7%
Simplified74.7%
expm1-log1p-u54.5%
expm1-udef10.5%
div-inv10.5%
pow-flip11.2%
metadata-eval11.2%
associate-/l*11.2%
Applied egg-rr11.2%
expm1-def54.9%
expm1-log1p75.0%
associate-*l*75.8%
associate-/r/76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in k around 0 59.8%
associate-/l*59.7%
associate-/r/61.1%
Simplified61.1%
if -1.999999999999994e-310 < t Initial program 31.2%
Simplified44.6%
associate-*l*43.1%
+-rgt-identity43.1%
*-commutative43.1%
associate-*r*43.1%
*-commutative43.1%
add-sqr-sqrt25.3%
pow225.3%
Applied egg-rr41.2%
Taylor expanded in k around 0 67.2%
Final simplification64.0%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= t -2e-310) (* (/ 2.0 t) (/ (pow l 2.0) (pow k 4.0))) (/ 2.0 (pow (* (/ (pow k 2.0) l) (sqrt t)) 2.0))))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= -2e-310) {
tmp = (2.0 / t) * (pow(l, 2.0) / pow(k, 4.0));
} else {
tmp = 2.0 / pow(((pow(k, 2.0) / l) * sqrt(t)), 2.0);
}
return tmp;
}
NOTE: l should be positive before calling this function
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 <= (-2d-310)) then
tmp = (2.0d0 / t) * ((l ** 2.0d0) / (k ** 4.0d0))
else
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * sqrt(t)) ** 2.0d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -2e-310) {
tmp = (2.0 / t) * (Math.pow(l, 2.0) / Math.pow(k, 4.0));
} else {
tmp = 2.0 / Math.pow(((Math.pow(k, 2.0) / l) * Math.sqrt(t)), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= -2e-310: tmp = (2.0 / t) * (math.pow(l, 2.0) / math.pow(k, 4.0)) else: tmp = 2.0 / math.pow(((math.pow(k, 2.0) / l) * math.sqrt(t)), 2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= -2e-310) tmp = Float64(Float64(2.0 / t) * Float64((l ^ 2.0) / (k ^ 4.0))); else tmp = Float64(2.0 / (Float64(Float64((k ^ 2.0) / l) * sqrt(t)) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -2e-310) tmp = (2.0 / t) * ((l ^ 2.0) / (k ^ 4.0)); else tmp = 2.0 / ((((k ^ 2.0) / l) * sqrt(t)) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -2e-310], N[(N[(2.0 / t), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{2}{t} \cdot \frac{{\ell}^{2}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{k}^{2}}{\ell} \cdot \sqrt{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -1.999999999999994e-310Initial program 37.5%
Simplified41.4%
Taylor expanded in t around 0 74.8%
times-frac74.7%
Simplified74.7%
Taylor expanded in k around 0 56.8%
*-commutative56.8%
associate-/l*57.6%
associate-/r/56.0%
Simplified56.0%
Taylor expanded in t around 0 56.8%
associate-*r/56.8%
*-commutative56.8%
times-frac57.6%
Simplified57.6%
if -1.999999999999994e-310 < t Initial program 31.2%
Simplified44.6%
associate-*l*43.1%
+-rgt-identity43.1%
*-commutative43.1%
associate-*r*43.1%
*-commutative43.1%
add-sqr-sqrt25.3%
pow225.3%
Applied egg-rr41.2%
Taylor expanded in k around 0 67.2%
Final simplification62.1%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (pow l 2.0) (* t (pow k 4.0)))))
l = abs(l);
double code(double t, double l, double k) {
return 2.0 * (pow(l, 2.0) / (t * pow(k, 4.0)));
}
NOTE: l should be positive before calling this function
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
l = Math.abs(l);
public static double code(double t, double l, double k) {
return 2.0 * (Math.pow(l, 2.0) / (t * Math.pow(k, 4.0)));
}
l = abs(l) def code(t, l, k): return 2.0 * (math.pow(l, 2.0) / (t * math.pow(k, 4.0)))
l = abs(l) function code(t, l, k) return Float64(2.0 * Float64((l ^ 2.0) / Float64(t * (k ^ 4.0)))) end
l = abs(l) function tmp = code(t, l, k) tmp = 2.0 * ((l ^ 2.0) / (t * (k ^ 4.0))); end
NOTE: l should be positive before calling this function 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}
l = |l|\\
\\
2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}}
\end{array}
Initial program 34.6%
associate-/r*34.5%
associate-*l/34.5%
associate--l+34.6%
Simplified34.6%
Taylor expanded in k around 0 55.8%
Final simplification55.8%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* (/ 2.0 t) (* (pow l 2.0) (pow k -4.0))))
l = abs(l);
double code(double t, double l, double k) {
return (2.0 / t) * (pow(l, 2.0) * pow(k, -4.0));
}
NOTE: l should be positive before calling this function
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) * ((l ** 2.0d0) * (k ** (-4.0d0)))
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return (2.0 / t) * (Math.pow(l, 2.0) * Math.pow(k, -4.0));
}
l = abs(l) def code(t, l, k): return (2.0 / t) * (math.pow(l, 2.0) * math.pow(k, -4.0))
l = abs(l) function code(t, l, k) return Float64(Float64(2.0 / t) * Float64((l ^ 2.0) * (k ^ -4.0))) end
l = abs(l) function tmp = code(t, l, k) tmp = (2.0 / t) * ((l ^ 2.0) * (k ^ -4.0)); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 / t), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\frac{2}{t} \cdot \left({\ell}^{2} \cdot {k}^{-4}\right)
\end{array}
Initial program 34.6%
Simplified42.9%
Taylor expanded in t around 0 70.7%
times-frac72.2%
Simplified72.2%
Taylor expanded in k around 0 55.8%
*-commutative55.8%
associate-/l*56.2%
associate-/r/54.5%
Simplified54.5%
Taylor expanded in t around 0 55.8%
associate-*r/55.8%
*-commutative55.8%
times-frac56.2%
Simplified56.2%
expm1-log1p-u56.1%
expm1-udef55.0%
div-inv55.0%
pow-flip55.0%
metadata-eval55.0%
Applied egg-rr55.0%
expm1-def56.1%
expm1-log1p56.2%
Simplified56.2%
Final simplification56.2%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* (/ 2.0 t) (/ (pow l 2.0) (pow k 4.0))))
l = abs(l);
double code(double t, double l, double k) {
return (2.0 / t) * (pow(l, 2.0) / pow(k, 4.0));
}
NOTE: l should be positive before calling this function
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) * ((l ** 2.0d0) / (k ** 4.0d0))
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return (2.0 / t) * (Math.pow(l, 2.0) / Math.pow(k, 4.0));
}
l = abs(l) def code(t, l, k): return (2.0 / t) * (math.pow(l, 2.0) / math.pow(k, 4.0))
l = abs(l) function code(t, l, k) return Float64(Float64(2.0 / t) * Float64((l ^ 2.0) / (k ^ 4.0))) end
l = abs(l) function tmp = code(t, l, k) tmp = (2.0 / t) * ((l ^ 2.0) / (k ^ 4.0)); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 / t), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\frac{2}{t} \cdot \frac{{\ell}^{2}}{{k}^{4}}
\end{array}
Initial program 34.6%
Simplified42.9%
Taylor expanded in t around 0 70.7%
times-frac72.2%
Simplified72.2%
Taylor expanded in k around 0 55.8%
*-commutative55.8%
associate-/l*56.2%
associate-/r/54.5%
Simplified54.5%
Taylor expanded in t around 0 55.8%
associate-*r/55.8%
*-commutative55.8%
times-frac56.2%
Simplified56.2%
Final simplification56.2%
herbie shell --seed 2023315
(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))))