
(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 13 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: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 2.35e-17)
(/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0)))
(if (<= k 3.6e+192)
(* l (* l (/ (/ 2.0 (tan k)) (* (sin k) (* k (* t k))))))
(* 2.0 (/ (/ (* (* (/ l k) (/ l k)) (cos k)) t) (pow (sin k) 2.0))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.35e-17) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else if (k <= 3.6e+192) {
tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * (((((l / k) * (l / k)) * cos(k)) / t) / pow(sin(k), 2.0));
}
return tmp;
}
NOTE: k 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 <= 2.35d-17) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else if (k <= 3.6d+192) then
tmp = l * (l * ((2.0d0 / tan(k)) / (sin(k) * (k * (t * k)))))
else
tmp = 2.0d0 * (((((l / k) * (l / k)) * cos(k)) / t) / (sin(k) ** 2.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.35e-17) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else if (k <= 3.6e+192) {
tmp = l * (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * (((((l / k) * (l / k)) * Math.cos(k)) / t) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.35e-17: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) elif k <= 3.6e+192: tmp = l * (l * ((2.0 / math.tan(k)) / (math.sin(k) * (k * (t * k))))) else: tmp = 2.0 * (((((l / k) * (l / k)) * math.cos(k)) / t) / math.pow(math.sin(k), 2.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.35e-17) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); elseif (k <= 3.6e+192) tmp = Float64(l * Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * Float64(k * Float64(t * k)))))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) * cos(k)) / t) / (sin(k) ^ 2.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.35e-17) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); elseif (k <= 3.6e+192) tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k))))); else tmp = 2.0 * (((((l / k) * (l / k)) * cos(k)) / t) / (sin(k) ^ 2.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.35e-17], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.6e+192], N[(l * N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.35 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{elif}\;k \leq 3.6 \cdot 10^{+192}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \cos k}{t}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if k < 2.35e-17Initial program 55.0%
*-commutative55.0%
associate-*l*47.8%
associate-*r*47.8%
+-commutative47.8%
associate-+r+47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in k around 0 49.6%
associate-/l*50.6%
unpow250.6%
unpow250.6%
Simplified50.6%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.6%
associate-*l*53.6%
Simplified53.6%
expm1-log1p-u39.8%
expm1-udef39.2%
associate-/r*39.2%
metadata-eval39.2%
times-frac46.8%
Applied egg-rr46.8%
expm1-def48.3%
expm1-log1p63.7%
associate-/r*63.7%
associate-/r*64.6%
Simplified64.6%
if 2.35e-17 < k < 3.6000000000000002e192Initial program 49.2%
associate-/l/49.2%
associate-*l/49.3%
associate-*l/49.3%
associate-/r/49.3%
*-commutative49.3%
associate-/l/49.3%
associate-*r*49.3%
*-commutative49.3%
associate-*r*49.3%
*-commutative49.3%
Simplified49.3%
Taylor expanded in k around inf 79.3%
unpow279.3%
*-commutative79.3%
Simplified79.3%
expm1-log1p-u68.2%
expm1-udef60.5%
Applied egg-rr60.5%
expm1-def68.2%
expm1-log1p79.3%
associate-*l*84.4%
associate-/r*84.4%
unpow284.4%
*-commutative84.4%
*-commutative84.4%
associate-*l*84.4%
*-commutative84.4%
unpow284.4%
associate-*l*89.5%
Simplified89.5%
if 3.6000000000000002e192 < k Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/52.0%
associate-/r/56.0%
*-commutative56.0%
associate-/l/56.0%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in k around inf 68.2%
*-commutative68.2%
times-frac68.2%
unpow268.2%
unpow268.2%
times-frac99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in l around 0 68.2%
associate-/r*68.2%
*-commutative68.2%
associate-*r/68.2%
unpow268.2%
unpow268.2%
times-frac99.6%
unpow299.6%
*-commutative99.6%
times-frac99.7%
Simplified99.7%
frac-times99.6%
associate-/r*99.6%
Applied egg-rr99.6%
unpow299.6%
Applied egg-rr99.6%
Final simplification71.6%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (+ 1.0 (+ 1.0 (pow (/ k t) 2.0)))))
(if (<=
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) t_1))
5e+298)
(/ 2.0 (* (* (/ (pow t 3.0) l) (/ k l)) (* (tan k) t_1)))
(* 2.0 (/ (/ (* (* (/ l k) (/ l k)) (cos k)) t) (pow (sin k) 2.0))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + pow((k / t), 2.0));
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * t_1)) <= 5e+298) {
tmp = 2.0 / (((pow(t, 3.0) / l) * (k / l)) * (tan(k) * t_1));
} else {
tmp = 2.0 * (((((l / k) * (l / k)) * cos(k)) / t) / pow(sin(k), 2.0));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 + (1.0d0 + ((k / t) ** 2.0d0))
if ((2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * t_1)) <= 5d+298) then
tmp = 2.0d0 / ((((t ** 3.0d0) / l) * (k / l)) * (tan(k) * t_1))
else
tmp = 2.0d0 * (((((l / k) * (l / k)) * cos(k)) / t) / (sin(k) ** 2.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + Math.pow((k / t), 2.0));
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * t_1)) <= 5e+298) {
tmp = 2.0 / (((Math.pow(t, 3.0) / l) * (k / l)) * (Math.tan(k) * t_1));
} else {
tmp = 2.0 * (((((l / k) * (l / k)) * Math.cos(k)) / t) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = 1.0 + (1.0 + math.pow((k / t), 2.0)) tmp = 0 if (2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * t_1)) <= 5e+298: tmp = 2.0 / (((math.pow(t, 3.0) / l) * (k / l)) * (math.tan(k) * t_1)) else: tmp = 2.0 * (((((l / k) * (l / k)) * math.cos(k)) / t) / math.pow(math.sin(k), 2.0)) return tmp
k = abs(k) function code(t, l, k) t_1 = Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))) tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * t_1)) <= 5e+298) tmp = Float64(2.0 / Float64(Float64(Float64((t ^ 3.0) / l) * Float64(k / l)) * Float64(tan(k) * t_1))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) * cos(k)) / t) / (sin(k) ^ 2.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = 1.0 + (1.0 + ((k / t) ^ 2.0)); tmp = 0.0; if ((2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * t_1)) <= 5e+298) tmp = 2.0 / ((((t ^ 3.0) / l) * (k / l)) * (tan(k) * t_1)); else tmp = 2.0 * (((((l / k) * (l / k)) * cos(k)) / t) / (sin(k) ^ 2.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(1.0 + N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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] * t$95$1), $MachinePrecision]), $MachinePrecision], 5e+298], N[(2.0 / N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := 1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot t_1} \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{2}{\left(\frac{{t}^{3}}{\ell} \cdot \frac{k}{\ell}\right) \cdot \left(\tan k \cdot t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \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 79.1%
associate-*l*79.1%
+-commutative79.1%
Simplified79.1%
Taylor expanded in k around 0 79.1%
*-commutative79.1%
unpow279.1%
times-frac83.1%
Simplified83.1%
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.4%
associate-/l/23.4%
associate-*l/23.4%
associate-*l/23.4%
associate-/r/24.3%
*-commutative24.3%
associate-/l/24.3%
associate-*r*24.3%
*-commutative24.3%
associate-*r*24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in k around inf 58.4%
*-commutative58.4%
times-frac57.6%
unpow257.6%
unpow257.6%
times-frac80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in l around 0 58.4%
associate-/r*57.6%
*-commutative57.6%
associate-*r/57.6%
unpow257.6%
unpow257.6%
times-frac80.1%
unpow280.1%
*-commutative80.1%
times-frac81.7%
Simplified81.7%
frac-times80.1%
associate-/r*81.7%
Applied egg-rr81.7%
unpow281.7%
Applied egg-rr81.7%
Final simplification82.5%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 2.55e-15)
(/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0)))
(if (<= k 5.8e+192)
(* l (* l (/ (/ 2.0 (tan k)) (* (sin k) (* k (* t k))))))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t (pow (sin k) 2.0))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.55e-15) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else if (k <= 5.8e+192) {
tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
NOTE: k 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 <= 2.55d-15) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else if (k <= 5.8d+192) then
tmp = l * (l * ((2.0d0 / tan(k)) / (sin(k) * (k * (t * k)))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.55e-15) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else if (k <= 5.8e+192) {
tmp = l * (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.55e-15: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) elif k <= 5.8e+192: tmp = l * (l * ((2.0 / math.tan(k)) / (math.sin(k) * (k * (t * k))))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.55e-15) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); elseif (k <= 5.8e+192) tmp = Float64(l * Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * Float64(k * Float64(t * k)))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.55e-15) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); elseif (k <= 5.8e+192) tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k))))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.55e-15], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.8e+192], N[(l * N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.55 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{elif}\;k \leq 5.8 \cdot 10^{+192}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 2.55e-15Initial program 55.0%
*-commutative55.0%
associate-*l*47.8%
associate-*r*47.8%
+-commutative47.8%
associate-+r+47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in k around 0 49.6%
associate-/l*50.6%
unpow250.6%
unpow250.6%
Simplified50.6%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.6%
associate-*l*53.6%
Simplified53.6%
expm1-log1p-u39.8%
expm1-udef39.2%
associate-/r*39.2%
metadata-eval39.2%
times-frac46.8%
Applied egg-rr46.8%
expm1-def48.3%
expm1-log1p63.7%
associate-/r*63.7%
associate-/r*64.6%
Simplified64.6%
if 2.55e-15 < k < 5.8000000000000003e192Initial program 49.2%
associate-/l/49.2%
associate-*l/49.3%
associate-*l/49.3%
associate-/r/49.3%
*-commutative49.3%
associate-/l/49.3%
associate-*r*49.3%
*-commutative49.3%
associate-*r*49.3%
*-commutative49.3%
Simplified49.3%
Taylor expanded in k around inf 79.3%
unpow279.3%
*-commutative79.3%
Simplified79.3%
expm1-log1p-u68.2%
expm1-udef60.5%
Applied egg-rr60.5%
expm1-def68.2%
expm1-log1p79.3%
associate-*l*84.4%
associate-/r*84.4%
unpow284.4%
*-commutative84.4%
*-commutative84.4%
associate-*l*84.4%
*-commutative84.4%
unpow284.4%
associate-*l*89.5%
Simplified89.5%
if 5.8000000000000003e192 < k Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/52.0%
associate-/r/56.0%
*-commutative56.0%
associate-/l/56.0%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in k around inf 68.2%
*-commutative68.2%
times-frac68.2%
unpow268.2%
unpow268.2%
times-frac99.6%
*-commutative99.6%
Simplified99.6%
Final simplification71.6%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 3.8e-13)
(/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0)))
(if (<= k 3.6e+192)
(* l (* l (/ (/ 2.0 (tan k)) (* (sin k) (* k (* t k))))))
(* 2.0 (/ (* (* (/ l k) (/ l k)) (cos k)) (* t (pow (sin k) 2.0)))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 3.8e-13) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else if (k <= 3.6e+192) {
tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) * cos(k)) / (t * pow(sin(k), 2.0)));
}
return tmp;
}
NOTE: k 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 <= 3.8d-13) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else if (k <= 3.6d+192) then
tmp = l * (l * ((2.0d0 / tan(k)) / (sin(k) * (k * (t * k)))))
else
tmp = 2.0d0 * ((((l / k) * (l / k)) * cos(k)) / (t * (sin(k) ** 2.0d0)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.8e-13) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else if (k <= 3.6e+192) {
tmp = l * (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) * Math.cos(k)) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 3.8e-13: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) elif k <= 3.6e+192: tmp = l * (l * ((2.0 / math.tan(k)) / (math.sin(k) * (k * (t * k))))) else: tmp = 2.0 * ((((l / k) * (l / k)) * math.cos(k)) / (t * math.pow(math.sin(k), 2.0))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 3.8e-13) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); elseif (k <= 3.6e+192) tmp = Float64(l * Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * Float64(k * Float64(t * k)))))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) * cos(k)) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.8e-13) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); elseif (k <= 3.6e+192) tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k))))); else tmp = 2.0 * ((((l / k) * (l / k)) * cos(k)) / (t * (sin(k) ^ 2.0))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 3.8e-13], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.6e+192], N[(l * N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{elif}\;k \leq 3.6 \cdot 10^{+192}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \cos k}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if k < 3.8e-13Initial program 55.0%
*-commutative55.0%
associate-*l*47.8%
associate-*r*47.8%
+-commutative47.8%
associate-+r+47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in k around 0 49.6%
associate-/l*50.6%
unpow250.6%
unpow250.6%
Simplified50.6%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.6%
associate-*l*53.6%
Simplified53.6%
expm1-log1p-u39.8%
expm1-udef39.2%
associate-/r*39.2%
metadata-eval39.2%
times-frac46.8%
Applied egg-rr46.8%
expm1-def48.3%
expm1-log1p63.7%
associate-/r*63.7%
associate-/r*64.6%
Simplified64.6%
if 3.8e-13 < k < 3.6000000000000002e192Initial program 49.2%
associate-/l/49.2%
associate-*l/49.3%
associate-*l/49.3%
associate-/r/49.3%
*-commutative49.3%
associate-/l/49.3%
associate-*r*49.3%
*-commutative49.3%
associate-*r*49.3%
*-commutative49.3%
Simplified49.3%
Taylor expanded in k around inf 79.3%
unpow279.3%
*-commutative79.3%
Simplified79.3%
expm1-log1p-u68.2%
expm1-udef60.5%
Applied egg-rr60.5%
expm1-def68.2%
expm1-log1p79.3%
associate-*l*84.4%
associate-/r*84.4%
unpow284.4%
*-commutative84.4%
*-commutative84.4%
associate-*l*84.4%
*-commutative84.4%
unpow284.4%
associate-*l*89.5%
Simplified89.5%
if 3.6000000000000002e192 < k Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/52.0%
associate-/r/56.0%
*-commutative56.0%
associate-/l/56.0%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in k around inf 68.2%
*-commutative68.2%
times-frac68.2%
unpow268.2%
unpow268.2%
times-frac99.6%
*-commutative99.6%
Simplified99.6%
associate-*r/99.6%
pow299.6%
Applied egg-rr99.6%
unpow299.6%
Applied egg-rr99.6%
Final simplification71.6%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 4.7e-17)
(/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0)))
(if (<= k 3.8e+192)
(* l (* l (/ (/ 2.0 (tan k)) (* (sin k) (* k (* t k))))))
(*
2.0
(*
(* (/ l k) (/ l k))
(/ (cos k) (* t (- 0.5 (/ (cos (+ k k)) 2.0)))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 4.7e-17) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else if (k <= 3.8e+192) {
tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (0.5 - (cos((k + k)) / 2.0)))));
}
return tmp;
}
NOTE: k 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 <= 4.7d-17) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else if (k <= 3.8d+192) then
tmp = l * (l * ((2.0d0 / tan(k)) / (sin(k) * (k * (t * k)))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * (0.5d0 - (cos((k + k)) / 2.0d0)))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.7e-17) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else if (k <= 3.8e+192) {
tmp = l * (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * (k * (t * k)))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * (0.5 - (Math.cos((k + k)) / 2.0)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 4.7e-17: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) elif k <= 3.8e+192: tmp = l * (l * ((2.0 / math.tan(k)) / (math.sin(k) * (k * (t * k))))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * (0.5 - (math.cos((k + k)) / 2.0))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 4.7e-17) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); elseif (k <= 3.8e+192) tmp = Float64(l * Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * Float64(k * Float64(t * k)))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * Float64(0.5 - Float64(cos(Float64(k + k)) / 2.0)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.7e-17) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); elseif (k <= 3.8e+192) tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k))))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (0.5 - (cos((k + k)) / 2.0))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 4.7e-17], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e+192], N[(l * N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[(0.5 - N[(N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.7 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{elif}\;k \leq 3.8 \cdot 10^{+192}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot \left(0.5 - \frac{\cos \left(k + k\right)}{2}\right)}\right)\\
\end{array}
\end{array}
if k < 4.7e-17Initial program 55.0%
*-commutative55.0%
associate-*l*47.8%
associate-*r*47.8%
+-commutative47.8%
associate-+r+47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in k around 0 49.6%
associate-/l*50.6%
unpow250.6%
unpow250.6%
Simplified50.6%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.6%
associate-*l*53.6%
Simplified53.6%
expm1-log1p-u39.8%
expm1-udef39.2%
associate-/r*39.2%
metadata-eval39.2%
times-frac46.8%
Applied egg-rr46.8%
expm1-def48.3%
expm1-log1p63.7%
associate-/r*63.7%
associate-/r*64.6%
Simplified64.6%
if 4.7e-17 < k < 3.7999999999999999e192Initial program 49.2%
associate-/l/49.2%
associate-*l/49.3%
associate-*l/49.3%
associate-/r/49.3%
*-commutative49.3%
associate-/l/49.3%
associate-*r*49.3%
*-commutative49.3%
associate-*r*49.3%
*-commutative49.3%
Simplified49.3%
Taylor expanded in k around inf 79.3%
unpow279.3%
*-commutative79.3%
Simplified79.3%
expm1-log1p-u68.2%
expm1-udef60.5%
Applied egg-rr60.5%
expm1-def68.2%
expm1-log1p79.3%
associate-*l*84.4%
associate-/r*84.4%
unpow284.4%
*-commutative84.4%
*-commutative84.4%
associate-*l*84.4%
*-commutative84.4%
unpow284.4%
associate-*l*89.5%
Simplified89.5%
if 3.7999999999999999e192 < k Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/52.0%
associate-/r/56.0%
*-commutative56.0%
associate-/l/56.0%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in k around inf 68.2%
*-commutative68.2%
times-frac68.2%
unpow268.2%
unpow268.2%
times-frac99.6%
*-commutative99.6%
Simplified99.6%
unpow299.6%
sin-mult99.4%
Applied egg-rr99.4%
div-sub99.4%
+-inverses99.4%
cos-099.4%
metadata-eval99.4%
Simplified99.4%
Final simplification71.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 3.3e-15) (/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0))) (* l (* l (/ (/ 2.0 (tan k)) (* (sin k) (* k (* t k))))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 3.3e-15) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else {
tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k)))));
}
return tmp;
}
NOTE: k 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 <= 3.3d-15) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else
tmp = l * (l * ((2.0d0 / tan(k)) / (sin(k) * (k * (t * k)))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.3e-15) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else {
tmp = l * (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * (k * (t * k)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 3.3e-15: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) else: tmp = l * (l * ((2.0 / math.tan(k)) / (math.sin(k) * (k * (t * k))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 3.3e-15) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); else tmp = Float64(l * Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * Float64(k * Float64(t * k)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.3e-15) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); else tmp = l * (l * ((2.0 / tan(k)) / (sin(k) * (k * (t * k))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 3.3e-15], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.3 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}\right)\\
\end{array}
\end{array}
if k < 3.3e-15Initial program 55.0%
*-commutative55.0%
associate-*l*47.8%
associate-*r*47.8%
+-commutative47.8%
associate-+r+47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in k around 0 49.6%
associate-/l*50.6%
unpow250.6%
unpow250.6%
Simplified50.6%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.6%
associate-*l*53.6%
Simplified53.6%
expm1-log1p-u39.8%
expm1-udef39.2%
associate-/r*39.2%
metadata-eval39.2%
times-frac46.8%
Applied egg-rr46.8%
expm1-def48.3%
expm1-log1p63.7%
associate-/r*63.7%
associate-/r*64.6%
Simplified64.6%
if 3.3e-15 < k Initial program 50.4%
associate-/l/50.3%
associate-*l/50.4%
associate-*l/50.4%
associate-/r/52.0%
*-commutative52.0%
associate-/l/52.0%
associate-*r*52.0%
*-commutative52.0%
associate-*r*52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in k around inf 74.8%
unpow274.8%
*-commutative74.8%
Simplified74.8%
expm1-log1p-u68.2%
expm1-udef63.6%
Applied egg-rr63.6%
expm1-def68.2%
expm1-log1p74.8%
associate-*l*79.8%
associate-/r*79.8%
unpow279.8%
*-commutative79.8%
*-commutative79.8%
associate-*l*79.8%
*-commutative79.8%
unpow279.8%
associate-*l*84.4%
Simplified84.4%
Final simplification69.4%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 4.8e-21) (/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0))) (* 2.0 (* (/ (pow (/ l k) 2.0) t) (/ (cos k) (* k k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 4.8e-21) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / (k * k)));
}
return tmp;
}
NOTE: k 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 <= 4.8d-21) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) / t) * (cos(k) / (k * k)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.8e-21) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / (k * k)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 4.8e-21: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) else: tmp = 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / (k * k))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 4.8e-21) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / Float64(k * k)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.8e-21) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); else tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / (k * k))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 4.8e-21], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{k \cdot k}\right)\\
\end{array}
\end{array}
if k < 4.7999999999999999e-21Initial program 55.3%
*-commutative55.3%
associate-*l*48.0%
associate-*r*48.0%
+-commutative48.0%
associate-+r+48.0%
metadata-eval48.0%
Simplified48.0%
Taylor expanded in k around 0 49.8%
associate-/l*50.8%
unpow250.8%
unpow250.8%
Simplified50.8%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.8%
associate-*l*53.7%
Simplified53.7%
expm1-log1p-u39.8%
expm1-udef39.3%
associate-/r*39.3%
metadata-eval39.3%
times-frac46.9%
Applied egg-rr46.9%
expm1-def48.4%
expm1-log1p64.0%
associate-/r*64.0%
associate-/r*64.9%
Simplified64.9%
if 4.7999999999999999e-21 < k Initial program 49.7%
associate-/l/49.7%
associate-*l/49.7%
associate-*l/49.7%
associate-/r/51.2%
*-commutative51.2%
associate-/l/51.3%
associate-*r*51.3%
*-commutative51.3%
associate-*r*51.3%
*-commutative51.3%
Simplified51.3%
Taylor expanded in k around inf 73.0%
*-commutative73.0%
times-frac70.1%
unpow270.1%
unpow270.1%
times-frac87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in l around 0 73.0%
associate-/r*70.0%
*-commutative70.0%
associate-*r/70.0%
unpow270.0%
unpow270.0%
times-frac87.1%
unpow287.1%
*-commutative87.1%
times-frac88.6%
Simplified88.6%
Taylor expanded in k around 0 69.3%
unpow269.3%
Simplified69.3%
Final simplification66.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 8.5e-13) (/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0))) (* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* k (* t k)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-13) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (k * (t * k))));
}
return tmp;
}
NOTE: k 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 <= 8.5d-13) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (k * (t * k))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-13) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (k * (t * k))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 8.5e-13: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (k * (t * k)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 8.5e-13) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(k * Float64(t * k))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 8.5e-13) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (k * (t * k)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 8.5e-13], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 8.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{k \cdot \left(t \cdot k\right)}\right)\\
\end{array}
\end{array}
if k < 8.5000000000000001e-13Initial program 55.0%
*-commutative55.0%
associate-*l*47.8%
associate-*r*47.8%
+-commutative47.8%
associate-+r+47.8%
metadata-eval47.8%
Simplified47.8%
Taylor expanded in k around 0 49.6%
associate-/l*50.6%
unpow250.6%
unpow250.6%
Simplified50.6%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.6%
associate-*l*53.6%
Simplified53.6%
expm1-log1p-u39.8%
expm1-udef39.2%
associate-/r*39.2%
metadata-eval39.2%
times-frac46.8%
Applied egg-rr46.8%
expm1-def48.3%
expm1-log1p63.7%
associate-/r*63.7%
associate-/r*64.6%
Simplified64.6%
if 8.5000000000000001e-13 < k Initial program 50.4%
associate-/l/50.3%
associate-*l/50.4%
associate-*l/50.4%
associate-/r/52.0%
*-commutative52.0%
associate-/l/52.0%
associate-*r*52.0%
*-commutative52.0%
associate-*r*52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in k around inf 74.8%
*-commutative74.8%
times-frac71.7%
unpow271.7%
unpow271.7%
times-frac89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in k around 0 69.2%
unpow269.2%
associate-*l*69.2%
Simplified69.2%
Final simplification65.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.06e-20) (/ (/ 1.0 (/ k l)) (/ (/ k l) (pow t -3.0))) (* 2.0 (/ (* l (/ l t)) (pow k 4.0)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.06e-20) {
tmp = (1.0 / (k / l)) / ((k / l) / pow(t, -3.0));
} else {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
}
return tmp;
}
NOTE: k 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 <= 1.06d-20) then
tmp = (1.0d0 / (k / l)) / ((k / l) / (t ** (-3.0d0)))
else
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.06e-20) {
tmp = (1.0 / (k / l)) / ((k / l) / Math.pow(t, -3.0));
} else {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.06e-20: tmp = (1.0 / (k / l)) / ((k / l) / math.pow(t, -3.0)) else: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.06e-20) tmp = Float64(Float64(1.0 / Float64(k / l)) / Float64(Float64(k / l) / (t ^ -3.0))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.06e-20) tmp = (1.0 / (k / l)) / ((k / l) / (t ^ -3.0)); else tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.06e-20], N[(N[(1.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] / N[Power[t, -3.0], $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}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.06 \cdot 10^{-20}:\\
\;\;\;\;\frac{\frac{1}{\frac{k}{\ell}}}{\frac{\frac{k}{\ell}}{{t}^{-3}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 1.06e-20Initial program 55.3%
*-commutative55.3%
associate-*l*48.0%
associate-*r*48.0%
+-commutative48.0%
associate-+r+48.0%
metadata-eval48.0%
Simplified48.0%
Taylor expanded in k around 0 49.8%
associate-/l*50.8%
unpow250.8%
unpow250.8%
Simplified50.8%
expm1-log1p-u40.1%
expm1-udef35.6%
div-inv35.6%
pow-flip35.6%
metadata-eval35.6%
Applied egg-rr35.6%
expm1-def40.1%
expm1-log1p50.8%
associate-*l*53.7%
Simplified53.7%
expm1-log1p-u39.8%
expm1-udef39.3%
associate-/r*39.3%
metadata-eval39.3%
times-frac46.9%
Applied egg-rr46.9%
expm1-def48.4%
expm1-log1p64.0%
associate-/r*64.0%
associate-/r*64.9%
Simplified64.9%
if 1.06e-20 < k Initial program 49.7%
associate-/l/49.7%
associate-*l/49.7%
associate-*l/49.7%
associate-/r/51.2%
*-commutative51.2%
associate-/l/51.3%
associate-*r*51.3%
*-commutative51.3%
associate-*r*51.3%
*-commutative51.3%
Simplified51.3%
Taylor expanded in k around inf 73.0%
*-commutative73.0%
times-frac70.1%
unpow270.1%
unpow270.1%
times-frac87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in k around 0 61.0%
unpow261.0%
*-commutative61.0%
times-frac62.7%
Simplified62.7%
associate-*r/63.8%
Applied egg-rr63.8%
Final simplification64.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 6e-22) (* (/ l k) (/ l (* (pow t 3.0) k))) (* 2.0 (/ (* l (/ l t)) (pow k 4.0)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6e-22) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((l * (l / t)) / pow(k, 4.0));
}
return tmp;
}
NOTE: k 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 <= 6d-22) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else
tmp = 2.0d0 * ((l * (l / t)) / (k ** 4.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6e-22) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 6e-22: tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) else: tmp = 2.0 * ((l * (l / t)) / math.pow(k, 4.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6e-22) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6e-22) tmp = (l / k) * (l / ((t ^ 3.0) * k)); else tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6e-22], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $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}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6 \cdot 10^{-22}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 5.9999999999999998e-22Initial program 55.3%
associate-/l/55.3%
associate-*l/55.8%
associate-*l/54.2%
associate-/r/54.2%
*-commutative54.2%
associate-/l/54.2%
associate-*r*54.2%
*-commutative54.2%
associate-*r*54.2%
*-commutative54.2%
Simplified54.2%
Taylor expanded in k around 0 49.8%
unpow249.8%
unpow249.8%
associate-*l*57.6%
Simplified57.6%
times-frac64.5%
Applied egg-rr64.5%
if 5.9999999999999998e-22 < k Initial program 49.7%
associate-/l/49.7%
associate-*l/49.7%
associate-*l/49.7%
associate-/r/51.2%
*-commutative51.2%
associate-/l/51.3%
associate-*r*51.3%
*-commutative51.3%
associate-*r*51.3%
*-commutative51.3%
Simplified51.3%
Taylor expanded in k around inf 73.0%
*-commutative73.0%
times-frac70.1%
unpow270.1%
unpow270.1%
times-frac87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in k around 0 61.0%
unpow261.0%
*-commutative61.0%
times-frac62.7%
Simplified62.7%
associate-*r/63.8%
Applied egg-rr63.8%
Final simplification64.3%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (/ l t) (* l (pow k -4.0)))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l * pow(k, -4.0)));
}
NOTE: k 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 / t) * (l * (k ** (-4.0d0))))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l * Math.pow(k, -4.0)));
}
k = abs(k) def code(t, l, k): return 2.0 * ((l / t) * (l * math.pow(k, -4.0)))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l / t) * Float64(l * (k ^ -4.0)))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l / t) * (l * (k ^ -4.0))); end
NOTE: k should be positive before calling this function 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}
k = |k|\\
\\
2 \cdot \left(\frac{\ell}{t} \cdot \left(\ell \cdot {k}^{-4}\right)\right)
\end{array}
Initial program 53.9%
associate-/l/53.9%
associate-*l/54.2%
associate-*l/53.1%
associate-/r/53.5%
*-commutative53.5%
associate-/l/53.5%
associate-*r*53.5%
*-commutative53.5%
associate-*r*53.5%
*-commutative53.5%
Simplified53.5%
Taylor expanded in k around inf 57.6%
*-commutative57.6%
times-frac57.7%
unpow257.7%
unpow257.7%
times-frac68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in k around 0 50.5%
unpow250.5%
*-commutative50.5%
times-frac53.5%
Simplified53.5%
expm1-log1p-u41.8%
expm1-udef41.5%
div-inv41.5%
pow-flip41.5%
metadata-eval41.5%
Applied egg-rr41.5%
expm1-def41.8%
expm1-log1p53.5%
Simplified53.5%
Final simplification53.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (/ l t) (/ l (pow k 4.0)))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / pow(k, 4.0)));
}
NOTE: k 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 / t) * (l / (k ** 4.0d0)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
k = abs(k) def code(t, l, k): return 2.0 * ((l / t) * (l / math.pow(k, 4.0)))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end
NOTE: k should be positive before calling this function 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}
k = |k|\\
\\
2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)
\end{array}
Initial program 53.9%
associate-/l/53.9%
associate-*l/54.2%
associate-*l/53.1%
associate-/r/53.5%
*-commutative53.5%
associate-/l/53.5%
associate-*r*53.5%
*-commutative53.5%
associate-*r*53.5%
*-commutative53.5%
Simplified53.5%
Taylor expanded in k around inf 57.6%
*-commutative57.6%
times-frac57.7%
unpow257.7%
unpow257.7%
times-frac68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in k around 0 50.5%
unpow250.5%
*-commutative50.5%
times-frac53.5%
Simplified53.5%
Final simplification53.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (* l (* l (pow k -4.0))) t)))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l * (l * pow(k, -4.0))) / t);
}
NOTE: k 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 * (l * (k ** (-4.0d0)))) / t)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l * (l * Math.pow(k, -4.0))) / t);
}
k = abs(k) def code(t, l, k): return 2.0 * ((l * (l * math.pow(k, -4.0))) / t)
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l * Float64(l * (k ^ -4.0))) / t)) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l * (l * (k ^ -4.0))) / t); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(l * N[(l * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \frac{\ell \cdot \left(\ell \cdot {k}^{-4}\right)}{t}
\end{array}
Initial program 53.9%
associate-/l/53.9%
associate-*l/54.2%
associate-*l/53.1%
associate-/r/53.5%
*-commutative53.5%
associate-/l/53.5%
associate-*r*53.5%
*-commutative53.5%
associate-*r*53.5%
*-commutative53.5%
Simplified53.5%
Taylor expanded in k around inf 57.6%
*-commutative57.6%
times-frac57.7%
unpow257.7%
unpow257.7%
times-frac68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in k around 0 50.5%
unpow250.5%
*-commutative50.5%
times-frac53.5%
Simplified53.5%
associate-*l/53.7%
div-inv53.7%
pow-flip53.7%
metadata-eval53.7%
Applied egg-rr53.7%
Final simplification53.7%
herbie shell --seed 2023243
(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))))