
(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 20 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 1.7e-98)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(if (<= k 2.15e+105)
(/ 2.0 (* (/ (* k k) l) (* (/ t l) (* (sin k) (tan k)))))
(* (* l l) (/ 1.0 (/ (tan k) (/ 2.0 (* k (* k (* t (sin k)))))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.7e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else if (k <= 2.15e+105) {
tmp = 2.0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k))));
} else {
tmp = (l * l) * (1.0 / (tan(k) / (2.0 / (k * (k * (t * sin(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 <= 1.7d-98) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else if (k <= 2.15d+105) then
tmp = 2.0d0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k))))
else
tmp = (l * l) * (1.0d0 / (tan(k) / (2.0d0 / (k * (k * (t * sin(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 <= 1.7e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else if (k <= 2.15e+105) {
tmp = 2.0 / (((k * k) / l) * ((t / l) * (Math.sin(k) * Math.tan(k))));
} else {
tmp = (l * l) * (1.0 / (Math.tan(k) / (2.0 / (k * (k * (t * Math.sin(k)))))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.7e-98: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) elif k <= 2.15e+105: tmp = 2.0 / (((k * k) / l) * ((t / l) * (math.sin(k) * math.tan(k)))) else: tmp = (l * l) * (1.0 / (math.tan(k) / (2.0 / (k * (k * (t * math.sin(k))))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.7e-98) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); elseif (k <= 2.15e+105) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / l) * Float64(Float64(t / l) * Float64(sin(k) * tan(k))))); else tmp = Float64(Float64(l * l) * Float64(1.0 / Float64(tan(k) / Float64(2.0 / Float64(k * Float64(k * Float64(t * sin(k)))))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.7e-98) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); elseif (k <= 2.15e+105) tmp = 2.0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k)))); else tmp = (l * l) * (1.0 / (tan(k) / (2.0 / (k * (k * (t * sin(k))))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.7e-98], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.15e+105], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(1.0 / N[(N[Tan[k], $MachinePrecision] / N[(2.0 / N[(k * N[(k * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.7 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;k \leq 2.15 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{\frac{k \cdot k}{\ell} \cdot \left(\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{1}{\frac{\tan k}{\frac{2}{k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)}}}\\
\end{array}
\end{array}
if k < 1.7000000000000001e-98Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 1.7000000000000001e-98 < k < 2.1500000000000001e105Initial program 44.6%
*-commutative44.6%
associate-*l*44.6%
associate-*r*44.6%
+-commutative44.6%
associate-+r+44.6%
metadata-eval44.6%
Simplified44.6%
Taylor expanded in k around inf 69.8%
unpow269.8%
times-frac92.0%
unpow292.0%
Simplified92.0%
expm1-log1p-u68.9%
expm1-udef42.1%
frac-times35.3%
Applied egg-rr35.3%
expm1-def52.8%
expm1-log1p69.8%
unpow269.8%
unpow269.8%
unpow269.8%
times-frac92.0%
associate-*l*92.2%
unpow292.2%
Simplified92.2%
if 2.1500000000000001e105 < k Initial program 47.9%
associate-/l/47.9%
associate-*l/47.9%
associate-*l/47.9%
associate-/r/47.9%
*-commutative47.9%
associate-/l/47.9%
associate-*r*47.9%
*-commutative47.9%
associate-*r*47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in k around inf 93.5%
associate-*r*93.5%
unpow293.5%
Simplified93.5%
clear-num93.5%
inv-pow93.5%
associate-*l*93.5%
Applied egg-rr93.5%
unpow-193.5%
associate-/l*93.4%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
Final simplification75.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.32e-98) (/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l))))) (* 2.0 (* (/ (cos k) k) (/ (* (/ l t) (/ l (pow (sin k) 2.0))) k)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.32e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else {
tmp = 2.0 * ((cos(k) / k) * (((l / t) * (l / pow(sin(k), 2.0))) / 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 <= 1.32d-98) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else
tmp = 2.0d0 * ((cos(k) / k) * (((l / t) * (l / (sin(k) ** 2.0d0))) / 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 <= 1.32e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else {
tmp = 2.0 * ((Math.cos(k) / k) * (((l / t) * (l / Math.pow(Math.sin(k), 2.0))) / k));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.32e-98: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) else: tmp = 2.0 * ((math.cos(k) / k) * (((l / t) * (l / math.pow(math.sin(k), 2.0))) / k)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.32e-98) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / k) * Float64(Float64(Float64(l / t) * Float64(l / (sin(k) ^ 2.0))) / k))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.32e-98) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); else tmp = 2.0 * ((cos(k) / k) * (((l / t) * (l / (sin(k) ^ 2.0))) / k)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.32e-98], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.32 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k} \cdot \frac{\frac{\ell}{t} \cdot \frac{\ell}{{\sin k}^{2}}}{k}\right)\\
\end{array}
\end{array}
if k < 1.31999999999999995e-98Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 1.31999999999999995e-98 < k Initial program 46.1%
associate-*l*46.1%
associate-/l/46.1%
*-commutative46.1%
associate-*r/46.0%
associate-/l*46.2%
associate-/r/46.1%
Simplified48.8%
Taylor expanded in k around inf 80.5%
times-frac80.6%
unpow280.6%
unpow280.6%
*-commutative80.6%
Simplified80.6%
associate-*l/80.6%
times-frac92.8%
Applied egg-rr92.8%
times-frac95.7%
Simplified95.7%
Final simplification75.1%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 6.7e-99)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(if (<= k 7.2e-14)
(/ 2.0 (* k (* (/ t l) (/ (pow k 3.0) l))))
(if (<= k 5.5e+152)
(* l (* l (/ 2.0 (* (* k k) (* t (* (sin k) (tan k)))))))
(* (/ (/ l (tan k)) (/ k l)) (/ (/ 2.0 (* k t)) (sin k)))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.7e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else if (k <= 7.2e-14) {
tmp = 2.0 / (k * ((t / l) * (pow(k, 3.0) / l)));
} else if (k <= 5.5e+152) {
tmp = l * (l * (2.0 / ((k * k) * (t * (sin(k) * tan(k))))));
} else {
tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(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 <= 6.7d-99) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else if (k <= 7.2d-14) then
tmp = 2.0d0 / (k * ((t / l) * ((k ** 3.0d0) / l)))
else if (k <= 5.5d+152) then
tmp = l * (l * (2.0d0 / ((k * k) * (t * (sin(k) * tan(k))))))
else
tmp = ((l / tan(k)) / (k / l)) * ((2.0d0 / (k * t)) / sin(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 <= 6.7e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else if (k <= 7.2e-14) {
tmp = 2.0 / (k * ((t / l) * (Math.pow(k, 3.0) / l)));
} else if (k <= 5.5e+152) {
tmp = l * (l * (2.0 / ((k * k) * (t * (Math.sin(k) * Math.tan(k))))));
} else {
tmp = ((l / Math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / Math.sin(k));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 6.7e-99: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) elif k <= 7.2e-14: tmp = 2.0 / (k * ((t / l) * (math.pow(k, 3.0) / l))) elif k <= 5.5e+152: tmp = l * (l * (2.0 / ((k * k) * (t * (math.sin(k) * math.tan(k)))))) else: tmp = ((l / math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / math.sin(k)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6.7e-99) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); elseif (k <= 7.2e-14) tmp = Float64(2.0 / Float64(k * Float64(Float64(t / l) * Float64((k ^ 3.0) / l)))); elseif (k <= 5.5e+152) tmp = Float64(l * Float64(l * Float64(2.0 / Float64(Float64(k * k) * Float64(t * Float64(sin(k) * tan(k))))))); else tmp = Float64(Float64(Float64(l / tan(k)) / Float64(k / l)) * Float64(Float64(2.0 / Float64(k * t)) / sin(k))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.7e-99) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); elseif (k <= 7.2e-14) tmp = 2.0 / (k * ((t / l) * ((k ^ 3.0) / l))); elseif (k <= 5.5e+152) tmp = l * (l * (2.0 / ((k * k) * (t * (sin(k) * tan(k)))))); else tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(k)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.7e-99], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e-14], N[(2.0 / N[(k * N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.5e+152], N[(l * N[(l * N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(t * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.7 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{2}{k \cdot \left(\frac{t}{\ell} \cdot \frac{{k}^{3}}{\ell}\right)}\\
\mathbf{elif}\;k \leq 5.5 \cdot 10^{+152}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{2}{\left(k \cdot k\right) \cdot \left(t \cdot \left(\sin k \cdot \tan k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{2}{k \cdot t}}{\sin k}\\
\end{array}
\end{array}
if k < 6.6999999999999999e-99Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 6.6999999999999999e-99 < k < 7.1999999999999996e-14Initial program 46.6%
*-commutative46.6%
associate-*l*46.7%
associate-*r*46.8%
+-commutative46.8%
associate-+r+46.8%
metadata-eval46.8%
Simplified46.8%
Taylor expanded in k around inf 52.0%
unpow252.0%
times-frac83.7%
unpow283.7%
Simplified83.7%
Taylor expanded in k around 0 83.7%
unpow256.0%
Simplified83.7%
pow183.7%
*-commutative83.7%
div-inv83.8%
associate-*r*83.8%
*-commutative83.8%
un-div-inv83.9%
Applied egg-rr83.9%
unpow183.9%
associate-*l*83.8%
*-commutative83.8%
associate-*r*84.1%
*-commutative84.1%
associate-*l*84.1%
associate-*r/84.2%
unpow284.2%
associate-*l/84.2%
unpow284.2%
unpow384.3%
Simplified84.3%
if 7.1999999999999996e-14 < k < 5.4999999999999999e152Initial program 41.8%
associate-/l/41.8%
associate-*l/41.7%
associate-*l/41.7%
associate-/r/41.7%
*-commutative41.7%
associate-/l/41.8%
associate-*r*41.8%
*-commutative41.8%
associate-*r*41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in k around inf 88.2%
associate-*r*88.1%
unpow288.1%
Simplified88.1%
expm1-log1p-u79.5%
expm1-udef41.9%
associate-*l*41.9%
Applied egg-rr41.9%
expm1-def79.6%
expm1-log1p88.2%
associate-*l*99.3%
*-commutative99.3%
unpow299.3%
*-commutative99.3%
associate-*r*99.3%
associate-*r*99.3%
associate-*l*99.3%
unpow299.3%
Simplified99.3%
if 5.4999999999999999e152 < k Initial program 50.0%
associate-/l/50.0%
associate-*l/50.0%
associate-*l/50.0%
associate-/r/50.0%
*-commutative50.0%
associate-/l/50.0%
associate-*r*50.0%
*-commutative50.0%
associate-*r*50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in k around inf 92.2%
associate-*r*92.2%
unpow292.2%
Simplified92.2%
associate-*r/92.2%
associate-*l*92.2%
Applied egg-rr92.2%
times-frac92.2%
Applied egg-rr92.2%
expm1-log1p-u92.2%
expm1-udef92.2%
associate-/l*92.2%
associate-*l*92.2%
*-commutative92.2%
Applied egg-rr92.2%
expm1-def99.9%
expm1-log1p99.9%
associate-*r/99.9%
times-frac96.7%
associate-/r/96.7%
associate-/l*96.7%
associate-*r*96.7%
*-commutative96.7%
associate-/r*96.7%
*-commutative96.7%
Simplified96.7%
Final simplification74.6%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5.8e-99)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(if (<= k 6e-14)
(/ 2.0 (* k (* (/ t l) (/ (pow k 3.0) l))))
(* l (* l (/ 2.0 (* (* k k) (* t (* (sin k) (tan k))))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5.8e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else if (k <= 6e-14) {
tmp = 2.0 / (k * ((t / l) * (pow(k, 3.0) / l)));
} else {
tmp = l * (l * (2.0 / ((k * k) * (t * (sin(k) * tan(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 <= 5.8d-99) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else if (k <= 6d-14) then
tmp = 2.0d0 / (k * ((t / l) * ((k ** 3.0d0) / l)))
else
tmp = l * (l * (2.0d0 / ((k * k) * (t * (sin(k) * tan(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 <= 5.8e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else if (k <= 6e-14) {
tmp = 2.0 / (k * ((t / l) * (Math.pow(k, 3.0) / l)));
} else {
tmp = l * (l * (2.0 / ((k * k) * (t * (Math.sin(k) * Math.tan(k))))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 5.8e-99: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) elif k <= 6e-14: tmp = 2.0 / (k * ((t / l) * (math.pow(k, 3.0) / l))) else: tmp = l * (l * (2.0 / ((k * k) * (t * (math.sin(k) * math.tan(k)))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5.8e-99) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); elseif (k <= 6e-14) tmp = Float64(2.0 / Float64(k * Float64(Float64(t / l) * Float64((k ^ 3.0) / l)))); else tmp = Float64(l * Float64(l * Float64(2.0 / Float64(Float64(k * k) * Float64(t * Float64(sin(k) * tan(k))))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.8e-99) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); elseif (k <= 6e-14) tmp = 2.0 / (k * ((t / l) * ((k ^ 3.0) / l))); else tmp = l * (l * (2.0 / ((k * k) * (t * (sin(k) * tan(k)))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5.8e-99], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6e-14], N[(2.0 / N[(k * N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l * N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(t * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.8 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;k \leq 6 \cdot 10^{-14}:\\
\;\;\;\;\frac{2}{k \cdot \left(\frac{t}{\ell} \cdot \frac{{k}^{3}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{2}{\left(k \cdot k\right) \cdot \left(t \cdot \left(\sin k \cdot \tan k\right)\right)}\right)\\
\end{array}
\end{array}
if k < 5.79999999999999971e-99Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 5.79999999999999971e-99 < k < 5.9999999999999997e-14Initial program 46.6%
*-commutative46.6%
associate-*l*46.7%
associate-*r*46.8%
+-commutative46.8%
associate-+r+46.8%
metadata-eval46.8%
Simplified46.8%
Taylor expanded in k around inf 52.0%
unpow252.0%
times-frac83.7%
unpow283.7%
Simplified83.7%
Taylor expanded in k around 0 83.7%
unpow256.0%
Simplified83.7%
pow183.7%
*-commutative83.7%
div-inv83.8%
associate-*r*83.8%
*-commutative83.8%
un-div-inv83.9%
Applied egg-rr83.9%
unpow183.9%
associate-*l*83.8%
*-commutative83.8%
associate-*r*84.1%
*-commutative84.1%
associate-*l*84.1%
associate-*r/84.2%
unpow284.2%
associate-*l/84.2%
unpow284.2%
unpow384.3%
Simplified84.3%
if 5.9999999999999997e-14 < k Initial program 45.9%
associate-/l/45.9%
associate-*l/45.9%
associate-*l/45.9%
associate-/r/45.9%
*-commutative45.9%
associate-/l/45.9%
associate-*r*45.9%
*-commutative45.9%
associate-*r*45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in k around inf 90.2%
associate-*r*90.1%
unpow290.1%
Simplified90.1%
expm1-log1p-u85.8%
expm1-udef67.1%
associate-*l*67.1%
Applied egg-rr67.1%
expm1-def85.9%
expm1-log1p90.2%
associate-*l*95.7%
*-commutative95.7%
unpow295.7%
*-commutative95.7%
associate-*r*95.7%
associate-*r*95.7%
associate-*l*95.7%
unpow295.7%
Simplified95.7%
Final simplification74.0%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 1.45e-98)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(if (<= k 2e+106)
(/ 2.0 (* (* (sin k) (tan k)) (* (/ t l) (/ k (/ l k)))))
(* (/ (/ l (tan k)) (/ k l)) (/ (/ 2.0 (* k t)) (sin k))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.45e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else if (k <= 2e+106) {
tmp = 2.0 / ((sin(k) * tan(k)) * ((t / l) * (k / (l / k))));
} else {
tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(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 <= 1.45d-98) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else if (k <= 2d+106) then
tmp = 2.0d0 / ((sin(k) * tan(k)) * ((t / l) * (k / (l / k))))
else
tmp = ((l / tan(k)) / (k / l)) * ((2.0d0 / (k * t)) / sin(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 <= 1.45e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else if (k <= 2e+106) {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * ((t / l) * (k / (l / k))));
} else {
tmp = ((l / Math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / Math.sin(k));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.45e-98: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) elif k <= 2e+106: tmp = 2.0 / ((math.sin(k) * math.tan(k)) * ((t / l) * (k / (l / k)))) else: tmp = ((l / math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / math.sin(k)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.45e-98) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); elseif (k <= 2e+106) tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * Float64(Float64(t / l) * Float64(k / Float64(l / k))))); else tmp = Float64(Float64(Float64(l / tan(k)) / Float64(k / l)) * Float64(Float64(2.0 / Float64(k * t)) / sin(k))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.45e-98) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); elseif (k <= 2e+106) tmp = 2.0 / ((sin(k) * tan(k)) * ((t / l) * (k / (l / k)))); else tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(k)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.45e-98], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e+106], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.45 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;k \leq 2 \cdot 10^{+106}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot \left(\frac{t}{\ell} \cdot \frac{k}{\frac{\ell}{k}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{2}{k \cdot t}}{\sin k}\\
\end{array}
\end{array}
if k < 1.45e-98Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 1.45e-98 < k < 2.00000000000000018e106Initial program 44.6%
*-commutative44.6%
associate-*l*44.6%
associate-*r*44.6%
+-commutative44.6%
associate-+r+44.6%
metadata-eval44.6%
Simplified44.6%
Taylor expanded in k around inf 69.8%
unpow269.8%
times-frac92.0%
unpow292.0%
Simplified92.0%
add-log-exp28.5%
exp-prod28.1%
associate-/l*28.1%
Applied egg-rr28.1%
log-pow29.6%
rem-log-exp59.6%
Simplified92.1%
if 2.00000000000000018e106 < k Initial program 47.9%
associate-/l/47.9%
associate-*l/47.9%
associate-*l/47.9%
associate-/r/47.9%
*-commutative47.9%
associate-/l/47.9%
associate-*r*47.9%
*-commutative47.9%
associate-*r*47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in k around inf 93.5%
associate-*r*93.5%
unpow293.5%
Simplified93.5%
associate-*r/93.5%
associate-*l*93.6%
Applied egg-rr93.6%
times-frac93.4%
Applied egg-rr93.4%
expm1-log1p-u93.4%
expm1-udef83.0%
associate-/l*83.0%
associate-*l*83.0%
*-commutative83.0%
Applied egg-rr83.0%
expm1-def99.8%
expm1-log1p99.8%
associate-*r/99.8%
times-frac93.1%
associate-/r/93.1%
associate-/l*93.1%
associate-*r*93.1%
*-commutative93.1%
associate-/r*93.1%
*-commutative93.1%
Simplified93.1%
Final simplification73.9%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5e-99)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(if (<= k 2.15e+105)
(/ 2.0 (* (/ (* k k) l) (* (/ t l) (* (sin k) (tan k)))))
(* (/ (/ l (tan k)) (/ k l)) (/ (/ 2.0 (* k t)) (sin k))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else if (k <= 2.15e+105) {
tmp = 2.0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k))));
} else {
tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(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 <= 5d-99) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else if (k <= 2.15d+105) then
tmp = 2.0d0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k))))
else
tmp = ((l / tan(k)) / (k / l)) * ((2.0d0 / (k * t)) / sin(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 <= 5e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else if (k <= 2.15e+105) {
tmp = 2.0 / (((k * k) / l) * ((t / l) * (Math.sin(k) * Math.tan(k))));
} else {
tmp = ((l / Math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / Math.sin(k));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 5e-99: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) elif k <= 2.15e+105: tmp = 2.0 / (((k * k) / l) * ((t / l) * (math.sin(k) * math.tan(k)))) else: tmp = ((l / math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / math.sin(k)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5e-99) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); elseif (k <= 2.15e+105) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / l) * Float64(Float64(t / l) * Float64(sin(k) * tan(k))))); else tmp = Float64(Float64(Float64(l / tan(k)) / Float64(k / l)) * Float64(Float64(2.0 / Float64(k * t)) / sin(k))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5e-99) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); elseif (k <= 2.15e+105) tmp = 2.0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k)))); else tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(k)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5e-99], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.15e+105], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;k \leq 2.15 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{\frac{k \cdot k}{\ell} \cdot \left(\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{2}{k \cdot t}}{\sin k}\\
\end{array}
\end{array}
if k < 4.99999999999999969e-99Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 4.99999999999999969e-99 < k < 2.1500000000000001e105Initial program 44.6%
*-commutative44.6%
associate-*l*44.6%
associate-*r*44.6%
+-commutative44.6%
associate-+r+44.6%
metadata-eval44.6%
Simplified44.6%
Taylor expanded in k around inf 69.8%
unpow269.8%
times-frac92.0%
unpow292.0%
Simplified92.0%
expm1-log1p-u68.9%
expm1-udef42.1%
frac-times35.3%
Applied egg-rr35.3%
expm1-def52.8%
expm1-log1p69.8%
unpow269.8%
unpow269.8%
unpow269.8%
times-frac92.0%
associate-*l*92.2%
unpow292.2%
Simplified92.2%
if 2.1500000000000001e105 < k Initial program 47.9%
associate-/l/47.9%
associate-*l/47.9%
associate-*l/47.9%
associate-/r/47.9%
*-commutative47.9%
associate-/l/47.9%
associate-*r*47.9%
*-commutative47.9%
associate-*r*47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in k around inf 93.5%
associate-*r*93.5%
unpow293.5%
Simplified93.5%
associate-*r/93.5%
associate-*l*93.6%
Applied egg-rr93.6%
times-frac93.4%
Applied egg-rr93.4%
expm1-log1p-u93.4%
expm1-udef83.0%
associate-/l*83.0%
associate-*l*83.0%
*-commutative83.0%
Applied egg-rr83.0%
expm1-def99.8%
expm1-log1p99.8%
associate-*r/99.8%
times-frac93.1%
associate-/r/93.1%
associate-/l*93.1%
associate-*r*93.1%
*-commutative93.1%
associate-/r*93.1%
*-commutative93.1%
Simplified93.1%
Final simplification73.9%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 1.5e-98)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(if (<= k 6e+152)
(/ 2.0 (* (* (sin k) (tan k)) (/ (* (* k k) (/ t l)) l)))
(* (/ (/ l (tan k)) (/ k l)) (/ (/ 2.0 (* k t)) (sin k))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.5e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else if (k <= 6e+152) {
tmp = 2.0 / ((sin(k) * tan(k)) * (((k * k) * (t / l)) / l));
} else {
tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(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 <= 1.5d-98) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else if (k <= 6d+152) then
tmp = 2.0d0 / ((sin(k) * tan(k)) * (((k * k) * (t / l)) / l))
else
tmp = ((l / tan(k)) / (k / l)) * ((2.0d0 / (k * t)) / sin(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 <= 1.5e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else if (k <= 6e+152) {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * (((k * k) * (t / l)) / l));
} else {
tmp = ((l / Math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / Math.sin(k));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.5e-98: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) elif k <= 6e+152: tmp = 2.0 / ((math.sin(k) * math.tan(k)) * (((k * k) * (t / l)) / l)) else: tmp = ((l / math.tan(k)) / (k / l)) * ((2.0 / (k * t)) / math.sin(k)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.5e-98) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); elseif (k <= 6e+152) tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * Float64(Float64(Float64(k * k) * Float64(t / l)) / l))); else tmp = Float64(Float64(Float64(l / tan(k)) / Float64(k / l)) * Float64(Float64(2.0 / Float64(k * t)) / sin(k))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.5e-98) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); elseif (k <= 6e+152) tmp = 2.0 / ((sin(k) * tan(k)) * (((k * k) * (t / l)) / l)); else tmp = ((l / tan(k)) / (k / l)) * ((2.0 / (k * t)) / sin(k)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.5e-98], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6e+152], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.5 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;k \leq 6 \cdot 10^{+152}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot \frac{\left(k \cdot k\right) \cdot \frac{t}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{2}{k \cdot t}}{\sin k}\\
\end{array}
\end{array}
if k < 1.5e-98Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 1.5e-98 < k < 5.99999999999999981e152Initial program 43.7%
*-commutative43.7%
associate-*l*43.7%
associate-*r*43.8%
+-commutative43.8%
associate-+r+43.8%
metadata-eval43.8%
Simplified43.8%
Taylor expanded in k around inf 73.7%
unpow273.7%
times-frac88.4%
unpow288.4%
Simplified88.4%
associate-*l/93.1%
Applied egg-rr93.1%
if 5.99999999999999981e152 < k Initial program 50.0%
associate-/l/50.0%
associate-*l/50.0%
associate-*l/50.0%
associate-/r/50.0%
*-commutative50.0%
associate-/l/50.0%
associate-*r*50.0%
*-commutative50.0%
associate-*r*50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in k around inf 92.2%
associate-*r*92.2%
unpow292.2%
Simplified92.2%
associate-*r/92.2%
associate-*l*92.2%
Applied egg-rr92.2%
times-frac92.2%
Applied egg-rr92.2%
expm1-log1p-u92.2%
expm1-udef92.2%
associate-/l*92.2%
associate-*l*92.2%
*-commutative92.2%
Applied egg-rr92.2%
expm1-def99.9%
expm1-log1p99.9%
associate-*r/99.9%
times-frac96.7%
associate-/r/96.7%
associate-/l*96.7%
associate-*r*96.7%
*-commutative96.7%
associate-/r*96.7%
*-commutative96.7%
Simplified96.7%
Final simplification74.6%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 1.2e-98)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(if (<= k 2.15e+105)
(/ 2.0 (* (/ (* k k) l) (* (/ t l) (* (sin k) (tan k)))))
(/ (* (* l l) (/ 2.0 (* k (* k (* t (sin k)))))) (tan k)))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.2e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else if (k <= 2.15e+105) {
tmp = 2.0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k))));
} else {
tmp = ((l * l) * (2.0 / (k * (k * (t * sin(k)))))) / tan(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 <= 1.2d-98) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else if (k <= 2.15d+105) then
tmp = 2.0d0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k))))
else
tmp = ((l * l) * (2.0d0 / (k * (k * (t * sin(k)))))) / tan(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 <= 1.2e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else if (k <= 2.15e+105) {
tmp = 2.0 / (((k * k) / l) * ((t / l) * (Math.sin(k) * Math.tan(k))));
} else {
tmp = ((l * l) * (2.0 / (k * (k * (t * Math.sin(k)))))) / Math.tan(k);
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.2e-98: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) elif k <= 2.15e+105: tmp = 2.0 / (((k * k) / l) * ((t / l) * (math.sin(k) * math.tan(k)))) else: tmp = ((l * l) * (2.0 / (k * (k * (t * math.sin(k)))))) / math.tan(k) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.2e-98) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); elseif (k <= 2.15e+105) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / l) * Float64(Float64(t / l) * Float64(sin(k) * tan(k))))); else tmp = Float64(Float64(Float64(l * l) * Float64(2.0 / Float64(k * Float64(k * Float64(t * sin(k)))))) / tan(k)); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.2e-98) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); elseif (k <= 2.15e+105) tmp = 2.0 / (((k * k) / l) * ((t / l) * (sin(k) * tan(k)))); else tmp = ((l * l) * (2.0 / (k * (k * (t * sin(k)))))) / tan(k); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.2e-98], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.15e+105], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(k * N[(k * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;k \leq 2.15 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{\frac{k \cdot k}{\ell} \cdot \left(\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \frac{2}{k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)}}{\tan k}\\
\end{array}
\end{array}
if k < 1.20000000000000002e-98Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 1.20000000000000002e-98 < k < 2.1500000000000001e105Initial program 44.6%
*-commutative44.6%
associate-*l*44.6%
associate-*r*44.6%
+-commutative44.6%
associate-+r+44.6%
metadata-eval44.6%
Simplified44.6%
Taylor expanded in k around inf 69.8%
unpow269.8%
times-frac92.0%
unpow292.0%
Simplified92.0%
expm1-log1p-u68.9%
expm1-udef42.1%
frac-times35.3%
Applied egg-rr35.3%
expm1-def52.8%
expm1-log1p69.8%
unpow269.8%
unpow269.8%
unpow269.8%
times-frac92.0%
associate-*l*92.2%
unpow292.2%
Simplified92.2%
if 2.1500000000000001e105 < k Initial program 47.9%
associate-/l/47.9%
associate-*l/47.9%
associate-*l/47.9%
associate-/r/47.9%
*-commutative47.9%
associate-/l/47.9%
associate-*r*47.9%
*-commutative47.9%
associate-*r*47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in k around inf 93.5%
associate-*r*93.5%
unpow293.5%
Simplified93.5%
associate-*r/93.5%
associate-*l*93.6%
Applied egg-rr93.6%
times-frac93.4%
Applied egg-rr93.4%
associate-*l/93.5%
associate-*l*99.9%
*-commutative99.9%
Applied egg-rr99.9%
Final simplification75.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 9.5e-99) (/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l))))) (/ 2.0 (* (* (sin k) (tan k)) (/ (/ (* k t) (/ l k)) l)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else {
tmp = 2.0 / ((sin(k) * tan(k)) * (((k * t) / (l / k)) / l));
}
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 <= 9.5d-99) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else
tmp = 2.0d0 / ((sin(k) * tan(k)) * (((k * t) / (l / k)) / l))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * (((k * t) / (l / k)) / l));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 9.5e-99: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) else: tmp = 2.0 / ((math.sin(k) * math.tan(k)) * (((k * t) / (l / k)) / l)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 9.5e-99) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * Float64(Float64(Float64(k * t) / Float64(l / k)) / l))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9.5e-99) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); else tmp = 2.0 / ((sin(k) * tan(k)) * (((k * t) / (l / k)) / l)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 9.5e-99], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(k * t), $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot \frac{\frac{k \cdot t}{\frac{\ell}{k}}}{\ell}}\\
\end{array}
\end{array}
if k < 9.5000000000000008e-99Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 9.5000000000000008e-99 < k Initial program 46.1%
*-commutative46.1%
associate-*l*46.1%
associate-*r*46.1%
+-commutative46.1%
associate-+r+46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in k around inf 80.6%
unpow280.6%
times-frac89.8%
unpow289.8%
Simplified89.8%
associate-*l/92.7%
Applied egg-rr92.7%
Taylor expanded in k around 0 89.4%
*-commutative89.4%
unpow289.4%
associate-*l*92.3%
associate-/l*94.2%
*-commutative94.2%
Simplified94.2%
Final simplification74.5%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 2.25e-98)
(/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l)))))
(*
2.0
(*
(/ (cos k) k)
(/ (* (/ l t) (+ (/ l (* k k)) (* l 0.3333333333333333))) k)))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.25e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else {
tmp = 2.0 * ((cos(k) / k) * (((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))) / 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 <= 2.25d-98) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else
tmp = 2.0d0 * ((cos(k) / k) * (((l / t) * ((l / (k * k)) + (l * 0.3333333333333333d0))) / 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 <= 2.25e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else {
tmp = 2.0 * ((Math.cos(k) / k) * (((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))) / k));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.25e-98: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) else: tmp = 2.0 * ((math.cos(k) / k) * (((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))) / k)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.25e-98) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / k) * Float64(Float64(Float64(l / t) * Float64(Float64(l / Float64(k * k)) + Float64(l * 0.3333333333333333))) / k))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.25e-98) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); else tmp = 2.0 * ((cos(k) / k) * (((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))) / k)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.25e-98], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] * N[(N[(N[(l / t), $MachinePrecision] * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] + N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.25 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k} \cdot \frac{\frac{\ell}{t} \cdot \left(\frac{\ell}{k \cdot k} + \ell \cdot 0.3333333333333333\right)}{k}\right)\\
\end{array}
\end{array}
if k < 2.24999999999999998e-98Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 2.24999999999999998e-98 < k Initial program 46.1%
associate-*l*46.1%
associate-/l/46.1%
*-commutative46.1%
associate-*r/46.0%
associate-/l*46.2%
associate-/r/46.1%
Simplified48.8%
Taylor expanded in k around inf 80.5%
times-frac80.6%
unpow280.6%
unpow280.6%
*-commutative80.6%
Simplified80.6%
associate-*l/80.6%
times-frac92.8%
Applied egg-rr92.8%
times-frac95.7%
Simplified95.7%
Taylor expanded in k around 0 73.4%
unpow273.4%
*-commutative73.4%
Simplified73.4%
Final simplification66.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 6.8e-99) (/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l))))) (* 2.0 (* (/ (cos k) (* k k)) (* (/ l t) (/ l (* k k)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.8e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (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 <= 6.8d-99) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l / t) * (l / (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 <= 6.8e-99) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 6.8e-99: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l / t) * (l / (k * k)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6.8e-99) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); 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
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.8e-99) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.8e-99], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $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}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.8 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\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 k < 6.80000000000000014e-99Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 6.80000000000000014e-99 < k Initial program 46.1%
associate-*l*46.1%
associate-/l/46.1%
*-commutative46.1%
associate-*r/46.0%
associate-/l*46.2%
associate-/r/46.1%
Simplified48.8%
Taylor expanded in k around inf 80.5%
times-frac80.6%
unpow280.6%
unpow280.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in k around 0 62.7%
unpow262.7%
times-frac70.8%
unpow270.8%
Simplified70.8%
Final simplification65.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.6e-98) (/ 2.0 (* 2.0 (* (/ k l) (* k (/ (pow t 3.0) l))))) (/ 2.0 (* k (* (/ t l) (/ (pow k 3.0) l))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.6e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (pow(t, 3.0) / l))));
} else {
tmp = 2.0 / (k * ((t / l) * (pow(k, 3.0) / l)));
}
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.6d-98) then
tmp = 2.0d0 / (2.0d0 * ((k / l) * (k * ((t ** 3.0d0) / l))))
else
tmp = 2.0d0 / (k * ((t / l) * ((k ** 3.0d0) / l)))
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.6e-98) {
tmp = 2.0 / (2.0 * ((k / l) * (k * (Math.pow(t, 3.0) / l))));
} else {
tmp = 2.0 / (k * ((t / l) * (Math.pow(k, 3.0) / l)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.6e-98: tmp = 2.0 / (2.0 * ((k / l) * (k * (math.pow(t, 3.0) / l)))) else: tmp = 2.0 / (k * ((t / l) * (math.pow(k, 3.0) / l))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.6e-98) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k / l) * Float64(k * Float64((t ^ 3.0) / l))))); else tmp = Float64(2.0 / Float64(k * Float64(Float64(t / l) * Float64((k ^ 3.0) / l)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.6e-98) tmp = 2.0 / (2.0 * ((k / l) * (k * ((t ^ 3.0) / l)))); else tmp = 2.0 / (k * ((t / l) * ((k ^ 3.0) / l))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.6e-98], N[(2.0 / N[(2.0 * N[(N[(k / l), $MachinePrecision] * N[(k * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k * N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.6 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\frac{k}{\ell} \cdot \left(k \cdot \frac{{t}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(\frac{t}{\ell} \cdot \frac{{k}^{3}}{\ell}\right)}\\
\end{array}
\end{array}
if k < 1.6e-98Initial program 43.9%
*-commutative43.9%
associate-*l*41.9%
associate-*r*41.9%
+-commutative41.9%
associate-+r+41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in k around 0 38.4%
*-commutative38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
div-inv58.9%
inv-pow58.9%
Applied egg-rr58.9%
associate-*l*64.1%
unpow-164.1%
Simplified64.1%
Taylor expanded in t around 0 38.4%
unpow238.4%
times-frac58.9%
unpow258.9%
associate-*l/64.1%
associate-*l*62.7%
Simplified62.7%
if 1.6e-98 < k Initial program 46.1%
*-commutative46.1%
associate-*l*46.1%
associate-*r*46.1%
+-commutative46.1%
associate-+r+46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in k around inf 80.6%
unpow280.6%
times-frac89.8%
unpow289.8%
Simplified89.8%
Taylor expanded in k around 0 70.3%
unpow263.4%
Simplified70.3%
pow170.3%
*-commutative70.3%
div-inv70.3%
associate-*r*70.3%
*-commutative70.3%
un-div-inv70.3%
Applied egg-rr70.3%
unpow170.3%
associate-*l*70.3%
*-commutative70.3%
associate-*r*70.4%
*-commutative70.4%
associate-*l*70.4%
associate-*r/70.4%
unpow270.4%
associate-*l/70.4%
unpow270.4%
unpow370.4%
Simplified70.4%
Final simplification65.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 6.3e-99) (* (/ l (pow t 3.0)) (/ 1.0 (/ k (/ l k)))) (* 2.0 (/ 1.0 (* (* k k) (* (/ t l) (* k (/ k l))))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.3e-99) {
tmp = (l / pow(t, 3.0)) * (1.0 / (k / (l / k)));
} else {
tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l)))));
}
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 <= 6.3d-99) then
tmp = (l / (t ** 3.0d0)) * (1.0d0 / (k / (l / k)))
else
tmp = 2.0d0 * (1.0d0 / ((k * k) * ((t / l) * (k * (k / l)))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6.3e-99) {
tmp = (l / Math.pow(t, 3.0)) * (1.0 / (k / (l / k)));
} else {
tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 6.3e-99: tmp = (l / math.pow(t, 3.0)) * (1.0 / (k / (l / k))) else: tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6.3e-99) tmp = Float64(Float64(l / (t ^ 3.0)) * Float64(1.0 / Float64(k / Float64(l / k)))); else tmp = Float64(2.0 * Float64(1.0 / Float64(Float64(k * k) * Float64(Float64(t / l) * Float64(k * Float64(k / l)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.3e-99) tmp = (l / (t ^ 3.0)) * (1.0 / (k / (l / k))); else tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.3e-99], N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(1.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.3 \cdot 10^{-99}:\\
\;\;\;\;\frac{\ell}{{t}^{3}} \cdot \frac{1}{\frac{k}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{1}{\left(k \cdot k\right) \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot \frac{k}{\ell}\right)\right)}\\
\end{array}
\end{array}
if k < 6.29999999999999992e-99Initial program 43.9%
associate-*l*43.9%
associate-/l/43.9%
*-commutative43.9%
associate-*r/42.6%
associate-/l*43.9%
associate-/r/41.5%
Simplified57.8%
Taylor expanded in k around 0 38.4%
unpow238.4%
*-commutative38.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
clear-num58.9%
inv-pow58.9%
associate-/l*63.8%
Applied egg-rr63.8%
unpow-163.8%
Simplified63.8%
if 6.29999999999999992e-99 < k Initial program 46.1%
*-commutative46.1%
associate-*l*46.1%
associate-*r*46.1%
+-commutative46.1%
associate-+r+46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in k around inf 80.6%
unpow280.6%
times-frac89.8%
unpow289.8%
Simplified89.8%
Taylor expanded in k around 0 70.3%
unpow263.4%
Simplified70.3%
div-inv70.3%
*-commutative70.3%
div-inv70.3%
associate-*r*70.3%
*-commutative70.3%
un-div-inv70.3%
Applied egg-rr70.3%
Final simplification66.2%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 6.6e-99) (* (/ l (pow t 3.0)) (/ 1.0 (/ k (/ l k)))) (/ 2.0 (* k (* (/ t l) (/ (pow k 3.0) l))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.6e-99) {
tmp = (l / pow(t, 3.0)) * (1.0 / (k / (l / k)));
} else {
tmp = 2.0 / (k * ((t / l) * (pow(k, 3.0) / l)));
}
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 <= 6.6d-99) then
tmp = (l / (t ** 3.0d0)) * (1.0d0 / (k / (l / k)))
else
tmp = 2.0d0 / (k * ((t / l) * ((k ** 3.0d0) / l)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6.6e-99) {
tmp = (l / Math.pow(t, 3.0)) * (1.0 / (k / (l / k)));
} else {
tmp = 2.0 / (k * ((t / l) * (Math.pow(k, 3.0) / l)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 6.6e-99: tmp = (l / math.pow(t, 3.0)) * (1.0 / (k / (l / k))) else: tmp = 2.0 / (k * ((t / l) * (math.pow(k, 3.0) / l))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6.6e-99) tmp = Float64(Float64(l / (t ^ 3.0)) * Float64(1.0 / Float64(k / Float64(l / k)))); else tmp = Float64(2.0 / Float64(k * Float64(Float64(t / l) * Float64((k ^ 3.0) / l)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.6e-99) tmp = (l / (t ^ 3.0)) * (1.0 / (k / (l / k))); else tmp = 2.0 / (k * ((t / l) * ((k ^ 3.0) / l))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.6e-99], N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k * N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.6 \cdot 10^{-99}:\\
\;\;\;\;\frac{\ell}{{t}^{3}} \cdot \frac{1}{\frac{k}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(\frac{t}{\ell} \cdot \frac{{k}^{3}}{\ell}\right)}\\
\end{array}
\end{array}
if k < 6.59999999999999973e-99Initial program 43.9%
associate-*l*43.9%
associate-/l/43.9%
*-commutative43.9%
associate-*r/42.6%
associate-/l*43.9%
associate-/r/41.5%
Simplified57.8%
Taylor expanded in k around 0 38.4%
unpow238.4%
*-commutative38.4%
times-frac58.9%
unpow258.9%
Simplified58.9%
clear-num58.9%
inv-pow58.9%
associate-/l*63.8%
Applied egg-rr63.8%
unpow-163.8%
Simplified63.8%
if 6.59999999999999973e-99 < k Initial program 46.1%
*-commutative46.1%
associate-*l*46.1%
associate-*r*46.1%
+-commutative46.1%
associate-+r+46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in k around inf 80.6%
unpow280.6%
times-frac89.8%
unpow289.8%
Simplified89.8%
Taylor expanded in k around 0 70.3%
unpow263.4%
Simplified70.3%
pow170.3%
*-commutative70.3%
div-inv70.3%
associate-*r*70.3%
*-commutative70.3%
un-div-inv70.3%
Applied egg-rr70.3%
unpow170.3%
associate-*l*70.3%
*-commutative70.3%
associate-*r*70.4%
*-commutative70.4%
associate-*l*70.4%
associate-*r/70.4%
unpow270.4%
associate-*l/70.4%
unpow270.4%
unpow370.4%
Simplified70.4%
Final simplification66.3%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= t -5.6e-39) (* (/ l (* k k)) (/ l (pow t 3.0))) (* 2.0 (/ 1.0 (* (* k k) (* (/ t l) (* k (/ k l))))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -5.6e-39) {
tmp = (l / (k * k)) * (l / pow(t, 3.0));
} else {
tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l)))));
}
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 (t <= (-5.6d-39)) then
tmp = (l / (k * k)) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 * (1.0d0 / ((k * k) * ((t / l) * (k * (k / l)))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -5.6e-39) {
tmp = (l / (k * k)) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -5.6e-39: tmp = (l / (k * k)) * (l / math.pow(t, 3.0)) else: tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -5.6e-39) tmp = Float64(Float64(l / Float64(k * k)) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(1.0 / Float64(Float64(k * k) * Float64(Float64(t / l) * Float64(k * Float64(k / l)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -5.6e-39) tmp = (l / (k * k)) * (l / (t ^ 3.0)); else tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -5.6e-39], N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(1.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{-39}:\\
\;\;\;\;\frac{\ell}{k \cdot k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{1}{\left(k \cdot k\right) \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot \frac{k}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < -5.6000000000000003e-39Initial program 81.6%
associate-*l*81.6%
associate-/l/81.4%
*-commutative81.4%
associate-*r/81.1%
associate-/l*81.5%
associate-/r/77.7%
Simplified77.7%
Taylor expanded in k around 0 60.0%
unpow260.0%
*-commutative60.0%
times-frac78.0%
unpow278.0%
Simplified78.0%
if -5.6000000000000003e-39 < t Initial program 40.6%
*-commutative40.6%
associate-*l*39.6%
associate-*r*39.6%
+-commutative39.6%
associate-+r+39.6%
metadata-eval39.6%
Simplified39.6%
Taylor expanded in k around inf 72.8%
unpow272.8%
times-frac91.3%
unpow291.3%
Simplified91.3%
Taylor expanded in k around 0 78.9%
unpow272.0%
Simplified78.9%
div-inv78.9%
*-commutative78.9%
div-inv79.0%
associate-*r*79.0%
*-commutative79.0%
un-div-inv79.0%
Applied egg-rr79.0%
Final simplification78.9%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ 1.0 (* (* k k) (* (/ t l) (* k (/ k l)))))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l)))));
}
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 * (1.0d0 / ((k * k) * ((t / l) * (k * (k / l)))))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l)))));
}
k = abs(k) def code(t, l, k): return 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l)))))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(1.0 / Float64(Float64(k * k) * Float64(Float64(t / l) * Float64(k * Float64(k / l)))))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * (1.0 / ((k * k) * ((t / l) * (k * (k / l))))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(1.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \frac{1}{\left(k \cdot k\right) \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot \frac{k}{\ell}\right)\right)}
\end{array}
Initial program 44.7%
*-commutative44.7%
associate-*l*43.5%
associate-*r*43.5%
+-commutative43.5%
associate-+r+43.5%
metadata-eval43.5%
Simplified43.5%
Taylor expanded in k around inf 71.5%
unpow271.5%
times-frac88.1%
unpow288.1%
Simplified88.1%
Taylor expanded in k around 0 76.0%
unpow269.7%
Simplified76.0%
div-inv76.0%
*-commutative76.0%
div-inv76.0%
associate-*r*76.0%
*-commutative76.0%
un-div-inv76.0%
Applied egg-rr76.0%
Final simplification76.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* l (* l (/ 2.0 (* (* k k) (* t (* k k)))))))
k = abs(k);
double code(double t, double l, double k) {
return l * (l * (2.0 / ((k * k) * (t * (k * k)))));
}
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 = l * (l * (2.0d0 / ((k * k) * (t * (k * k)))))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return l * (l * (2.0 / ((k * k) * (t * (k * k)))));
}
k = abs(k) def code(t, l, k): return l * (l * (2.0 / ((k * k) * (t * (k * k)))))
k = abs(k) function code(t, l, k) return Float64(l * Float64(l * Float64(2.0 / Float64(Float64(k * k) * Float64(t * Float64(k * k)))))) end
k = abs(k) function tmp = code(t, l, k) tmp = l * (l * (2.0 / ((k * k) * (t * (k * k))))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(l * N[(l * N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\ell \cdot \left(\ell \cdot \frac{2}{\left(k \cdot k\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}\right)
\end{array}
Initial program 44.7%
associate-/l/44.7%
associate-*l/43.9%
associate-*l/41.7%
associate-/r/41.7%
*-commutative41.7%
associate-/l/41.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in k around inf 70.2%
associate-*r*70.2%
unpow270.2%
Simplified70.2%
expm1-log1p-u58.8%
expm1-udef48.1%
associate-*l*48.1%
Applied egg-rr48.1%
expm1-def58.8%
expm1-log1p70.2%
associate-*l*83.6%
*-commutative83.6%
unpow283.6%
*-commutative83.6%
associate-*r*83.6%
associate-*r*83.6%
associate-*l*83.6%
unpow283.6%
Simplified83.6%
Taylor expanded in k around 0 69.7%
unpow269.7%
Simplified69.7%
Final simplification69.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* l (/ (* 2.0 l) (* (* k k) (* k (* k t))))))
k = abs(k);
double code(double t, double l, double k) {
return l * ((2.0 * l) / ((k * k) * (k * (k * 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 = l * ((2.0d0 * l) / ((k * k) * (k * (k * t))))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return l * ((2.0 * l) / ((k * k) * (k * (k * t))));
}
k = abs(k) def code(t, l, k): return l * ((2.0 * l) / ((k * k) * (k * (k * t))))
k = abs(k) function code(t, l, k) return Float64(l * Float64(Float64(2.0 * l) / Float64(Float64(k * k) * Float64(k * Float64(k * t))))) end
k = abs(k) function tmp = code(t, l, k) tmp = l * ((2.0 * l) / ((k * k) * (k * (k * t)))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(l * N[(N[(2.0 * l), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\ell \cdot \frac{2 \cdot \ell}{\left(k \cdot k\right) \cdot \left(k \cdot \left(k \cdot t\right)\right)}
\end{array}
Initial program 44.7%
associate-/l/44.7%
associate-*l/43.9%
associate-*l/41.7%
associate-/r/41.7%
*-commutative41.7%
associate-/l/41.7%
associate-*r*41.7%
*-commutative41.7%
associate-*r*41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in k around inf 70.2%
associate-*r*70.2%
unpow270.2%
Simplified70.2%
expm1-log1p-u58.8%
expm1-udef48.1%
associate-*l*48.1%
Applied egg-rr48.1%
expm1-def58.8%
expm1-log1p70.2%
associate-*l*83.6%
*-commutative83.6%
unpow283.6%
*-commutative83.6%
associate-*r*83.6%
associate-*r*83.6%
associate-*l*83.6%
unpow283.6%
Simplified83.6%
Taylor expanded in k around 0 69.7%
unpow269.7%
Simplified69.7%
associate-*r/69.8%
associate-*r*69.9%
Applied egg-rr69.9%
Final simplification69.9%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (* k (* k (* (/ t l) (* k (/ k l)))))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / (k * (k * ((t / l) * (k * (k / l)))));
}
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 / (k * (k * ((t / l) * (k * (k / l)))))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / (k * (k * ((t / l) * (k * (k / l)))));
}
k = abs(k) def code(t, l, k): return 2.0 / (k * (k * ((t / l) * (k * (k / l)))))
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(k * Float64(k * Float64(Float64(t / l) * Float64(k * Float64(k / l)))))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / (k * (k * ((t / l) * (k * (k / l))))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(k * N[(k * N[(N[(t / l), $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot \frac{k}{\ell}\right)\right)\right)}
\end{array}
Initial program 44.7%
*-commutative44.7%
associate-*l*43.5%
associate-*r*43.5%
+-commutative43.5%
associate-+r+43.5%
metadata-eval43.5%
Simplified43.5%
Taylor expanded in k around inf 71.5%
unpow271.5%
times-frac88.1%
unpow288.1%
Simplified88.1%
Taylor expanded in k around 0 76.0%
unpow269.7%
Simplified76.0%
pow176.0%
*-commutative76.0%
div-inv76.0%
associate-*r*76.0%
*-commutative76.0%
un-div-inv76.0%
Applied egg-rr76.0%
unpow176.0%
associate-*l*76.0%
Simplified76.0%
Final simplification76.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (* (* k k) (* (/ t l) (/ k (/ l k))))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / ((k * k) * ((t / l) * (k / (l / k))));
}
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 / ((k * k) * ((t / l) * (k / (l / k))))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / ((k * k) * ((t / l) * (k / (l / k))));
}
k = abs(k) def code(t, l, k): return 2.0 / ((k * k) * ((t / l) * (k / (l / k))))
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(t / l) * Float64(k / Float64(l / k))))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / ((k * k) * ((t / l) * (k / (l / k)))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{\left(k \cdot k\right) \cdot \left(\frac{t}{\ell} \cdot \frac{k}{\frac{\ell}{k}}\right)}
\end{array}
Initial program 44.7%
*-commutative44.7%
associate-*l*43.5%
associate-*r*43.5%
+-commutative43.5%
associate-+r+43.5%
metadata-eval43.5%
Simplified43.5%
Taylor expanded in k around inf 71.5%
unpow271.5%
times-frac88.1%
unpow288.1%
Simplified88.1%
Taylor expanded in k around 0 76.0%
unpow269.7%
Simplified76.0%
add-log-exp51.8%
exp-prod51.7%
associate-/l*51.7%
Applied egg-rr51.7%
log-pow54.1%
rem-log-exp76.0%
Simplified76.0%
Final simplification76.0%
herbie shell --seed 2023278
(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))))