How can I calculate this limit? $\lim _{ m\rightarrow \infty  }{ \left( \lim _{ n\rightarrow \infty  }{ \cos ^{ 2n }{ \left( \pi m!x \right)  }  }  \right)  } $
Attempt :  since $\cos ^{ 2 }{ x=\frac { 1+cos2x }{ 2 }  } $ so we can write $$\lim _{ m\rightarrow \infty  }{ \left( \lim _{ n\rightarrow \infty  }{ \cos ^{ 2n }{ \left( \pi m!x \right)  }  }  \right)  } =\lim _{ m\rightarrow \infty  }{ \left( \lim _{ n\rightarrow \infty  }{ \frac { \left( 1+cos\left( 2\pi m!x \right)  \right) ^{ n } }{ 2^{ n } }  }  \right)  } $$ 
then i applied Teylor expansion for $cos\left( 2\pi m!x \right)$
$$cox\left( 2\pi m!x \right) =1-\frac { \left( 2\pi m!x \right) ^{ 2 } }{ 2! } +o\left( \frac { \left( 2\pi m!x \right) ^{ 4 } }{ 4! }  \right)   $$ 
but this way seems me very long,how can i proceed?
Thanks in advance!

Let 
\begin{equation*}
f_{m}(x)=\lim_{n\rightarrow \infty }(\cos m!\pi x)^{2n}.
\end{equation*}
Note that for $m$ fixed, $f_{m}(x)$ is the limit of geometric sequence, $%
r^{n}$ with 
\begin{equation*}
r=(\cos m!\pi x)^{2}\in \lbrack 0,1].
\end{equation*}
If $r=1,$ the limit of the geometric sequence $(r^{n})$ is $1,$ otherwise,
the limit is $0.$ So when $m!x$ is an integer $f_{m}(x)=1,$ and otherwise
(when $m!x$ is not integer) $f_{m}(x)=0.$ Now let 
\begin{equation*}
f(x)=\lim_{m\rightarrow \infty }f_{m}(x).
\end{equation*}
Let us discuss when $x$ is rational or is irrational. If $x$ is irrational,
then 
\begin{equation*}
(\cos m!\pi x)^{2}\neq 1
\end{equation*}
and then $f(x)=0.$ If $x$ is rational, say $x=\frac{a}{b}$ with $a$ and $b$
integers. We have 
\begin{equation*}
m!x=\frac{m!a}{b}=\frac{1\times 2\times \cdots \times m\times a}{b}.
\end{equation*}
If $m\geq b$ then $f(x)=1.$ It follows that 
\begin{equation*}
\lim_{m\rightarrow \infty }\lim_{n\rightarrow \infty }(\cos m!\pi x)^{2n}=0
\end{equation*}
if $x$ is irrational 
\begin{equation*}
\lim_{m\rightarrow \infty }\lim_{n\rightarrow \infty }(\cos m!\pi x)^{2n}=1
\end{equation*}
if $x$ is instead rational.
