
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
(FPCore (t l k)
:precision binary64
(if (or (<= t -230000.0) (not (<= t 6.4e-93)))
(/
(pow
(* (/ (cbrt (/ 2.0 (tan k))) t) (* (cbrt l) (/ (cbrt l) (cbrt (sin k)))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(* 2.0 (/ (* (pow (/ l k) 2.0) (/ (cos k) t)) (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -230000.0) || !(t <= 6.4e-93)) {
tmp = pow(((cbrt((2.0 / tan(k))) / t) * (cbrt(l) * (cbrt(l) / cbrt(sin(k))))), 3.0) / (2.0 + pow((k / t), 2.0));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) * (cos(k) / t)) / pow(sin(k), 2.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -230000.0) || !(t <= 6.4e-93)) {
tmp = Math.pow(((Math.cbrt((2.0 / Math.tan(k))) / t) * (Math.cbrt(l) * (Math.cbrt(l) / Math.cbrt(Math.sin(k))))), 3.0) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) * (Math.cos(k) / t)) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((t <= -230000.0) || !(t <= 6.4e-93)) tmp = Float64((Float64(Float64(cbrt(Float64(2.0 / tan(k))) / t) * Float64(cbrt(l) * Float64(cbrt(l) / cbrt(sin(k))))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / t)) / (sin(k) ^ 2.0))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[t, -230000.0], N[Not[LessEqual[t, 6.4e-93]], $MachinePrecision]], N[(N[Power[N[(N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -230000 \lor \neg \left(t \leq 6.4 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t} \cdot \left(\sqrt[3]{\ell} \cdot \frac{\sqrt[3]{\ell}}{\sqrt[3]{\sin k}}\right)\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if t < -2.3e5 or 6.3999999999999997e-93 < t Initial program 70.2%
associate-/r*70.2%
associate-*l*59.2%
sqr-neg59.2%
associate-*l*70.2%
*-commutative70.2%
sqr-neg70.2%
associate-/r*70.2%
Simplified70.7%
associate-/l/70.7%
associate-/r/70.2%
add-cube-cbrt70.1%
Applied egg-rr78.3%
pow-plus78.3%
metadata-eval78.3%
associate-/r/78.4%
associate-/r/78.3%
Simplified78.3%
cbrt-prod91.4%
Applied egg-rr91.4%
cbrt-div95.0%
Applied egg-rr95.0%
if -2.3e5 < t < 6.3999999999999997e-93Initial program 38.7%
associate-/r*38.7%
associate-*l*38.7%
sqr-neg38.7%
associate-*l*38.7%
*-commutative38.7%
sqr-neg38.7%
associate-/r*38.7%
Simplified38.7%
associate-/l/38.7%
associate-/r/38.7%
add-cube-cbrt38.7%
Applied egg-rr55.8%
pow-plus55.8%
metadata-eval55.8%
associate-/r/55.8%
associate-/r/55.8%
Simplified55.8%
cbrt-prod55.5%
Applied egg-rr55.5%
cbrt-div55.4%
Applied egg-rr55.4%
Taylor expanded in k around inf 78.9%
times-frac78.8%
unpow278.8%
associate-/l/79.4%
associate-/l/80.2%
associate-*r/80.2%
associate-/l/79.6%
unpow279.6%
times-frac79.7%
*-commutative79.7%
times-frac76.7%
unpow276.7%
unpow276.7%
times-frac86.9%
unpow286.9%
Simplified86.9%
Final simplification91.4%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))
(+ 1.0 (+ t_1 1.0))))
2e+305)
(/
(pow
(* (/ (cbrt (/ 2.0 (tan k))) t) (* (cbrt l) (cbrt (/ l (sin k)))))
3.0)
(+ 2.0 t_1))
(* 2.0 (/ (* (pow (/ l k) 2.0) (/ (cos k) t)) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 2e+305) {
tmp = pow(((cbrt((2.0 / tan(k))) / t) * (cbrt(l) * cbrt((l / sin(k))))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 * ((pow((l / k), 2.0) * (cos(k) / t)) / pow(sin(k), 2.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 2e+305) {
tmp = Math.pow(((Math.cbrt((2.0 / Math.tan(k))) / t) * (Math.cbrt(l) * Math.cbrt((l / Math.sin(k))))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) * (Math.cos(k) / t)) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(t_1 + 1.0)))) <= 2e+305) tmp = Float64((Float64(Float64(cbrt(Float64(2.0 / tan(k))) / t) * Float64(cbrt(l) * cbrt(Float64(l / sin(k))))) ^ 3.0) / Float64(2.0 + t_1)); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / t)) / (sin(k) ^ 2.0))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+305], N[(N[Power[N[(N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] * N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t_1 + 1\right)\right)} \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t} \cdot \left(\sqrt[3]{\ell} \cdot \sqrt[3]{\frac{\ell}{\sin k}}\right)\right)}^{3}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 1.9999999999999999e305Initial program 82.7%
associate-/r*82.7%
associate-*l*71.7%
sqr-neg71.7%
associate-*l*82.7%
*-commutative82.7%
sqr-neg82.7%
associate-/r*82.7%
Simplified83.2%
associate-/l/83.2%
associate-/r/82.7%
add-cube-cbrt82.6%
Applied egg-rr91.0%
pow-plus91.0%
metadata-eval91.0%
associate-/r/91.2%
associate-/r/91.0%
Simplified91.0%
cbrt-prod94.7%
Applied egg-rr94.7%
if 1.9999999999999999e305 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 22.7%
associate-/r*22.7%
associate-*l*22.7%
sqr-neg22.7%
associate-*l*22.7%
*-commutative22.7%
sqr-neg22.7%
associate-/r*22.7%
Simplified22.7%
associate-/l/22.7%
associate-/r/22.7%
add-cube-cbrt22.7%
Applied egg-rr39.5%
pow-plus39.5%
metadata-eval39.5%
associate-/r/39.5%
associate-/r/39.5%
Simplified39.5%
cbrt-prod51.2%
Applied egg-rr51.2%
cbrt-div54.4%
Applied egg-rr54.4%
Taylor expanded in k around inf 64.0%
times-frac63.9%
unpow263.9%
associate-/l/64.6%
associate-/l/64.6%
associate-*r/64.6%
associate-/l/63.9%
unpow263.9%
times-frac64.8%
*-commutative64.8%
times-frac61.0%
unpow261.0%
unpow261.0%
times-frac80.9%
unpow280.9%
Simplified80.9%
Final simplification88.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))
(+ 1.0 (+ t_1 1.0))))
5e+298)
(/
(pow (* (/ (cbrt (/ 2.0 (tan k))) t) (cbrt (* l (/ l (sin k))))) 3.0)
(+ 2.0 t_1))
(* 2.0 (/ (* (pow (/ l k) 2.0) (/ (cos k) t)) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 5e+298) {
tmp = pow(((cbrt((2.0 / tan(k))) / t) * cbrt((l * (l / sin(k))))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 * ((pow((l / k), 2.0) * (cos(k) / t)) / pow(sin(k), 2.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 5e+298) {
tmp = Math.pow(((Math.cbrt((2.0 / Math.tan(k))) / t) * Math.cbrt((l * (l / Math.sin(k))))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) * (Math.cos(k) / t)) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(t_1 + 1.0)))) <= 5e+298) tmp = Float64((Float64(Float64(cbrt(Float64(2.0 / tan(k))) / t) * cbrt(Float64(l * Float64(l / sin(k))))) ^ 3.0) / Float64(2.0 + t_1)); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / t)) / (sin(k) ^ 2.0))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+298], N[(N[Power[N[(N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision] * N[Power[N[(l * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t_1 + 1\right)\right)} \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t} \cdot \sqrt[3]{\ell \cdot \frac{\ell}{\sin k}}\right)}^{3}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 5.0000000000000003e298Initial program 82.6%
associate-/r*82.6%
associate-*l*72.1%
sqr-neg72.1%
associate-*l*82.6%
*-commutative82.6%
sqr-neg82.6%
associate-/r*82.6%
Simplified83.7%
associate-/l/83.7%
associate-/r/82.6%
add-cube-cbrt82.5%
Applied egg-rr91.5%
pow-plus91.6%
metadata-eval91.6%
associate-/r/91.7%
associate-/r/91.6%
Simplified91.6%
if 5.0000000000000003e298 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 23.3%
associate-/r*23.3%
associate-*l*22.6%
sqr-neg22.6%
associate-*l*23.3%
*-commutative23.3%
sqr-neg23.3%
associate-/r*23.3%
Simplified22.6%
associate-/l/22.6%
associate-/r/23.3%
add-cube-cbrt23.3%
Applied egg-rr39.2%
pow-plus39.2%
metadata-eval39.2%
associate-/r/39.2%
associate-/r/39.2%
Simplified39.2%
cbrt-prod51.6%
Applied egg-rr51.6%
cbrt-div54.8%
Applied egg-rr54.8%
Taylor expanded in k around inf 63.5%
times-frac63.5%
unpow263.5%
associate-/l/64.1%
associate-/l/64.1%
associate-*r/64.1%
associate-/l/63.5%
unpow263.5%
times-frac64.3%
*-commutative64.3%
times-frac60.6%
unpow260.6%
unpow260.6%
times-frac80.3%
unpow280.3%
Simplified80.3%
Final simplification86.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))
(+ 1.0 (+ t_1 1.0))))
5e+298)
(/
(pow (* (/ (cbrt (/ 2.0 (tan k))) t) (cbrt (/ l (/ (sin k) l)))) 3.0)
(+ 2.0 t_1))
(* 2.0 (/ (* (pow (/ l k) 2.0) (/ (cos k) t)) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 5e+298) {
tmp = pow(((cbrt((2.0 / tan(k))) / t) * cbrt((l / (sin(k) / l)))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 * ((pow((l / k), 2.0) * (cos(k) / t)) / pow(sin(k), 2.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 5e+298) {
tmp = Math.pow(((Math.cbrt((2.0 / Math.tan(k))) / t) * Math.cbrt((l / (Math.sin(k) / l)))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) * (Math.cos(k) / t)) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(t_1 + 1.0)))) <= 5e+298) tmp = Float64((Float64(Float64(cbrt(Float64(2.0 / tan(k))) / t) * cbrt(Float64(l / Float64(sin(k) / l)))) ^ 3.0) / Float64(2.0 + t_1)); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / t)) / (sin(k) ^ 2.0))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+298], N[(N[Power[N[(N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision] * N[Power[N[(l / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t_1 + 1\right)\right)} \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t} \cdot \sqrt[3]{\frac{\ell}{\frac{\sin k}{\ell}}}\right)}^{3}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 5.0000000000000003e298Initial program 82.6%
associate-/r*82.6%
associate-*l*72.1%
sqr-neg72.1%
associate-*l*82.6%
*-commutative82.6%
sqr-neg82.6%
associate-/r*82.6%
Simplified83.7%
associate-/l/83.7%
associate-/r/82.6%
add-cube-cbrt82.5%
Applied egg-rr91.5%
pow-plus91.6%
metadata-eval91.6%
associate-/r/91.7%
associate-/r/91.6%
Simplified91.6%
Taylor expanded in k around inf 57.6%
unpow1/386.9%
unpow286.9%
associate-/l*91.7%
Simplified91.7%
if 5.0000000000000003e298 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 23.3%
associate-/r*23.3%
associate-*l*22.6%
sqr-neg22.6%
associate-*l*23.3%
*-commutative23.3%
sqr-neg23.3%
associate-/r*23.3%
Simplified22.6%
associate-/l/22.6%
associate-/r/23.3%
add-cube-cbrt23.3%
Applied egg-rr39.2%
pow-plus39.2%
metadata-eval39.2%
associate-/r/39.2%
associate-/r/39.2%
Simplified39.2%
cbrt-prod51.6%
Applied egg-rr51.6%
cbrt-div54.8%
Applied egg-rr54.8%
Taylor expanded in k around inf 63.5%
times-frac63.5%
unpow263.5%
associate-/l/64.1%
associate-/l/64.1%
associate-*r/64.1%
associate-/l/63.5%
unpow263.5%
times-frac64.3%
*-commutative64.3%
times-frac60.6%
unpow260.6%
unpow260.6%
times-frac80.3%
unpow280.3%
Simplified80.3%
Final simplification86.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))
(+ 1.0 (+ t_1 1.0))))
2e+305)
(*
(/ 2.0 (* (tan k) (* (/ (sin k) l) (/ (pow t 3.0) l))))
(/ 1.0 (+ 2.0 t_1)))
(* 2.0 (/ (* (pow (/ l k) 2.0) (/ (cos k) t)) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 2e+305) {
tmp = (2.0 / (tan(k) * ((sin(k) / l) * (pow(t, 3.0) / l)))) * (1.0 / (2.0 + t_1));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) * (cos(k) / t)) / pow(sin(k), 2.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (k / t) ** 2.0d0
if ((2.0d0 / ((tan(k) * (sin(k) * ((t ** 3.0d0) / (l * l)))) * (1.0d0 + (t_1 + 1.0d0)))) <= 2d+305) then
tmp = (2.0d0 / (tan(k) * ((sin(k) / l) * ((t ** 3.0d0) / l)))) * (1.0d0 / (2.0d0 + t_1))
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) * (cos(k) / t)) / (sin(k) ** 2.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 2e+305) {
tmp = (2.0 / (Math.tan(k) * ((Math.sin(k) / l) * (Math.pow(t, 3.0) / l)))) * (1.0 / (2.0 + t_1));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) * (Math.cos(k) / t)) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if (2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t, 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 2e+305: tmp = (2.0 / (math.tan(k) * ((math.sin(k) / l) * (math.pow(t, 3.0) / l)))) * (1.0 / (2.0 + t_1)) else: tmp = 2.0 * ((math.pow((l / k), 2.0) * (math.cos(k) / t)) / math.pow(math.sin(k), 2.0)) return tmp
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(t_1 + 1.0)))) <= 2e+305) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(Float64(sin(k) / l) * Float64((t ^ 3.0) / l)))) * Float64(1.0 / Float64(2.0 + t_1))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / t)) / (sin(k) ^ 2.0))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if ((2.0 / ((tan(k) * (sin(k) * ((t ^ 3.0) / (l * l)))) * (1.0 + (t_1 + 1.0)))) <= 2e+305) tmp = (2.0 / (tan(k) * ((sin(k) / l) * ((t ^ 3.0) / l)))) * (1.0 / (2.0 + t_1)); else tmp = 2.0 * ((((l / k) ^ 2.0) * (cos(k) / t)) / (sin(k) ^ 2.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+305], 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[(1.0 / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t_1 + 1\right)\right)} \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\frac{2}{\tan k \cdot \left(\frac{\sin k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)} \cdot \frac{1}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 1.9999999999999999e305Initial program 82.7%
associate-/r*82.7%
+-commutative82.7%
Simplified82.7%
add-sqr-sqrt41.5%
pow241.5%
sqrt-div41.5%
sqrt-pow142.2%
metadata-eval42.2%
sqrt-prod18.4%
add-sqr-sqrt43.5%
Applied egg-rr43.5%
div-inv43.5%
*-commutative43.5%
*-commutative43.5%
associate-+r+43.5%
metadata-eval43.5%
Applied egg-rr43.5%
Taylor expanded in k around inf 83.2%
*-commutative83.2%
unpow283.2%
times-frac89.3%
Simplified89.3%
if 1.9999999999999999e305 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 22.7%
associate-/r*22.7%
associate-*l*22.7%
sqr-neg22.7%
associate-*l*22.7%
*-commutative22.7%
sqr-neg22.7%
associate-/r*22.7%
Simplified22.7%
associate-/l/22.7%
associate-/r/22.7%
add-cube-cbrt22.7%
Applied egg-rr39.5%
pow-plus39.5%
metadata-eval39.5%
associate-/r/39.5%
associate-/r/39.5%
Simplified39.5%
cbrt-prod51.2%
Applied egg-rr51.2%
cbrt-div54.4%
Applied egg-rr54.4%
Taylor expanded in k around inf 64.0%
times-frac63.9%
unpow263.9%
associate-/l/64.6%
associate-/l/64.6%
associate-*r/64.6%
associate-/l/63.9%
unpow263.9%
times-frac64.8%
*-commutative64.8%
times-frac61.0%
unpow261.0%
unpow261.0%
times-frac80.9%
unpow280.9%
Simplified80.9%
Final simplification85.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 2.3e-15)
(* (/ l k) (/ l (* k (pow t 3.0))))
(if (<= k 7.2e+62)
(* 2.0 (/ (* (cos k) (* (/ l t_1) (/ l t))) (* k k)))
(* 2.0 (/ (* (pow (/ l k) 2.0) (/ (cos k) t)) t_1))))))
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 2.3e-15) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else if (k <= 7.2e+62) {
tmp = 2.0 * ((cos(k) * ((l / t_1) * (l / t))) / (k * k));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) * (cos(k) / t)) / t_1);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 2.3d-15) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else if (k <= 7.2d+62) then
tmp = 2.0d0 * ((cos(k) * ((l / t_1) * (l / t))) / (k * k))
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) * (cos(k) / t)) / t_1)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 2.3e-15) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else if (k <= 7.2e+62) {
tmp = 2.0 * ((Math.cos(k) * ((l / t_1) * (l / t))) / (k * k));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) * (Math.cos(k) / t)) / t_1);
}
return tmp;
}
def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 2.3e-15: tmp = (l / k) * (l / (k * math.pow(t, 3.0))) elif k <= 7.2e+62: tmp = 2.0 * ((math.cos(k) * ((l / t_1) * (l / t))) / (k * k)) else: tmp = 2.0 * ((math.pow((l / k), 2.0) * (math.cos(k) / t)) / t_1) return tmp
function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 2.3e-15) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); elseif (k <= 7.2e+62) tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(Float64(l / t_1) * Float64(l / t))) / Float64(k * k))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / t)) / t_1)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 2.3e-15) tmp = (l / k) * (l / (k * (t ^ 3.0))); elseif (k <= 7.2e+62) tmp = 2.0 * ((cos(k) * ((l / t_1) * (l / t))) / (k * k)); else tmp = 2.0 * ((((l / k) ^ 2.0) * (cos(k) / t)) / t_1); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 2.3e-15], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+62], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l / t$95$1), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 2.3 \cdot 10^{-15}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+62}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\frac{\ell}{t_1} \cdot \frac{\ell}{t}\right)}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t}}{t_1}\\
\end{array}
\end{array}
if k < 2.2999999999999999e-15Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
unpow253.9%
associate-*r*62.0%
unpow262.0%
times-frac68.3%
Simplified68.3%
if 2.2999999999999999e-15 < k < 7.2e62Initial program 57.6%
associate-/r*57.8%
associate-*l*57.8%
sqr-neg57.8%
associate-*l*57.8%
*-commutative57.8%
sqr-neg57.8%
associate-*l/57.7%
associate-*r/57.8%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in k around inf 74.6%
times-frac74.6%
unpow274.6%
unpow274.6%
times-frac84.5%
Simplified84.5%
associate-*l/84.5%
Applied egg-rr84.5%
if 7.2e62 < k Initial program 37.1%
associate-/r*37.1%
associate-*l*37.1%
sqr-neg37.1%
associate-*l*37.1%
*-commutative37.1%
sqr-neg37.1%
associate-/r*37.1%
Simplified37.1%
associate-/l/37.1%
associate-/r/37.1%
add-cube-cbrt37.1%
Applied egg-rr48.8%
pow-plus48.8%
metadata-eval48.8%
associate-/r/48.9%
associate-/r/48.9%
Simplified48.9%
cbrt-prod61.7%
Applied egg-rr61.7%
cbrt-div61.6%
Applied egg-rr61.6%
Taylor expanded in k around inf 60.3%
times-frac54.8%
unpow254.8%
associate-/l/56.2%
associate-/l/56.2%
associate-*r/56.2%
associate-/l/54.8%
unpow254.8%
times-frac60.2%
*-commutative60.2%
times-frac53.4%
unpow253.4%
unpow253.4%
times-frac88.1%
unpow288.1%
Simplified88.1%
Final simplification73.5%
(FPCore (t l k)
:precision binary64
(if (or (<= t -120000.0) (not (<= t 5.5e-86)))
(/
(/ 2.0 (* (tan k) (* (/ (pow t 3.0) l) (/ k l))))
(+ 1.0 (+ (pow (/ k t) 2.0) 1.0)))
(* 2.0 (/ (* (cos k) (* (/ l (pow (sin k) 2.0)) (/ l t))) (* k k)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -120000.0) || !(t <= 5.5e-86)) {
tmp = (2.0 / (tan(k) * ((pow(t, 3.0) / l) * (k / l)))) / (1.0 + (pow((k / t), 2.0) + 1.0));
} else {
tmp = 2.0 * ((cos(k) * ((l / pow(sin(k), 2.0)) * (l / t))) / (k * k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-120000.0d0)) .or. (.not. (t <= 5.5d-86))) then
tmp = (2.0d0 / (tan(k) * (((t ** 3.0d0) / l) * (k / l)))) / (1.0d0 + (((k / t) ** 2.0d0) + 1.0d0))
else
tmp = 2.0d0 * ((cos(k) * ((l / (sin(k) ** 2.0d0)) * (l / t))) / (k * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -120000.0) || !(t <= 5.5e-86)) {
tmp = (2.0 / (Math.tan(k) * ((Math.pow(t, 3.0) / l) * (k / l)))) / (1.0 + (Math.pow((k / t), 2.0) + 1.0));
} else {
tmp = 2.0 * ((Math.cos(k) * ((l / Math.pow(Math.sin(k), 2.0)) * (l / t))) / (k * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -120000.0) or not (t <= 5.5e-86): tmp = (2.0 / (math.tan(k) * ((math.pow(t, 3.0) / l) * (k / l)))) / (1.0 + (math.pow((k / t), 2.0) + 1.0)) else: tmp = 2.0 * ((math.cos(k) * ((l / math.pow(math.sin(k), 2.0)) * (l / t))) / (k * k)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -120000.0) || !(t <= 5.5e-86)) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(Float64((t ^ 3.0) / l) * Float64(k / l)))) / Float64(1.0 + Float64((Float64(k / t) ^ 2.0) + 1.0))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(Float64(l / (sin(k) ^ 2.0)) * Float64(l / t))) / Float64(k * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -120000.0) || ~((t <= 5.5e-86))) tmp = (2.0 / (tan(k) * (((t ^ 3.0) / l) * (k / l)))) / (1.0 + (((k / t) ^ 2.0) + 1.0)); else tmp = 2.0 * ((cos(k) * ((l / (sin(k) ^ 2.0)) * (l / t))) / (k * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -120000.0], N[Not[LessEqual[t, 5.5e-86]], $MachinePrecision]], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -120000 \lor \neg \left(t \leq 5.5 \cdot 10^{-86}\right):\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(\frac{{t}^{3}}{\ell} \cdot \frac{k}{\ell}\right)}}{1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\frac{\ell}{{\sin k}^{2}} \cdot \frac{\ell}{t}\right)}{k \cdot k}\\
\end{array}
\end{array}
if t < -1.2e5 or 5.5e-86 < t Initial program 69.6%
associate-/r*69.6%
+-commutative69.6%
Simplified69.6%
Taylor expanded in k around 0 68.0%
*-commutative68.0%
unpow268.0%
times-frac77.2%
Simplified77.2%
if -1.2e5 < t < 5.5e-86Initial program 40.3%
associate-/r*40.3%
associate-*l*40.3%
sqr-neg40.3%
associate-*l*40.3%
*-commutative40.3%
sqr-neg40.3%
associate-*l/40.3%
associate-*r/40.3%
associate-/r/40.3%
Simplified40.3%
Taylor expanded in k around inf 79.4%
times-frac79.3%
unpow279.3%
unpow279.3%
times-frac85.3%
Simplified85.3%
associate-*l/85.3%
Applied egg-rr85.3%
Final simplification80.9%
(FPCore (t l k) :precision binary64 (if (or (<= t -165000.0) (not (<= t 1.5e-23))) (* (/ l k) (/ l (* k (pow t 3.0)))) (* 2.0 (* (* (/ l (pow (sin k) 2.0)) (/ l t)) (/ (cos k) (* k k))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -165000.0) || !(t <= 1.5e-23)) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * (((l / pow(sin(k), 2.0)) * (l / t)) * (cos(k) / (k * k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-165000.0d0)) .or. (.not. (t <= 1.5d-23))) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * (((l / (sin(k) ** 2.0d0)) * (l / t)) * (cos(k) / (k * k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -165000.0) || !(t <= 1.5e-23)) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * (((l / Math.pow(Math.sin(k), 2.0)) * (l / t)) * (Math.cos(k) / (k * k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -165000.0) or not (t <= 1.5e-23): tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * (((l / math.pow(math.sin(k), 2.0)) * (l / t)) * (math.cos(k) / (k * k))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -165000.0) || !(t <= 1.5e-23)) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / (sin(k) ^ 2.0)) * Float64(l / t)) * Float64(cos(k) / Float64(k * k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -165000.0) || ~((t <= 1.5e-23))) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * (((l / (sin(k) ^ 2.0)) * (l / t)) * (cos(k) / (k * k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -165000.0], N[Not[LessEqual[t, 1.5e-23]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -165000 \lor \neg \left(t \leq 1.5 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{{\sin k}^{2}} \cdot \frac{\ell}{t}\right) \cdot \frac{\cos k}{k \cdot k}\right)\\
\end{array}
\end{array}
if t < -165000 or 1.50000000000000001e-23 < t Initial program 68.4%
associate-/r*68.4%
associate-*l*55.6%
sqr-neg55.6%
associate-*l*68.4%
*-commutative68.4%
sqr-neg68.4%
associate-/r*68.4%
Simplified69.0%
associate-/l/69.0%
associate-/r/68.4%
add-cube-cbrt68.3%
Applied egg-rr77.1%
pow-plus77.1%
metadata-eval77.1%
associate-/r/77.2%
associate-/r/77.1%
Simplified77.1%
Taylor expanded in k around 0 54.0%
unpow254.0%
associate-*r*66.0%
unpow266.0%
times-frac77.0%
Simplified77.0%
if -165000 < t < 1.50000000000000001e-23Initial program 45.2%
associate-/r*45.2%
associate-*l*45.2%
sqr-neg45.2%
associate-*l*45.2%
*-commutative45.2%
sqr-neg45.2%
associate-*l/44.5%
associate-*r/44.4%
associate-/r/44.4%
Simplified44.4%
Taylor expanded in k around inf 79.2%
times-frac79.1%
unpow279.1%
unpow279.1%
times-frac84.4%
Simplified84.4%
Final simplification80.8%
(FPCore (t l k) :precision binary64 (if (or (<= t -100000.0) (not (<= t 1.72e-23))) (* (/ l k) (/ l (* k (pow t 3.0)))) (* 2.0 (/ (* (cos k) (* (/ l (pow (sin k) 2.0)) (/ l t))) (* k k)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -100000.0) || !(t <= 1.72e-23)) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * ((cos(k) * ((l / pow(sin(k), 2.0)) * (l / t))) / (k * k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-100000.0d0)) .or. (.not. (t <= 1.72d-23))) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * ((cos(k) * ((l / (sin(k) ** 2.0d0)) * (l / t))) / (k * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -100000.0) || !(t <= 1.72e-23)) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * ((Math.cos(k) * ((l / Math.pow(Math.sin(k), 2.0)) * (l / t))) / (k * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -100000.0) or not (t <= 1.72e-23): tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * ((math.cos(k) * ((l / math.pow(math.sin(k), 2.0)) * (l / t))) / (k * k)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -100000.0) || !(t <= 1.72e-23)) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(Float64(l / (sin(k) ^ 2.0)) * Float64(l / t))) / Float64(k * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -100000.0) || ~((t <= 1.72e-23))) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * ((cos(k) * ((l / (sin(k) ^ 2.0)) * (l / t))) / (k * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -100000.0], N[Not[LessEqual[t, 1.72e-23]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -100000 \lor \neg \left(t \leq 1.72 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\frac{\ell}{{\sin k}^{2}} \cdot \frac{\ell}{t}\right)}{k \cdot k}\\
\end{array}
\end{array}
if t < -1e5 or 1.7200000000000001e-23 < t Initial program 68.4%
associate-/r*68.4%
associate-*l*55.6%
sqr-neg55.6%
associate-*l*68.4%
*-commutative68.4%
sqr-neg68.4%
associate-/r*68.4%
Simplified69.0%
associate-/l/69.0%
associate-/r/68.4%
add-cube-cbrt68.3%
Applied egg-rr77.1%
pow-plus77.1%
metadata-eval77.1%
associate-/r/77.2%
associate-/r/77.1%
Simplified77.1%
Taylor expanded in k around 0 54.0%
unpow254.0%
associate-*r*66.0%
unpow266.0%
times-frac77.0%
Simplified77.0%
if -1e5 < t < 1.7200000000000001e-23Initial program 45.2%
associate-/r*45.2%
associate-*l*45.2%
sqr-neg45.2%
associate-*l*45.2%
*-commutative45.2%
sqr-neg45.2%
associate-*l/44.5%
associate-*r/44.4%
associate-/r/44.4%
Simplified44.4%
Taylor expanded in k around inf 79.2%
times-frac79.1%
unpow279.1%
unpow279.1%
times-frac84.4%
Simplified84.4%
associate-*l/84.4%
Applied egg-rr84.4%
Final simplification80.8%
(FPCore (t l k)
:precision binary64
(if (or (<= t -100000.0) (not (<= t 1.65e-23)))
(* (/ l k) (/ l (* k (pow t 3.0))))
(*
2.0
(*
(pow (/ l k) 2.0)
(/ (* (cos k) (+ 0.3333333333333333 (/ 1.0 (* k k)))) t)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -100000.0) || !(t <= 1.65e-23)) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * (pow((l / k), 2.0) * ((cos(k) * (0.3333333333333333 + (1.0 / (k * k)))) / t));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-100000.0d0)) .or. (.not. (t <= 1.65d-23))) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * (((l / k) ** 2.0d0) * ((cos(k) * (0.3333333333333333d0 + (1.0d0 / (k * k)))) / t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -100000.0) || !(t <= 1.65e-23)) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * ((Math.cos(k) * (0.3333333333333333 + (1.0 / (k * k)))) / t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -100000.0) or not (t <= 1.65e-23): tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * (math.pow((l / k), 2.0) * ((math.cos(k) * (0.3333333333333333 + (1.0 / (k * k)))) / t)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -100000.0) || !(t <= 1.65e-23)) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(Float64(cos(k) * Float64(0.3333333333333333 + Float64(1.0 / Float64(k * k)))) / t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -100000.0) || ~((t <= 1.65e-23))) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * (((l / k) ^ 2.0) * ((cos(k) * (0.3333333333333333 + (1.0 / (k * k)))) / t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -100000.0], N[Not[LessEqual[t, 1.65e-23]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[(0.3333333333333333 + N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -100000 \lor \neg \left(t \leq 1.65 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k \cdot \left(0.3333333333333333 + \frac{1}{k \cdot k}\right)}{t}\right)\\
\end{array}
\end{array}
if t < -1e5 or 1.6500000000000001e-23 < t Initial program 68.4%
associate-/r*68.4%
associate-*l*55.6%
sqr-neg55.6%
associate-*l*68.4%
*-commutative68.4%
sqr-neg68.4%
associate-/r*68.4%
Simplified69.0%
associate-/l/69.0%
associate-/r/68.4%
add-cube-cbrt68.3%
Applied egg-rr77.1%
pow-plus77.1%
metadata-eval77.1%
associate-/r/77.2%
associate-/r/77.1%
Simplified77.1%
Taylor expanded in k around 0 54.0%
unpow254.0%
associate-*r*66.0%
unpow266.0%
times-frac77.0%
Simplified77.0%
if -1e5 < t < 1.6500000000000001e-23Initial program 45.2%
associate-/r*45.2%
associate-*l*45.2%
sqr-neg45.2%
associate-*l*45.2%
*-commutative45.2%
sqr-neg45.2%
associate-*l/44.5%
associate-*r/44.4%
associate-/r/44.4%
Simplified44.4%
Taylor expanded in k around inf 79.2%
times-frac79.1%
unpow279.1%
unpow279.1%
times-frac84.4%
Simplified84.4%
Taylor expanded in k around 0 69.7%
+-commutative69.7%
fma-def69.7%
unpow269.7%
associate-*r/69.9%
unpow269.9%
associate-/l*72.8%
unpow272.8%
Simplified72.8%
Taylor expanded in t around -inf 69.9%
mul-1-neg69.9%
times-frac70.2%
distribute-rgt-neg-in70.2%
mul-1-neg70.2%
unsub-neg70.2%
*-commutative70.2%
unpow270.2%
associate-*l*70.2%
unpow270.2%
unpow270.2%
times-frac72.7%
unpow272.7%
Simplified72.7%
Taylor expanded in l around 0 69.9%
associate-*r*69.9%
*-commutative69.9%
times-frac69.5%
unpow269.5%
unpow269.5%
unpow269.5%
times-frac73.6%
unpow273.6%
Simplified73.6%
Final simplification75.2%
(FPCore (t l k)
:precision binary64
(if (or (<= t -100000.0) (not (<= t 1.65e-23)))
(* (/ l k) (/ l (* k (pow t 3.0))))
(*
2.0
(*
(/ (cos k) (* k k))
(* (/ l t) (+ (/ l (* k k)) (* l 0.3333333333333333)))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -100000.0) || !(t <= 1.65e-23)) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-100000.0d0)) .or. (.not. (t <= 1.65d-23))) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -100000.0) || !(t <= 1.65e-23)) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -100000.0) or not (t <= 1.65e-23): tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333)))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -100000.0) || !(t <= 1.65e-23)) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l / t) * Float64(Float64(l / Float64(k * k)) + Float64(l * 0.3333333333333333))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -100000.0) || ~((t <= 1.65e-23))) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -100000.0], N[Not[LessEqual[t, 1.65e-23]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] + N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -100000 \lor \neg \left(t \leq 1.65 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell}{t} \cdot \left(\frac{\ell}{k \cdot k} + \ell \cdot 0.3333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if t < -1e5 or 1.6500000000000001e-23 < t Initial program 68.4%
associate-/r*68.4%
associate-*l*55.6%
sqr-neg55.6%
associate-*l*68.4%
*-commutative68.4%
sqr-neg68.4%
associate-/r*68.4%
Simplified69.0%
associate-/l/69.0%
associate-/r/68.4%
add-cube-cbrt68.3%
Applied egg-rr77.1%
pow-plus77.1%
metadata-eval77.1%
associate-/r/77.2%
associate-/r/77.1%
Simplified77.1%
Taylor expanded in k around 0 54.0%
unpow254.0%
associate-*r*66.0%
unpow266.0%
times-frac77.0%
Simplified77.0%
if -1e5 < t < 1.6500000000000001e-23Initial program 45.2%
associate-/r*45.2%
associate-*l*45.2%
sqr-neg45.2%
associate-*l*45.2%
*-commutative45.2%
sqr-neg45.2%
associate-*l/44.5%
associate-*r/44.4%
associate-/r/44.4%
Simplified44.4%
Taylor expanded in k around inf 79.2%
times-frac79.1%
unpow279.1%
unpow279.1%
times-frac84.4%
Simplified84.4%
Taylor expanded in k around 0 73.5%
unpow273.5%
*-commutative73.5%
Simplified73.5%
Final simplification75.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ l k) (/ l (* k (pow t 3.0))))))
(if (<= t -1.2e-72)
(/ (* 2.0 t_1) (+ 2.0 (* (/ k t) (/ k t))))
(if (<= t 1.5e-23)
(*
2.0
(*
(/ (cos k) (* k k))
(* (/ l t) (+ (/ l (* k k)) (* l 0.3333333333333333)))))
t_1))))
double code(double t, double l, double k) {
double t_1 = (l / k) * (l / (k * pow(t, 3.0)));
double tmp;
if (t <= -1.2e-72) {
tmp = (2.0 * t_1) / (2.0 + ((k / t) * (k / t)));
} else if (t <= 1.5e-23) {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (l / k) * (l / (k * (t ** 3.0d0)))
if (t <= (-1.2d-72)) then
tmp = (2.0d0 * t_1) / (2.0d0 + ((k / t) * (k / t)))
else if (t <= 1.5d-23) then
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333d0))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (l / k) * (l / (k * Math.pow(t, 3.0)));
double tmp;
if (t <= -1.2e-72) {
tmp = (2.0 * t_1) / (2.0 + ((k / t) * (k / t)));
} else if (t <= 1.5e-23) {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))));
} else {
tmp = t_1;
}
return tmp;
}
def code(t, l, k): t_1 = (l / k) * (l / (k * math.pow(t, 3.0))) tmp = 0 if t <= -1.2e-72: tmp = (2.0 * t_1) / (2.0 + ((k / t) * (k / t))) elif t <= 1.5e-23: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333)))) else: tmp = t_1 return tmp
function code(t, l, k) t_1 = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))) tmp = 0.0 if (t <= -1.2e-72) tmp = Float64(Float64(2.0 * t_1) / Float64(2.0 + Float64(Float64(k / t) * Float64(k / t)))); elseif (t <= 1.5e-23) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l / t) * Float64(Float64(l / Float64(k * k)) + Float64(l * 0.3333333333333333))))); else tmp = t_1; end return tmp end
function tmp_2 = code(t, l, k) t_1 = (l / k) * (l / (k * (t ^ 3.0))); tmp = 0.0; if (t <= -1.2e-72) tmp = (2.0 * t_1) / (2.0 + ((k / t) * (k / t))); elseif (t <= 1.5e-23) tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333)))); else tmp = t_1; end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e-72], N[(N[(2.0 * t$95$1), $MachinePrecision] / N[(2.0 + N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-23], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] + N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{-72}:\\
\;\;\;\;\frac{2 \cdot t_1}{2 + \frac{k}{t} \cdot \frac{k}{t}}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-23}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell}{t} \cdot \left(\frac{\ell}{k \cdot k} + \ell \cdot 0.3333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.2e-72Initial program 68.3%
associate-/r*68.3%
associate-*l*61.8%
sqr-neg61.8%
associate-*l*68.3%
*-commutative68.3%
sqr-neg68.3%
associate-/r*68.3%
Simplified68.6%
expm1-log1p-u52.1%
expm1-udef48.8%
associate-/l*48.8%
Applied egg-rr48.8%
expm1-def58.0%
expm1-log1p74.5%
associate-/r/74.5%
Simplified74.5%
unpow274.5%
Applied egg-rr74.5%
Taylor expanded in k around 0 57.2%
unpow257.2%
associate-*r*63.5%
unpow263.5%
times-frac72.0%
Simplified72.0%
if -1.2e-72 < t < 1.50000000000000001e-23Initial program 40.5%
associate-/r*40.6%
associate-*l*40.5%
sqr-neg40.5%
associate-*l*40.6%
*-commutative40.6%
sqr-neg40.6%
associate-*l/39.7%
associate-*r/39.7%
associate-/r/39.7%
Simplified39.7%
Taylor expanded in k around inf 79.6%
times-frac79.4%
unpow279.4%
unpow279.4%
times-frac85.4%
Simplified85.4%
Taylor expanded in k around 0 75.1%
unpow275.1%
*-commutative75.1%
Simplified75.1%
if 1.50000000000000001e-23 < t Initial program 70.2%
associate-/r*70.3%
associate-*l*55.2%
sqr-neg55.2%
associate-*l*70.3%
*-commutative70.3%
sqr-neg70.3%
associate-/r*70.3%
Simplified70.9%
associate-/l/70.9%
associate-/r/70.3%
add-cube-cbrt70.2%
Applied egg-rr76.5%
pow-plus76.6%
metadata-eval76.6%
associate-/r/76.8%
associate-/r/76.6%
Simplified76.6%
Taylor expanded in k around 0 52.7%
unpow252.7%
associate-*r*66.7%
unpow266.7%
times-frac78.0%
Simplified78.0%
Final simplification75.2%
(FPCore (t l k) :precision binary64 (if (or (<= t -720.0) (not (<= t 1.5e-23))) (* (/ l k) (/ l (* k (pow t 3.0)))) (* 2.0 (* (/ (cos k) (* k k)) (* (/ l t) (/ l (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -720.0) || !(t <= 1.5e-23)) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-720.0d0)) .or. (.not. (t <= 1.5d-23))) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -720.0) || !(t <= 1.5e-23)) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -720.0) or not (t <= 1.5e-23): tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l / t) * (l / (k * k)))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -720.0) || !(t <= 1.5e-23)) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l / t) * Float64(l / Float64(k * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -720.0) || ~((t <= 1.5e-23))) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -720.0], N[Not[LessEqual[t, 1.5e-23]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -720 \lor \neg \left(t \leq 1.5 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)\right)\\
\end{array}
\end{array}
if t < -720 or 1.50000000000000001e-23 < t Initial program 68.9%
associate-/r*68.9%
associate-*l*56.3%
sqr-neg56.3%
associate-*l*68.9%
*-commutative68.9%
sqr-neg68.9%
associate-/r*68.9%
Simplified69.4%
associate-/l/69.4%
associate-/r/68.9%
add-cube-cbrt68.8%
Applied egg-rr77.4%
pow-plus77.4%
metadata-eval77.4%
associate-/r/77.5%
associate-/r/77.4%
Simplified77.4%
Taylor expanded in k around 0 53.2%
unpow253.2%
associate-*r*65.1%
unpow265.1%
times-frac75.9%
Simplified75.9%
if -720 < t < 1.50000000000000001e-23Initial program 44.4%
associate-/r*44.4%
associate-*l*44.4%
sqr-neg44.4%
associate-*l*44.4%
*-commutative44.4%
sqr-neg44.4%
associate-*l/43.6%
associate-*r/43.6%
associate-/r/43.6%
Simplified43.6%
Taylor expanded in k around inf 78.9%
times-frac78.8%
unpow278.8%
unpow278.8%
times-frac84.2%
Simplified84.2%
Taylor expanded in k around 0 72.8%
unpow272.8%
Simplified72.8%
Final simplification74.3%
(FPCore (t l k) :precision binary64 (if (<= k 2.3e-14) (* (/ l k) (/ l (* k (pow t 3.0)))) (* 2.0 (* (/ (cos k) (* k k)) (/ l (/ (* t (* k k)) l))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.3e-14) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * (l / ((t * (k * k)) / l)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.3d-14) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * (l / ((t * (k * k)) / l)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.3e-14) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * (l / ((t * (k * k)) / l)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.3e-14: tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * (l / ((t * (k * k)) / l))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.3e-14) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(l / Float64(Float64(t * Float64(k * k)) / l)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.3e-14) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * ((cos(k) / (k * k)) * (l / ((t * (k * k)) / l))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.3e-14], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.3 \cdot 10^{-14}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \frac{\ell}{\frac{t \cdot \left(k \cdot k\right)}{\ell}}\right)\\
\end{array}
\end{array}
if k < 2.29999999999999998e-14Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
unpow253.9%
associate-*r*62.0%
unpow262.0%
times-frac68.3%
Simplified68.3%
if 2.29999999999999998e-14 < k Initial program 42.6%
associate-/r*42.6%
associate-*l*42.6%
sqr-neg42.6%
associate-*l*42.6%
*-commutative42.6%
sqr-neg42.6%
associate-*l/42.6%
associate-*r/42.6%
associate-/r/42.6%
Simplified42.6%
Taylor expanded in k around inf 64.1%
times-frac60.1%
unpow260.1%
unpow260.1%
times-frac69.9%
Simplified69.9%
Taylor expanded in k around 0 53.8%
unpow253.8%
associate-/l*61.1%
unpow261.1%
Simplified61.1%
Final simplification66.3%
(FPCore (t l k) :precision binary64 (if (<= k 5e-11) (* (/ l k) (/ l (* k (pow t 3.0)))) (* 2.0 (* 0.3333333333333333 (* (/ (cos k) (* k k)) (* l (/ l t)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5e-11) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * (0.3333333333333333 * ((cos(k) / (k * k)) * (l * (l / t))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5d-11) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * (0.3333333333333333d0 * ((cos(k) / (k * k)) * (l * (l / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5e-11) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * (0.3333333333333333 * ((Math.cos(k) / (k * k)) * (l * (l / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5e-11: tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * (0.3333333333333333 * ((math.cos(k) / (k * k)) * (l * (l / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5e-11) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(0.3333333333333333 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(l * Float64(l / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5e-11) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * (0.3333333333333333 * ((cos(k) / (k * k)) * (l * (l / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5e-11], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.3333333333333333 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-11}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.3333333333333333 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\ell \cdot \frac{\ell}{t}\right)\right)\right)\\
\end{array}
\end{array}
if k < 5.00000000000000018e-11Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
unpow253.9%
associate-*r*62.0%
unpow262.0%
times-frac68.3%
Simplified68.3%
if 5.00000000000000018e-11 < k Initial program 42.6%
associate-/r*42.6%
associate-*l*42.6%
sqr-neg42.6%
associate-*l*42.6%
*-commutative42.6%
sqr-neg42.6%
associate-*l/42.6%
associate-*r/42.6%
associate-/r/42.6%
Simplified42.6%
Taylor expanded in k around inf 64.1%
times-frac60.1%
unpow260.1%
unpow260.1%
times-frac69.9%
Simplified69.9%
Taylor expanded in k around 0 51.9%
+-commutative51.9%
fma-def51.9%
unpow251.9%
associate-*r/52.2%
unpow252.2%
associate-/l*58.2%
unpow258.2%
Simplified58.2%
Taylor expanded in k around inf 53.5%
times-frac50.7%
unpow250.7%
unpow250.7%
associate-*r/56.9%
Simplified56.9%
Final simplification65.1%
(FPCore (t l k) :precision binary64 (if (<= k 2.8e-14) (* (/ l k) (/ l (* k (pow t 3.0)))) (* 2.0 (/ (* l (/ l t)) (pow k 4.0)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.8e-14) {
tmp = (l / k) * (l / (k * pow(t, 3.0)));
} else {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.8d-14) then
tmp = (l / k) * (l / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.8e-14) {
tmp = (l / k) * (l / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.8e-14: tmp = (l / k) * (l / (k * math.pow(t, 3.0))) else: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.8e-14) tmp = Float64(Float64(l / k) * Float64(l / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.8e-14) tmp = (l / k) * (l / (k * (t ^ 3.0))); else tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.8e-14], N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 2.8000000000000001e-14Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
unpow253.9%
associate-*r*62.0%
unpow262.0%
times-frac68.3%
Simplified68.3%
if 2.8000000000000001e-14 < k Initial program 42.6%
associate-/r*42.6%
associate-*l*42.6%
sqr-neg42.6%
associate-*l*42.6%
*-commutative42.6%
sqr-neg42.6%
associate-*l/42.6%
associate-*r/42.6%
associate-/r/42.6%
Simplified42.6%
Taylor expanded in k around inf 64.1%
times-frac60.1%
unpow260.1%
unpow260.1%
times-frac69.9%
Simplified69.9%
Taylor expanded in k around 0 49.1%
*-commutative49.1%
associate-/r*47.6%
unpow247.6%
associate-*r/54.8%
Simplified54.8%
Final simplification64.5%
(FPCore (t l k) :precision binary64 (* 2.0 (* (/ l t) (/ l (pow k 4.0)))))
double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / pow(k, 4.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
def code(t, l, k): return 2.0 * ((l / t) * (l / math.pow(k, 4.0)))
function code(t, l, k) return Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end
code[t_, l_, k_] := N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)
\end{array}
Initial program 56.4%
associate-/r*56.4%
associate-*l*50.2%
sqr-neg50.2%
associate-*l*56.4%
*-commutative56.4%
sqr-neg56.4%
associate-*l/56.7%
associate-*r/56.1%
associate-/r/56.1%
Simplified56.1%
Taylor expanded in k around inf 62.6%
times-frac61.9%
unpow261.9%
unpow261.9%
times-frac67.0%
Simplified67.0%
Taylor expanded in k around 0 52.7%
unpow252.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in l around 0 52.7%
unpow252.7%
*-commutative52.7%
times-frac56.4%
Simplified56.4%
Final simplification56.4%
herbie shell --seed 2023275
(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))))