
(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 19 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
(if (<= l 6.6e-156)
(* 2.0 (/ (pow (/ l (pow k 2.0)) 2.0) t))
(if (<= l 1.45e+156)
(*
2.0
(/ (* (pow l 2.0) (* (pow k -2.0) (cos k))) (* t (pow (sin k) 2.0))))
(if (<= l 9e+272)
(* 2.0 (pow (* (/ k l) (* (sin k) (sqrt (/ t (cos k))))) -2.0))
(/
2.0
(*
(* (pow (/ k t) 2.0) (* (sin k) (tan k)))
(pow (/ t (pow (cbrt l) 2.0)) 3.0)))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (l <= 6.6e-156) {
tmp = 2.0 * (pow((l / pow(k, 2.0)), 2.0) / t);
} else if (l <= 1.45e+156) {
tmp = 2.0 * ((pow(l, 2.0) * (pow(k, -2.0) * cos(k))) / (t * pow(sin(k), 2.0)));
} else if (l <= 9e+272) {
tmp = 2.0 * pow(((k / l) * (sin(k) * sqrt((t / cos(k))))), -2.0);
} else {
tmp = 2.0 / ((pow((k / t), 2.0) * (sin(k) * tan(k))) * pow((t / pow(cbrt(l), 2.0)), 3.0));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (l <= 6.6e-156) {
tmp = 2.0 * (Math.pow((l / Math.pow(k, 2.0)), 2.0) / t);
} else if (l <= 1.45e+156) {
tmp = 2.0 * ((Math.pow(l, 2.0) * (Math.pow(k, -2.0) * Math.cos(k))) / (t * Math.pow(Math.sin(k), 2.0)));
} else if (l <= 9e+272) {
tmp = 2.0 * Math.pow(((k / l) * (Math.sin(k) * Math.sqrt((t / Math.cos(k))))), -2.0);
} else {
tmp = 2.0 / ((Math.pow((k / t), 2.0) * (Math.sin(k) * Math.tan(k))) * Math.pow((t / Math.pow(Math.cbrt(l), 2.0)), 3.0));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (l <= 6.6e-156) tmp = Float64(2.0 * Float64((Float64(l / (k ^ 2.0)) ^ 2.0) / t)); elseif (l <= 1.45e+156) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * Float64((k ^ -2.0) * cos(k))) / Float64(t * (sin(k) ^ 2.0)))); elseif (l <= 9e+272) tmp = Float64(2.0 * (Float64(Float64(k / l) * Float64(sin(k) * sqrt(Float64(t / cos(k))))) ^ -2.0)); else tmp = Float64(2.0 / Float64(Float64((Float64(k / t) ^ 2.0) * Float64(sin(k) * tan(k))) * (Float64(t / (cbrt(l) ^ 2.0)) ^ 3.0))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[l, 6.6e-156], N[(2.0 * N[(N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.45e+156], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 9e+272], N[(2.0 * N[Power[N[(N[(k / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.6 \cdot 10^{-156}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}{t}\\
\mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+156}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \left({k}^{-2} \cdot \cos k\right)}{t \cdot {\sin k}^{2}}\\
\mathbf{elif}\;\ell \leq 9 \cdot 10^{+272}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\ell} \cdot \left(\sin k \cdot \sqrt{\frac{t}{\cos k}}\right)\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot {\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if l < 6.5999999999999997e-156Initial program 23.7%
Simplified34.5%
Taylor expanded in k around 0 50.6%
associate-/r*50.7%
Simplified50.7%
expm1-log1p-u50.7%
expm1-udef50.2%
div-inv49.6%
pow-flip49.6%
metadata-eval49.6%
Applied egg-rr49.6%
expm1-def50.0%
expm1-log1p50.1%
Simplified50.1%
add-sqr-sqrt50.1%
pow250.1%
sqrt-prod50.1%
unpow250.1%
sqrt-prod14.5%
add-sqr-sqrt58.3%
metadata-eval58.3%
pow-prod-up58.3%
sqrt-prod65.1%
add-sqr-sqrt65.1%
Applied egg-rr65.1%
Taylor expanded in l around 0 65.1%
if 6.5999999999999997e-156 < l < 1.45000000000000005e156Initial program 45.2%
Simplified55.9%
Taylor expanded in t around 0 84.4%
associate-/r*93.6%
Simplified93.6%
expm1-log1p-u85.2%
expm1-udef70.3%
div-inv70.3%
pow-flip70.3%
metadata-eval70.3%
Applied egg-rr70.3%
expm1-def85.1%
expm1-log1p93.6%
associate-*l*93.6%
Simplified93.6%
if 1.45000000000000005e156 < l < 9.00000000000000059e272Initial program 26.4%
Simplified26.4%
associate-*l*26.4%
+-rgt-identity26.4%
*-commutative26.4%
associate-*r*26.4%
*-commutative26.4%
add-sqr-sqrt13.0%
pow213.0%
Applied egg-rr26.4%
Taylor expanded in k around inf 47.5%
associate-*l/39.5%
associate-*l*39.5%
Simplified39.5%
expm1-log1p-u38.1%
expm1-udef38.1%
div-inv38.1%
pow-flip38.1%
associate-/l*34.5%
metadata-eval34.5%
Applied egg-rr34.5%
expm1-def42.5%
expm1-log1p43.4%
associate-/r/47.6%
Simplified47.6%
if 9.00000000000000059e272 < l Initial program 45.5%
Simplified45.5%
unpow345.5%
times-frac54.7%
pow254.7%
Applied egg-rr54.7%
add-cube-cbrt54.6%
pow354.7%
Applied egg-rr72.7%
cube-prod72.3%
rem-cube-cbrt72.3%
associate-*r*72.3%
*-commutative72.3%
*-commutative72.3%
Simplified72.3%
Final simplification71.2%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 2e-258)
(* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t))
(if (<= (* l l) 5e+271)
(*
2.0
(/ (/ (* (pow l 2.0) (cos k)) (pow k 2.0)) (* t (pow (sin k) 2.0))))
(/
2.0
(pow
(*
(cbrt (* (tan k) (* (sin k) (pow (/ k t) 2.0))))
(/ t (pow (cbrt l) 2.0)))
3.0)))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-258) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else if ((l * l) <= 5e+271) {
tmp = 2.0 * (((pow(l, 2.0) * cos(k)) / pow(k, 2.0)) / (t * pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow((cbrt((tan(k) * (sin(k) * pow((k / t), 2.0)))) * (t / pow(cbrt(l), 2.0))), 3.0);
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-258) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else if ((l * l) <= 5e+271) {
tmp = 2.0 * (((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow((Math.cbrt((Math.tan(k) * (Math.sin(k) * Math.pow((k / t), 2.0)))) * (t / Math.pow(Math.cbrt(l), 2.0))), 3.0);
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 2e-258) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); elseif (Float64(l * l) <= 5e+271) tmp = Float64(2.0 * Float64(Float64(Float64((l ^ 2.0) * cos(k)) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(cbrt(Float64(tan(k) * Float64(sin(k) * (Float64(k / t) ^ 2.0)))) * Float64(t / (cbrt(l) ^ 2.0))) ^ 3.0)); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 2e-258], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+271], N[(2.0 * N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Power[N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-258}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+271}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2} \cdot \cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\tan k \cdot \left(\sin k \cdot {\left(\frac{k}{t}\right)}^{2}\right)} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.99999999999999991e-258Initial program 30.3%
Simplified40.9%
Taylor expanded in k around 0 53.4%
associate-/r*54.9%
Simplified54.9%
expm1-log1p-u54.9%
expm1-udef54.0%
div-inv52.5%
pow-flip52.5%
metadata-eval52.5%
Applied egg-rr52.5%
expm1-def53.4%
expm1-log1p53.4%
Simplified53.4%
add-sqr-sqrt53.4%
pow253.4%
sqrt-prod53.4%
unpow253.4%
sqrt-prod37.2%
add-sqr-sqrt72.7%
metadata-eval72.7%
pow-prod-up72.7%
sqrt-prod84.5%
add-sqr-sqrt84.5%
Applied egg-rr84.5%
if 1.99999999999999991e-258 < (*.f64 l l) < 5.0000000000000003e271Initial program 36.1%
Simplified49.5%
Taylor expanded in t around 0 84.8%
associate-/r*93.4%
Simplified93.4%
if 5.0000000000000003e271 < (*.f64 l l) Initial program 20.9%
Simplified22.4%
unpow322.4%
times-frac40.2%
pow240.2%
Applied egg-rr40.2%
add-cube-cbrt40.2%
pow340.1%
Applied egg-rr61.0%
Final simplification82.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= l 1.45e-154)
(* 2.0 (/ (pow (/ l (pow k 2.0)) 2.0) t))
(if (<= l 8.6e+155)
(*
2.0
(/ (* (pow l 2.0) (* (pow k -2.0) (cos k))) (* t (pow (sin k) 2.0))))
(if (<= l 1.65e+273)
(* 2.0 (pow (* (/ k l) (* (sin k) (sqrt (/ t (cos k))))) -2.0))
(/
(/ 2.0 (* (tan k) (* (pow (/ t (cbrt l)) 3.0) (/ (sin k) l))))
(* (/ k t) (/ k t)))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (l <= 1.45e-154) {
tmp = 2.0 * (pow((l / pow(k, 2.0)), 2.0) / t);
} else if (l <= 8.6e+155) {
tmp = 2.0 * ((pow(l, 2.0) * (pow(k, -2.0) * cos(k))) / (t * pow(sin(k), 2.0)));
} else if (l <= 1.65e+273) {
tmp = 2.0 * pow(((k / l) * (sin(k) * sqrt((t / cos(k))))), -2.0);
} else {
tmp = (2.0 / (tan(k) * (pow((t / cbrt(l)), 3.0) * (sin(k) / l)))) / ((k / t) * (k / t));
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.45e-154) {
tmp = 2.0 * (Math.pow((l / Math.pow(k, 2.0)), 2.0) / t);
} else if (l <= 8.6e+155) {
tmp = 2.0 * ((Math.pow(l, 2.0) * (Math.pow(k, -2.0) * Math.cos(k))) / (t * Math.pow(Math.sin(k), 2.0)));
} else if (l <= 1.65e+273) {
tmp = 2.0 * Math.pow(((k / l) * (Math.sin(k) * Math.sqrt((t / Math.cos(k))))), -2.0);
} else {
tmp = (2.0 / (Math.tan(k) * (Math.pow((t / Math.cbrt(l)), 3.0) * (Math.sin(k) / l)))) / ((k / t) * (k / t));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (l <= 1.45e-154) tmp = Float64(2.0 * Float64((Float64(l / (k ^ 2.0)) ^ 2.0) / t)); elseif (l <= 8.6e+155) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * Float64((k ^ -2.0) * cos(k))) / Float64(t * (sin(k) ^ 2.0)))); elseif (l <= 1.65e+273) tmp = Float64(2.0 * (Float64(Float64(k / l) * Float64(sin(k) * sqrt(Float64(t / cos(k))))) ^ -2.0)); else tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64((Float64(t / cbrt(l)) ^ 3.0) * Float64(sin(k) / l)))) / Float64(Float64(k / t) * Float64(k / t))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[l, 1.45e-154], N[(2.0 * N[(N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 8.6e+155], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.65e+273], N[(2.0 * N[Power[N[(N[(k / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Power[N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.45 \cdot 10^{-154}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}{t}\\
\mathbf{elif}\;\ell \leq 8.6 \cdot 10^{+155}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \left({k}^{-2} \cdot \cos k\right)}{t \cdot {\sin k}^{2}}\\
\mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+273}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\ell} \cdot \left(\sin k \cdot \sqrt{\frac{t}{\cos k}}\right)\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left({\left(\frac{t}{\sqrt[3]{\ell}}\right)}^{3} \cdot \frac{\sin k}{\ell}\right)}}{\frac{k}{t} \cdot \frac{k}{t}}\\
\end{array}
\end{array}
if l < 1.45e-154Initial program 23.7%
Simplified34.5%
Taylor expanded in k around 0 50.6%
associate-/r*50.7%
Simplified50.7%
expm1-log1p-u50.7%
expm1-udef50.2%
div-inv49.6%
pow-flip49.6%
metadata-eval49.6%
Applied egg-rr49.6%
expm1-def50.0%
expm1-log1p50.1%
Simplified50.1%
add-sqr-sqrt50.1%
pow250.1%
sqrt-prod50.1%
unpow250.1%
sqrt-prod14.5%
add-sqr-sqrt58.3%
metadata-eval58.3%
pow-prod-up58.3%
sqrt-prod65.1%
add-sqr-sqrt65.1%
Applied egg-rr65.1%
Taylor expanded in l around 0 65.1%
if 1.45e-154 < l < 8.6000000000000005e155Initial program 45.2%
Simplified55.9%
Taylor expanded in t around 0 84.4%
associate-/r*93.6%
Simplified93.6%
expm1-log1p-u85.2%
expm1-udef70.3%
div-inv70.3%
pow-flip70.3%
metadata-eval70.3%
Applied egg-rr70.3%
expm1-def85.1%
expm1-log1p93.6%
associate-*l*93.6%
Simplified93.6%
if 8.6000000000000005e155 < l < 1.64999999999999993e273Initial program 26.4%
Simplified26.4%
associate-*l*26.4%
+-rgt-identity26.4%
*-commutative26.4%
associate-*r*26.4%
*-commutative26.4%
add-sqr-sqrt13.0%
pow213.0%
Applied egg-rr26.4%
Taylor expanded in k around inf 47.5%
associate-*l/39.5%
associate-*l*39.5%
Simplified39.5%
expm1-log1p-u38.1%
expm1-udef38.1%
div-inv38.1%
pow-flip38.1%
associate-/l*34.5%
metadata-eval34.5%
Applied egg-rr34.5%
expm1-def42.5%
expm1-log1p43.4%
associate-/r/47.6%
Simplified47.6%
if 1.64999999999999993e273 < l Initial program 45.5%
associate-/r*45.5%
associate-*l/45.5%
associate--l+45.5%
Simplified45.5%
times-frac45.8%
Applied egg-rr45.8%
+-commutative45.8%
associate-+l-46.0%
metadata-eval46.0%
--rgt-identity46.0%
unpow246.0%
Applied egg-rr46.0%
add-cube-cbrt46.0%
pow346.0%
cbrt-div46.0%
unpow346.0%
add-cbrt-cube54.5%
Applied egg-rr54.5%
Final simplification70.4%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 6.5e-5)
(* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t))
(*
2.0
(/
(/ (* (pow l 2.0) (cos k)) (pow k 2.0))
(* t (- 0.5 (/ (cos (* 2.0 k)) 2.0)))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.5e-5) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else {
tmp = 2.0 * (((pow(l, 2.0) * cos(k)) / pow(k, 2.0)) / (t * (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 <= 6.5d-5) then
tmp = 2.0d0 * (((l * (k ** (-2.0d0))) ** 2.0d0) / t)
else
tmp = 2.0d0 * ((((l ** 2.0d0) * cos(k)) / (k ** 2.0d0)) / (t * (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 <= 6.5e-5) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else {
tmp = 2.0 * (((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(k, 2.0)) / (t * (0.5 - (Math.cos((2.0 * k)) / 2.0))));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 6.5e-5: tmp = 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t) else: tmp = 2.0 * (((math.pow(l, 2.0) * math.cos(k)) / math.pow(k, 2.0)) / (t * (0.5 - (math.cos((2.0 * k)) / 2.0)))) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 6.5e-5) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); else tmp = Float64(2.0 * Float64(Float64(Float64((l ^ 2.0) * cos(k)) / (k ^ 2.0)) / Float64(t * 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 <= 6.5e-5) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); else tmp = 2.0 * ((((l ^ 2.0) * cos(k)) / (k ^ 2.0)) / (t * (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, 6.5e-5], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.5 \cdot 10^{-5}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2} \cdot \cos k}{{k}^{2}}}{t \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\\
\end{array}
\end{array}
if k < 6.49999999999999943e-5Initial program 29.6%
Simplified38.2%
Taylor expanded in k around 0 57.8%
associate-/r*57.9%
Simplified57.9%
expm1-log1p-u57.6%
expm1-udef55.7%
div-inv55.1%
pow-flip55.2%
metadata-eval55.2%
Applied egg-rr55.2%
expm1-def57.1%
expm1-log1p57.4%
Simplified57.4%
add-sqr-sqrt57.4%
pow257.4%
sqrt-prod57.4%
unpow257.4%
sqrt-prod35.9%
add-sqr-sqrt65.3%
metadata-eval65.3%
pow-prod-up65.3%
sqrt-prod71.5%
add-sqr-sqrt71.6%
Applied egg-rr71.6%
if 6.49999999999999943e-5 < k Initial program 32.6%
Simplified43.9%
Taylor expanded in t around 0 66.9%
associate-/r*70.3%
Simplified70.3%
unpow270.3%
sin-mult69.8%
Applied egg-rr69.8%
div-sub69.8%
+-inverses69.8%
cos-069.8%
metadata-eval69.8%
count-269.8%
Simplified69.8%
Final simplification71.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t 1.9e-209)
(* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t))
(if (<= t 4.1e+216)
(/ 2.0 (* (sin k) (* (tan k) (pow (* (/ k t) (/ (pow t 1.5) l)) 2.0))))
(/ 2.0 (pow (/ (* k (* (sin k) (sqrt t))) l) 2.0)))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= 1.9e-209) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else if (t <= 4.1e+216) {
tmp = 2.0 / (sin(k) * (tan(k) * pow(((k / t) * (pow(t, 1.5) / l)), 2.0)));
} else {
tmp = 2.0 / pow(((k * (sin(k) * sqrt(t))) / l), 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 <= 1.9d-209) then
tmp = 2.0d0 * (((l * (k ** (-2.0d0))) ** 2.0d0) / t)
else if (t <= 4.1d+216) then
tmp = 2.0d0 / (sin(k) * (tan(k) * (((k / t) * ((t ** 1.5d0) / l)) ** 2.0d0)))
else
tmp = 2.0d0 / (((k * (sin(k) * sqrt(t))) / l) ** 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 <= 1.9e-209) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else if (t <= 4.1e+216) {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * Math.pow(((k / t) * (Math.pow(t, 1.5) / l)), 2.0)));
} else {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) * Math.sqrt(t))) / l), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= 1.9e-209: tmp = 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t) elif t <= 4.1e+216: tmp = 2.0 / (math.sin(k) * (math.tan(k) * math.pow(((k / t) * (math.pow(t, 1.5) / l)), 2.0))) else: tmp = 2.0 / math.pow(((k * (math.sin(k) * math.sqrt(t))) / l), 2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= 1.9e-209) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); elseif (t <= 4.1e+216) tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * (Float64(Float64(k / t) * Float64((t ^ 1.5) / l)) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) * sqrt(t))) / l) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 1.9e-209) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); elseif (t <= 4.1e+216) tmp = 2.0 / (sin(k) * (tan(k) * (((k / t) * ((t ^ 1.5) / l)) ^ 2.0))); else tmp = 2.0 / (((k * (sin(k) * sqrt(t))) / l) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, 1.9e-209], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+216], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[N[(N[(k / t), $MachinePrecision] * N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.9 \cdot 10^{-209}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+216}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t} \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \left(\sin k \cdot \sqrt{t}\right)}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.8999999999999999e-209Initial program 26.0%
Simplified36.7%
Taylor expanded in k around 0 52.8%
associate-/r*53.5%
Simplified53.5%
expm1-log1p-u53.3%
expm1-udef50.9%
div-inv50.3%
pow-flip50.3%
metadata-eval50.3%
Applied egg-rr50.3%
expm1-def52.7%
expm1-log1p52.9%
Simplified52.9%
add-sqr-sqrt52.9%
pow252.9%
sqrt-prod52.9%
unpow252.9%
sqrt-prod35.1%
add-sqr-sqrt62.2%
metadata-eval62.2%
pow-prod-up62.2%
sqrt-prod67.9%
add-sqr-sqrt67.9%
Applied egg-rr67.9%
if 1.8999999999999999e-209 < t < 4.0999999999999998e216Initial program 42.1%
Simplified46.5%
associate-*l*46.5%
+-rgt-identity46.5%
*-commutative46.5%
associate-*r*46.5%
*-commutative46.5%
add-sqr-sqrt33.7%
pow233.7%
Applied egg-rr59.3%
expm1-log1p-u58.6%
expm1-udef51.9%
associate-*l*52.0%
unpow-prod-down52.0%
pow252.0%
add-sqr-sqrt64.2%
*-commutative64.2%
Applied egg-rr64.2%
expm1-def79.0%
expm1-log1p87.1%
associate-*l*87.1%
Simplified87.1%
if 4.0999999999999998e216 < t Initial program 26.3%
Simplified42.7%
associate-*l*42.7%
+-rgt-identity42.7%
*-commutative42.7%
associate-*r*42.7%
*-commutative42.7%
add-sqr-sqrt16.2%
pow216.2%
Applied egg-rr17.1%
Taylor expanded in k around inf 47.2%
associate-*l/47.4%
associate-*l*52.3%
Simplified52.3%
Taylor expanded in k around 0 66.8%
Final simplification73.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t 3.7e-209)
(* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t))
(if (<= t 4.1e+216)
(/ 2.0 (* (* (sin k) (tan k)) (pow (* (/ k t) (/ (pow t 1.5) l)) 2.0)))
(/ 2.0 (pow (/ (* k (* (sin k) (sqrt t))) l) 2.0)))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= 3.7e-209) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else if (t <= 4.1e+216) {
tmp = 2.0 / ((sin(k) * tan(k)) * pow(((k / t) * (pow(t, 1.5) / l)), 2.0));
} else {
tmp = 2.0 / pow(((k * (sin(k) * sqrt(t))) / l), 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 <= 3.7d-209) then
tmp = 2.0d0 * (((l * (k ** (-2.0d0))) ** 2.0d0) / t)
else if (t <= 4.1d+216) then
tmp = 2.0d0 / ((sin(k) * tan(k)) * (((k / t) * ((t ** 1.5d0) / l)) ** 2.0d0))
else
tmp = 2.0d0 / (((k * (sin(k) * sqrt(t))) / l) ** 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 <= 3.7e-209) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else if (t <= 4.1e+216) {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(((k / t) * (Math.pow(t, 1.5) / l)), 2.0));
} else {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) * Math.sqrt(t))) / l), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= 3.7e-209: tmp = 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t) elif t <= 4.1e+216: tmp = 2.0 / ((math.sin(k) * math.tan(k)) * math.pow(((k / t) * (math.pow(t, 1.5) / l)), 2.0)) else: tmp = 2.0 / math.pow(((k * (math.sin(k) * math.sqrt(t))) / l), 2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= 3.7e-209) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); elseif (t <= 4.1e+216) tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (Float64(Float64(k / t) * Float64((t ^ 1.5) / l)) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) * sqrt(t))) / l) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 3.7e-209) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); elseif (t <= 4.1e+216) tmp = 2.0 / ((sin(k) * tan(k)) * (((k / t) * ((t ^ 1.5) / l)) ^ 2.0)); else tmp = 2.0 / (((k * (sin(k) * sqrt(t))) / l) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, 3.7e-209], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+216], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k / t), $MachinePrecision] * N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.7 \cdot 10^{-209}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+216}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{t} \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \left(\sin k \cdot \sqrt{t}\right)}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.6999999999999998e-209Initial program 26.0%
Simplified36.7%
Taylor expanded in k around 0 52.8%
associate-/r*53.5%
Simplified53.5%
expm1-log1p-u53.3%
expm1-udef50.9%
div-inv50.3%
pow-flip50.3%
metadata-eval50.3%
Applied egg-rr50.3%
expm1-def52.7%
expm1-log1p52.9%
Simplified52.9%
add-sqr-sqrt52.9%
pow252.9%
sqrt-prod52.9%
unpow252.9%
sqrt-prod35.1%
add-sqr-sqrt62.2%
metadata-eval62.2%
pow-prod-up62.2%
sqrt-prod67.9%
add-sqr-sqrt67.9%
Applied egg-rr67.9%
if 3.6999999999999998e-209 < t < 4.0999999999999998e216Initial program 42.1%
Simplified46.5%
associate-*l*46.5%
+-rgt-identity46.5%
*-commutative46.5%
associate-*r*46.5%
*-commutative46.5%
add-sqr-sqrt33.7%
pow233.7%
Applied egg-rr59.3%
expm1-log1p-u58.6%
expm1-udef51.9%
associate-*l*52.0%
unpow-prod-down52.0%
pow252.0%
add-sqr-sqrt64.2%
*-commutative64.2%
Applied egg-rr64.2%
expm1-def79.0%
expm1-log1p87.1%
Simplified87.1%
if 4.0999999999999998e216 < t Initial program 26.3%
Simplified42.7%
associate-*l*42.7%
+-rgt-identity42.7%
*-commutative42.7%
associate-*r*42.7%
*-commutative42.7%
add-sqr-sqrt16.2%
pow216.2%
Applied egg-rr17.1%
Taylor expanded in k around inf 47.2%
associate-*l/47.4%
associate-*l*52.3%
Simplified52.3%
Taylor expanded in k around 0 66.8%
Final simplification73.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* l (pow k -2.0))))
(if (<= k 2.2e+17)
(* 2.0 (/ (pow t_1 2.0) t))
(if (<= k 5e+145)
(* 2.0 (pow (* (sqrt (/ t (cos k))) (* (sin k) (/ k l))) -2.0))
(* 2.0 (/ (pow (cbrt (pow t_1 3.0)) 2.0) t))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = l * pow(k, -2.0);
double tmp;
if (k <= 2.2e+17) {
tmp = 2.0 * (pow(t_1, 2.0) / t);
} else if (k <= 5e+145) {
tmp = 2.0 * pow((sqrt((t / cos(k))) * (sin(k) * (k / l))), -2.0);
} else {
tmp = 2.0 * (pow(cbrt(pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = l * Math.pow(k, -2.0);
double tmp;
if (k <= 2.2e+17) {
tmp = 2.0 * (Math.pow(t_1, 2.0) / t);
} else if (k <= 5e+145) {
tmp = 2.0 * Math.pow((Math.sqrt((t / Math.cos(k))) * (Math.sin(k) * (k / l))), -2.0);
} else {
tmp = 2.0 * (Math.pow(Math.cbrt(Math.pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = abs(l) function code(t, l, k) t_1 = Float64(l * (k ^ -2.0)) tmp = 0.0 if (k <= 2.2e+17) tmp = Float64(2.0 * Float64((t_1 ^ 2.0) / t)); elseif (k <= 5e+145) tmp = Float64(2.0 * (Float64(sqrt(Float64(t / cos(k))) * Float64(sin(k) * Float64(k / l))) ^ -2.0)); else tmp = Float64(2.0 * Float64((cbrt((t_1 ^ 3.0)) ^ 2.0) / t)); end return tmp end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2.2e+17], N[(2.0 * N[(N[Power[t$95$1, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5e+145], N[(2.0 * N[Power[N[(N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot {k}^{-2}\\
\mathbf{if}\;k \leq 2.2 \cdot 10^{+17}:\\
\;\;\;\;2 \cdot \frac{{t_1}^{2}}{t}\\
\mathbf{elif}\;k \leq 5 \cdot 10^{+145}:\\
\;\;\;\;2 \cdot {\left(\sqrt{\frac{t}{\cos k}} \cdot \left(\sin k \cdot \frac{k}{\ell}\right)\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\sqrt[3]{{t_1}^{3}}\right)}^{2}}{t}\\
\end{array}
\end{array}
if k < 2.2e17Initial program 29.6%
Simplified38.1%
Taylor expanded in k around 0 57.3%
associate-/r*57.4%
Simplified57.4%
expm1-log1p-u57.1%
expm1-udef54.9%
div-inv54.4%
pow-flip54.4%
metadata-eval54.4%
Applied egg-rr54.4%
expm1-def56.5%
expm1-log1p56.9%
Simplified56.9%
add-sqr-sqrt56.9%
pow256.9%
sqrt-prod56.9%
unpow256.9%
sqrt-prod35.6%
add-sqr-sqrt64.7%
metadata-eval64.7%
pow-prod-up64.7%
sqrt-prod70.8%
add-sqr-sqrt70.8%
Applied egg-rr70.8%
if 2.2e17 < k < 4.99999999999999967e145Initial program 26.1%
Simplified48.8%
associate-*l*48.8%
+-rgt-identity48.8%
*-commutative48.8%
associate-*r*48.7%
*-commutative48.7%
add-sqr-sqrt19.7%
pow219.7%
Applied egg-rr22.9%
Taylor expanded in k around inf 48.0%
associate-*l/48.2%
associate-*l*48.3%
Simplified48.3%
div-inv48.3%
pow-flip48.2%
associate-/l*48.0%
metadata-eval48.0%
Applied egg-rr48.0%
Taylor expanded in k around inf 48.0%
*-commutative48.0%
associate-*l/48.0%
*-commutative48.0%
Simplified48.0%
if 4.99999999999999967e145 < k Initial program 38.0%
Simplified40.7%
Taylor expanded in k around 0 54.8%
associate-/r*54.8%
Simplified54.8%
expm1-log1p-u54.8%
expm1-udef54.8%
div-inv54.8%
pow-flip54.8%
metadata-eval54.8%
Applied egg-rr54.8%
expm1-def54.8%
expm1-log1p54.8%
Simplified54.8%
add-sqr-sqrt54.8%
pow254.8%
sqrt-prod54.8%
unpow254.8%
sqrt-prod30.3%
add-sqr-sqrt58.3%
metadata-eval58.3%
pow-prod-up58.3%
sqrt-prod58.2%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
add-cbrt-cube58.3%
pow358.3%
Applied egg-rr58.3%
Final simplification66.2%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* l (pow k -2.0))))
(if (<= k 7.5e+16)
(* 2.0 (/ (pow t_1 2.0) t))
(if (<= k 3.1e+145)
(* 2.0 (pow (* (/ k l) (* (sin k) (sqrt (/ t (cos k))))) -2.0))
(* 2.0 (/ (pow (cbrt (pow t_1 3.0)) 2.0) t))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = l * pow(k, -2.0);
double tmp;
if (k <= 7.5e+16) {
tmp = 2.0 * (pow(t_1, 2.0) / t);
} else if (k <= 3.1e+145) {
tmp = 2.0 * pow(((k / l) * (sin(k) * sqrt((t / cos(k))))), -2.0);
} else {
tmp = 2.0 * (pow(cbrt(pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = l * Math.pow(k, -2.0);
double tmp;
if (k <= 7.5e+16) {
tmp = 2.0 * (Math.pow(t_1, 2.0) / t);
} else if (k <= 3.1e+145) {
tmp = 2.0 * Math.pow(((k / l) * (Math.sin(k) * Math.sqrt((t / Math.cos(k))))), -2.0);
} else {
tmp = 2.0 * (Math.pow(Math.cbrt(Math.pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = abs(l) function code(t, l, k) t_1 = Float64(l * (k ^ -2.0)) tmp = 0.0 if (k <= 7.5e+16) tmp = Float64(2.0 * Float64((t_1 ^ 2.0) / t)); elseif (k <= 3.1e+145) tmp = Float64(2.0 * (Float64(Float64(k / l) * Float64(sin(k) * sqrt(Float64(t / cos(k))))) ^ -2.0)); else tmp = Float64(2.0 * Float64((cbrt((t_1 ^ 3.0)) ^ 2.0) / t)); end return tmp end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 7.5e+16], N[(2.0 * N[(N[Power[t$95$1, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.1e+145], N[(2.0 * N[Power[N[(N[(k / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot {k}^{-2}\\
\mathbf{if}\;k \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;2 \cdot \frac{{t_1}^{2}}{t}\\
\mathbf{elif}\;k \leq 3.1 \cdot 10^{+145}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\ell} \cdot \left(\sin k \cdot \sqrt{\frac{t}{\cos k}}\right)\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\sqrt[3]{{t_1}^{3}}\right)}^{2}}{t}\\
\end{array}
\end{array}
if k < 7.5e16Initial program 29.6%
Simplified38.1%
Taylor expanded in k around 0 57.3%
associate-/r*57.4%
Simplified57.4%
expm1-log1p-u57.1%
expm1-udef54.9%
div-inv54.4%
pow-flip54.4%
metadata-eval54.4%
Applied egg-rr54.4%
expm1-def56.5%
expm1-log1p56.9%
Simplified56.9%
add-sqr-sqrt56.9%
pow256.9%
sqrt-prod56.9%
unpow256.9%
sqrt-prod35.6%
add-sqr-sqrt64.7%
metadata-eval64.7%
pow-prod-up64.7%
sqrt-prod70.8%
add-sqr-sqrt70.8%
Applied egg-rr70.8%
if 7.5e16 < k < 3.09999999999999988e145Initial program 26.1%
Simplified48.8%
associate-*l*48.8%
+-rgt-identity48.8%
*-commutative48.8%
associate-*r*48.7%
*-commutative48.7%
add-sqr-sqrt19.7%
pow219.7%
Applied egg-rr22.9%
Taylor expanded in k around inf 48.0%
associate-*l/48.2%
associate-*l*48.3%
Simplified48.3%
expm1-log1p-u47.6%
expm1-udef32.6%
div-inv32.6%
pow-flip32.6%
associate-/l*32.6%
metadata-eval32.6%
Applied egg-rr32.6%
expm1-def47.5%
expm1-log1p48.0%
associate-/r/48.1%
Simplified48.1%
if 3.09999999999999988e145 < k Initial program 38.0%
Simplified40.7%
Taylor expanded in k around 0 54.8%
associate-/r*54.8%
Simplified54.8%
expm1-log1p-u54.8%
expm1-udef54.8%
div-inv54.8%
pow-flip54.8%
metadata-eval54.8%
Applied egg-rr54.8%
expm1-def54.8%
expm1-log1p54.8%
Simplified54.8%
add-sqr-sqrt54.8%
pow254.8%
sqrt-prod54.8%
unpow254.8%
sqrt-prod30.3%
add-sqr-sqrt58.3%
metadata-eval58.3%
pow-prod-up58.3%
sqrt-prod58.2%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
add-cbrt-cube58.3%
pow358.3%
Applied egg-rr58.3%
Final simplification66.2%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* l (pow k -2.0))))
(if (<= k 2e+17)
(* 2.0 (/ (pow t_1 2.0) t))
(if (<= k 8.5e+145)
(* 2.0 (pow (/ k (* (/ l (sin k)) (sqrt (/ (cos k) t)))) -2.0))
(* 2.0 (/ (pow (cbrt (pow t_1 3.0)) 2.0) t))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = l * pow(k, -2.0);
double tmp;
if (k <= 2e+17) {
tmp = 2.0 * (pow(t_1, 2.0) / t);
} else if (k <= 8.5e+145) {
tmp = 2.0 * pow((k / ((l / sin(k)) * sqrt((cos(k) / t)))), -2.0);
} else {
tmp = 2.0 * (pow(cbrt(pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = l * Math.pow(k, -2.0);
double tmp;
if (k <= 2e+17) {
tmp = 2.0 * (Math.pow(t_1, 2.0) / t);
} else if (k <= 8.5e+145) {
tmp = 2.0 * Math.pow((k / ((l / Math.sin(k)) * Math.sqrt((Math.cos(k) / t)))), -2.0);
} else {
tmp = 2.0 * (Math.pow(Math.cbrt(Math.pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = abs(l) function code(t, l, k) t_1 = Float64(l * (k ^ -2.0)) tmp = 0.0 if (k <= 2e+17) tmp = Float64(2.0 * Float64((t_1 ^ 2.0) / t)); elseif (k <= 8.5e+145) tmp = Float64(2.0 * (Float64(k / Float64(Float64(l / sin(k)) * sqrt(Float64(cos(k) / t)))) ^ -2.0)); else tmp = Float64(2.0 * Float64((cbrt((t_1 ^ 3.0)) ^ 2.0) / t)); end return tmp end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2e+17], N[(2.0 * N[(N[Power[t$95$1, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.5e+145], N[(2.0 * N[Power[N[(k / N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot {k}^{-2}\\
\mathbf{if}\;k \leq 2 \cdot 10^{+17}:\\
\;\;\;\;2 \cdot \frac{{t_1}^{2}}{t}\\
\mathbf{elif}\;k \leq 8.5 \cdot 10^{+145}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\frac{\ell}{\sin k} \cdot \sqrt{\frac{\cos k}{t}}}\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\sqrt[3]{{t_1}^{3}}\right)}^{2}}{t}\\
\end{array}
\end{array}
if k < 2e17Initial program 29.6%
Simplified38.1%
Taylor expanded in k around 0 57.3%
associate-/r*57.4%
Simplified57.4%
expm1-log1p-u57.1%
expm1-udef54.9%
div-inv54.4%
pow-flip54.4%
metadata-eval54.4%
Applied egg-rr54.4%
expm1-def56.5%
expm1-log1p56.9%
Simplified56.9%
add-sqr-sqrt56.9%
pow256.9%
sqrt-prod56.9%
unpow256.9%
sqrt-prod35.6%
add-sqr-sqrt64.7%
metadata-eval64.7%
pow-prod-up64.7%
sqrt-prod70.8%
add-sqr-sqrt70.8%
Applied egg-rr70.8%
if 2e17 < k < 8.49999999999999977e145Initial program 26.1%
Simplified48.8%
associate-*l*48.8%
+-rgt-identity48.8%
*-commutative48.8%
associate-*r*48.7%
*-commutative48.7%
add-sqr-sqrt19.7%
pow219.7%
Applied egg-rr22.9%
Taylor expanded in k around inf 48.0%
associate-*l/48.2%
associate-*l*48.3%
Simplified48.3%
div-inv48.3%
pow-flip48.2%
associate-/l*48.0%
metadata-eval48.0%
Applied egg-rr48.0%
Taylor expanded in l around 0 48.0%
if 8.49999999999999977e145 < k Initial program 38.0%
Simplified40.7%
Taylor expanded in k around 0 54.8%
associate-/r*54.8%
Simplified54.8%
expm1-log1p-u54.8%
expm1-udef54.8%
div-inv54.8%
pow-flip54.8%
metadata-eval54.8%
Applied egg-rr54.8%
expm1-def54.8%
expm1-log1p54.8%
Simplified54.8%
add-sqr-sqrt54.8%
pow254.8%
sqrt-prod54.8%
unpow254.8%
sqrt-prod30.3%
add-sqr-sqrt58.3%
metadata-eval58.3%
pow-prod-up58.3%
sqrt-prod58.2%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
add-cbrt-cube58.3%
pow358.3%
Applied egg-rr58.3%
Final simplification66.2%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* l (pow k -2.0))))
(if (<= k 2.2e+17)
(* 2.0 (/ (pow t_1 2.0) t))
(if (<= k 1.4e+146)
(* 2.0 (pow (/ k (/ l (* (sin k) (sqrt (/ t (cos k)))))) -2.0))
(* 2.0 (/ (pow (cbrt (pow t_1 3.0)) 2.0) t))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = l * pow(k, -2.0);
double tmp;
if (k <= 2.2e+17) {
tmp = 2.0 * (pow(t_1, 2.0) / t);
} else if (k <= 1.4e+146) {
tmp = 2.0 * pow((k / (l / (sin(k) * sqrt((t / cos(k)))))), -2.0);
} else {
tmp = 2.0 * (pow(cbrt(pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = l * Math.pow(k, -2.0);
double tmp;
if (k <= 2.2e+17) {
tmp = 2.0 * (Math.pow(t_1, 2.0) / t);
} else if (k <= 1.4e+146) {
tmp = 2.0 * Math.pow((k / (l / (Math.sin(k) * Math.sqrt((t / Math.cos(k)))))), -2.0);
} else {
tmp = 2.0 * (Math.pow(Math.cbrt(Math.pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = abs(l) function code(t, l, k) t_1 = Float64(l * (k ^ -2.0)) tmp = 0.0 if (k <= 2.2e+17) tmp = Float64(2.0 * Float64((t_1 ^ 2.0) / t)); elseif (k <= 1.4e+146) tmp = Float64(2.0 * (Float64(k / Float64(l / Float64(sin(k) * sqrt(Float64(t / cos(k)))))) ^ -2.0)); else tmp = Float64(2.0 * Float64((cbrt((t_1 ^ 3.0)) ^ 2.0) / t)); end return tmp end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2.2e+17], N[(2.0 * N[(N[Power[t$95$1, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.4e+146], N[(2.0 * N[Power[N[(k / N[(l / N[(N[Sin[k], $MachinePrecision] * N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot {k}^{-2}\\
\mathbf{if}\;k \leq 2.2 \cdot 10^{+17}:\\
\;\;\;\;2 \cdot \frac{{t_1}^{2}}{t}\\
\mathbf{elif}\;k \leq 1.4 \cdot 10^{+146}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\frac{\ell}{\sin k \cdot \sqrt{\frac{t}{\cos k}}}}\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\sqrt[3]{{t_1}^{3}}\right)}^{2}}{t}\\
\end{array}
\end{array}
if k < 2.2e17Initial program 29.6%
Simplified38.1%
Taylor expanded in k around 0 57.3%
associate-/r*57.4%
Simplified57.4%
expm1-log1p-u57.1%
expm1-udef54.9%
div-inv54.4%
pow-flip54.4%
metadata-eval54.4%
Applied egg-rr54.4%
expm1-def56.5%
expm1-log1p56.9%
Simplified56.9%
add-sqr-sqrt56.9%
pow256.9%
sqrt-prod56.9%
unpow256.9%
sqrt-prod35.6%
add-sqr-sqrt64.7%
metadata-eval64.7%
pow-prod-up64.7%
sqrt-prod70.8%
add-sqr-sqrt70.8%
Applied egg-rr70.8%
if 2.2e17 < k < 1.4e146Initial program 26.1%
Simplified48.8%
associate-*l*48.8%
+-rgt-identity48.8%
*-commutative48.8%
associate-*r*48.7%
*-commutative48.7%
add-sqr-sqrt19.7%
pow219.7%
Applied egg-rr22.9%
Taylor expanded in k around inf 48.0%
associate-*l/48.2%
associate-*l*48.3%
Simplified48.3%
div-inv48.3%
pow-flip48.2%
associate-/l*48.0%
metadata-eval48.0%
Applied egg-rr48.0%
if 1.4e146 < k Initial program 38.0%
Simplified40.7%
Taylor expanded in k around 0 54.8%
associate-/r*54.8%
Simplified54.8%
expm1-log1p-u54.8%
expm1-udef54.8%
div-inv54.8%
pow-flip54.8%
metadata-eval54.8%
Applied egg-rr54.8%
expm1-def54.8%
expm1-log1p54.8%
Simplified54.8%
add-sqr-sqrt54.8%
pow254.8%
sqrt-prod54.8%
unpow254.8%
sqrt-prod30.3%
add-sqr-sqrt58.3%
metadata-eval58.3%
pow-prod-up58.3%
sqrt-prod58.2%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
add-cbrt-cube58.3%
pow358.3%
Applied egg-rr58.3%
Final simplification66.2%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* l (pow k -2.0))))
(if (<= k 2e+17)
(* 2.0 (/ (pow t_1 2.0) t))
(if (<= k 2.9e+147)
(/ 2.0 (pow (/ (* k (* (sin k) (sqrt (/ t (cos k))))) l) 2.0))
(* 2.0 (/ (pow (cbrt (pow t_1 3.0)) 2.0) t))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = l * pow(k, -2.0);
double tmp;
if (k <= 2e+17) {
tmp = 2.0 * (pow(t_1, 2.0) / t);
} else if (k <= 2.9e+147) {
tmp = 2.0 / pow(((k * (sin(k) * sqrt((t / cos(k))))) / l), 2.0);
} else {
tmp = 2.0 * (pow(cbrt(pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = l * Math.pow(k, -2.0);
double tmp;
if (k <= 2e+17) {
tmp = 2.0 * (Math.pow(t_1, 2.0) / t);
} else if (k <= 2.9e+147) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) * Math.sqrt((t / Math.cos(k))))) / l), 2.0);
} else {
tmp = 2.0 * (Math.pow(Math.cbrt(Math.pow(t_1, 3.0)), 2.0) / t);
}
return tmp;
}
l = abs(l) function code(t, l, k) t_1 = Float64(l * (k ^ -2.0)) tmp = 0.0 if (k <= 2e+17) tmp = Float64(2.0 * Float64((t_1 ^ 2.0) / t)); elseif (k <= 2.9e+147) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) * sqrt(Float64(t / cos(k))))) / l) ^ 2.0)); else tmp = Float64(2.0 * Float64((cbrt((t_1 ^ 3.0)) ^ 2.0) / t)); end return tmp end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2e+17], N[(2.0 * N[(N[Power[t$95$1, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.9e+147], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot {k}^{-2}\\
\mathbf{if}\;k \leq 2 \cdot 10^{+17}:\\
\;\;\;\;2 \cdot \frac{{t_1}^{2}}{t}\\
\mathbf{elif}\;k \leq 2.9 \cdot 10^{+147}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \left(\sin k \cdot \sqrt{\frac{t}{\cos k}}\right)}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\sqrt[3]{{t_1}^{3}}\right)}^{2}}{t}\\
\end{array}
\end{array}
if k < 2e17Initial program 29.6%
Simplified38.1%
Taylor expanded in k around 0 57.3%
associate-/r*57.4%
Simplified57.4%
expm1-log1p-u57.1%
expm1-udef54.9%
div-inv54.4%
pow-flip54.4%
metadata-eval54.4%
Applied egg-rr54.4%
expm1-def56.5%
expm1-log1p56.9%
Simplified56.9%
add-sqr-sqrt56.9%
pow256.9%
sqrt-prod56.9%
unpow256.9%
sqrt-prod35.6%
add-sqr-sqrt64.7%
metadata-eval64.7%
pow-prod-up64.7%
sqrt-prod70.8%
add-sqr-sqrt70.8%
Applied egg-rr70.8%
if 2e17 < k < 2.8999999999999998e147Initial program 26.1%
Simplified48.8%
associate-*l*48.8%
+-rgt-identity48.8%
*-commutative48.8%
associate-*r*48.7%
*-commutative48.7%
add-sqr-sqrt19.7%
pow219.7%
Applied egg-rr22.9%
Taylor expanded in k around inf 48.0%
associate-*l/48.2%
associate-*l*48.3%
Simplified48.3%
if 2.8999999999999998e147 < k Initial program 38.0%
Simplified40.7%
Taylor expanded in k around 0 54.8%
associate-/r*54.8%
Simplified54.8%
expm1-log1p-u54.8%
expm1-udef54.8%
div-inv54.8%
pow-flip54.8%
metadata-eval54.8%
Applied egg-rr54.8%
expm1-def54.8%
expm1-log1p54.8%
Simplified54.8%
add-sqr-sqrt54.8%
pow254.8%
sqrt-prod54.8%
unpow254.8%
sqrt-prod30.3%
add-sqr-sqrt58.3%
metadata-eval58.3%
pow-prod-up58.3%
sqrt-prod58.2%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
add-cbrt-cube58.3%
pow358.3%
Applied egg-rr58.3%
Final simplification66.3%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t 7.2e-297)
(* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t))
(if (<= t 9.2e-99)
(/ 2.0 (pow (/ (* k (* (sin k) (sqrt t))) l) 2.0))
(if (<= t 1.45e+81)
(/
(/ 2.0 (* (tan k) (* (/ (sin k) l) (/ (pow t 3.0) l))))
(* (/ k t) (/ k t)))
(* 2.0 (pow (/ k (* (/ l k) (sqrt (/ 1.0 t)))) -2.0))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= 7.2e-297) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else if (t <= 9.2e-99) {
tmp = 2.0 / pow(((k * (sin(k) * sqrt(t))) / l), 2.0);
} else if (t <= 1.45e+81) {
tmp = (2.0 / (tan(k) * ((sin(k) / l) * (pow(t, 3.0) / l)))) / ((k / t) * (k / t));
} else {
tmp = 2.0 * pow((k / ((l / k) * sqrt((1.0 / 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 <= 7.2d-297) then
tmp = 2.0d0 * (((l * (k ** (-2.0d0))) ** 2.0d0) / t)
else if (t <= 9.2d-99) then
tmp = 2.0d0 / (((k * (sin(k) * sqrt(t))) / l) ** 2.0d0)
else if (t <= 1.45d+81) then
tmp = (2.0d0 / (tan(k) * ((sin(k) / l) * ((t ** 3.0d0) / l)))) / ((k / t) * (k / t))
else
tmp = 2.0d0 * ((k / ((l / k) * sqrt((1.0d0 / 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 <= 7.2e-297) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else if (t <= 9.2e-99) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) * Math.sqrt(t))) / l), 2.0);
} else if (t <= 1.45e+81) {
tmp = (2.0 / (Math.tan(k) * ((Math.sin(k) / l) * (Math.pow(t, 3.0) / l)))) / ((k / t) * (k / t));
} else {
tmp = 2.0 * Math.pow((k / ((l / k) * Math.sqrt((1.0 / t)))), -2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= 7.2e-297: tmp = 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t) elif t <= 9.2e-99: tmp = 2.0 / math.pow(((k * (math.sin(k) * math.sqrt(t))) / l), 2.0) elif t <= 1.45e+81: tmp = (2.0 / (math.tan(k) * ((math.sin(k) / l) * (math.pow(t, 3.0) / l)))) / ((k / t) * (k / t)) else: tmp = 2.0 * math.pow((k / ((l / k) * math.sqrt((1.0 / t)))), -2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= 7.2e-297) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); elseif (t <= 9.2e-99) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) * sqrt(t))) / l) ^ 2.0)); elseif (t <= 1.45e+81) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(Float64(sin(k) / l) * Float64((t ^ 3.0) / l)))) / Float64(Float64(k / t) * Float64(k / t))); else tmp = Float64(2.0 * (Float64(k / Float64(Float64(l / k) * sqrt(Float64(1.0 / t)))) ^ -2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 7.2e-297) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); elseif (t <= 9.2e-99) tmp = 2.0 / (((k * (sin(k) * sqrt(t))) / l) ^ 2.0); elseif (t <= 1.45e+81) tmp = (2.0 / (tan(k) * ((sin(k) / l) * ((t ^ 3.0) / l)))) / ((k / t) * (k / t)); else tmp = 2.0 * ((k / ((l / k) * sqrt((1.0 / t)))) ^ -2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, 7.2e-297], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e-99], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+81], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(k / N[(N[(l / k), $MachinePrecision] * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.2 \cdot 10^{-297}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \left(\sin k \cdot \sqrt{t}\right)}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+81}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(\frac{\sin k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}}{\frac{k}{t} \cdot \frac{k}{t}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\frac{\ell}{k} \cdot \sqrt{\frac{1}{t}}}\right)}^{-2}\\
\end{array}
\end{array}
if t < 7.19999999999999988e-297Initial program 27.3%
Simplified39.0%
Taylor expanded in k around 0 53.1%
associate-/r*53.8%
Simplified53.8%
expm1-log1p-u53.6%
expm1-udef51.6%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
Applied egg-rr51.0%
expm1-def53.0%
expm1-log1p53.2%
Simplified53.2%
add-sqr-sqrt53.2%
pow253.2%
sqrt-prod53.2%
unpow253.2%
sqrt-prod37.0%
add-sqr-sqrt62.7%
metadata-eval62.7%
pow-prod-up62.7%
sqrt-prod69.0%
add-sqr-sqrt69.0%
Applied egg-rr69.0%
if 7.19999999999999988e-297 < t < 9.1999999999999994e-99Initial program 21.0%
Simplified21.0%
associate-*l*21.0%
+-rgt-identity21.0%
*-commutative21.0%
associate-*r*21.0%
*-commutative21.0%
add-sqr-sqrt21.0%
pow221.0%
Applied egg-rr57.9%
Taylor expanded in k around inf 71.5%
associate-*l/71.5%
associate-*l*71.6%
Simplified71.6%
Taylor expanded in k around 0 79.7%
if 9.1999999999999994e-99 < t < 1.45e81Initial program 63.5%
associate-/r*61.2%
associate-*l/61.2%
associate--l+61.2%
Simplified61.2%
times-frac65.1%
Applied egg-rr65.1%
+-commutative65.1%
associate-+l-72.6%
metadata-eval72.6%
--rgt-identity72.6%
unpow272.6%
Applied egg-rr72.6%
if 1.45e81 < t Initial program 29.7%
Simplified41.4%
associate-*l*41.4%
+-rgt-identity41.4%
*-commutative41.4%
associate-*r*41.4%
*-commutative41.4%
add-sqr-sqrt23.0%
pow223.0%
Applied egg-rr37.0%
Taylor expanded in k around inf 56.5%
associate-*l/54.5%
associate-*l*56.8%
Simplified56.8%
div-inv56.8%
pow-flip56.8%
associate-/l*60.9%
metadata-eval60.9%
Applied egg-rr60.9%
Taylor expanded in k around 0 65.0%
Final simplification70.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t 1.8e-296)
(* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t))
(if (<= t 6.2e-104)
(/ 2.0 (pow (/ (* k (* (sin k) (sqrt t))) l) 2.0))
(if (<= t 7.8e+85)
(/
(/ 2.0 (* (tan k) (* (/ (sin k) l) (/ (pow t 3.0) l))))
(/ k (* t (/ t k))))
(* 2.0 (pow (/ k (* (/ l k) (sqrt (/ 1.0 t)))) -2.0))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= 1.8e-296) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else if (t <= 6.2e-104) {
tmp = 2.0 / pow(((k * (sin(k) * sqrt(t))) / l), 2.0);
} else if (t <= 7.8e+85) {
tmp = (2.0 / (tan(k) * ((sin(k) / l) * (pow(t, 3.0) / l)))) / (k / (t * (t / k)));
} else {
tmp = 2.0 * pow((k / ((l / k) * sqrt((1.0 / 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 <= 1.8d-296) then
tmp = 2.0d0 * (((l * (k ** (-2.0d0))) ** 2.0d0) / t)
else if (t <= 6.2d-104) then
tmp = 2.0d0 / (((k * (sin(k) * sqrt(t))) / l) ** 2.0d0)
else if (t <= 7.8d+85) then
tmp = (2.0d0 / (tan(k) * ((sin(k) / l) * ((t ** 3.0d0) / l)))) / (k / (t * (t / k)))
else
tmp = 2.0d0 * ((k / ((l / k) * sqrt((1.0d0 / 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 <= 1.8e-296) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else if (t <= 6.2e-104) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) * Math.sqrt(t))) / l), 2.0);
} else if (t <= 7.8e+85) {
tmp = (2.0 / (Math.tan(k) * ((Math.sin(k) / l) * (Math.pow(t, 3.0) / l)))) / (k / (t * (t / k)));
} else {
tmp = 2.0 * Math.pow((k / ((l / k) * Math.sqrt((1.0 / t)))), -2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= 1.8e-296: tmp = 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t) elif t <= 6.2e-104: tmp = 2.0 / math.pow(((k * (math.sin(k) * math.sqrt(t))) / l), 2.0) elif t <= 7.8e+85: tmp = (2.0 / (math.tan(k) * ((math.sin(k) / l) * (math.pow(t, 3.0) / l)))) / (k / (t * (t / k))) else: tmp = 2.0 * math.pow((k / ((l / k) * math.sqrt((1.0 / t)))), -2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= 1.8e-296) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); elseif (t <= 6.2e-104) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) * sqrt(t))) / l) ^ 2.0)); elseif (t <= 7.8e+85) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(Float64(sin(k) / l) * Float64((t ^ 3.0) / l)))) / Float64(k / Float64(t * Float64(t / k)))); else tmp = Float64(2.0 * (Float64(k / Float64(Float64(l / k) * sqrt(Float64(1.0 / t)))) ^ -2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 1.8e-296) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); elseif (t <= 6.2e-104) tmp = 2.0 / (((k * (sin(k) * sqrt(t))) / l) ^ 2.0); elseif (t <= 7.8e+85) tmp = (2.0 / (tan(k) * ((sin(k) / l) * ((t ^ 3.0) / l)))) / (k / (t * (t / k))); else tmp = 2.0 * ((k / ((l / k) * sqrt((1.0 / t)))) ^ -2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, 1.8e-296], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-104], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+85], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / N[(t * N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(k / N[(N[(l / k), $MachinePrecision] * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.8 \cdot 10^{-296}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \left(\sin k \cdot \sqrt{t}\right)}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+85}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(\frac{\sin k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}}{\frac{k}{t \cdot \frac{t}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\frac{\ell}{k} \cdot \sqrt{\frac{1}{t}}}\right)}^{-2}\\
\end{array}
\end{array}
if t < 1.7999999999999999e-296Initial program 27.3%
Simplified39.0%
Taylor expanded in k around 0 53.1%
associate-/r*53.8%
Simplified53.8%
expm1-log1p-u53.6%
expm1-udef51.6%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
Applied egg-rr51.0%
expm1-def53.0%
expm1-log1p53.2%
Simplified53.2%
add-sqr-sqrt53.2%
pow253.2%
sqrt-prod53.2%
unpow253.2%
sqrt-prod37.0%
add-sqr-sqrt62.7%
metadata-eval62.7%
pow-prod-up62.7%
sqrt-prod69.0%
add-sqr-sqrt69.0%
Applied egg-rr69.0%
if 1.7999999999999999e-296 < t < 6.19999999999999951e-104Initial program 21.4%
Simplified21.4%
associate-*l*21.4%
+-rgt-identity21.4%
*-commutative21.4%
associate-*r*21.4%
*-commutative21.4%
add-sqr-sqrt21.4%
pow221.4%
Applied egg-rr56.7%
Taylor expanded in k around inf 70.6%
associate-*l/70.6%
associate-*l*70.7%
Simplified70.7%
Taylor expanded in k around 0 79.1%
if 6.19999999999999951e-104 < t < 7.80000000000000067e85Initial program 61.4%
associate-/r*59.2%
associate-*l/59.2%
associate--l+59.2%
Simplified59.2%
times-frac66.4%
Applied egg-rr66.4%
+-commutative66.4%
associate-+l-73.6%
metadata-eval73.6%
--rgt-identity73.6%
unpow273.6%
clear-num73.6%
frac-times73.7%
*-un-lft-identity73.7%
Applied egg-rr73.7%
if 7.80000000000000067e85 < t Initial program 29.7%
Simplified41.4%
associate-*l*41.4%
+-rgt-identity41.4%
*-commutative41.4%
associate-*r*41.4%
*-commutative41.4%
add-sqr-sqrt23.0%
pow223.0%
Applied egg-rr37.0%
Taylor expanded in k around inf 56.5%
associate-*l/54.5%
associate-*l*56.8%
Simplified56.8%
div-inv56.8%
pow-flip56.8%
associate-/l*60.9%
metadata-eval60.9%
Applied egg-rr60.9%
Taylor expanded in k around 0 65.0%
Final simplification70.1%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t 5.4e-297)
(* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t))
(if (<= t 3.3e-99)
(/ 2.0 (pow (/ (* k (* (sin k) (sqrt t))) l) 2.0))
(if (<= t 4.2e+84)
(/
(/ 2.0 (* (tan k) (/ (/ (* (sin k) (pow t 3.0)) l) l)))
(* (/ k t) (/ k t)))
(* 2.0 (pow (/ k (* (/ l k) (sqrt (/ 1.0 t)))) -2.0))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= 5.4e-297) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else if (t <= 3.3e-99) {
tmp = 2.0 / pow(((k * (sin(k) * sqrt(t))) / l), 2.0);
} else if (t <= 4.2e+84) {
tmp = (2.0 / (tan(k) * (((sin(k) * pow(t, 3.0)) / l) / l))) / ((k / t) * (k / t));
} else {
tmp = 2.0 * pow((k / ((l / k) * sqrt((1.0 / 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 <= 5.4d-297) then
tmp = 2.0d0 * (((l * (k ** (-2.0d0))) ** 2.0d0) / t)
else if (t <= 3.3d-99) then
tmp = 2.0d0 / (((k * (sin(k) * sqrt(t))) / l) ** 2.0d0)
else if (t <= 4.2d+84) then
tmp = (2.0d0 / (tan(k) * (((sin(k) * (t ** 3.0d0)) / l) / l))) / ((k / t) * (k / t))
else
tmp = 2.0d0 * ((k / ((l / k) * sqrt((1.0d0 / 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 <= 5.4e-297) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else if (t <= 3.3e-99) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) * Math.sqrt(t))) / l), 2.0);
} else if (t <= 4.2e+84) {
tmp = (2.0 / (Math.tan(k) * (((Math.sin(k) * Math.pow(t, 3.0)) / l) / l))) / ((k / t) * (k / t));
} else {
tmp = 2.0 * Math.pow((k / ((l / k) * Math.sqrt((1.0 / t)))), -2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= 5.4e-297: tmp = 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t) elif t <= 3.3e-99: tmp = 2.0 / math.pow(((k * (math.sin(k) * math.sqrt(t))) / l), 2.0) elif t <= 4.2e+84: tmp = (2.0 / (math.tan(k) * (((math.sin(k) * math.pow(t, 3.0)) / l) / l))) / ((k / t) * (k / t)) else: tmp = 2.0 * math.pow((k / ((l / k) * math.sqrt((1.0 / t)))), -2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= 5.4e-297) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); elseif (t <= 3.3e-99) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) * sqrt(t))) / l) ^ 2.0)); elseif (t <= 4.2e+84) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(Float64(Float64(sin(k) * (t ^ 3.0)) / l) / l))) / Float64(Float64(k / t) * Float64(k / t))); else tmp = Float64(2.0 * (Float64(k / Float64(Float64(l / k) * sqrt(Float64(1.0 / t)))) ^ -2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 5.4e-297) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); elseif (t <= 3.3e-99) tmp = 2.0 / (((k * (sin(k) * sqrt(t))) / l) ^ 2.0); elseif (t <= 4.2e+84) tmp = (2.0 / (tan(k) * (((sin(k) * (t ^ 3.0)) / l) / l))) / ((k / t) * (k / t)); else tmp = 2.0 * ((k / ((l / k) * sqrt((1.0 / t)))) ^ -2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, 5.4e-297], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-99], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+84], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(k / N[(N[(l / k), $MachinePrecision] * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.4 \cdot 10^{-297}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \left(\sin k \cdot \sqrt{t}\right)}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+84}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \frac{\frac{\sin k \cdot {t}^{3}}{\ell}}{\ell}}}{\frac{k}{t} \cdot \frac{k}{t}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\frac{\ell}{k} \cdot \sqrt{\frac{1}{t}}}\right)}^{-2}\\
\end{array}
\end{array}
if t < 5.4000000000000002e-297Initial program 27.3%
Simplified39.0%
Taylor expanded in k around 0 53.1%
associate-/r*53.8%
Simplified53.8%
expm1-log1p-u53.6%
expm1-udef51.6%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
Applied egg-rr51.0%
expm1-def53.0%
expm1-log1p53.2%
Simplified53.2%
add-sqr-sqrt53.2%
pow253.2%
sqrt-prod53.2%
unpow253.2%
sqrt-prod37.0%
add-sqr-sqrt62.7%
metadata-eval62.7%
pow-prod-up62.7%
sqrt-prod69.0%
add-sqr-sqrt69.0%
Applied egg-rr69.0%
if 5.4000000000000002e-297 < t < 3.29999999999999986e-99Initial program 21.0%
Simplified21.0%
associate-*l*21.0%
+-rgt-identity21.0%
*-commutative21.0%
associate-*r*21.0%
*-commutative21.0%
add-sqr-sqrt21.0%
pow221.0%
Applied egg-rr57.9%
Taylor expanded in k around inf 71.5%
associate-*l/71.5%
associate-*l*71.6%
Simplified71.6%
Taylor expanded in k around 0 79.7%
if 3.29999999999999986e-99 < t < 4.20000000000000037e84Initial program 63.5%
associate-/r*61.2%
associate-*l/61.2%
associate--l+61.2%
Simplified61.2%
times-frac65.1%
Applied egg-rr65.1%
+-commutative65.1%
associate-+l-72.6%
metadata-eval72.6%
--rgt-identity72.6%
unpow272.6%
Applied egg-rr72.6%
frac-times65.1%
associate-/r*72.7%
*-commutative72.7%
Applied egg-rr72.7%
if 4.20000000000000037e84 < t Initial program 29.7%
Simplified41.4%
associate-*l*41.4%
+-rgt-identity41.4%
*-commutative41.4%
associate-*r*41.4%
*-commutative41.4%
add-sqr-sqrt23.0%
pow223.0%
Applied egg-rr37.0%
Taylor expanded in k around inf 56.5%
associate-*l/54.5%
associate-*l*56.8%
Simplified56.8%
div-inv56.8%
pow-flip56.8%
associate-/l*60.9%
metadata-eval60.9%
Applied egg-rr60.9%
Taylor expanded in k around 0 65.0%
Final simplification70.1%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= t 6.5e-297) (* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t)) (/ 2.0 (pow (/ (* k (* (sin k) (sqrt t))) l) 2.0))))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (t <= 6.5e-297) {
tmp = 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
} else {
tmp = 2.0 / pow(((k * (sin(k) * sqrt(t))) / l), 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 <= 6.5d-297) then
tmp = 2.0d0 * (((l * (k ** (-2.0d0))) ** 2.0d0) / t)
else
tmp = 2.0d0 / (((k * (sin(k) * sqrt(t))) / l) ** 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 <= 6.5e-297) {
tmp = 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
} else {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) * Math.sqrt(t))) / l), 2.0);
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if t <= 6.5e-297: tmp = 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t) else: tmp = 2.0 / math.pow(((k * (math.sin(k) * math.sqrt(t))) / l), 2.0) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (t <= 6.5e-297) tmp = Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)); else tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) * sqrt(t))) / l) ^ 2.0)); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 6.5e-297) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); else tmp = 2.0 / (((k * (sin(k) * sqrt(t))) / l) ^ 2.0); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, 6.5e-297], N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.5 \cdot 10^{-297}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \left(\sin k \cdot \sqrt{t}\right)}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 6.5000000000000002e-297Initial program 27.3%
Simplified39.0%
Taylor expanded in k around 0 53.1%
associate-/r*53.8%
Simplified53.8%
expm1-log1p-u53.6%
expm1-udef51.6%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
Applied egg-rr51.0%
expm1-def53.0%
expm1-log1p53.2%
Simplified53.2%
add-sqr-sqrt53.2%
pow253.2%
sqrt-prod53.2%
unpow253.2%
sqrt-prod37.0%
add-sqr-sqrt62.7%
metadata-eval62.7%
pow-prod-up62.7%
sqrt-prod69.0%
add-sqr-sqrt69.0%
Applied egg-rr69.0%
if 6.5000000000000002e-297 < t Initial program 35.0%
Simplified41.0%
associate-*l*41.0%
+-rgt-identity41.0%
*-commutative41.0%
associate-*r*41.0%
*-commutative41.0%
add-sqr-sqrt27.5%
pow227.5%
Applied egg-rr48.4%
Taylor expanded in k around inf 61.2%
associate-*l/59.5%
associate-*l*60.5%
Simplified60.5%
Taylor expanded in k around 0 66.6%
Final simplification68.0%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (* (pow l 2.0) (pow k -4.0)) t)))
l = abs(l);
double code(double t, double l, double k) {
return 2.0 * ((pow(l, 2.0) * pow(k, -4.0)) / t);
}
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) * (k ** (-4.0d0))) / t)
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return 2.0 * ((Math.pow(l, 2.0) * Math.pow(k, -4.0)) / t);
}
l = abs(l) def code(t, l, k): return 2.0 * ((math.pow(l, 2.0) * math.pow(k, -4.0)) / t)
l = abs(l) function code(t, l, k) return Float64(2.0 * Float64(Float64((l ^ 2.0) * (k ^ -4.0)) / t)) end
l = abs(l) function tmp = code(t, l, k) tmp = 2.0 * (((l ^ 2.0) * (k ^ -4.0)) / t); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t}
\end{array}
Initial program 30.4%
Simplified39.8%
Taylor expanded in k around 0 54.6%
associate-/r*54.7%
Simplified54.7%
expm1-log1p-u54.4%
expm1-udef52.8%
div-inv52.4%
pow-flip52.5%
metadata-eval52.5%
Applied egg-rr52.5%
expm1-def54.0%
expm1-log1p54.3%
Simplified54.3%
Final simplification54.3%
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(Float64((l ^ 2.0) / 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[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}
\end{array}
Initial program 30.4%
Simplified39.8%
Taylor expanded in t around 0 67.6%
*-commutative67.6%
times-frac71.3%
Simplified71.3%
associate-*l/71.3%
div-inv70.9%
pow-flip71.1%
metadata-eval71.1%
Applied egg-rr71.1%
Taylor expanded in k around 0 54.6%
*-commutative54.6%
associate-/r*54.5%
Simplified54.5%
Final simplification54.5%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t)))
l = abs(l);
double code(double t, double l, double k) {
return 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t);
}
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) / (k ** 4.0d0)) / t)
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t);
}
l = abs(l) def code(t, l, k): return 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t)
l = abs(l) function code(t, l, k) return Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t)) end
l = abs(l) function tmp = code(t, l, k) tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}
\end{array}
Initial program 30.4%
Simplified39.8%
Taylor expanded in k around 0 54.6%
associate-/r*54.7%
Simplified54.7%
Final simplification54.7%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (pow (* l (pow k -2.0)) 2.0) t)))
l = abs(l);
double code(double t, double l, double k) {
return 2.0 * (pow((l * pow(k, -2.0)), 2.0) / t);
}
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 * (k ** (-2.0d0))) ** 2.0d0) / t)
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return 2.0 * (Math.pow((l * Math.pow(k, -2.0)), 2.0) / t);
}
l = abs(l) def code(t, l, k): return 2.0 * (math.pow((l * math.pow(k, -2.0)), 2.0) / t)
l = abs(l) function code(t, l, k) return Float64(2.0 * Float64((Float64(l * (k ^ -2.0)) ^ 2.0) / t)) end
l = abs(l) function tmp = code(t, l, k) tmp = 2.0 * (((l * (k ^ -2.0)) ^ 2.0) / t); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[Power[N[(l * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}
\end{array}
Initial program 30.4%
Simplified39.8%
Taylor expanded in k around 0 54.6%
associate-/r*54.7%
Simplified54.7%
expm1-log1p-u54.4%
expm1-udef52.8%
div-inv52.4%
pow-flip52.5%
metadata-eval52.5%
Applied egg-rr52.5%
expm1-def54.0%
expm1-log1p54.3%
Simplified54.3%
add-sqr-sqrt54.3%
pow254.3%
sqrt-prod54.3%
unpow254.3%
sqrt-prod33.5%
add-sqr-sqrt60.2%
metadata-eval60.2%
pow-prod-up60.2%
sqrt-prod64.7%
add-sqr-sqrt64.8%
Applied egg-rr64.8%
Final simplification64.8%
herbie shell --seed 2023299
(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))))