Problem
Let $a\in\mathbb{C}$ , $|a|=1$ and $c\in\mathbb{R}$. Let us assume that $\exists{n\in\mathbb{N}} \;\; a=\exp(c i n)$
Find the value of smallest possible $n\in\mathbb{N}$.
Background
I am working on a computer program where the value of $a$ is generated by substituting some $n$ into the expression. Now I would like to revert the process and find out what was the value of $n$ when I am given only $a$ itself, or actually its floating representation .
Assume $c\neq 0.$
Since $a=e^{i\theta},$ we are looking for $n$ satisfying $\;{cn}={\theta}.$ If such $n$ exists, then any $$n+\frac{2\pi k}{c},\quad k\in\mathbb{Z}$$ satisfies, as $$e^{ic(n+2\pi k/c)}=e^{icn}=e^{i\theta}=a.$$